diff --git a/Cargo.lock b/Cargo.lock index dcc77df9ce..b55770eece 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,19 +52,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", @@ -117,9 +117,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -146,9 +146,9 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a318f1f38d2418400f8209655bfd825785afd25aa30bb7ba6cc792e4596748" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ "windows-sys 0.52.0", ] @@ -165,9 +165,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "ark-bls12-377" @@ -344,7 +344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ "concurrent-queue", - "event-listener 4.0.0", + "event-listener 4.0.3", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -356,7 +356,7 @@ 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", @@ -370,25 +370,25 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd1f344136bad34df1f83a47f3fd7f2ab85d75cb8a940af4ccf6d482a84ea01b" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "blocking", "futures-lite", ] [[package]] name = "async-io" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff" +checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite", "parking", "polling", - "rustix 0.38.26", + "rustix 0.38.28", "slab", "tracing", "windows-sys 0.52.0", @@ -405,11 +405,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.0", + "event-listener 4.0.3", "event-listener-strategy", "pin-project-lite", ] @@ -433,13 +433,13 @@ checksum = "15c1cd5d253ecac3d3cf15e390fd96bd92a13b1d14497d81abf077304794fb04" dependencies = [ "async-channel", "async-io", - "async-lock 3.2.0", + "async-lock 3.3.0", "async-signal", "blocking", "cfg-if", - "event-listener 4.0.0", + "event-listener 4.0.3", "futures-lite", - "rustix 0.38.26", + "rustix 0.38.28", "windows-sys 0.52.0", ] @@ -455,7 +455,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.26", + "rustix 0.38.28", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -463,15 +463,15 @@ dependencies = [ [[package]] name = "async-task" -version = "4.5.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", @@ -518,7 +518,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.1", + "object 0.32.2", "rustc-demangle", ] @@ -536,9 +536,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" [[package]] name = "base64ct" @@ -548,9 +548,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f2139706359229bfa8f19142ac1155b4b80beafb7a60471ac5dd109d4a19778" +checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" dependencies = [ "serde", ] @@ -692,7 +692,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel", - "async-lock 3.2.0", + "async-lock 3.3.0", "async-task", "fastrand", "futures-io", @@ -847,9 +847,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.13" +version = "4.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52bdc885e4cacc7f7c9eedc1ef6da641603180c783c41a15c264944deeaab642" +checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2" dependencies = [ "clap_builder", "clap_derive", @@ -857,9 +857,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.12" +version = "4.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370" dependencies = [ "anstream", "anstyle", @@ -947,9 +947,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" @@ -1002,9 +1002,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", ] @@ -1065,46 +1065,37 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1301,12 +1292,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "digest" version = "0.8.1" @@ -1458,9 +1443,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -1473,15 +1458,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 4.0.0", + "event-listener 4.0.3", "pin-project-lite", ] [[package]] name = "eyre" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd" +checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" dependencies = [ "indenter", "once_cell", @@ -1618,9 +1603,9 @@ checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[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", "futures-core", @@ -1721,9 +1706,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", @@ -1872,7 +1857,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]] @@ -1881,7 +1866,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "allocator-api2", "serde", ] @@ -1955,11 +1940,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1975,9 +1960,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1998,9 +1983,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -2013,7 +1998,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2", "tokio", "tower-service", "tracing", @@ -2038,9 +2023,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", @@ -2224,9 +2209,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" @@ -2345,9 +2330,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libm" @@ -2460,9 +2445,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" @@ -2470,7 +2455,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.26", + "rustix 0.38.28", ] [[package]] @@ -2482,15 +2467,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "memory-db" version = "0.32.0" @@ -2664,18 +2640,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" @@ -2860,9 +2836,9 @@ dependencies = [ [[package]] name = "platforms" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "plotters" @@ -2901,7 +2877,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.26", + "rustix 0.38.28", "tracing", "windows-sys 0.52.0", ] @@ -2923,16 +2899,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi", -] - [[package]] name = "primitive-types" version = "0.12.2" @@ -3082,7 +3048,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]] @@ -3125,18 +3091,18 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", @@ -3194,7 +3160,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", "untrusted", @@ -3244,9 +3210,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.26" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9470c4bf8246c8daf25f9598dca807fb6510347b1e1cfa55749113850c79d88a" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.1", "errno", @@ -3257,9 +3223,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring", @@ -3285,7 +3251,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", ] [[package]] @@ -3317,9 +3283,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -3423,6 +3389,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "scale-typegen" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00860983481ac590ac87972062909bef0d6a658013b592ccc0f2feb272feab11" +dependencies = [ + "proc-macro2", + "quote", + "scale-info", + "syn 2.0.48", + "thiserror", +] + [[package]] name = "scale-value" version = "0.13.0" @@ -3445,11 +3424,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3458,7 +3437,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", ] @@ -3586,9 +3565,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" [[package]] name = "send_wrapper" @@ -3613,9 +3592,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.12" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] @@ -3633,9 +3612,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", @@ -3759,7 +3738,7 @@ dependencies = [ "async-executor", "async-fs", "async-io", - "async-lock 3.2.0", + "async-lock 3.3.0", "async-net", "async-process", "blocking", @@ -3773,9 +3752,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d1eaa97d77be4d026a1e7ffad1bb3b78448763b357ea6f8188d3e6f736a9b9" dependencies = [ "arrayvec 0.7.4", - "async-lock 3.2.0", + "async-lock 3.3.0", "atomic-take", - "base64 0.21.5", + "base64 0.21.6", "bip39", "blake2-rfc", "bs58", @@ -3784,7 +3763,7 @@ dependencies = [ "derive_more", "ed25519-zebra 4.0.3", "either", - "event-listener 4.0.0", + "event-listener 4.0.3", "fnv", "futures-lite", "futures-util", @@ -3828,12 +3807,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5496f2d116b7019a526b1039ec2247dd172b8670633b1a64a614c9ea12c9d8c7" dependencies = [ "async-channel", - "async-lock 3.2.0", - "base64 0.21.5", + "async-lock 3.3.0", + "base64 0.21.6", "blake2-rfc", "derive_more", "either", - "event-listener 4.0.0", + "event-listener 4.0.3", "fnv", "futures-channel", "futures-lite", @@ -3857,16 +3836,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.5" @@ -4183,7 +4152,7 @@ version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9c4bf89a5bd74f696cd1f23d83bb6abe6bd0abad1f3c70d4b0d7ebec4098cfe" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "hash-db", "hashbrown 0.13.2", "lazy_static", @@ -4250,9 +4219,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", @@ -4339,7 +4308,7 @@ dependencies = [ "either", "frame-metadata 16.0.0", "futures", - "getrandom 0.2.11", + "getrandom 0.2.12", "hex", "impl-serde", "jsonrpsee", @@ -4372,7 +4341,7 @@ dependencies = [ name = "subxt-cli" version = "0.33.0" dependencies = [ - "clap 4.4.13", + "clap 4.4.14", "color-eyre", "frame-metadata 16.0.0", "hex", @@ -4395,17 +4364,16 @@ dependencies = [ name = "subxt-codegen" version = "0.33.0" dependencies = [ - "bitvec", "frame-metadata 16.0.0", - "getrandom 0.2.11", + "getrandom 0.2.12", "heck", "hex", "jsonrpsee", "parity-scale-codec", - "pretty_assertions", "proc-macro2", "quote", "scale-info", + "scale-typegen", "subxt-metadata", "syn 2.0.48", "thiserror", @@ -4420,7 +4388,7 @@ dependencies = [ "futures", "futures-timer", "futures-util", - "getrandom 0.2.11", + "getrandom 0.2.12", "instant", "js-sys", "pin-project", @@ -4468,7 +4436,7 @@ name = "subxt-signer" version = "0.33.0" dependencies = [ "bip39", - "getrandom 0.2.11", + "getrandom 0.2.12", "hex", "hmac 0.12.1", "parity-scale-codec", @@ -4516,9 +4484,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[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 = "termcolor" @@ -4552,18 +4520,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.53" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2cd5904763bad08ad5513ddbb12cf2ae273ca53fa9f68e843e236ec6dfccc09" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.53" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcf4a824cce0aeacd6f38ae6f24234c8e80d68632338ebaa1443b5df9e29e19" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", @@ -4617,7 +4585,7 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] @@ -4859,15 +4827,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419ecd263363827c5730386f418715766f584e2f874d32c23c5b00bd9727e7e" +checksum = "76de4f783e610194f6c98bfd53f9fc52bb2e0d02c947621e8a0f4ecc799b2880" dependencies = [ "basic-toml", "glob 0.3.1", @@ -4924,9 +4892,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -5298,7 +5266,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset", "paste", "rand 0.8.5", "rustix 0.36.17", @@ -5339,7 +5307,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.26", + "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -5376,11 +5344,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]] @@ -5583,9 +5551,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.25" +version = "0.5.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e87b8dfbe3baffbe687eef2e164e32286eff31a5ee16463ce03d991643ec94" +checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" dependencies = [ "memchr", ] @@ -5611,12 +5579,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "yap" version = "0.11.0" diff --git a/Cargo.toml b/Cargo.toml index 1aab4d59a8..4901889e2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,13 +17,7 @@ members = [ # We exclude any crates that would depend on non mutually # exclusive feature flags and thus can't compile with the # workspace: -exclude = [ - "testing/wasm-rpc-tests", - "testing/wasm-lightclient-tests", - "signer/wasm-tests", - "examples/wasm-example", - "examples/parachain-example" -] +exclude = ["testing/wasm-rpc-tests", "testing/wasm-lightclient-tests", "signer/wasm-tests", "examples/wasm-example", "examples/parachain-example"] resolver = "2" [workspace.package] @@ -100,6 +94,8 @@ url = "2.5.0" wabt = "0.10.0" wasm-bindgen-test = "0.3.24" which = "5.0.0" +scale-typegen-description = "0.1.0" +scale-typegen = "0.1.1" # Light client support: smoldot = { version = "0.16.0", default-features = false } diff --git a/cli/src/commands/codegen.rs b/cli/src/commands/codegen.rs index fa9b5d889d..1e5d0d7b78 100644 --- a/cli/src/commands/codegen.rs +++ b/cli/src/commands/codegen.rs @@ -173,7 +173,8 @@ fn codegen( .map_err(|e| eyre!("Cannot parse derive for type {ty_str}: {e}"))?; let derive = syn::parse_str(&derive) .map_err(|e| eyre!("Cannot parse derive for type {ty_str}: {e}"))?; - codegen.add_derives_for_type(ty, std::iter::once(derive)); + // Note: recursive derives and attributes not supported in the CLI => recursive: false + codegen.add_derives_for_type(ty, std::iter::once(derive), false); } // Configure attribtues: @@ -190,7 +191,8 @@ fn codegen( .map_err(|e| eyre!("Cannot parse attribute for type {ty_str}: {e}"))?; let attribute: OuterAttribute = syn::parse_str(&attr) .map_err(|e| eyre!("Cannot parse attribute for type {ty_str}: {e}"))?; - codegen.add_attributes_for_type(ty, std::iter::once(attribute.0)); + // Note: recursive derives and attributes not supported in the CLI => recursive: false + codegen.add_attributes_for_type(ty, std::iter::once(attribute.0), false); } // Insert type substitutions: diff --git a/cli/src/commands/diff.rs b/cli/src/commands/diff.rs index 02dd50d1be..bc7f4c79ea 100644 --- a/cli/src/commands/diff.rs +++ b/cli/src/commands/diff.rs @@ -228,11 +228,11 @@ impl StorageEntryDiff { let value_1_ty_id = storage_entry_1.entry_type().value_ty(); let value_1_hash = metadata_1 .type_hash(value_1_ty_id) - .expect("type should be present"); + .expect("type is in metadata; qed"); let value_2_ty_id = storage_entry_2.entry_type().value_ty(); let value_2_hash = metadata_1 .type_hash(value_2_ty_id) - .expect("type should be present"); + .expect("type is in metadata; qed"); let value_different = value_1_hash != value_2_hash; let key_1_hash = storage_entry_1 @@ -241,7 +241,7 @@ impl StorageEntryDiff { .map(|key_ty| { metadata_1 .type_hash(key_ty) - .expect("type should be present") + .expect("type is in metadata; qed") }) .unwrap_or_default(); let key_2_hash = storage_entry_2 @@ -250,7 +250,7 @@ impl StorageEntryDiff { .map(|key_ty| { metadata_2 .type_hash(key_ty) - .expect("type should be present") + .expect("type is in metadata; qed") }) .unwrap_or_default(); let key_different = key_1_hash != key_2_hash; @@ -309,12 +309,12 @@ fn storage_differences<'a>( |e| { pallet_metadata_1 .storage_hash(e.name()) - .expect("storage entry should be present") + .expect("storage entry is in metadata; qed") }, |e| { pallet_metadata_2 .storage_hash(e.name()) - .expect("storage entry should be present") + .expect("storage entry is in metadata; qed") }, |e| e.name(), ) @@ -330,12 +330,12 @@ fn calls_differences<'a>( |e| { pallet_metadata_1 .call_hash(&e.name) - .expect("call should be present") + .expect("call is in metadata; qed") }, |e| { pallet_metadata_2 .call_hash(&e.name) - .expect("call should be present") + .expect("call is in metadata; qed") }, |e| &e.name, ); @@ -351,12 +351,12 @@ fn constants_differences<'a>( |e| { pallet_metadata_1 .constant_hash(e.name()) - .expect("constant should be present") + .expect("constant is in metadata; qed") }, |e| { pallet_metadata_2 .constant_hash(e.name()) - .expect("constant should be present") + .expect("constant is in metadata; qed") }, |e| e.name(), ) diff --git a/cli/src/commands/explore/mod.rs b/cli/src/commands/explore/mod.rs index 31fd365ce0..cd033f3dc7 100644 --- a/cli/src/commands/explore/mod.rs +++ b/cli/src/commands/explore/mod.rs @@ -142,7 +142,7 @@ pub async fn run(opts: Opts, output: &mut impl std::io::Write) -> color_eyre::Re explore_constants(command, &metadata, pallet_metadata, output) } PalletSubcommand::Storage(command) => { - // if the metadata came from some url, we use that same url to make storage calls against. + // if the metadata is in some url, we use that same url to make storage calls against. let node_url = opts.file_or_url.url.map(|url| url.to_string()); explore_storage(command, &metadata, pallet_metadata, node_url, output).await } diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index aae5ffec34..666c52142d 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -31,12 +31,10 @@ jsonrpsee = { workspace = true, features = ["async-client", "client-ws-transport hex = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread"], optional = true } thiserror = { workspace = true } +scale-typegen = { workspace = true } # Included if "web" feature is enabled, to enable its js feature. getrandom = { workspace = true, optional = true } [dev-dependencies] -bitvec = { workspace = true } scale-info = { workspace = true, features = ["bit-vec"] } -pretty_assertions = { workspace = true } -frame-metadata = { workspace = true } diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index a095727c31..1eaf6fac9a 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -3,10 +3,10 @@ // see LICENSE for license details. use super::CodegenError; -use crate::types::{CompositeDefFields, TypeGenerator}; use heck::{ToSnakeCase as _, ToUpperCamelCase as _}; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; +use scale_typegen::{typegen::ir::type_ir::CompositeIRKind, TypeGenerator}; use subxt_metadata::PalletMetadata; /// Generate calls from the provided pallet's metadata. Each call returns a `StaticTxPayload` @@ -14,81 +14,69 @@ use subxt_metadata::PalletMetadata; /// /// # Arguments /// -/// - `metadata` - Runtime metadata from which the calls are generated. -/// - `type_gen` - The type generator containing all types defined by metadata. +/// - `type_gen` - [`scale_typegen::TypeGenerator`] that contains settings and all types from the runtime metadata. /// - `pallet` - Pallet metadata from which the calls are generated. -/// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from. +/// - `crate_path` - The crate path under which subxt is located, e.g. `::subxt` when using subxt as a dependency. pub fn generate_calls( type_gen: &TypeGenerator, pallet: &PalletMetadata, - types_mod_ident: &syn::Ident, crate_path: &syn::Path, - should_gen_docs: bool, ) -> Result { // Early return if the pallet has no calls. let Some(call_ty) = pallet.call_ty_id() else { return Ok(quote!()); }; - let mut struct_defs = super::generate_structs_from_variants( + let variant_names_and_struct_defs = super::generate_structs_from_variants( type_gen, - types_mod_ident, call_ty, |name| name.to_upper_camel_case().into(), "Call", - crate_path, - should_gen_docs, )?; - - let result = struct_defs - .iter_mut() - .map(|(variant_name, struct_def, aliases)| { - let fn_name = format_ident!("{}", variant_name.to_snake_case()); - - let result: Vec<_> = match struct_def.fields { - CompositeDefFields::Named(ref named_fields) => named_fields + let (call_structs, call_fns): (Vec<_>, Vec<_>) = variant_names_and_struct_defs + .into_iter() + .map(|var| { + let (call_fn_args, call_args): (Vec<_>, Vec<_>) = match &var.composite.kind { + CompositeIRKind::Named(named_fields) => named_fields .iter() .map(|(name, field)| { - let call_arg = if field.is_boxed() { + // Note: fn_arg_type this is relative the type path of the type alias when prefixed with `types::`, e.g. `set_max_code_size::New` + let fn_arg_type = &field.type_path; + let call_arg = if field.is_boxed { quote! { #name: ::std::boxed::Box::new(#name) } } else { quote! { #name } }; - - let alias_name = - format_ident!("{}", name.to_string().to_upper_camel_case()); - - (quote!( #name: types::#fn_name::#alias_name ), call_arg) + (quote!( #name: types::#fn_arg_type ), call_arg) }) - .collect(), - CompositeDefFields::NoFields => Default::default(), - CompositeDefFields::Unnamed(_) => { + .unzip(), + CompositeIRKind::NoFields => Default::default(), + CompositeIRKind::Unnamed(_) => { return Err(CodegenError::InvalidCallVariant(call_ty)) } }; - let call_fn_args = result.iter().map(|(call_fn_arg, _)| call_fn_arg); - let call_args = result.iter().map(|(_, call_arg)| call_arg); - let pallet_name = pallet.name(); - let call_name = &variant_name; - let struct_name = &struct_def.name; + let call_name = &var.variant_name; + let struct_name = &var.composite.name; let Some(call_hash) = pallet.call_hash(call_name) else { return Err(CodegenError::MissingCallMetadata( pallet_name.into(), call_name.to_string(), )); }; - + let fn_name = format_ident!("{}", var.variant_name.to_snake_case()); // Propagate the documentation just to `TransactionApi` methods, while // draining the documentation of inner call structures. - let docs = should_gen_docs.then_some(struct_def.docs.take()).flatten(); + let docs = &var.composite.docs; + // this converts the composite into a full struct type. No Type Parameters needed here. + let struct_def = type_gen.upcast_composite(&var.composite); + let alias_mod = var.type_alias_mod; // The call structure's documentation was stripped above. let call_struct = quote! { #struct_def - - #aliases + #alias_mod impl #crate_path::blocks::StaticExtrinsic for #struct_name { const PALLET: &'static str = #pallet_name; @@ -113,17 +101,15 @@ pub fn generate_calls( Ok((call_struct, client_fn)) }) - .collect::, _>>()?; + .collect::, _>>()? + .into_iter() + .unzip(); - let call_structs = result.iter().map(|(call_struct, _)| call_struct); - let call_fns = result.iter().map(|(_, client_fn)| client_fn); + let call_type = type_gen.resolve_type_path(call_ty)?; + let call_ty = type_gen.resolve_type(call_ty)?; + let docs = type_gen.docs_from_scale_info(&call_ty.docs); - let call_type = type_gen.resolve_type_path(call_ty); - let call_ty = type_gen.resolve_type(call_ty); - let docs = &call_ty.docs; - let docs = should_gen_docs - .then_some(quote! { #( #[doc = #docs ] )* }) - .unwrap_or_default(); + let types_mod_ident = type_gen.types_mod_ident(); Ok(quote! { #docs diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index 31fa7526c4..30bd93484e 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -2,10 +2,10 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::types::TypeGenerator; use heck::ToSnakeCase as _; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; +use scale_typegen::TypeGenerator; use subxt_metadata::PalletMetadata; use super::CodegenError; @@ -29,16 +29,13 @@ use super::CodegenError; /// /// # Arguments /// -/// - `metadata` - Runtime metadata from which the calls are generated. -/// - `type_gen` - The type generator containing all types defined by metadata -/// - `pallet` - Pallet metadata from which the calls are generated. -/// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from. +/// - `type_gen` - [`scale_typegen::TypeGenerator`] that contains settings and all types from the runtime metadata. +/// - `pallet` - Pallet metadata from which the constants are generated. +/// - `crate_path` - The crate path under which subxt is located, e.g. `::subxt` when using subxt as a dependency. pub fn generate_constants( type_gen: &TypeGenerator, pallet: &PalletMetadata, - types_mod_ident: &syn::Ident, crate_path: &syn::Path, - should_gen_docs: bool, ) -> Result { // Early return if the pallet has no constants. if pallet.constants().len() == 0 { @@ -58,9 +55,11 @@ pub fn generate_constants( )); }; - let return_ty = type_gen.resolve_type_path(constant.ty()); + let return_ty = type_gen.resolve_type_path(constant.ty())?; let docs = constant.docs(); - let docs = should_gen_docs + let docs = type_gen + .settings() + .should_gen_docs .then_some(quote! { #( #[doc = #docs ] )* }) .unwrap_or_default(); @@ -77,6 +76,8 @@ pub fn generate_constants( }) .collect::, _>>()?; + let types_mod_ident = type_gen.types_mod_ident(); + Ok(quote! { pub mod constants { use super::#types_mod_ident; diff --git a/codegen/src/api/custom_values.rs b/codegen/src/api/custom_values.rs index 1ef1381e19..a528071474 100644 --- a/codegen/src/api/custom_values.rs +++ b/codegen/src/api/custom_values.rs @@ -2,10 +2,9 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use std::collections::HashSet; - -use crate::types::TypeGenerator; use heck::ToSnakeCase as _; +use scale_typegen::TypeGenerator; +use std::collections::HashSet; use subxt_metadata::{CustomValueMetadata, Metadata}; use proc_macro2::TokenStream as TokenStream2; @@ -60,6 +59,7 @@ fn generate_custom_value_fn( let (return_ty, decodable) = if type_is_valid { let return_ty = type_gen .resolve_type_path(custom_value.type_id()) + .expect("type is in metadata; qed") .to_token_stream(); let decodable = quote!(#crate_path::custom_values::Yes); (return_ty, decodable) diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index 6a7503699e..38cbca7479 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -4,26 +4,26 @@ use proc_macro2::TokenStream as TokenStream2; use quote::quote; +use scale_typegen::TypeGenerator; use subxt_metadata::PalletMetadata; -use crate::types::TypeGenerator; - use super::CodegenError; /// Generate error type alias from the provided pallet metadata. pub fn generate_error_type_alias( type_gen: &TypeGenerator, pallet: &PalletMetadata, - should_gen_docs: bool, ) -> Result { let Some(error_ty) = pallet.error_ty_id() else { return Ok(quote!()); }; - let error_type = type_gen.resolve_type_path(error_ty); - let error_ty = type_gen.resolve_type(error_ty); + let error_type = type_gen.resolve_type_path(error_ty)?; + let error_ty = type_gen.resolve_type(error_ty)?; let docs = &error_ty.docs; - let docs = should_gen_docs + let docs = type_gen + .settings() + .should_gen_docs .then_some(quote! { #( #[doc = #docs ] )* }) .unwrap_or_default(); Ok(quote! { diff --git a/codegen/src/api/events.rs b/codegen/src/api/events.rs index f2d086870e..445d66424c 100644 --- a/codegen/src/api/events.rs +++ b/codegen/src/api/events.rs @@ -2,9 +2,9 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::types::TypeGenerator; use proc_macro2::TokenStream as TokenStream2; use quote::quote; +use scale_typegen::TypeGenerator; use subxt_metadata::PalletMetadata; use super::CodegenError; @@ -35,55 +35,48 @@ use super::CodegenError; /// /// # Arguments /// -/// - `type_gen` - The type generator containing all types defined by metadata. +/// - `type_gen` - [`scale_typegen::TypeGenerator`] that contains settings and all types from the runtime metadata. /// - `pallet` - Pallet metadata from which the events are generated. -/// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from. +/// - `crate_path` - The crate path under which subxt is located, e.g. `::subxt` when using subxt as a dependency. pub fn generate_events( type_gen: &TypeGenerator, pallet: &PalletMetadata, - types_mod_ident: &syn::Ident, crate_path: &syn::Path, - should_gen_docs: bool, ) -> Result { // Early return if the pallet has no events. let Some(event_ty) = pallet.event_ty_id() else { return Ok(quote!()); }; - let struct_defs = super::generate_structs_from_variants( - type_gen, - types_mod_ident, - event_ty, - |name| name.into(), - "Event", - crate_path, - should_gen_docs, - )?; + let variant_names_and_struct_defs = + super::generate_structs_from_variants(type_gen, event_ty, |name| name.into(), "Event")?; - let event_structs = struct_defs - .iter() - .map(|(variant_name, struct_def, aliases)| { - let pallet_name = pallet.name(); - let event_struct = &struct_def.name; - let event_name = variant_name; + let event_structs = variant_names_and_struct_defs.into_iter().map(|var| { + let pallet_name = pallet.name(); + let event_struct_name = &var.composite.name; + let event_name = var.variant_name; + let alias_mod = var.type_alias_mod; + let struct_def = type_gen.upcast_composite(&var.composite); + quote! { + #struct_def + #alias_mod - quote! { - #struct_def - - #aliases - - impl #crate_path::events::StaticEvent for #event_struct { - const PALLET: &'static str = #pallet_name; - const EVENT: &'static str = #event_name; - } + impl #crate_path::events::StaticEvent for #event_struct_name { + const PALLET: &'static str = #pallet_name; + const EVENT: &'static str = #event_name; } - }); - let event_type = type_gen.resolve_type_path(event_ty); - let event_ty = type_gen.resolve_type(event_ty); + } + }); + + let event_type = type_gen.resolve_type_path(event_ty)?; + let event_ty = type_gen.resolve_type(event_ty)?; let docs = &event_ty.docs; - let docs = should_gen_docs + let docs = type_gen + .settings() + .should_gen_docs .then_some(quote! { #( #[doc = #docs ] )* }) .unwrap_or_default(); + let types_mod_ident = type_gen.types_mod_ident(); Ok(quote! { #docs diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index f87ffee2ad..df6c43b0a1 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -12,20 +12,20 @@ mod events; mod runtime_apis; mod storage; +use scale_typegen::typegen::ir::type_ir::{CompositeFieldIR, CompositeIR, CompositeIRKind}; +use scale_typegen::typegen::type_params::TypeParameters; +use scale_typegen::typegen::type_path::TypePath; +use scale_typegen::TypeGenerator; use subxt_metadata::Metadata; +use syn::{parse_quote, Ident}; -use crate::api::custom_values::generate_custom_values; use crate::error::CodegenError; -use crate::types::DerivesRegistry; -use crate::{ - ir, - types::{CompositeDef, CompositeDefFields, TypeGenerator, TypeSubstitutes}, -}; +use crate::subxt_type_gen_settings; +use crate::{api::custom_values::generate_custom_values, ir}; -use heck::ToSnakeCase as _; +use heck::{ToSnakeCase as _, ToUpperCamelCase}; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; -use syn::parse_quote; /// Create the API for interacting with a Substrate runtime. pub struct RuntimeGenerator { @@ -60,26 +60,21 @@ impl RuntimeGenerator { pub fn generate_runtime_types( &self, item_mod: syn::ItemMod, - derives: DerivesRegistry, - type_substitutes: TypeSubstitutes, + derives: scale_typegen::DerivesRegistry, + type_substitutes: scale_typegen::TypeSubstitutes, crate_path: syn::Path, should_gen_docs: bool, ) -> Result { let item_mod_attrs = item_mod.attrs.clone(); - let item_mod_ir = ir::ItemMod::try_from(item_mod)?; - let mod_ident = &item_mod_ir.ident; - let rust_items = item_mod_ir.rust_items(); - let type_gen = TypeGenerator::new( - self.metadata.types(), - "runtime_types", - type_substitutes, - derives, - crate_path, - should_gen_docs, - ); + let settings = + subxt_type_gen_settings(derives, type_substitutes, &crate_path, should_gen_docs); + + let type_gen = TypeGenerator::new(self.metadata.types(), &settings); let types_mod = type_gen.generate_types_mod()?; + let mod_ident = &item_mod_ir.ident; + let rust_items = item_mod_ir.rust_items(); Ok(quote! { #( #item_mod_attrs )* @@ -114,24 +109,20 @@ impl RuntimeGenerator { pub fn generate_runtime( &self, item_mod: syn::ItemMod, - derives: DerivesRegistry, - type_substitutes: TypeSubstitutes, + derives: scale_typegen::DerivesRegistry, + type_substitutes: scale_typegen::TypeSubstitutes, crate_path: syn::Path, should_gen_docs: bool, ) -> Result { let item_mod_attrs = item_mod.attrs.clone(); let item_mod_ir = ir::ItemMod::try_from(item_mod)?; - let type_gen = TypeGenerator::new( - self.metadata.types(), - "runtime_types", - type_substitutes, - derives, - crate_path.clone(), - should_gen_docs, - ); + let settings = + subxt_type_gen_settings(derives, type_substitutes, &crate_path, should_gen_docs); + + let type_gen = TypeGenerator::new(self.metadata.types(), &settings); let types_mod = type_gen.generate_types_mod()?; - let types_mod_ident = types_mod.ident(); + let types_mod_ident = type_gen.types_mod_ident(); let pallets_with_mod_names = self .metadata .pallets() @@ -165,39 +156,15 @@ impl RuntimeGenerator { let modules = pallets_with_mod_names .iter() .map(|(pallet, mod_name)| { - let calls = calls::generate_calls( - &type_gen, - pallet, - types_mod_ident, - &crate_path, - should_gen_docs, - )?; + let calls = calls::generate_calls(&type_gen, pallet, &crate_path)?; - let event = events::generate_events( - &type_gen, - pallet, - types_mod_ident, - &crate_path, - should_gen_docs, - )?; + let event = events::generate_events(&type_gen, pallet, &crate_path)?; - let storage_mod = storage::generate_storage( - &type_gen, - pallet, - types_mod_ident, - &crate_path, - should_gen_docs, - )?; + let storage_mod = storage::generate_storage(&type_gen, pallet, &crate_path)?; - let constants_mod = constants::generate_constants( - &type_gen, - pallet, - types_mod_ident, - &crate_path, - should_gen_docs, - )?; + let constants_mod = constants::generate_constants(&type_gen, pallet, &crate_path)?; - let errors = errors::generate_error_type_alias(&type_gen, pallet, should_gen_docs)?; + let errors = errors::generate_error_type_alias(&type_gen, pallet)?; Ok(quote! { pub mod #mod_name { @@ -242,14 +209,14 @@ impl RuntimeGenerator { &type_gen, types_mod_ident, &crate_path, - should_gen_docs, )?; // Fetch the paths of the outer enums. // Substrate exposes those under `kitchensink_runtime`, while Polkadot under `polkadot_runtime`. - let call_path = type_gen.resolve_type_path(self.metadata.outer_enums().call_enum_ty()); - let event_path = type_gen.resolve_type_path(self.metadata.outer_enums().event_enum_ty()); - let error_path = type_gen.resolve_type_path(self.metadata.outer_enums().error_enum_ty()); + + let call_path = type_gen.resolve_type_path(self.metadata.outer_enums().call_enum_ty())?; + let event_path = type_gen.resolve_type_path(self.metadata.outer_enums().event_enum_ty())?; + let error_path = type_gen.resolve_type_path(self.metadata.outer_enums().error_enum_ty())?; let custom_values = generate_custom_values(&self.metadata, &type_gen, &crate_path); @@ -358,17 +325,14 @@ impl RuntimeGenerator { /// Return a vector of tuples of variant names and corresponding struct definitions. pub fn generate_structs_from_variants( type_gen: &TypeGenerator, - types_mod_ident: &syn::Ident, type_id: u32, variant_to_struct_name: F, error_message_type_name: &str, - crate_path: &syn::Path, - should_gen_docs: bool, -) -> Result, CodegenError> +) -> Result, CodegenError> where F: Fn(&str) -> std::borrow::Cow, { - let ty = type_gen.resolve_type(type_id); + let ty = type_gen.resolve_type(type_id)?; let scale_info::TypeDef::Variant(variant) = &ty.type_def else { return Err(CodegenError::InvalidType(error_message_type_name.into())); @@ -378,84 +342,91 @@ where .variants .iter() .map(|var| { + let mut type_params = TypeParameters::from_scale_info(&[]); + let composite_ir_kind = + type_gen.create_composite_ir_kind(&var.fields, &mut type_params)?; let struct_name = variant_to_struct_name(&var.name); - - let fields = CompositeDefFields::from_scale_info_fields( - struct_name.as_ref(), - &var.fields, - &[], - type_gen, - )?; - - let alias_module_name = format_ident!("{}", var.name.to_snake_case()); - - let docs = should_gen_docs.then_some(&*var.docs).unwrap_or_default(); - let struct_def = CompositeDef::struct_def( - &ty, - struct_name.as_ref(), - Default::default(), - fields.clone(), - Some(parse_quote!(pub)), - type_gen, - docs, - crate_path, - Some(alias_module_name.clone()), - )?; - - let type_aliases = TypeAliases::new(fields, types_mod_ident.clone(), alias_module_name); - - Ok((var.name.to_string(), struct_def, type_aliases)) + let mut composite = CompositeIR::new( + syn::parse_str(&struct_name).expect("enum variant is a valid ident; qed"), + composite_ir_kind, + type_gen.docs_from_scale_info(&var.docs), + ); + + let type_alias_mod = generate_type_alias_mod(&mut composite, type_gen); + Ok(StructFromVariant { + variant_name: var.name.to_string(), + composite, + type_alias_mod, + }) }) .collect() } -/// Generate the type aliases from a set of enum / struct definitions. -/// -/// The type aliases are used to make the generated code more readable. -#[derive(Debug)] -pub struct TypeAliases { - fields: CompositeDefFields, - types_mod_ident: syn::Ident, - mod_name: syn::Ident, -} - -impl TypeAliases { - pub fn new( - fields: CompositeDefFields, - types_mod_ident: syn::Ident, - mod_name: syn::Ident, - ) -> Self { - TypeAliases { - fields, - types_mod_ident, - mod_name, - } - } +pub struct StructFromVariant { + variant_name: String, + composite: CompositeIR, + type_alias_mod: TokenStream2, } -impl quote::ToTokens for TypeAliases { - fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { - let has_fields = matches!(&self.fields, CompositeDefFields::Named(fields) if !fields.is_empty()) - || matches!(&self.fields, CompositeDefFields::Unnamed(fields) if !fields.is_empty()); - if !has_fields { - return; - } - - let visibility: syn::Visibility = parse_quote!(pub); - - let aliases = self - .fields - .to_type_aliases_tokens(Some(visibility).as_ref()); +/// Modifies the composite, by replacing its types with references to the generated type alias module. +/// Returns the TokenStream of the type alias module. +/// +/// E.g a struct like this: +/// ```ignore +/// pub struct SetMaxCodeSize { +/// pub new: ::core::primitive::u32, +/// } +/// ``` +/// will be made into this: +/// ```ignore +/// pub struct SetMaxCodeSize { +/// pub new: set_max_code_size::New, +/// } +/// ``` +/// And the type alias module will look like this: +/// ```ignore +/// pub mod set_max_code_size { +/// use super::runtime_types; +/// pub type New = ::core::primitive::u32; +/// } +/// ``` +pub fn generate_type_alias_mod( + composite: &mut CompositeIR, + type_gen: &TypeGenerator, +) -> TokenStream2 { + let mut aliases: Vec = vec![]; + let alias_mod_name: Ident = syn::parse_str(&composite.name.to_string().to_snake_case()) + .expect("composite name in snake_case should be a valid identifier"); - let mod_name = &self.mod_name; - let types_mod_ident = &self.types_mod_ident; + let mut modify_field_to_be_type_alias = |field: &mut CompositeFieldIR, alias_name: Ident| { + let type_path = &field.type_path; + aliases.push(quote!(pub type #alias_name = #type_path;)); - tokens.extend(quote! { - pub mod #mod_name { - use super::#types_mod_ident; + let type_alias_path: syn::Path = parse_quote!(#alias_mod_name::#alias_name); + field.type_path = TypePath::from_syn_path(type_alias_path); + }; - #aliases + match &mut composite.kind { + CompositeIRKind::NoFields => { + return quote!(); // no types mod generated for unit structs. + } + CompositeIRKind::Named(named) => { + for (name, field) in named.iter_mut() { + let alias_name = format_ident!("{}", name.to_string().to_upper_camel_case()); + modify_field_to_be_type_alias(field, alias_name); } - }) - } + } + CompositeIRKind::Unnamed(unnamed) => { + for (i, field) in unnamed.iter_mut().enumerate() { + let alias_name = format_ident!("Field{}", i); + modify_field_to_be_type_alias(field, alias_name); + } + } + }; + + let types_mod_ident = type_gen.types_mod_ident(); + quote!(pub mod #alias_mod_name { + use super::#types_mod_ident; + #( #aliases )* + }) } diff --git a/codegen/src/api/runtime_apis.rs b/codegen/src/api/runtime_apis.rs index 66196c0b00..31af5ea5be 100644 --- a/codegen/src/api/runtime_apis.rs +++ b/codegen/src/api/runtime_apis.rs @@ -4,140 +4,155 @@ use std::collections::HashSet; -use crate::{types::TypeGenerator, CodegenError}; use heck::ToSnakeCase as _; use heck::ToUpperCamelCase as _; + +use scale_typegen::TypeGenerator; use subxt_metadata::{Metadata, RuntimeApiMetadata}; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; +use crate::CodegenError; + /// Generates runtime functions for the given API metadata. fn generate_runtime_api( api: RuntimeApiMetadata, type_gen: &TypeGenerator, - types_mod_ident: &syn::Ident, crate_path: &syn::Path, - should_gen_docs: bool, ) -> Result<(TokenStream2, TokenStream2), CodegenError> { // Trait name must remain as is (upper case) to identity the runtime call. let trait_name_str = api.name(); // The snake case for the trait name. let trait_name_snake = format_ident!("{}", api.name().to_snake_case()); let docs = api.docs(); - let docs: TokenStream2 = should_gen_docs + let docs: TokenStream2 = type_gen + .settings() + .should_gen_docs .then_some(quote! { #( #[doc = #docs ] )* }) .unwrap_or_default(); - let structs_and_methods: Vec<_> = api.methods().map(|method| { - let method_name = format_ident!("{}", method.name()); - let method_name_str = method.name(); - - let docs = method.docs(); - let docs: TokenStream2 = should_gen_docs - .then_some(quote! { #( #[doc = #docs ] )* }) - .unwrap_or_default(); - - let mut unique_names = HashSet::new(); - let mut unique_aliases = HashSet::new(); - - let inputs: Vec<_> = method.inputs().enumerate().map(|(idx, input)| { - // These are method names, which can just be '_', but struct field names can't - // just be an underscore, so fix any such names we find to work in structs. - - let mut name = input.name.trim_start_matches('_').to_string(); - if name.is_empty() { - name = format!("_{}", idx); - } - while !unique_names.insert(name.clone()) { - // Name is already used, append the index until it is unique. - name = format!("{}_param{}", name, idx); - } - - let mut alias = name.to_upper_camel_case(); - // Note: name is not empty. - if alias.as_bytes()[0].is_ascii_digit() { - alias = format!("Param{}", alias); - } - while !unique_aliases.insert(alias.clone()) { - alias = format!("{}Param{}", alias, idx); - } - - let (alias_name, name) = (format_ident!("{alias}"), format_ident!("{name}")); - - // Generate alias for runtime type. - let ty = type_gen.resolve_type_path(input.ty); - let aliased_param = quote!( pub type #alias_name = #ty; ); - - // Structures are placed on the same level as the alias module. - let struct_ty_path = quote!( #method_name::#alias_name ); - let struct_param = quote!(#name: #struct_ty_path); - - // Function parameters must be indented by `types`. - let fn_param = quote!(#name: types::#struct_ty_path); - (fn_param, struct_param, name, aliased_param) - }).collect(); - - let fn_params = inputs.iter().map(|(fn_param, _, _, _)| fn_param); - let struct_params = inputs.iter().map(|(_, struct_param, _, _)| struct_param); - let param_names = inputs.iter().map(|(_, _, name, _,)| name); - let type_aliases = inputs.iter().map(|(_, _, _, aliased_param)| aliased_param); - - let output = type_gen.resolve_type_path(method.output_ty()); - let aliased_module = quote!( - pub mod #method_name { - use super::#types_mod_ident; - - #( #type_aliases )* - - // Guard the `Output` name against collisions by placing it in a dedicated module. - pub mod output { + let structs_and_methods: Vec<_> = api + .methods() + .map(|method| { + let method_name = format_ident!("{}", method.name()); + let method_name_str = method.name(); + + let docs = method.docs(); + let docs: TokenStream2 = type_gen + .settings() + .should_gen_docs + .then_some(quote! { #( #[doc = #docs ] )* }) + .unwrap_or_default(); + + let mut unique_names = HashSet::new(); + let mut unique_aliases = HashSet::new(); + + let inputs: Vec<_> = method + .inputs() + .enumerate() + .map(|(idx, input)| { + // These are method names, which can just be '_', but struct field names can't + // just be an underscore, so fix any such names we find to work in structs. + let mut name = input.name.trim_start_matches('_').to_string(); + if name.is_empty() { + name = format!("_{}", idx); + } + while !unique_names.insert(name.clone()) { + // Name is already used, append the index until it is unique. + name = format!("{}_param{}", name, idx); + } + + let mut alias = name.to_upper_camel_case(); + // Note: name is not empty. + if alias.as_bytes()[0].is_ascii_digit() { + alias = format!("Param{}", alias); + } + while !unique_aliases.insert(alias.clone()) { + alias = format!("{}Param{}", alias, idx); + } + + let (alias_name, name) = (format_ident!("{alias}"), format_ident!("{name}")); + + // Generate alias for runtime type. + let ty = type_gen + .resolve_type_path(input.ty) + .expect("runtime api input type is in metadata; qed"); + let aliased_param = quote!( pub type #alias_name = #ty; ); + + // Structures are placed on the same level as the alias module. + let struct_ty_path = quote!( #method_name::#alias_name ); + let struct_param = quote!(#name: #struct_ty_path); + + // Function parameters must be indented by `types`. + let fn_param = quote!(#name: types::#struct_ty_path); + (fn_param, struct_param, name, aliased_param) + }) + .collect(); + + let fn_params = inputs.iter().map(|(fn_param, _, _, _)| fn_param); + let struct_params = inputs.iter().map(|(_, struct_param, _, _)| struct_param); + let param_names = inputs.iter().map(|(_, _, name, _)| name); + let type_aliases = inputs.iter().map(|(_, _, _, aliased_param)| aliased_param); + let types_mod_ident = type_gen.types_mod_ident(); + + let output = type_gen.resolve_type_path(method.output_ty())?; + let aliased_module = quote!( + pub mod #method_name { use super::#types_mod_ident; - pub type Output = #output; - } - } - ); - // From the method metadata generate a structure that holds - // all parameter types. This structure is used with metadata - // to encode parameters to the call via `encode_as_fields_to`. - let derives = type_gen.default_derives(); - let struct_name = format_ident!("{}", method.name().to_upper_camel_case()); - let struct_input = quote!( - #aliased_module - - #derives - pub struct #struct_name { - #( pub #struct_params, )* - } - ); - - let Some(call_hash) = api.method_hash(method.name()) else { - return Err(CodegenError::MissingRuntimeApiMetadata( - trait_name_str.to_owned(), - method_name_str.to_owned(), - )) - }; + #( #type_aliases )* - let method = quote!( - #docs - pub fn #method_name(&self, #( #fn_params, )* ) -> #crate_path::runtime_api::Payload { - #crate_path::runtime_api::Payload::new_static( - #trait_name_str, - #method_name_str, - types::#struct_name { #( #param_names, )* }, - [#(#call_hash,)*], - ) - } - ); + // Guard the `Output` name against collisions by placing it in a dedicated module. + pub mod output { + use super::#types_mod_ident; + pub type Output = #output; + } + } + ); + + // From the method metadata generate a structure that holds + // all parameter types. This structure is used with metadata + // to encode parameters to the call via `encode_as_fields_to`. + let derives = type_gen.settings().derives.default_derives(); + let struct_name = format_ident!("{}", method.name().to_upper_camel_case()); + let struct_input = quote!( + #aliased_module + + #derives + pub struct #struct_name { + #( pub #struct_params, )* + } + ); + + let Some(call_hash) = api.method_hash(method.name()) else { + return Err(CodegenError::MissingRuntimeApiMetadata( + trait_name_str.to_owned(), + method_name_str.to_owned(), + )) + }; + + let method = quote!( + #docs + pub fn #method_name(&self, #( #fn_params, )* ) -> #crate_path::runtime_api::Payload { + #crate_path::runtime_api::Payload::new_static( + #trait_name_str, + #method_name_str, + types::#struct_name { #( #param_names, )* }, + [#(#call_hash,)*], + ) + } + ); - Ok((struct_input, method)) - }).collect::>()?; + Ok((struct_input, method)) + }) + .collect::>()?; let trait_name = format_ident!("{}", trait_name_str); let structs = structs_and_methods.iter().map(|(struct_, _)| struct_); let methods = structs_and_methods.iter().map(|(_, method)| method); + let types_mod_ident = type_gen.types_mod_ident(); let runtime_api = quote!( pub mod #trait_name_snake { @@ -175,13 +190,10 @@ pub fn generate_runtime_apis( type_gen: &TypeGenerator, types_mod_ident: &syn::Ident, crate_path: &syn::Path, - should_gen_docs: bool, ) -> Result { let runtime_fns: Vec<_> = metadata .runtime_api_traits() - .map(|api| { - generate_runtime_api(api, type_gen, types_mod_ident, crate_path, should_gen_docs) - }) + .map(|api| generate_runtime_api(api, type_gen, crate_path)) .collect::>()?; let runtime_apis_def = runtime_fns.iter().map(|(apis, _)| apis); diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 9330c8e029..9ea3832e94 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -2,13 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::types::TypeGenerator; -use crate::types::TypePath; -use heck::ToSnakeCase as _; -use heck::ToUpperCamelCase as _; +use heck::{ToSnakeCase as _, ToUpperCamelCase}; use proc_macro2::{Ident, TokenStream as TokenStream2, TokenStream}; use quote::{format_ident, quote}; use scale_info::TypeDef; +use scale_typegen::{typegen::type_path::TypePath, TypeGenerator}; use subxt_metadata::{ PalletMetadata, StorageEntryMetadata, StorageEntryModifier, StorageEntryType, }; @@ -20,37 +18,26 @@ use super::CodegenError; /// /// # Arguments /// -/// - `metadata` - Runtime metadata from which the storages are generated. -/// - `type_gen` - The type generator containing all types defined by metadata. -/// - `pallet` - Pallet metadata from which the storages are generated. -/// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from. +/// - `type_gen` - [`scale_typegen::TypeGenerator`] that contains settings and all types from the runtime metadata. +/// - `pallet` - Pallet metadata from which the storage items are generated. +/// - `crate_path` - The crate path under which subxt is located, e.g. `::subxt` when using subxt as a dependency. pub fn generate_storage( type_gen: &TypeGenerator, pallet: &PalletMetadata, - types_mod_ident: &syn::Ident, crate_path: &syn::Path, - should_gen_docs: bool, ) -> Result { let Some(storage) = pallet.storage() else { return Ok(quote!()); }; - let (storage_fns, alias_modules): (Vec<_>, Vec<_>) = storage + let (storage_fns, alias_modules): (Vec, Vec) = storage .entries() .iter() - .map(|entry| { - generate_storage_entry_fns( - type_gen, - pallet, - entry, - crate_path, - should_gen_docs, - types_mod_ident, - ) - }) + .map(|entry| generate_storage_entry_fns(type_gen, pallet, entry, crate_path)) .collect::, CodegenError>>()? .into_iter() .unzip(); + let types_mod_ident = type_gen.types_mod_ident(); Ok(quote! { pub mod storage { @@ -71,17 +58,18 @@ pub fn generate_storage( }) } +/// Returns storage entry functions and alias modules. fn generate_storage_entry_fns( type_gen: &TypeGenerator, pallet: &PalletMetadata, storage_entry: &StorageEntryMetadata, crate_path: &syn::Path, - should_gen_docs: bool, - types_mod_ident: &syn::Ident, ) -> Result<(TokenStream2, TokenStream2), CodegenError> { let snake_case_name = storage_entry.name().to_snake_case(); let storage_entry_ty = storage_entry.entry_type().value_ty(); - let storage_entry_value_ty = type_gen.resolve_type_path(storage_entry_ty); + let storage_entry_value_ty = type_gen + .resolve_type_path(storage_entry_ty) + .expect("storage type is in metadata; qed"); let alias_name = format_ident!("{}", storage_entry.name().to_upper_camel_case()); let alias_module_name = format_ident!("{snake_case_name}"); @@ -89,7 +77,9 @@ fn generate_storage_entry_fns( let storage_entry_map = |idx, id| { let ident: Ident = format_ident!("_{}", idx); - let ty_path = type_gen.resolve_type_path(id); + let ty_path = type_gen + .resolve_type_path(id) + .expect("type is in metadata; qed"); let alias_name = format_ident!("Param{}", idx); let alias_type = primitive_type_alias(&ty_path); @@ -103,7 +93,11 @@ fn generate_storage_entry_fns( let keys: Vec<(Ident, TokenStream, TokenStream)> = match storage_entry.entry_type() { StorageEntryType::Plain(_) => vec![], StorageEntryType::Map { key_ty, .. } => { - match &type_gen.resolve_type(*key_ty).type_def { + match &type_gen + .resolve_type(*key_ty) + .expect("key type should be present") + .type_def + { // An N-map; return each of the keys separately. TypeDef::Tuple(tuple) => tuple .fields @@ -128,7 +122,9 @@ fn generate_storage_entry_fns( }; let docs = storage_entry.docs(); - let docs = should_gen_docs + let docs = type_gen + .settings() + .should_gen_docs .then_some(quote! { #( #[doc = #docs ] )* }) .unwrap_or_default(); @@ -181,6 +177,7 @@ fn generate_storage_entry_fns( let alias_types = keys.iter().map(|(_, alias_type, _)| alias_type); + let types_mod_ident = type_gen.types_mod_ident(); // Generate type alias for the return type only, since // the keys of the storage entry are not explicitly named. let alias_module = quote! { @@ -217,9 +214,10 @@ fn primitive_type_alias(type_path: &TypePath) -> TokenStream { mod tests { use crate::RuntimeGenerator; use frame_metadata::v15; - use heck::ToUpperCamelCase as _; + use heck::ToUpperCamelCase; use quote::{format_ident, quote}; use scale_info::{meta_type, MetaType}; + use std::borrow::Cow; use subxt_metadata::Metadata; @@ -330,6 +328,8 @@ mod tests { _0: impl ::std::borrow::Borrow, ) ); + dbg!(&generated_str); + dbg!(&expected_storage_constructor.to_string()); assert!(generated_str.contains(&expected_storage_constructor.to_string())); let alias_name = format_ident!("{}", name.to_upper_camel_case()); diff --git a/codegen/src/error.rs b/codegen/src/error.rs index 5b4dc90fa4..65ce06bf1b 100644 --- a/codegen/src/error.rs +++ b/codegen/src/error.rs @@ -5,14 +5,12 @@ //! Errors that can be emitted from codegen. use proc_macro2::{Span, TokenStream as TokenStream2}; +use scale_typegen::TypegenError; /// Error returned when the Codegen cannot generate the runtime API. #[derive(Debug, thiserror::Error)] #[non_exhaustive] pub enum CodegenError { - /// The given metadata type could not be found. - #[error("Could not find type with ID {0} in the type registry; please raise a support issue.")] - TypeNotFound(u32), /// Cannot fetch the metadata bytes. #[error("Failed to fetch metadata, make sure that you're pointing at a node which is providing substrate-based metadata: {0}")] Fetch(#[from] FetchMetadataError), @@ -22,12 +20,6 @@ pub enum CodegenError { /// Out of line modules are not supported. #[error("Out-of-line subxt modules are not supported, make sure you are providing a body to your module: pub mod polkadot {{ ... }}")] InvalidModule(Span), - /// Expected named or unnamed fields. - #[error("Fields should either be all named or all unnamed, make sure you are providing a valid metadata: {0}")] - InvalidFields(String), - /// Substitute types must have a valid path. - #[error("Type substitution error: {0}")] - TypeSubstitutionError(#[from] TypeSubstitutionError), /// Invalid type path. #[error("Invalid type path {0}: {1}")] InvalidTypePath(String, syn::Error), @@ -56,6 +48,9 @@ pub enum CodegenError { "Extrinsic call type could not be found. Make sure you are providing a valid substrate-based metadata" )] MissingCallType, + /// Cannot generate types. + #[error("Type Generation failed: {0}")] + TypeGeneration(#[from] TypegenError), } impl CodegenError { @@ -65,7 +60,7 @@ impl CodegenError { fn get_location(&self) -> Span { match self { Self::InvalidModule(span) => *span, - Self::TypeSubstitutionError(err) => err.get_location(), + Self::TypeGeneration(TypegenError::InvalidSubstitute(err)) => err.span, Self::InvalidTypePath(_, err) => err.span(), _ => proc_macro2::Span::call_site(), } @@ -102,43 +97,3 @@ pub enum FetchMetadataError { #[error("Other error: {0}")] Other(String), } - -/// Error attempting to do type substitution. -#[derive(Debug, thiserror::Error)] -#[non_exhaustive] -pub enum TypeSubstitutionError { - /// Substitute "to" type must be an absolute path. - #[error("`substitute_type(with = )` must be a path prefixed with 'crate::' or '::'")] - ExpectedAbsolutePath(Span), - /// Substitute types must have a valid path. - #[error("Substitute types must have a valid path.")] - EmptySubstitutePath(Span), - /// From/To substitution types should use angle bracket generics. - #[error("Expected the from/to type generics to have the form 'Foo'.")] - ExpectedAngleBracketGenerics(Span), - /// Source substitute type must be an ident. - #[error("Expected an ident like 'Foo' or 'A' to mark a type to be substituted.")] - InvalidFromType(Span), - /// Target type is invalid. - #[error("Expected an ident like 'Foo' or an absolute concrete path like '::path::to::Bar' for the substitute type.")] - InvalidToType(Span), - /// Target ident doesn't correspond to any source type. - #[error("Cannot find matching param on 'from' type.")] - NoMatchingFromType(Span), -} - -impl TypeSubstitutionError { - /// Fetch the location for this error. - // Todo: Probably worth storing location outside of the variant, - // so that there's a common way to set a location for some error. - fn get_location(&self) -> Span { - match self { - TypeSubstitutionError::ExpectedAbsolutePath(span) => *span, - TypeSubstitutionError::EmptySubstitutePath(span) => *span, - TypeSubstitutionError::ExpectedAngleBracketGenerics(span) => *span, - TypeSubstitutionError::InvalidFromType(span) => *span, - TypeSubstitutionError::InvalidToType(span) => *span, - TypeSubstitutionError::NoMatchingFromType(span) => *span, - } - } -} diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs index e319b1aaff..1baa7aa61d 100644 --- a/codegen/src/lib.rs +++ b/codegen/src/lib.rs @@ -9,10 +9,8 @@ #![deny(unused_crate_dependencies, missing_docs)] mod api; -mod ir; -mod types; - pub mod error; +mod ir; // These should probably be in a separate crate; they are used by the // macro and CLI tool, so they only live here because this is a common @@ -25,14 +23,12 @@ use getrandom as _; use api::RuntimeGenerator; use proc_macro2::TokenStream as TokenStream2; +use scale_typegen::{ + typegen::settings::substitutes::absolute_path, DerivesRegistry, TypeGeneratorSettings, + TypeSubstitutes, TypegenError, +}; use std::collections::HashMap; - -// We expose these only because they are currently needed in subxt-explorer. -// Eventually we'll move the type generation stuff out into a separate crate. -#[doc(hidden)] -pub mod __private { - pub use crate::types::{DerivesRegistry, TypeDefGen, TypeGenerator, TypeSubstitutes}; -} +use syn::parse_quote; // Part of the public interface, so expose: pub use error::CodegenError; @@ -72,6 +68,8 @@ pub struct CodegenBuilder { type_substitutes: HashMap, derives_for_type: HashMap>, attributes_for_type: HashMap>, + derives_for_type_recursive: HashMap>, + attributes_for_type_recursive: HashMap>, } impl Default for CodegenBuilder { @@ -90,6 +88,8 @@ impl Default for CodegenBuilder { type_substitutes: HashMap::new(), derives_for_type: HashMap::new(), attributes_for_type: HashMap::new(), + derives_for_type_recursive: HashMap::new(), + attributes_for_type_recursive: HashMap::new(), } } } @@ -159,33 +159,47 @@ impl CodegenBuilder { /// Set additional derives for a specific type at the path given. /// - /// # Warning - /// - /// For composite types, you may also need to set the same additional derives on all of - /// the contained types as well to avoid compile errors in the generated code. + /// If you want to set the additional derives on all contained types recursively as well, + /// you can set the `recursive` argument to `true`. If you don't do that, + /// there might be compile errors in the generated code, if the derived trait + /// relies on the fact that contained types also implement that trait. pub fn add_derives_for_type( &mut self, ty: syn::TypePath, derives: impl IntoIterator, + recursive: bool, ) { - self.derives_for_type.entry(ty).or_default().extend(derives); + if recursive { + self.derives_for_type_recursive + .entry(ty) + .or_default() + .extend(derives); + } else { + self.derives_for_type.entry(ty).or_default().extend(derives); + } } /// Set additional attributes for a specific type at the path given. /// - /// # Warning - /// - /// For composite types, you may also need to consider contained types and whether they need - /// similar attributes setting. + /// Setting the `recursive` argument to `true` will additionally add the specified + /// attributes to all contained types recursively. pub fn add_attributes_for_type( &mut self, ty: syn::TypePath, attributes: impl IntoIterator, + recursive: bool, ) { - self.attributes_for_type - .entry(ty) - .or_default() - .extend(attributes); + if recursive { + self.attributes_for_type_recursive + .entry(ty) + .or_default() + .extend(attributes); + } else { + self.attributes_for_type + .entry(ty) + .or_default() + .extend(attributes); + } } /// Substitute a type at the given path with some type at the second path. During codegen, @@ -217,30 +231,39 @@ impl CodegenBuilder { pub fn generate(self, metadata: Metadata) -> Result { let crate_path = self.crate_path; - let mut derives_registry = if self.use_default_derives { - types::DerivesRegistry::with_default_derives(&crate_path) + let mut derives_registry: DerivesRegistry = if self.use_default_derives { + default_derives(&crate_path) } else { - types::DerivesRegistry::new() + DerivesRegistry::new() }; - derives_registry.extend_for_all(self.extra_global_derives, self.extra_global_attributes); + derives_registry.add_derives_for_all(self.extra_global_derives); + derives_registry.add_attributes_for_all(self.extra_global_attributes); for (ty, derives) in self.derives_for_type { - derives_registry.extend_for_type(ty, derives, vec![]); + derives_registry.add_derives_for(ty, derives, false); + } + for (ty, derives) in self.derives_for_type_recursive { + derives_registry.add_derives_for(ty, derives, true); } for (ty, attributes) in self.attributes_for_type { - derives_registry.extend_for_type(ty, vec![], attributes); + derives_registry.add_attributes_for(ty, attributes, false); + } + for (ty, attributes) in self.attributes_for_type_recursive { + derives_registry.add_attributes_for(ty, attributes, true); } - let mut type_substitutes = if self.use_default_substitutions { - types::TypeSubstitutes::with_default_substitutes(&crate_path) + let mut type_substitutes: TypeSubstitutes = if self.use_default_substitutions { + default_substitutes(&crate_path) } else { - types::TypeSubstitutes::new() + TypeSubstitutes::new() }; for (from, with) in self.type_substitutes { - let abs_path = with.try_into()?; - type_substitutes.insert(from, abs_path)?; + let abs_path = absolute_path(with).map_err(TypegenError::from)?; + type_substitutes + .insert(from, abs_path) + .map_err(TypegenError::from)?; } let item_mod = self.item_mod; @@ -266,3 +289,123 @@ impl CodegenBuilder { } } } + +/// The default [`scale_typegen::TypeGeneratorSettings`], subxt is using for generating code. +/// Useful for emulating subxt's code generation settings from e.g. subxt-explorer. +pub fn default_subxt_type_gen_settings() -> TypeGeneratorSettings { + let crate_path: syn::Path = parse_quote!(::subxt); + let derives = default_derives(&crate_path); + let substitutes = default_substitutes(&crate_path); + subxt_type_gen_settings(derives, substitutes, &crate_path, true) +} + +fn subxt_type_gen_settings( + derives: scale_typegen::DerivesRegistry, + substitutes: scale_typegen::TypeSubstitutes, + crate_path: &syn::Path, + should_gen_docs: bool, +) -> TypeGeneratorSettings { + TypeGeneratorSettings { + types_mod_ident: parse_quote!(runtime_types), + should_gen_docs, + derives, + substitutes, + decoded_bits_type_path: Some(parse_quote!(#crate_path::utils::bits::DecodedBits)), + compact_as_type_path: Some(parse_quote!(#crate_path::ext::codec::CompactAs)), + compact_type_path: Some(parse_quote!(#crate_path::ext::codec::Compact)), + insert_codec_attributes: true, + } +} + +fn default_derives(crate_path: &syn::Path) -> DerivesRegistry { + let encode_crate_path = quote::quote! { #crate_path::ext::scale_encode }.to_string(); + let decode_crate_path = quote::quote! { #crate_path::ext::scale_decode }.to_string(); + + let derives: [syn::Path; 5] = [ + parse_quote!(#crate_path::ext::scale_encode::EncodeAsType), + parse_quote!(#crate_path::ext::scale_decode::DecodeAsType), + parse_quote!(#crate_path::ext::codec::Encode), + parse_quote!(#crate_path::ext::codec::Decode), + parse_quote!(Debug), + ]; + + let attributes: [syn::Attribute; 3] = [ + parse_quote!(#[encode_as_type(crate_path = #encode_crate_path)]), + parse_quote!(#[decode_as_type(crate_path = #decode_crate_path)]), + parse_quote!(#[codec(crate = #crate_path::ext::codec)]), + ]; + + let mut derives_registry = DerivesRegistry::new(); + derives_registry.add_derives_for_all(derives); + derives_registry.add_attributes_for_all(attributes); + derives_registry +} + +fn default_substitutes(crate_path: &syn::Path) -> TypeSubstitutes { + let mut type_substitutes = TypeSubstitutes::new(); + + let defaults: [(syn::Path, syn::Path); 11] = [ + ( + parse_quote!(bitvec::order::Lsb0), + parse_quote!(#crate_path::utils::bits::Lsb0), + ), + ( + parse_quote!(bitvec::order::Msb0), + parse_quote!(#crate_path::utils::bits::Msb0), + ), + ( + parse_quote!(sp_core::crypto::AccountId32), + parse_quote!(#crate_path::utils::AccountId32), + ), + ( + parse_quote!(sp_runtime::multiaddress::MultiAddress), + parse_quote!(#crate_path::utils::MultiAddress), + ), + ( + parse_quote!(primitive_types::H160), + parse_quote!(#crate_path::utils::H160), + ), + ( + parse_quote!(primitive_types::H256), + parse_quote!(#crate_path::utils::H256), + ), + ( + parse_quote!(primitive_types::H512), + parse_quote!(#crate_path::utils::H512), + ), + ( + parse_quote!(frame_support::traits::misc::WrapperKeepOpaque), + parse_quote!(#crate_path::utils::WrapperKeepOpaque), + ), + // BTreeMap and BTreeSet impose an `Ord` constraint on their key types. This + // can cause an issue with generated code that doesn't impl `Ord` by default. + // Decoding them to Vec by default (KeyedVec is just an alias for Vec with + // suitable type params) avoids these issues. + ( + parse_quote!(BTreeMap), + parse_quote!(#crate_path::utils::KeyedVec), + ), + (parse_quote!(BTreeSet), parse_quote!(::std::vec::Vec)), + // The `UncheckedExtrinsic(pub Vec)` is part of the runtime API calls. + // The inner bytes represent the encoded extrinsic, however when deriving the + // `EncodeAsType` the bytes would be re-encoded. This leads to the bytes + // being altered by adding the length prefix in front of them. + + // Note: Not sure if this is appropriate or not. The most recent polkadot.rs file does not have these. + ( + parse_quote!(sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic), + parse_quote!(#crate_path::utils::UncheckedExtrinsic), + ), + ]; + + let defaults = defaults.into_iter().map(|(from, to)| { + ( + from, + absolute_path(to).expect("default substitutes above are absolute paths; qed"), + ) + }); + type_substitutes + .extend(defaults) + .expect("default substitutes can always be parsed; qed"); + type_substitutes +} diff --git a/codegen/src/types/composite_def.rs b/codegen/src/types/composite_def.rs deleted file mode 100644 index a1cfcbf2cb..0000000000 --- a/codegen/src/types/composite_def.rs +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use crate::error::CodegenError; - -use super::{Derives, Field, TypeDefParameters, TypeGenerator, TypeParameter, TypePath}; -use heck::ToUpperCamelCase as _; -use proc_macro2::TokenStream; -use quote::{format_ident, quote}; -use scale_info::{form::PortableForm, Type, TypeDef, TypeDefPrimitive}; - -/// Representation of a type which consists of a set of fields. Used to generate Rust code for -/// either a standalone `struct` definition, or an `enum` variant. -/// -/// Fields can either be named or unnamed in either case. -#[derive(Debug)] -pub struct CompositeDef { - /// The name of the `struct`, or the name of the `enum` variant. - pub name: syn::Ident, - /// Generate either a standalone `struct` or an `enum` variant. - pub kind: CompositeDefKind, - /// The fields of the type, which are either all named or all unnamed. - pub fields: CompositeDefFields, - /// Documentation of the composite type as presented in metadata. - pub docs: Option, -} - -impl CompositeDef { - /// Construct a definition which will generate code for a standalone `struct`. - /// - /// This is useful for generating structures from call and enum metadata variants; - /// and from all the runtime types of the metadata. - #[allow(clippy::too_many_arguments)] - pub fn struct_def( - ty: &Type, - ident: &str, - type_params: TypeDefParameters, - fields_def: CompositeDefFields, - field_visibility: Option, - type_gen: &TypeGenerator, - docs: &[String], - crate_path: &syn::Path, - alias_module_name: Option, - ) -> Result { - let mut derives = type_gen.type_derives(ty)?; - let fields: Vec<_> = fields_def.field_types().collect(); - - if fields.len() == 1 { - // any single field wrapper struct with a concrete unsigned int type can derive - // CompactAs. - let field = &fields[0]; - if !type_params - .params() - .iter() - .any(|tp| Some(tp.original_name.to_string()) == field.type_name) - { - let ty = type_gen.resolve_type(field.type_id); - if matches!( - ty.type_def, - TypeDef::Primitive( - TypeDefPrimitive::U8 - | TypeDefPrimitive::U16 - | TypeDefPrimitive::U32 - | TypeDefPrimitive::U64 - | TypeDefPrimitive::U128 - ) - ) { - derives.insert_codec_compact_as(crate_path) - } - } - } - - let name = format_ident!("{}", ident); - let docs_token = Some(quote! { #( #[doc = #docs ] )* }); - - Ok(Self { - name, - kind: CompositeDefKind::Struct { - derives, - type_params, - field_visibility, - alias_module_name, - }, - fields: fields_def, - docs: docs_token, - }) - } - - /// Construct a definition which will generate code for an `enum` variant. - pub fn enum_variant_def(ident: &str, fields: CompositeDefFields, docs: &[String]) -> Self { - let name = format_ident!("{}", ident); - let docs_token = Some(quote! { #( #[doc = #docs ] )* }); - Self { - name, - kind: CompositeDefKind::EnumVariant, - fields, - docs: docs_token, - } - } -} - -impl quote::ToTokens for CompositeDef { - fn to_tokens(&self, tokens: &mut TokenStream) { - let name = &self.name; - let docs = &self.docs; - - let decl = match &self.kind { - CompositeDefKind::Struct { - derives, - type_params, - field_visibility, - alias_module_name, - } => { - let phantom_data = type_params.unused_params_phantom_data(); - - let fields: TokenStream = self.fields.to_struct_field_tokens( - phantom_data, - field_visibility.as_ref(), - alias_module_name.as_ref(), - ); - let trailing_semicolon = matches!( - self.fields, - CompositeDefFields::NoFields | CompositeDefFields::Unnamed(_) - ) - .then(|| quote!(;)); - - quote! { - #derives - #docs - pub struct #name #type_params #fields #trailing_semicolon - } - } - CompositeDefKind::EnumVariant => { - let fields = self.fields.to_enum_variant_field_tokens(); - - quote! { - #docs - #name #fields - } - } - }; - tokens.extend(decl) - } -} - -/// Which kind of composite type are we generating, either a standalone `struct` or an `enum` -/// variant. -#[derive(Debug)] -pub enum CompositeDefKind { - /// Composite type comprising a Rust `struct`. - Struct { - derives: Derives, - type_params: TypeDefParameters, - field_visibility: Option, - alias_module_name: Option, - }, - /// Comprises a variant of a Rust `enum`. - EnumVariant, -} - -/// Encapsulates the composite fields, keeping the invariant that all fields are either named or -/// unnamed. -#[derive(Debug, Clone)] -pub enum CompositeDefFields { - NoFields, - Named(Vec<(syn::Ident, CompositeDefFieldType)>), - Unnamed(Vec), -} - -impl CompositeDefFields { - /// Construct a new set of composite fields from the supplied [`::scale_info::Field`]s. - pub fn from_scale_info_fields( - name: &str, - fields: &[Field], - parent_type_params: &[TypeParameter], - type_gen: &TypeGenerator, - ) -> Result { - if fields.is_empty() { - return Ok(Self::NoFields); - } - - let mut named_fields = Vec::new(); - let mut unnamed_fields = Vec::new(); - - for field in fields { - let type_path = type_gen.resolve_field_type_path( - field.ty.id, - parent_type_params, - field.type_name.as_deref(), - ); - let field_type = - CompositeDefFieldType::new(field.ty.id, type_path, field.type_name.clone()); - - if let Some(name) = &field.name { - let field_name = format_ident!("{}", name); - named_fields.push((field_name, field_type)) - } else { - unnamed_fields.push(field_type) - } - } - - if !named_fields.is_empty() && !unnamed_fields.is_empty() { - return Err(CodegenError::InvalidFields(name.into())); - } - - let res = if !named_fields.is_empty() { - Self::Named(named_fields) - } else { - Self::Unnamed(unnamed_fields) - }; - Ok(res) - } - - /// Returns the set of composite fields. - pub fn field_types(&self) -> Box + '_> { - match self { - Self::NoFields => Box::new([].iter()), - Self::Named(named_fields) => Box::new(named_fields.iter().map(|(_, f)| f)), - Self::Unnamed(unnamed_fields) => Box::new(unnamed_fields.iter()), - } - } - - /// Generate the code for type aliases which will be used to construct the `struct` or `enum`. - pub fn to_type_aliases_tokens(&self, visibility: Option<&syn::Visibility>) -> TokenStream { - match self { - Self::NoFields => { - quote!() - } - Self::Named(ref fields) => { - let fields = fields.iter().map(|(name, ty)| { - let alias_name = format_ident!("{}", name.to_string().to_upper_camel_case()); - // Alias without boxing to have a cleaner call interface. - let ty_path = &ty.type_path; - quote! ( #visibility type #alias_name = #ty_path; ) - }); - quote!( #( #fields )* ) - } - Self::Unnamed(ref fields) => { - let fields = fields.iter().enumerate().map(|(idx, ty)| { - let alias_name = format_ident!("Field{}", idx); - quote! ( #visibility type #alias_name = #ty; ) - }); - - quote!( #( #fields )* ) - } - } - } - - /// Generate the code for fields which will compose a `struct`. - pub fn to_struct_field_tokens( - &self, - phantom_data: Option, - visibility: Option<&syn::Visibility>, - alias_module_name: Option<&syn::Ident>, - ) -> TokenStream { - match self { - Self::NoFields => { - if let Some(phantom_data) = phantom_data { - quote! { ( #phantom_data ) } - } else { - quote! {} - } - } - Self::Named(ref fields) => { - let fields = fields.iter().map(|(name, ty)| { - let compact_attr = ty.compact_attr(); - - if let Some(alias_module_name) = alias_module_name { - let alias_name = - format_ident!("{}", name.to_string().to_upper_camel_case()); - - let mut path = quote!( #alias_module_name::#alias_name); - if ty.is_boxed() { - path = quote!( ::std::boxed::Box<#path> ); - } - - quote! { #compact_attr #visibility #name: #path } - } else { - quote! { #compact_attr #visibility #name: #ty } - } - }); - let marker = phantom_data.map(|phantom_data| { - quote!( - #[codec(skip)] - #visibility __subxt_unused_type_params: #phantom_data - ) - }); - quote!( - { - #( #fields, )* - #marker - } - ) - } - Self::Unnamed(ref fields) => { - let fields = fields.iter().enumerate().map(|(idx, ty)| { - let compact_attr = ty.compact_attr(); - - if let Some(alias_module_name) = alias_module_name { - let alias_name = format_ident!("Field{}", idx); - - let mut path = quote!( #alias_module_name::#alias_name); - if ty.is_boxed() { - path = quote!( ::std::boxed::Box<#path> ); - } - - quote! { #compact_attr #visibility #path } - } else { - quote! { #compact_attr #visibility #ty } - } - }); - let marker = phantom_data.map(|phantom_data| { - quote!( - #[codec(skip)] - #visibility #phantom_data - ) - }); - quote! { - ( - #( #fields, )* - #marker - ) - } - } - } - } - - /// Generate the code for fields which will compose an `enum` variant. - pub fn to_enum_variant_field_tokens(&self) -> TokenStream { - match self { - Self::NoFields => quote! {}, - Self::Named(ref fields) => { - let fields = fields.iter().map(|(name, ty)| { - let compact_attr = ty.compact_attr(); - quote! { #compact_attr #name: #ty } - }); - quote!( { #( #fields, )* } ) - } - Self::Unnamed(ref fields) => { - let fields = fields.iter().map(|ty| { - let compact_attr = ty.compact_attr(); - quote! { #compact_attr #ty } - }); - quote! { ( #( #fields, )* ) } - } - } - } -} - -/// Represents a field of a composite type to be generated. -#[derive(Debug, Clone)] -pub struct CompositeDefFieldType { - pub type_id: u32, - pub type_path: TypePath, - pub type_name: Option, -} - -impl CompositeDefFieldType { - /// Construct a new [`CompositeDefFieldType`]. - pub fn new(type_id: u32, type_path: TypePath, type_name: Option) -> Self { - CompositeDefFieldType { - type_id, - type_path, - type_name, - } - } - - /// Returns `true` if the field is a [`::std::boxed::Box`]. - pub fn is_boxed(&self) -> bool { - // Use the type name to detect a `Box` field. - // Should be updated once `Box` types are no longer erased: - // https://github.com/paritytech/scale-info/pull/82 - matches!(&self.type_name, Some(ty_name) if ty_name.contains("Box<")) - } - - /// Returns the `#[codec(compact)]` attribute if the type is compact. - fn compact_attr(&self) -> Option { - self.type_path - .is_compact() - .then(|| quote!( #[codec(compact)] )) - } -} - -impl quote::ToTokens for CompositeDefFieldType { - fn to_tokens(&self, tokens: &mut TokenStream) { - let ty_path = &self.type_path; - - if self.is_boxed() { - tokens.extend(quote! { ::std::boxed::Box<#ty_path> }) - } else { - tokens.extend(quote! { #ty_path }) - }; - } -} diff --git a/codegen/src/types/derives.rs b/codegen/src/types/derives.rs deleted file mode 100644 index 429591ed8a..0000000000 --- a/codegen/src/types/derives.rs +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use syn::{parse_quote, Path}; - -use std::collections::{HashMap, HashSet}; - -/// A struct containing the derives that we'll be applying to types; -/// a combination of some common derives for all types, plus type -/// specific derives. -#[derive(Debug, Clone)] -pub struct DerivesRegistry { - default_derives: Derives, - specific_type_derives: HashMap, -} - -impl Default for DerivesRegistry { - fn default() -> Self { - Self::new() - } -} - -impl DerivesRegistry { - /// Creates a new `DerivesRegistry` with no default derives. - pub fn new() -> Self { - Self { - default_derives: Derives::new(), - specific_type_derives: Default::default(), - } - } - - /// Creates a new `DerivesRegistry` with default derives. - /// - /// The `crate_path` denotes the `subxt` crate access path in the - /// generated code. - pub fn with_default_derives(crate_path: &syn::Path) -> Self { - Self { - default_derives: Derives::with_defaults(crate_path), - specific_type_derives: Default::default(), - } - } - - /// Insert derives to be applied to all generated types. - pub fn extend_for_all( - &mut self, - derives: impl IntoIterator, - attributes: impl IntoIterator, - ) { - self.default_derives.derives.extend(derives); - self.default_derives.attributes.extend(attributes); - } - - /// Insert derives to be applied to a specific generated type. - pub fn extend_for_type( - &mut self, - ty: syn::TypePath, - derives: impl IntoIterator, - attributes: impl IntoIterator, - ) { - let type_derives = self.specific_type_derives.entry(ty).or_default(); - type_derives.derives.extend(derives); - type_derives.attributes.extend(attributes); - } - - /// Returns the derives to be applied to all generated types. - pub fn default_derives(&self) -> &Derives { - &self.default_derives - } - - /// Resolve the derives for a generated type. Includes: - /// - The default derives for all types e.g. `scale::Encode, scale::Decode` - /// - Any user-defined derives for all types via `generated_type_derives` - /// - Any user-defined derives for this specific type - pub fn resolve(&self, ty: &syn::TypePath) -> Derives { - let mut resolved_derives = self.default_derives.clone(); - if let Some(specific) = self.specific_type_derives.get(ty) { - resolved_derives.extend_from(specific.clone()); - } - resolved_derives - } -} - -/// A struct storing the set of derives and derive attributes that we'll apply -/// to generated types. -#[derive(Debug, Clone)] -pub struct Derives { - derives: HashSet, - attributes: HashSet, -} - -impl Default for Derives { - fn default() -> Self { - Self::new() - } -} - -impl FromIterator for Derives { - fn from_iter>(iter: T) -> Self { - let derives = iter.into_iter().collect(); - Self { - derives, - attributes: HashSet::new(), - } - } -} - -impl Derives { - /// Creates an empty instance of `Derives` (with no default derives). - pub fn new() -> Self { - Self { - derives: HashSet::new(), - attributes: HashSet::new(), - } - } - - /// Creates a new instance of `Derives` with the `crate_path` prepended - /// to the set of default derives that reside in `subxt`. - pub fn with_defaults(crate_path: &syn::Path) -> Self { - let mut derives = HashSet::new(); - let mut attributes = HashSet::new(); - - derives.insert(syn::parse_quote!(#crate_path::ext::scale_encode::EncodeAsType)); - let encode_crate_path = quote::quote! { #crate_path::ext::scale_encode }.to_string(); - attributes.insert(syn::parse_quote!(#[encode_as_type(crate_path = #encode_crate_path)])); - - derives.insert(syn::parse_quote!(#crate_path::ext::scale_decode::DecodeAsType)); - let decode_crate_path = quote::quote! { #crate_path::ext::scale_decode }.to_string(); - attributes.insert(syn::parse_quote!(#[decode_as_type(crate_path = #decode_crate_path)])); - - derives.insert(syn::parse_quote!(#crate_path::ext::codec::Encode)); - derives.insert(syn::parse_quote!(#crate_path::ext::codec::Decode)); - attributes.insert(syn::parse_quote!(#[codec(crate = #crate_path::ext::codec)])); - - derives.insert(syn::parse_quote!(Debug)); - - Self { - derives, - attributes, - } - } - - /// Extend this set of `Derives` from another. - pub fn extend_from(&mut self, other: Derives) { - self.derives.extend(other.derives); - self.attributes.extend(other.attributes); - } - - /// Add `#crate_path::ext::codec::CompactAs` to the derives. - pub fn insert_codec_compact_as(&mut self, crate_path: &syn::Path) { - self.insert_derive(parse_quote!(#crate_path::ext::codec::CompactAs)); - } - - /// Extend the set of derives by providing an iterator of paths to derive macros. - pub fn extend(&mut self, derives: impl Iterator) { - for derive in derives { - self.insert_derive(derive) - } - } - - /// Insert a single derive. - pub fn insert_derive(&mut self, derive: syn::Path) { - self.derives.insert(derive); - } - - /// Insert a single attribute to be applied to types. - pub fn insert_attribute(&mut self, attribute: syn::Attribute) { - self.attributes.insert(attribute); - } -} - -impl quote::ToTokens for Derives { - fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { - if !self.derives.is_empty() { - let mut sorted = self.derives.iter().cloned().collect::>(); - sorted.sort_by(|a, b| { - quote::quote!(#a) - .to_string() - .cmp("e::quote!(#b).to_string()) - }); - - tokens.extend(quote::quote! { - #[derive(#( #sorted ),*)] - }) - } - if !self.attributes.is_empty() { - let mut sorted = self.attributes.iter().cloned().collect::>(); - sorted.sort_by(|a, b| { - quote::quote!(#a) - .to_string() - .cmp("e::quote!(#b).to_string()) - }); - - tokens.extend(quote::quote! { - #( #sorted )* - }) - } - } -} diff --git a/codegen/src/types/mod.rs b/codegen/src/types/mod.rs deleted file mode 100644 index 2052ac2e76..0000000000 --- a/codegen/src/types/mod.rs +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -mod composite_def; -mod derives; -mod substitutes; -#[cfg(test)] -mod tests; -mod type_def; -mod type_def_params; -mod type_path; - -use proc_macro2::{Ident, Span, TokenStream}; -use quote::{quote, ToTokens}; -use scale_info::{form::PortableForm, PortableRegistry, Type, TypeDef}; -use std::collections::BTreeMap; - -use crate::error::CodegenError; - -pub use self::{ - composite_def::{CompositeDef, CompositeDefFieldType, CompositeDefFields}, - derives::{Derives, DerivesRegistry}, - substitutes::TypeSubstitutes, - type_def::TypeDefGen, - type_def_params::TypeDefParameters, - type_path::{TypeParameter, TypePath, TypePathType}, -}; - -pub type Field = scale_info::Field; - -/// Generate a Rust module containing all types defined in the supplied [`PortableRegistry`]. -#[derive(Debug)] -pub struct TypeGenerator<'a> { - /// The name of the module which will contain the generated types. - types_mod_ident: Ident, - /// Registry of type definitions to be transformed into Rust type definitions. - type_registry: &'a PortableRegistry, - /// User defined overrides for generated types. - type_substitutes: TypeSubstitutes, - /// Set of derives with which to annotate generated types. - derives: DerivesRegistry, - /// The `subxt` crate access path in the generated code. - crate_path: syn::Path, - /// True if codegen should generate the documentation for the API. - should_gen_docs: bool, -} - -impl<'a> TypeGenerator<'a> { - /// Construct a new [`TypeGenerator`]. - pub fn new( - type_registry: &'a PortableRegistry, - root_mod: &'static str, - type_substitutes: TypeSubstitutes, - derives: DerivesRegistry, - crate_path: syn::Path, - should_gen_docs: bool, - ) -> Self { - let root_mod_ident = Ident::new(root_mod, Span::call_site()); - Self { - types_mod_ident: root_mod_ident, - type_registry, - type_substitutes, - derives, - crate_path, - should_gen_docs, - } - } - - /// Generate a module containing all types defined in the supplied type registry. - pub fn generate_types_mod(&self) -> Result { - let root_mod_ident = &self.types_mod_ident; - let mut root_mod = Module::new(root_mod_ident.clone(), root_mod_ident.clone()); - - for ty in &self.type_registry.types { - let path = &ty.ty.path; - // Don't generate a type if it was substituted - the target type might - // not be in the type registry + our resolution already performs the substitution. - if self.type_substitutes.contains(path) { - continue; - } - - let namespace = path.namespace(); - - // prelude types e.g. Option/Result have no namespace, so we don't generate them - if namespace.is_empty() { - continue; - } - - // Lazily create submodules for the encountered namespace path, if they don't exist - let innermost_module = namespace - .iter() - .map(|segment| Ident::new(segment, Span::call_site())) - .fold(&mut root_mod, |module, ident| { - module - .children - .entry(ident.clone()) - .or_insert_with(|| Module::new(ident, root_mod_ident.clone())) - }); - - innermost_module - .types - .insert(path.clone(), TypeDefGen::from_type(&ty.ty, self)?); - } - - Ok(root_mod) - } - - /// # Panics - /// - /// If no type with the given id found in the type registry. - pub fn resolve_type(&self, id: u32) -> Type { - self.type_registry - .resolve(id) - .unwrap_or_else(|| panic!("No type with id {id} found")) - .clone() - } - - /// Get the type path for a field of a struct or an enum variant, providing any generic - /// type parameters from the containing type. This is for identifying where a generic type - /// parameter is used in a field type e.g. - /// - /// ```rust - /// struct S { - /// a: T, // `T` is the "parent" type param from the containing type. - /// b: Vec>, // nested use of generic type param `T`. - /// } - /// ``` - /// - /// This allows generating the correct generic field type paths. - /// - /// # Panics - /// - /// If no type with the given id found in the type registry. - pub fn resolve_field_type_path( - &self, - id: u32, - parent_type_params: &[TypeParameter], - original_name: Option<&str>, - ) -> TypePath { - self.resolve_type_path_recurse(id, true, parent_type_params, original_name) - } - - /// Get the type path for the given type identifier. - /// - /// # Panics - /// - /// If no type with the given id found in the type registry. - pub fn resolve_type_path(&self, id: u32) -> TypePath { - self.resolve_type_path_recurse(id, false, &[], None) - } - - /// Visit each node in a possibly nested type definition to produce a type path. - /// - /// e.g `Result>, String>` - /// - /// if `original_name` is `Some(original_name)`, the resolved type needs to have the same `original_name`. - fn resolve_type_path_recurse( - &self, - id: u32, - is_field: bool, - parent_type_params: &[TypeParameter], - original_name: Option<&str>, - ) -> TypePath { - if let Some(parent_type_param) = parent_type_params.iter().find(|tp| { - tp.concrete_type_id == id - && original_name.map_or(true, |original_name| tp.original_name == original_name) - }) { - return TypePath::from_parameter(parent_type_param.clone()); - } - - let mut ty = self.resolve_type(id); - - if ty.path.ident() == Some("Cow".to_string()) { - ty = self.resolve_type( - ty.type_params[0] - .ty - .expect("type parameters to Cow are not expected to be skipped; qed") - .id, - ) - } - - let params: Vec<_> = ty - .type_params - .iter() - .filter_map(|f| { - f.ty.map(|f| self.resolve_type_path_recurse(f.id, false, parent_type_params, None)) - }) - .collect(); - - let ty = match &ty.type_def { - TypeDef::Composite(_) | TypeDef::Variant(_) => { - if let Some(ty) = self - .type_substitutes - .for_path_with_params(&ty.path, ¶ms) - { - ty - } else { - TypePathType::from_type_def_path(&ty.path, self.types_mod_ident.clone(), params) - } - } - TypeDef::Primitive(primitive) => TypePathType::Primitive { - def: primitive.clone(), - }, - TypeDef::Array(arr) => TypePathType::Array { - len: arr.len as usize, - of: Box::new(self.resolve_type_path_recurse( - arr.type_param.id, - false, - parent_type_params, - None, - )), - }, - TypeDef::Sequence(seq) => TypePathType::Vec { - of: Box::new(self.resolve_type_path_recurse( - seq.type_param.id, - false, - parent_type_params, - None, - )), - }, - TypeDef::Tuple(tuple) => TypePathType::Tuple { - elements: tuple - .fields - .iter() - .map(|f| self.resolve_type_path_recurse(f.id, false, parent_type_params, None)) - .collect(), - }, - TypeDef::Compact(compact) => TypePathType::Compact { - inner: Box::new(self.resolve_type_path_recurse( - compact.type_param.id, - false, - parent_type_params, - None, - )), - is_field, - crate_path: self.crate_path.clone(), - }, - TypeDef::BitSequence(bitseq) => TypePathType::BitVec { - bit_order_type: Box::new(self.resolve_type_path_recurse( - bitseq.bit_order_type.id, - false, - parent_type_params, - None, - )), - bit_store_type: Box::new(self.resolve_type_path_recurse( - bitseq.bit_store_type.id, - false, - parent_type_params, - None, - )), - crate_path: self.crate_path.clone(), - }, - }; - - TypePath::from_type(ty) - } - - /// Returns the derives to be applied to all generated types. - pub fn default_derives(&self) -> &Derives { - self.derives.default_derives() - } - - /// Returns the type registry. - pub fn types(&self) -> &PortableRegistry { - self.type_registry - } - - /// Returns the derives to be applied to a generated type. - pub fn type_derives(&self, ty: &Type) -> Result { - let joined_path = ty.path.segments.join("::"); - let ty_path: syn::TypePath = syn::parse_str(&joined_path) - .map_err(|e| CodegenError::InvalidTypePath(joined_path, e))?; - Ok(self.derives.resolve(&ty_path)) - } - - /// The name of the module which will contain the generated types. - pub fn types_mod_ident(&self) -> &Ident { - &self.types_mod_ident - } - - /// The `subxt` crate access path in the generated code. - pub fn crate_path(&self) -> &syn::Path { - &self.crate_path - } - - /// True if codegen should generate the documentation for the API. - pub fn should_gen_docs(&self) -> bool { - self.should_gen_docs - } -} - -/// Represents a Rust `mod`, containing generated types and child `mod`s. -#[derive(Debug)] -pub struct Module { - name: Ident, - root_mod: Ident, - children: BTreeMap, - types: BTreeMap, TypeDefGen>, -} - -impl ToTokens for Module { - fn to_tokens(&self, tokens: &mut TokenStream) { - let name = &self.name; - let root_mod = &self.root_mod; - let modules = self.children.values(); - let types = self.types.values().clone(); - - tokens.extend(quote! { - pub mod #name { - use super::#root_mod; - - #( #modules )* - #( #types )* - } - }) - } -} - -impl Module { - /// Create a new [`Module`], with a reference to the root `mod` for resolving type paths. - pub(crate) fn new(name: Ident, root_mod: Ident) -> Self { - Self { - name, - root_mod, - children: BTreeMap::new(), - types: BTreeMap::new(), - } - } - - /// Returns the module ident. - pub fn ident(&self) -> &Ident { - &self.name - } - - /// Returns this `Module`s child `mod`s. - pub fn children(&self) -> impl Iterator { - self.children.iter() - } - - /// Returns the generated types. - pub fn types(&self) -> impl Iterator, &TypeDefGen)> { - self.types.iter() - } - - /// Returns the root `mod` used for resolving type paths. - pub fn root_mod(&self) -> &Ident { - &self.root_mod - } -} diff --git a/codegen/src/types/substitutes.rs b/codegen/src/types/substitutes.rs deleted file mode 100644 index c2639c3736..0000000000 --- a/codegen/src/types/substitutes.rs +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use crate::error::TypeSubstitutionError; -use std::{borrow::Borrow, collections::HashMap}; -use syn::{parse_quote, spanned::Spanned as _}; - -use super::{TypePath, TypePathType}; - -/// A map of type substitutes. We match on the paths to generated types in order -/// to figure out when to swap said type with some provided substitute. -#[derive(Debug)] -pub struct TypeSubstitutes { - substitutes: HashMap, -} - -#[derive(Debug)] -struct Substitute { - path: syn::Path, - param_mapping: TypeParamMapping, -} - -#[derive(Debug)] -enum TypeParamMapping { - // Pass any generics from source to target type - PassThrough, - // Replace any ident seen in the path with the input generic type at this index - Specified(Vec<(syn::Ident, usize)>), -} - -macro_rules! path_segments { - ($($ident: ident)::*) => { - PathSegments( - [$(stringify!($ident)),*].into_iter().map(String::from).collect::>() - ) - } -} - -impl Default for TypeSubstitutes { - fn default() -> Self { - Self::new() - } -} - -impl TypeSubstitutes { - /// Creates a new `TypeSubstitutes` with no default derives. - pub fn new() -> Self { - Self { - substitutes: HashMap::new(), - } - } - - /// Creates a new `TypeSubstitutes` with some default substitutions in place. - /// - /// The `crate_path` denotes the `subxt` crate access path in the - /// generated code. - pub fn with_default_substitutes(crate_path: &syn::Path) -> Self { - // Some hardcoded default type substitutes, can be overridden by user - let defaults = [ - ( - path_segments!(bitvec::order::Lsb0), - parse_quote!(#crate_path::utils::bits::Lsb0), - ), - ( - path_segments!(bitvec::order::Msb0), - parse_quote!(#crate_path::utils::bits::Msb0), - ), - ( - path_segments!(sp_core::crypto::AccountId32), - parse_quote!(#crate_path::utils::AccountId32), - ), - ( - path_segments!(sp_runtime::multiaddress::MultiAddress), - parse_quote!(#crate_path::utils::MultiAddress), - ), - ( - path_segments!(primitive_types::H160), - parse_quote!(#crate_path::utils::H160), - ), - ( - path_segments!(primitive_types::H256), - parse_quote!(#crate_path::utils::H256), - ), - ( - path_segments!(primitive_types::H512), - parse_quote!(#crate_path::utils::H512), - ), - ( - path_segments!(frame_support::traits::misc::WrapperKeepOpaque), - parse_quote!(#crate_path::utils::WrapperKeepOpaque), - ), - // BTreeMap and BTreeSet impose an `Ord` constraint on their key types. This - // can cause an issue with generated code that doesn't impl `Ord` by default. - // Decoding them to Vec by default (KeyedVec is just an alias for Vec with - // suitable type params) avoids these issues. - ( - path_segments!(BTreeMap), - parse_quote!(#crate_path::utils::KeyedVec), - ), - (path_segments!(BTreeSet), parse_quote!(::std::vec::Vec)), - // The `UncheckedExtrinsic(pub Vec)` is part of the runtime API calls. - // The inner bytes represent the encoded extrinsic, however when deriving the - // `EncodeAsType` the bytes would be re-encoded. This leads to the bytes - // being altered by adding the length prefix in front of them. - ( - path_segments!(sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic), - parse_quote!(#crate_path::utils::UncheckedExtrinsic), - ), - ]; - - let default_substitutes = defaults - .into_iter() - .map(|(k, v)| { - ( - k, - Substitute { - path: v, - param_mapping: TypeParamMapping::PassThrough, - }, - ) - }) - .collect(); - - Self { - substitutes: default_substitutes, - } - } - - /// Insert the given substitution, overwriting any other with the same path. - pub fn insert( - &mut self, - source: syn::Path, - target: AbsolutePath, - ) -> Result<(), TypeSubstitutionError> { - let (key, val) = TypeSubstitutes::parse_path_substitution(source, target.0)?; - self.substitutes.insert(key, val); - Ok(()) - } - - /// Only insert the given substitution if a substitution at that path doesn't - /// already exist. - pub fn insert_if_not_exists( - &mut self, - source: syn::Path, - target: AbsolutePath, - ) -> Result<(), TypeSubstitutionError> { - let (key, val) = TypeSubstitutes::parse_path_substitution(source, target.0)?; - self.substitutes.entry(key).or_insert(val); - Ok(()) - } - - /// Add a bunch of source to target type substitutions. - pub fn extend( - &mut self, - elems: impl IntoIterator, - ) -> Result<(), TypeSubstitutionError> { - for (source, target) in elems.into_iter() { - let (key, val) = TypeSubstitutes::parse_path_substitution(source, target.0)?; - self.substitutes.insert(key, val); - } - Ok(()) - } - - /// Given a source and target path, parse the type params to work out the mapping from - /// source to target, and output the source => substitution mapping that we work out from this. - fn parse_path_substitution( - src_path: syn::Path, - target_path: syn::Path, - ) -> Result<(PathSegments, Substitute), TypeSubstitutionError> { - let param_mapping = Self::parse_path_param_mapping(&src_path, &target_path)?; - - Ok(( - PathSegments::from(&src_path), - Substitute { - // Note; at this point, target_path might have some generics still. These - // might be hardcoded types that we want to keep, so leave them here for now. - path: target_path, - param_mapping, - }, - )) - } - - /// Given a source and target path, parse the type params to work out the mapping from - /// source to target, and return it. - fn parse_path_param_mapping( - src_path: &syn::Path, - target_path: &syn::Path, - ) -> Result { - let Some(syn::PathSegment { - arguments: src_path_args, - .. - }) = src_path.segments.last() - else { - return Err(TypeSubstitutionError::EmptySubstitutePath(src_path.span())); - }; - let Some(syn::PathSegment { - arguments: target_path_args, - .. - }) = target_path.segments.last() - else { - return Err(TypeSubstitutionError::EmptySubstitutePath( - target_path.span(), - )); - }; - - // Get hold of the generic args for the "from" type, erroring if they aren't valid. - let source_args = match src_path_args { - syn::PathArguments::None => { - // No generics defined on the source type: - Vec::new() - } - syn::PathArguments::AngleBracketed(args) => { - // We have generics like defined on the source type (error for any non-ident type): - args.args - .iter() - .map(|arg| match get_valid_from_substitution_type(arg) { - Some(ident) => Ok(ident), - None => Err(TypeSubstitutionError::InvalidFromType(arg.span())), - }) - .collect::, _>>()? - } - syn::PathArguments::Parenthesized(args) => { - // Generics like (A,B) -> defined; not allowed: - return Err(TypeSubstitutionError::ExpectedAngleBracketGenerics( - args.span(), - )); - } - }; - - // Get hold of the generic args for the "to" type, erroring if they aren't valid. - let target_args = match target_path_args { - syn::PathArguments::None => { - // No generics on target. - Vec::new() - } - syn::PathArguments::AngleBracketed(args) => { - // We have generics like defined on the target type. - args.args - .iter() - .map(|arg| match get_valid_to_substitution_type(arg) { - Some(arg) => Ok(arg), - None => Err(TypeSubstitutionError::InvalidToType(arg.span())), - }) - .collect::, _>>()? - } - syn::PathArguments::Parenthesized(args) => { - // Generics like (A,B) -> defined; not allowed: - return Err(TypeSubstitutionError::ExpectedAngleBracketGenerics( - args.span(), - )); - } - }; - - // If no generics defined on source or target, we just apply any concrete generics - // to the substitute type. - if source_args.is_empty() && target_args.is_empty() { - return Ok(TypeParamMapping::PassThrough); - } - - // Make a note of the idents in the source args and their indexes. - let mapping = source_args - .into_iter() - .enumerate() - .map(|(idx, ident)| (ident.clone(), idx)) - .collect(); - - Ok(TypeParamMapping::Specified(mapping)) - } - - /// Given a source type path, return whether a substitute exists for it. - pub fn contains(&self, path: impl Into) -> bool { - self.substitutes.contains_key(&path.into()) - } - - /// Given a source type path and the resolved, supplied type parameters, - /// return a new path and optionally overwritten type parameters. - pub fn for_path_with_params( - &self, - path: impl Into, - params: &[TypePath], - ) -> Option { - // If we find a substitute type, we'll take the substitute path, and - // swap any idents with their new concrete types. - fn replace_params( - mut substitute_path: syn::Path, - params: &[TypePath], - mapping: &TypeParamMapping, - ) -> TypePathType { - match mapping { - // We need to map the input params to the output params somehow: - TypeParamMapping::Specified(mapping) => { - // A map from ident name to replacement path. - let replacement_map: Vec<(&syn::Ident, &TypePath)> = mapping - .iter() - .filter_map(|(ident, idx)| params.get(*idx).map(|param| (ident, param))) - .collect(); - - // Replace params in our substitute path with the incoming ones as needed. - // No need if no replacements given. - if !replacement_map.is_empty() { - replace_path_params_recursively(&mut substitute_path, &replacement_map); - } - - TypePathType::Path { - path: substitute_path, - params: Vec::new(), - } - } - // No mapping; just hand back the substitute path and input params. - TypeParamMapping::PassThrough => TypePathType::Path { - path: substitute_path, - params: params.to_vec(), - }, - } - } - - let path = path.into(); - - self.substitutes - .get(&path) - .map(|sub| replace_params(sub.path.clone(), params, &sub.param_mapping)) - } -} - -/// Identifiers joined by the `::` separator. -/// -/// We use this as a common denominator, since we need a consistent keys for both -/// `syn::TypePath` and `scale_info::ty::path::Path` types. -#[derive(Debug, Hash, PartialEq, Eq)] -pub struct PathSegments(Vec); - -impl From<&syn::Path> for PathSegments { - fn from(path: &syn::Path) -> Self { - PathSegments(path.segments.iter().map(|x| x.ident.to_string()).collect()) - } -} - -impl From<&scale_info::Path> for PathSegments { - fn from(path: &scale_info::Path) -> Self { - PathSegments( - path.segments - .iter() - .map(|x| x.as_ref().to_owned()) - .collect(), - ) - } -} - -/// Dig through a `syn::TypePath` (this is provided by the user in a type substitution definition as the "to" type) and -/// swap out any type params which match the idents given in the "from" type with the corresponding concrete types. -/// -/// eg if we have: -/// -/// ```text -/// from = sp_runtime::MultiAddress, -/// to = ::subxt::utils::Static<::sp_runtime::MultiAddress> -/// ``` -/// -/// And we encounter a `sp_runtime::MultiAddress`, then we will pass the `::sp_runtime::MultiAddress` -/// type param value into this call to turn it into `::sp_runtime::MultiAddress`. -fn replace_path_params_recursively, P: Borrow>( - path: &mut syn::Path, - params: &Vec<(I, P)>, -) { - for segment in &mut path.segments { - let syn::PathArguments::AngleBracketed(args) = &mut segment.arguments else { - continue; - }; - for arg in &mut args.args { - let syn::GenericArgument::Type(ty) = arg else { - continue; - }; - let syn::Type::Path(path) = ty else { - continue; - }; - if let Some(ident) = get_ident_from_type_path(path) { - if let Some((_, replacement)) = params.iter().find(|(i, _)| ident == i.borrow()) { - *ty = replacement.borrow().to_syn_type(); - continue; - } - } - replace_path_params_recursively(&mut path.path, params); - } - } -} - -/// Given a "to" type in a type substitution, return the TypePath inside or None if -/// it's not a valid "to" type. -fn get_valid_to_substitution_type(arg: &syn::GenericArgument) -> Option<&syn::TypePath> { - let syn::GenericArgument::Type(syn::Type::Path(type_path)) = arg else { - // We are looking for a type, not a lifetime or anything else - return None; - }; - Some(type_path) -} - -/// Given a "from" type in a type substitution, return the Ident inside or None if -/// it's not a valid "from" type. -fn get_valid_from_substitution_type(arg: &syn::GenericArgument) -> Option<&syn::Ident> { - let syn::GenericArgument::Type(syn::Type::Path(type_path)) = arg else { - // We are looking for a type, not a lifetime or anything else - return None; - }; - get_ident_from_type_path(type_path) -} - -/// Given a type path, return the single ident representing it if that's all it is. -fn get_ident_from_type_path(type_path: &syn::TypePath) -> Option<&syn::Ident> { - if type_path.qself.is_some() { - // No "" type thing - return None; - } - if type_path.path.leading_colon.is_some() { - // No leading "::" - return None; - } - if type_path.path.segments.len() > 1 { - // The path should just be a single ident, not multiple - return None; - } - let Some(segment) = type_path.path.segments.last() else { - // Get the single ident (should be infallible) - return None; - }; - if !segment.arguments.is_empty() { - // The ident shouldn't have any of it's own generic args like A - return None; - } - Some(&segment.ident) -} - -/// Whether a path is absolute - starts with `::` or `crate`. -fn is_absolute(path: &syn::Path) -> bool { - path.leading_colon.is_some() - || path - .segments - .first() - .map_or(false, |segment| segment.ident == "crate") -} - -pub struct AbsolutePath(pub syn::Path); - -impl TryFrom for AbsolutePath { - type Error = TypeSubstitutionError; - fn try_from(value: syn::Path) -> Result { - if is_absolute(&value) { - Ok(AbsolutePath(value)) - } else { - Err(TypeSubstitutionError::ExpectedAbsolutePath(value.span())) - } - } -} - -#[cfg(test)] -mod test { - use super::*; - - macro_rules! syn_path { - ($path:path) => {{ - let path: syn::Path = syn::parse_quote!($path); - path - }}; - } - - macro_rules! type_path { - ($path:path) => {{ - let path: syn::Path = syn::parse_quote!($path); - TypePath::from_syn_path(path) - }}; - } - - fn ident(name: &'static str) -> syn::Ident { - syn::Ident::new(name, proc_macro2::Span::call_site()) - } - - #[test] - #[rustfmt::skip] - fn replacing_nested_type_params_works() { - // Original path, replacement ident->paths, expected output path - let paths = [ - // Works ok if nothing to replace - ( - syn_path!(::some::path::Foo<::other::Path>), - vec![], - syn_path!(::some::path::Foo<::other::Path>), - ), - // Simple top level replacing - ( - syn_path!(::some::path::Foo), - vec![(ident("A"), type_path!(::new::Value))], - syn_path!(::some::path::Foo<::new::Value>), - ), - // More deeply nested replacing works too - ( - syn_path!(::some::path::Foo<::other::Path>), - vec![(ident("A"), type_path!(::new::Value))], - syn_path!(::some::path::Foo<::other::Path<::new::Value, B>>), - ), - ( - syn_path!(::some::path::Foo<::other::Path>), - vec![ - (ident("A"), type_path!(::new::A)), - (ident("B"), type_path!(::new::B)), - ], - syn_path!(::some::path::Foo<::other::Path<::new::A, ::new::B>>), - ), - ( - syn_path!(::some::path::Foo<::other::Path>>, C>), - vec![ - (ident("A"), type_path!(::new::A)), - (ident("B"), type_path!(::new::B)), - ], - syn_path!(::some::path::Foo<::other::Path<::new::A, ::more::path::to<::something::Argh<::new::B>>>,C>), - ), - // The same ident will be replaced as many times as needed: - ( - syn_path!(::some::path::Foo<::other::Path, A>>), - vec![(ident("A"), type_path!(::new::Value))], - syn_path!(::some::path::Foo<::other::Path<::new::Value, ::foo::Argh<::new::Value, B>, ::new::Value>>), - ), - ]; - - for (mut path, replacements, expected) in paths { - replace_path_params_recursively(&mut path, &replacements); - assert_eq!(path, expected); - } - } -} diff --git a/codegen/src/types/tests.rs b/codegen/src/types/tests.rs deleted file mode 100644 index 7aa91e21e1..0000000000 --- a/codegen/src/types/tests.rs +++ /dev/null @@ -1,1323 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use super::*; -use pretty_assertions::assert_eq; -use scale_info::{meta_type, scale, Registry, TypeInfo}; -use syn::parse_quote; - -const MOD_PATH: &[&str] = &["subxt_codegen", "types", "tests"]; - -fn get_mod<'a>(module: &'a Module, path_segs: &[&'static str]) -> Option<&'a Module> { - let (mod_name, rest) = path_segs.split_first()?; - let mod_ident = Ident::new(mod_name, Span::call_site()); - let module = module.children.get(&mod_ident)?; - if rest.is_empty() { - Some(module) - } else { - get_mod(module, rest) - } -} - -#[test] -fn generate_struct_with_primitives() { - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - a: bool, - b: u32, - c: char, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub a: ::core::primitive::bool, - pub b: ::core::primitive::u32, - pub c: ::core::primitive::char, - } - } - } - .to_string() - ) -} - -#[test] -fn generate_struct_with_a_struct_field() { - #[allow(unused)] - #[derive(TypeInfo)] - struct Parent { - a: bool, - b: Child, - } - - #[allow(unused)] - #[derive(TypeInfo)] - struct Child { - a: i32, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Child { - pub a: ::core::primitive::i32, - } - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Parent { - pub a: ::core::primitive::bool, - pub b: root::subxt_codegen::types::tests::Child, - } - } - } - .to_string() - ) -} - -#[test] -fn generate_tuple_struct() { - #[allow(unused)] - #[derive(TypeInfo)] - struct Parent(bool, Child); - - #[allow(unused)] - #[derive(TypeInfo)] - struct Child(i32); - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Child(pub ::core::primitive::i32,); - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Parent(pub ::core::primitive::bool, pub root::subxt_codegen::types::tests::Child,); - } - } - .to_string() - ) -} - -#[test] -fn derive_compact_as_for_uint_wrapper_structs() { - #[allow(unused)] - #[derive(TypeInfo)] - struct Su8 { - a: u8, - } - #[allow(unused)] - #[derive(TypeInfo)] - struct TSu8(u8); - #[allow(unused)] - #[derive(TypeInfo)] - struct Su16 { - a: u16, - } - #[allow(unused)] - #[derive(TypeInfo)] - struct TSu16(u16); - #[allow(unused)] - #[derive(TypeInfo)] - struct Su32 { - a: u32, - } - #[allow(unused)] - #[derive(TypeInfo)] - struct TSu32(u32); - #[allow(unused)] - #[derive(TypeInfo)] - struct Su64 { - a: u64, - } - #[allow(unused)] - #[derive(TypeInfo)] - struct TSu64(u64); - #[allow(unused)] - #[derive(TypeInfo)] - struct Su128 { - a: u128, - } - #[allow(unused)] - #[derive(TypeInfo)] - struct TSu128(u128); - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Su128 { pub a: ::core::primitive::u128, } - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Su16 { pub a: ::core::primitive::u16, } - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Su32 { pub a: ::core::primitive::u32, } - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Su64 { pub a: ::core::primitive::u64, } - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Su8 { pub a: ::core::primitive::u8, } - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct TSu128(pub ::core::primitive::u128,); - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct TSu16(pub ::core::primitive::u16,); - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct TSu32(pub ::core::primitive::u32,); - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct TSu64(pub ::core::primitive::u64,); - - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct TSu8(pub ::core::primitive::u8,); - } - } - .to_string() - ) -} - -#[test] -fn generate_enum() { - #[allow(unused)] - #[derive(TypeInfo)] - enum E { - A, - B(bool), - C { a: u32 }, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub enum E { - # [codec (index = 0)] - A, - # [codec (index = 1)] - B (::core::primitive::bool,), - # [codec (index = 2)] - C { a: ::core::primitive::u32, }, - } - } - } - .to_string() - ) -} - -#[test] -fn compact_fields() { - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - #[codec(compact)] - a: u32, - } - - #[allow(unused)] - #[derive(TypeInfo)] - struct TupleStruct(#[codec(compact)] u32); - - #[allow(unused)] - #[derive(TypeInfo)] - enum E { - A { - #[codec(compact)] - a: u32, - }, - B(#[codec(compact)] u32), - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub enum E { - # [codec (index = 0)] - A { - #[codec(compact)] - a: ::core::primitive::u32, - }, - # [codec (index = 1)] - B( #[codec(compact)] ::core::primitive::u32,), - } - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - #[codec(compact)] pub a: ::core::primitive::u32, - } - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct TupleStruct(#[codec(compact)] pub ::core::primitive::u32,); - } - } - .to_string() - ) -} - -#[test] -fn compact_generic_parameter() { - use scale::Compact; - - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - a: Option<::Type>, - nested: Option, u8>>, - vector: Vec>, - array: [Compact; 32], - tuple: (Compact, Compact), - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub a: ::core::option::Option<::subxt_path::ext::codec::Compact<::core::primitive::u128> >, - pub nested: ::core::option::Option<::core::result::Result<::subxt_path::ext::codec::Compact<::core::primitive::u128>, ::core::primitive::u8 > >, - pub vector: ::std::vec::Vec<::subxt_path::ext::codec::Compact<::core::primitive::u16> >, - pub array: [::subxt_path::ext::codec::Compact<::core::primitive::u8>; 32usize], - pub tuple: (::subxt_path::ext::codec::Compact<::core::primitive::u8>, ::subxt_path::ext::codec::Compact<::core::primitive::u16>,), - } - } - } - .to_string() - ) -} - -#[test] -fn generate_array_field() { - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - a: [u8; 32], - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub a: [::core::primitive::u8; 32usize], - } - } - } - .to_string() - ) -} - -#[test] -fn option_fields() { - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - a: Option, - b: Option, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub a: ::core::option::Option<::core::primitive::bool>, - pub b: ::core::option::Option<::core::primitive::u32>, - } - } - } - .to_string() - ) -} - -#[test] -fn box_fields_struct() { - use std::boxed::Box; - - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - a: std::boxed::Box, - b: Box, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub a: ::std::boxed::Box<::core::primitive::bool>, - pub b: ::std::boxed::Box<::core::primitive::u32>, - } - } - } - .to_string() - ) -} - -#[test] -fn box_fields_enum() { - use std::boxed::Box; - - #[allow(unused)] - #[derive(TypeInfo)] - enum E { - A(Box), - B { a: Box }, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub enum E { - # [codec (index = 0)] - A(::std::boxed::Box<::core::primitive::bool>,), - # [codec (index = 1)] - B { a: ::std::boxed::Box<::core::primitive::u32>, }, - } - } - } - .to_string() - ) -} - -#[test] -fn range_fields() { - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - a: core::ops::Range, - b: core::ops::RangeInclusive, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub a: ::core::ops::Range<::core::primitive::u32>, - pub b: ::core::ops::RangeInclusive<::core::primitive::u32>, - } - } - } - .to_string() - ) -} - -#[test] -fn generics() { - #[allow(unused)] - #[derive(TypeInfo)] - struct Foo { - a: T, - } - - #[allow(unused)] - #[derive(TypeInfo)] - struct Bar { - b: Foo, - c: Foo, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Bar { - pub b: root::subxt_codegen::types::tests::Foo<::core::primitive::u32>, - pub c: root::subxt_codegen::types::tests::Foo<::core::primitive::u8>, - } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Foo<_0> { - pub a: _0, - } - } - } - .to_string() - ) -} - -#[test] -fn generics_nested() { - #[allow(unused)] - #[derive(TypeInfo)] - struct Foo { - a: T, - b: Option<(T, U)>, - } - - #[allow(unused)] - #[derive(TypeInfo)] - struct Bar { - b: Foo, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::>()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Bar<_0> { - pub b: root::subxt_codegen::types::tests::Foo<_0, ::core::primitive::u32>, - } - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Foo<_0, _1> { - pub a: _0, - pub b: ::core::option::Option<(_0, _1,)>, - } - } - } - .to_string() - ) -} - -#[test] -fn generate_bitvec() { - use bitvec::{ - order::{Lsb0, Msb0}, - vec::BitVec, - }; - - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - lsb: BitVec, - msb: BitVec, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub lsb: ::subxt_path::utils::bits::DecodedBits<::core::primitive::u8, ::subxt_path::utils::bits::Lsb0>, - pub msb: ::subxt_path::utils::bits::DecodedBits<::core::primitive::u16, ::subxt_path::utils::bits::Msb0>, - } - } - } - .to_string() - ) -} - -#[test] -fn generics_with_alias_adds_phantom_data_marker() { - trait Trait { - type Type; - } - - impl Trait for bool { - type Type = u32; - } - - type Foo = ::Type; - type Bar = (::Type, ::Type); - - #[allow(unused)] - #[derive(TypeInfo)] - struct NamedFields { - b: Foo, - } - - #[allow(unused)] - #[derive(TypeInfo)] - struct UnnamedFields(Bar); - - let mut registry = Registry::new(); - registry.register_type(&meta_type::>()); - registry.register_type(&meta_type::>()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct NamedFields<_0> { - pub b: ::core::primitive::u32, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_0> - } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct UnnamedFields<_0, _1> ( - pub (::core::primitive::u32, ::core::primitive::u32,), - #[codec(skip)] - pub ::core::marker::PhantomData<(_0, _1)> - ); - } - } - .to_string() - ) -} - -#[test] -fn modules() { - mod m { - pub mod a { - #[allow(unused)] - #[derive(scale_info::TypeInfo)] - pub struct Foo; - - pub mod b { - #[allow(unused)] - #[derive(scale_info::TypeInfo)] - pub struct Bar { - a: super::Foo, - } - } - } - - pub mod c { - #[allow(unused)] - #[derive(scale_info::TypeInfo)] - pub struct Foo { - a: super::a::b::Bar, - } - } - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - pub mod m { - use super::root; - pub mod a { - use super::root; - - pub mod b { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Bar { - pub a: root::subxt_codegen::types::tests::m::a::Foo, - } - } - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Foo; - } - - pub mod c { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct Foo { - pub a: root::subxt_codegen::types::tests::m::a::b::Bar, - } - } - } - } - } - .to_string() - ) -} - -#[test] -fn dont_force_struct_names_camel_case() { - #[allow(unused)] - #[derive(TypeInfo)] - struct AB; - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct AB; - } - } - .to_string() - ) -} - -#[test] -fn apply_user_defined_derives_for_all_types() { - #[allow(unused)] - #[derive(TypeInfo)] - struct A(B); - - #[allow(unused)] - #[derive(TypeInfo)] - struct B; - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - // configure derives - let mut derives = DerivesRegistry::with_default_derives(&crate_path); - derives.extend_for_all( - vec![parse_quote!(Clone), parse_quote!(Eq)], - vec![parse_quote!(#[some_attribute])], - ); - - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - derives, - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Clone, Debug, Eq)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - #[some_attribute] - pub struct A(pub root :: subxt_codegen :: types :: tests :: B,); - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Clone, Debug, Eq)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - #[some_attribute] - pub struct B; - } - } - .to_string() - ) -} - -#[test] -fn apply_user_defined_derives_for_specific_types() { - #[allow(unused)] - #[derive(TypeInfo)] - struct A(B); - - #[allow(unused)] - #[derive(TypeInfo)] - struct B(C); - - #[allow(unused)] - #[derive(TypeInfo)] - struct C; - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - // configure derives - let mut derives = DerivesRegistry::with_default_derives(&crate_path); - // for all types - derives.extend_for_all(vec![parse_quote!(Eq)], vec![]); - // for specific types - derives.extend_for_type( - parse_quote!(subxt_codegen::types::tests::B), - vec![parse_quote!(Hash)], - vec![parse_quote!(#[some_attribute])], - ); - // duplicates (in this case `Eq`) will be combined (i.e. a set union) - derives.extend_for_type( - parse_quote!(subxt_codegen::types::tests::C), - vec![ - parse_quote!(Eq), - parse_quote!(Ord), - parse_quote!(PartialOrd), - ], - vec![], - ); - - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - derives, - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug, Eq)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct A(pub root :: subxt_codegen :: types :: tests :: B,); - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug, Eq, Hash)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - #[some_attribute] - pub struct B(pub root :: subxt_codegen :: types :: tests :: C,); - - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug, Eq, Ord, PartialOrd)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct C; - } - } - .to_string() - ) -} - -#[test] -fn opt_out_from_default_derives() { - #[allow(unused)] - #[derive(TypeInfo)] - struct A(B); - - #[allow(unused)] - #[derive(TypeInfo)] - struct B; - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - // configure derives - let mut derives = DerivesRegistry::new(); - derives.extend_for_all( - vec![parse_quote!(Clone), parse_quote!(Eq)], - vec![parse_quote!(#[some_attribute])], - ); - derives.extend_for_type( - parse_quote!(subxt_codegen::types::tests::B), - vec![parse_quote!(Hash)], - vec![parse_quote!(#[some_other_attribute])], - ); - - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::with_default_substitutes(&crate_path), - derives, - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - - #[derive(Clone, Eq)] - #[some_attribute] - pub struct A(pub root :: subxt_codegen :: types :: tests :: B,); - - #[derive(Clone, Eq, Hash)] - #[some_attribute] - #[some_other_attribute] - pub struct B; - } - } - .to_string() - ) -} - -/// By default a BTreeMap would be replaced by a KeyedVec. -/// This test demonstrates that it does not happen if we opt out of default type substitutes. -#[test] -fn opt_out_from_default_substitutes() { - use std::collections::BTreeMap; - - #[allow(unused)] - #[derive(TypeInfo)] - struct S { - map: BTreeMap, - } - - let mut registry = Registry::new(); - registry.register_type(&meta_type::()); - let portable_types: PortableRegistry = registry.into(); - - let crate_path = syn::parse_str("::subxt_path").unwrap(); - let type_gen = TypeGenerator::new( - &portable_types, - "root", - TypeSubstitutes::new(), - DerivesRegistry::with_default_derives(&crate_path), - crate_path, - true, - ); - let types = type_gen.generate_types_mod().expect("Valid type mod; qed"); - let tests_mod = get_mod(&types, MOD_PATH).unwrap(); - - assert_eq!( - tests_mod.into_token_stream().to_string(), - quote! { - pub mod tests { - use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] - #[codec(crate = ::subxt_path::ext::codec)] - #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] - pub struct S { - pub map: ::std::collections::BTreeMap<:: core :: primitive :: u8,:: core :: primitive :: u8>, - } - } - }.to_string() - ) -} diff --git a/codegen/src/types/type_def.rs b/codegen/src/types/type_def.rs deleted file mode 100644 index 87f4f77259..0000000000 --- a/codegen/src/types/type_def.rs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use crate::error::CodegenError; - -use super::{ - CompositeDef, CompositeDefFields, Derives, TypeDefParameters, TypeGenerator, TypeParameter, -}; -use proc_macro2::TokenStream; -use quote::{format_ident, quote}; -use scale_info::{form::PortableForm, Type, TypeDef}; -use syn::parse_quote; - -/// Generates a Rust `struct` or `enum` definition based on the supplied [`scale-info::Type`]. -/// -/// Field type paths are resolved via the `TypeGenerator`, which contains the registry of all -/// generated types in the module. -#[derive(Debug)] -pub struct TypeDefGen { - /// The type parameters of the type to be generated - type_params: TypeDefParameters, - /// The derives with which to annotate the generated type. - derives: Derives, - /// The kind of type to be generated. - ty_kind: TypeDefGenKind, - /// Type documentation. - ty_docs: TokenStream, -} - -impl TypeDefGen { - /// Construct a type definition for codegen from the given [`scale_info::Type`]. - pub fn from_type( - ty: &Type, - type_gen: &TypeGenerator, - ) -> Result { - let derives = type_gen.type_derives(ty)?; - let crate_path = type_gen.crate_path(); - let should_gen_docs = type_gen.should_gen_docs(); - - let type_params = ty - .type_params - .iter() - .enumerate() - .filter_map(|(i, tp)| match &tp.ty { - Some(ty) => { - let tp_name = format_ident!("_{}", i); - Some(TypeParameter { - concrete_type_id: ty.id, - original_name: tp.name.clone(), - name: tp_name, - }) - } - None => None, - }) - .collect::>(); - - let mut type_params = TypeDefParameters::new(type_params); - - let ty_kind = match &ty.type_def { - TypeDef::Composite(composite) => { - let type_name = ty.path.ident().expect("structs should have a name"); - let fields = CompositeDefFields::from_scale_info_fields( - &type_name, - &composite.fields, - type_params.params(), - type_gen, - )?; - type_params.update_unused(fields.field_types()); - let docs = should_gen_docs.then_some(&*ty.docs).unwrap_or_default(); - let composite_def = CompositeDef::struct_def( - ty, - &type_name, - type_params.clone(), - fields, - Some(parse_quote!(pub)), - type_gen, - docs, - crate_path, - None, - )?; - TypeDefGenKind::Struct(composite_def) - } - TypeDef::Variant(variant) => { - let type_name = ty.path.ident().expect("variants should have a name"); - - let variants = variant - .variants - .iter() - .map(|v| { - let fields = CompositeDefFields::from_scale_info_fields( - &v.name, - &v.fields, - type_params.params(), - type_gen, - )?; - type_params.update_unused(fields.field_types()); - let docs = should_gen_docs.then_some(&*v.docs).unwrap_or_default(); - let variant_def = CompositeDef::enum_variant_def(&v.name, fields, docs); - Ok((v.index, variant_def)) - }) - .collect::, CodegenError>>()?; - - TypeDefGenKind::Enum(type_name, variants) - } - _ => TypeDefGenKind::BuiltIn, - }; - - let docs = &ty.docs; - let ty_docs = should_gen_docs - .then_some(quote! { #( #[doc = #docs ] )* }) - .unwrap_or_default(); - - Ok(Self { - type_params, - derives, - ty_kind, - ty_docs, - }) - } - - /// are there unused type params? - pub fn has_unused_type_params(&self) -> bool { - self.type_params.has_unused_type_params() - } -} - -impl quote::ToTokens for TypeDefGen { - fn to_tokens(&self, tokens: &mut TokenStream) { - match &self.ty_kind { - TypeDefGenKind::Struct(composite) => composite.to_tokens(tokens), - TypeDefGenKind::Enum(type_name, variants) => { - let mut variants = variants - .iter() - .map(|(index, def)| { - let index = proc_macro2::Literal::u8_unsuffixed(*index); - quote! { - #[codec(index = #index)] - #def - } - }) - .collect::>(); - - if let Some(phantom) = self.type_params.unused_params_phantom_data() { - variants.push(quote! { - __Ignore(#phantom) - }) - } - - let enum_ident = format_ident!("{}", type_name); - let type_params = &self.type_params; - let derives = &self.derives; - let docs = &self.ty_docs; - let ty_toks = quote! { - #derives - #docs - pub enum #enum_ident #type_params { - #( #variants, )* - } - }; - tokens.extend(ty_toks); - } - TypeDefGenKind::BuiltIn => (), /* all built-in types should already be in scope */ - } - } -} - -#[allow(clippy::large_enum_variant)] -#[derive(Debug)] -pub enum TypeDefGenKind { - Struct(CompositeDef), - Enum(String, Vec<(u8, CompositeDef)>), - BuiltIn, -} diff --git a/codegen/src/types/type_def_params.rs b/codegen/src/types/type_def_params.rs deleted file mode 100644 index 155029fdd4..0000000000 --- a/codegen/src/types/type_def_params.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use super::TypeParameter; -use crate::types::CompositeDefFieldType; -use quote::quote; -use std::collections::BTreeSet; - -/// Represents the set of generic type parameters for generating a type definition e.g. the `T` in -/// `Foo`. -/// -/// Additionally this allows generating a `PhantomData` type for any type params which are unused -/// in the type definition itself. -#[derive(Clone, Debug, Default)] -pub struct TypeDefParameters { - params: Vec, - unused: BTreeSet, -} - -impl TypeDefParameters { - /// Create a new [`TypeDefParameters`] instance. - pub fn new(params: Vec) -> Self { - let unused = params.iter().cloned().collect(); - Self { params, unused } - } - - /// Update the set of unused type parameters by removing those that are used in the given - /// fields. - pub fn update_unused<'a>(&mut self, fields: impl Iterator) { - let mut used_type_params = BTreeSet::new(); - for field in fields { - field.type_path.parent_type_params(&mut used_type_params) - } - for used_type_param in &used_type_params { - self.unused.remove(used_type_param); - } - } - - /// Construct a [`core::marker::PhantomData`] for the type unused type params. - pub fn unused_params_phantom_data(&self) -> Option { - if self.unused.is_empty() { - return None; - } - let params = if self.unused.len() == 1 { - let param = self - .unused - .iter() - .next() - .expect("Checked for exactly one unused param"); - quote! { #param } - } else { - let params = self.unused.iter(); - quote! { ( #( #params ), * ) } - }; - Some(syn::parse_quote! { ::core::marker::PhantomData<#params> }) - } - - /// Returns the set of type parameters. - pub fn params(&self) -> &[TypeParameter] { - &self.params - } - - /// Returns true if there are any unused type params - pub fn has_unused_type_params(&self) -> bool { - !self.unused.is_empty() - } -} - -impl quote::ToTokens for TypeDefParameters { - fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { - if !self.params.is_empty() { - let params = &self.params; - tokens.extend(quote! { < #( #params ),* > }) - } - } -} diff --git a/codegen/src/types/type_path.rs b/codegen/src/types/type_path.rs deleted file mode 100644 index 044ee2df6e..0000000000 --- a/codegen/src/types/type_path.rs +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2019-2023 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use proc_macro2::{Ident, TokenStream}; -use quote::format_ident; -use scale_info::{form::PortableForm, Path, TypeDefPrimitive}; -use std::collections::BTreeSet; -use syn::parse_quote; - -/// An opaque struct representing a type path. The main usage of this is -/// to spit out as tokens in some `quote!{ ... }` macro; the inner structure -/// should be unimportant. -#[derive(Clone, Debug)] -pub struct TypePath(TypePathInner); - -#[derive(Clone, Debug)] -pub enum TypePathInner { - Parameter(TypeParameter), - Type(TypePathType), -} - -impl quote::ToTokens for TypePath { - fn to_tokens(&self, tokens: &mut TokenStream) { - let syn_type = self.to_syn_type(); - syn_type.to_tokens(tokens) - } -} - -impl TypePath { - /// Construct a [`TypePath`] from a [`TypeParameter`] - pub fn from_parameter(param: TypeParameter) -> TypePath { - TypePath(TypePathInner::Parameter(param)) - } - - /// Construct a [`TypePath`] from a [`TypeParameter`] - pub fn from_type(ty: TypePathType) -> TypePath { - TypePath(TypePathInner::Type(ty)) - } - - /// Construct a [`TypePath`] from a [`syn::TypePath`] - pub fn from_syn_path(path: syn::Path) -> TypePath { - // Note; this doesn't parse the parameters or anything, but since nothing external - // can inspect this structure, and the ToTokens impl works either way, it should be ok. - TypePath(TypePathInner::Type(TypePathType::Path { - path, - params: Vec::new(), - })) - } - - pub(crate) fn to_syn_type(&self) -> syn::Type { - match &self.0 { - TypePathInner::Parameter(ty_param) => syn::Type::Path(parse_quote! { #ty_param }), - TypePathInner::Type(ty) => ty.to_syn_type(), - } - } - - pub(crate) fn is_compact(&self) -> bool { - matches!(&self.0, TypePathInner::Type(ty) if ty.is_compact()) - } - - pub(crate) fn is_string(&self) -> bool { - matches!(&self.0, TypePathInner::Type(ty) if ty.is_string()) - } - - /// Returns the type parameters in a path which are inherited from the containing type. - /// - /// # Example - /// - /// ```rust - /// struct S { - /// a: Vec>, // the parent type param here is `T` - /// } - /// ``` - pub fn parent_type_params(&self, acc: &mut BTreeSet) { - match &self.0 { - TypePathInner::Parameter(type_parameter) => { - acc.insert(type_parameter.clone()); - } - TypePathInner::Type(type_path) => type_path.parent_type_params(acc), - } - } - - /// Gets the vector type parameter if the data is represented as `TypeDef::Sequence`. - /// - /// **Note:** Utilized for transforming `std::vec::Vec` into slices `&[T]` for the storage API. - pub fn vec_type_param(&self) -> Option<&TypePath> { - let ty = match &self.0 { - TypePathInner::Type(ty) => ty, - _ => return None, - }; - - match ty { - TypePathType::Vec { of } => Some(of), - _ => None, - } - } -} - -#[derive(Clone, Debug)] -pub enum TypePathType { - Path { - path: syn::Path, - params: Vec, - }, - Vec { - of: Box, - }, - Array { - len: usize, - of: Box, - }, - Tuple { - elements: Vec, - }, - Primitive { - def: TypeDefPrimitive, - }, - Compact { - inner: Box, - is_field: bool, - crate_path: syn::Path, - }, - BitVec { - bit_order_type: Box, - bit_store_type: Box, - crate_path: syn::Path, - }, -} - -impl TypePathType { - pub fn from_type_def_path( - path: &Path, - root_mod_ident: Ident, - params: Vec, - ) -> Self { - let path_segments = &*path.segments; - - let path: syn::Path = match path_segments { - [] => panic!("Type has no ident"), - [ident] => { - // paths to prelude types - match ident.as_str() { - "Option" => parse_quote!(::core::option::Option), - "Result" => parse_quote!(::core::result::Result), - "Cow" => parse_quote!(::std::borrow::Cow), - "BTreeMap" => parse_quote!(::std::collections::BTreeMap), - "BTreeSet" => parse_quote!(::std::collections::BTreeSet), - "Range" => parse_quote!(::core::ops::Range), - "RangeInclusive" => parse_quote!(::core::ops::RangeInclusive), - "NonZeroI8" => parse_quote!(::core::num::NonZeroI8), - "NonZeroU8" => parse_quote!(::core::num::NonZeroU8), - "NonZeroI16" => parse_quote!(::core::num::NonZeroI16), - "NonZeroU16" => parse_quote!(::core::num::NonZeroU16), - "NonZeroI32" => parse_quote!(::core::num::NonZeroI32), - "NonZeroU32" => parse_quote!(::core::num::NonZeroU32), - "NonZeroI64" => parse_quote!(::core::num::NonZeroI64), - "NonZeroU64" => parse_quote!(::core::num::NonZeroU64), - "NonZeroI128" => parse_quote!(::core::num::NonZeroI128), - "NonZeroU128" => parse_quote!(::core::num::NonZeroU128), - "NonZeroIsize" => parse_quote!(::core::num::NonZeroIsize), - "NonZeroUsize" => parse_quote!(::core::num::NonZeroUsize), - ident => panic!("Unknown prelude type '{ident}'"), - } - } - _ => { - // paths to generated types in the root types module - let mut ty_path = path_segments - .iter() - .map(|s| syn::PathSegment::from(format_ident!("{}", s))) - .collect::>(); - ty_path.insert(0, syn::PathSegment::from(root_mod_ident)); - parse_quote!( #ty_path ) - } - }; - Self::Path { path, params } - } - - /// Visits a type path, collecting all the generic type parameters from the containing type. - /// - /// # Example - /// - /// ```rust - /// struct S { - /// a: Vec>, // the parent type param here is `T` - /// } - /// ``` - fn parent_type_params(&self, acc: &mut BTreeSet) { - match self { - TypePathType::Path { params, .. } => { - for p in params { - p.parent_type_params(acc) - } - } - TypePathType::Vec { of } => of.parent_type_params(acc), - TypePathType::Array { of, .. } => of.parent_type_params(acc), - TypePathType::Tuple { elements } => { - for e in elements { - e.parent_type_params(acc) - } - } - TypePathType::Primitive { .. } => (), - TypePathType::Compact { inner, .. } => inner.parent_type_params(acc), - TypePathType::BitVec { - bit_order_type, - bit_store_type, - crate_path: _, - } => { - bit_order_type.parent_type_params(acc); - bit_store_type.parent_type_params(acc); - } - } - } - - pub(crate) fn is_compact(&self) -> bool { - matches!(self, TypePathType::Compact { .. }) - } - - pub(crate) fn is_string(&self) -> bool { - matches!( - self, - TypePathType::Primitive { - def: TypeDefPrimitive::Str - } - ) - } - - fn to_syn_type(&self) -> syn::Type { - match &self { - TypePathType::Path { path, params } => { - let path = if params.is_empty() { - parse_quote! { #path } - } else { - parse_quote! { #path< #( #params ),* > } - }; - syn::Type::Path(path) - } - TypePathType::Vec { of } => { - let type_path = parse_quote! { ::std::vec::Vec<#of> }; - syn::Type::Path(type_path) - } - TypePathType::Array { len, of } => { - let array = parse_quote! { [#of; #len] }; - syn::Type::Array(array) - } - TypePathType::Tuple { elements } => { - let tuple = parse_quote! { (#( # elements, )* ) }; - syn::Type::Tuple(tuple) - } - TypePathType::Primitive { def } => syn::Type::Path(match def { - TypeDefPrimitive::Bool => parse_quote!(::core::primitive::bool), - TypeDefPrimitive::Char => parse_quote!(::core::primitive::char), - TypeDefPrimitive::Str => parse_quote!(::std::string::String), - TypeDefPrimitive::U8 => parse_quote!(::core::primitive::u8), - TypeDefPrimitive::U16 => parse_quote!(::core::primitive::u16), - TypeDefPrimitive::U32 => parse_quote!(::core::primitive::u32), - TypeDefPrimitive::U64 => parse_quote!(::core::primitive::u64), - TypeDefPrimitive::U128 => parse_quote!(::core::primitive::u128), - TypeDefPrimitive::U256 => unimplemented!("not a rust primitive"), - TypeDefPrimitive::I8 => parse_quote!(::core::primitive::i8), - TypeDefPrimitive::I16 => parse_quote!(::core::primitive::i16), - TypeDefPrimitive::I32 => parse_quote!(::core::primitive::i32), - TypeDefPrimitive::I64 => parse_quote!(::core::primitive::i64), - TypeDefPrimitive::I128 => parse_quote!(::core::primitive::i128), - TypeDefPrimitive::I256 => unimplemented!("not a rust primitive"), - }), - TypePathType::Compact { - inner, - is_field, - crate_path, - } => { - let path = if *is_field { - // compact fields can use the inner compact type directly and be annotated with - // the `compact` attribute e.g. `#[codec(compact)] my_compact_field: u128` - parse_quote! ( #inner ) - } else { - parse_quote! ( #crate_path::ext::codec::Compact<#inner> ) - }; - syn::Type::Path(path) - } - TypePathType::BitVec { - bit_order_type, - bit_store_type, - crate_path, - } => { - let type_path = parse_quote! { #crate_path::utils::bits::DecodedBits<#bit_store_type, #bit_order_type> }; - syn::Type::Path(type_path) - } - } - } -} - -#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -pub struct TypeParameter { - pub(super) concrete_type_id: u32, - pub(super) original_name: String, - pub(super) name: Ident, -} - -impl quote::ToTokens for TypeParameter { - fn to_tokens(&self, tokens: &mut TokenStream) { - self.name.to_tokens(tokens) - } -} diff --git a/macro/src/lib.rs b/macro/src/lib.rs index 3778d89a5f..39c4f0ff17 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -61,12 +61,16 @@ struct RuntimeMetadataArgs { struct DeriveForType { path: syn::TypePath, derive: Punctuated, + #[darling(default)] + recursive: bool, } #[derive(Debug, FromMeta)] struct AttributesForType { path: syn::TypePath, attributes: Punctuated, + #[darling(default)] + recursive: bool, } #[derive(Debug, FromMeta)] @@ -123,7 +127,7 @@ pub fn subxt(args: TokenStream, input: TokenStream) -> TokenStream { .collect(), ); for d in args.derive_for_type { - codegen.add_derives_for_type(d.path, d.derive.into_iter()); + codegen.add_derives_for_type(d.path, d.derive.into_iter(), d.recursive); } // Configure attributes: @@ -135,7 +139,7 @@ pub fn subxt(args: TokenStream, input: TokenStream) -> TokenStream { .collect(), ); for d in args.attributes_for_type { - codegen.add_attributes_for_type(d.path, d.attributes.into_iter().map(|a| a.0)) + codegen.add_attributes_for_type(d.path, d.attributes.into_iter().map(|a| a.0), d.recursive) } // Insert type substitutions: diff --git a/subxt/examples/setup_config_custom.rs b/subxt/examples/setup_config_custom.rs index 89a0c1dd93..c884324fc0 100644 --- a/subxt/examples/setup_config_custom.rs +++ b/subxt/examples/setup_config_custom.rs @@ -6,15 +6,10 @@ use subxt_signer::sr25519::dev; #[subxt::subxt( runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale", - derive_for_type(path = "xcm::v2::multilocation::MultiLocation", derive = "Clone"), - derive_for_type(path = "xcm::v2::multilocation::Junctions", derive = "Clone"), - derive_for_type(path = "xcm::v2::junction::Junction", derive = "Clone"), - derive_for_type(path = "xcm::v2::NetworkId", derive = "Clone"), - derive_for_type(path = "xcm::v2::BodyId", derive = "Clone"), - derive_for_type(path = "xcm::v2::BodyPart", derive = "Clone"), derive_for_type( - path = "bounded_collections::weak_bounded_vec::WeakBoundedVec", - derive = "Clone" + path = "xcm::v2::multilocation::MultiLocation", + derive = "Clone", + recursive ) )] pub mod runtime {} diff --git a/subxt/src/error/dispatch_error.rs b/subxt/src/error/dispatch_error.rs index 9df8ff860b..817a441dd6 100644 --- a/subxt/src/error/dispatch_error.rs +++ b/subxt/src/error/dispatch_error.rs @@ -213,7 +213,7 @@ impl ModuleError { /// Details about the module error. pub struct ModuleErrorDetails<'a> { - /// The pallet that the error came from + /// The pallet that the error is in pub pallet: crate::metadata::types::PalletMetadata<'a>, /// The variant representing the error pub variant: &'a scale_info::Variant, diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 16c23d6a8f..34f5b8ffe5 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -107,7 +107,7 @@ pub mod ext { /// ``` /// /// The `subxt` macro will populate the annotated module with all of the methods and types required -/// for interacting with the runtime that the metadata came from via Subxt. +/// for interacting with the runtime that the metadata is in via Subxt. /// /// # Configuration /// diff --git a/testing/integration-tests/src/full_client/codegen/polkadot.rs b/testing/integration-tests/src/full_client/codegen/polkadot.rs index 28017a804a..1e3fd1092b 100644 --- a/testing/integration-tests/src/full_client/codegen/polkadot.rs +++ b/testing/integration-tests/src/full_client/codegen/polkadot.rs @@ -21,6 +21,7 @@ pub mod api { "MmrLeaf", "Session", "Grandpa", + "ImOnline", "AuthorityDiscovery", "Treasury", "ConvictionVoting", @@ -65,7 +66,6 @@ pub mod api { "Auctions", "Crowdloan", "XcmPallet", - "IdentityMigrator", "ParasSudoWrapper", "AssignedSlots", "ValidatorManager", @@ -1149,9 +1149,9 @@ pub mod api { "session_executor_params", types::SessionExecutorParams { session_index }, [ - 94u8, 35u8, 29u8, 188u8, 247u8, 116u8, 165u8, 43u8, 248u8, 76u8, 21u8, - 237u8, 26u8, 25u8, 105u8, 27u8, 24u8, 245u8, 97u8, 25u8, 47u8, 118u8, - 98u8, 231u8, 27u8, 76u8, 172u8, 207u8, 90u8, 103u8, 52u8, 168u8, + 207u8, 66u8, 10u8, 104u8, 146u8, 219u8, 75u8, 157u8, 93u8, 224u8, + 215u8, 13u8, 255u8, 62u8, 134u8, 168u8, 185u8, 101u8, 39u8, 78u8, 98u8, + 44u8, 129u8, 38u8, 48u8, 244u8, 103u8, 205u8, 66u8, 121u8, 18u8, 247u8, ], ) } @@ -1296,25 +1296,6 @@ pub mod api { ], ) } - #[doc = " Get node features."] - #[doc = " This is a staging method! Do not use on production runtimes!"] - pub fn node_features( - &self, - ) -> ::subxt::runtime_api::Payload< - types::NodeFeatures, - types::node_features::output::Output, - > { - ::subxt::runtime_api::Payload::new_static( - "ParachainHost", - "node_features", - types::NodeFeatures {}, - [ - 94u8, 110u8, 38u8, 62u8, 66u8, 234u8, 216u8, 228u8, 36u8, 17u8, 33u8, - 56u8, 184u8, 122u8, 34u8, 254u8, 46u8, 62u8, 107u8, 227u8, 3u8, 126u8, - 220u8, 142u8, 92u8, 226u8, 123u8, 236u8, 34u8, 234u8, 82u8, 80u8, - ], - ) - } } pub mod types { use super::runtime_types; @@ -1939,27 +1920,6 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisabledValidators {} - pub mod node_features { - use super::runtime_types; - pub mod output { - use super::runtime_types; - pub type Output = ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >; - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NodeFeatures {} } } pub mod beefy_api { @@ -3525,6 +3485,9 @@ pub mod api { 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 treasury(&self) -> treasury::constants::ConstantsApi { treasury::constants::ConstantsApi } @@ -3649,6 +3612,9 @@ pub mod api { 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 treasury(&self) -> treasury::storage::StorageApi { treasury::storage::StorageApi } @@ -3813,6 +3779,9 @@ pub mod api { 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 treasury(&self) -> treasury::calls::TransactionApi { treasury::calls::TransactionApi } @@ -3926,9 +3895,6 @@ pub mod api { pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { xcm_pallet::calls::TransactionApi } - pub fn identity_migrator(&self) -> identity_migrator::calls::TransactionApi { - identity_migrator::calls::TransactionApi - } pub fn paras_sudo_wrapper(&self) -> paras_sudo_wrapper::calls::TransactionApi { paras_sudo_wrapper::calls::TransactionApi } @@ -3957,9 +3923,9 @@ pub mod api { .hash(); runtime_metadata_hash == [ - 235u8, 160u8, 5u8, 253u8, 168u8, 64u8, 107u8, 209u8, 67u8, 121u8, 247u8, 72u8, - 187u8, 80u8, 77u8, 25u8, 228u8, 46u8, 36u8, 153u8, 101u8, 69u8, 188u8, 15u8, 241u8, - 123u8, 87u8, 172u8, 143u8, 64u8, 199u8, 125u8, + 217u8, 170u8, 7u8, 110u8, 237u8, 43u8, 49u8, 116u8, 87u8, 190u8, 100u8, 30u8, + 165u8, 15u8, 56u8, 52u8, 43u8, 64u8, 243u8, 187u8, 213u8, 229u8, 138u8, 173u8, + 223u8, 202u8, 95u8, 218u8, 85u8, 15u8, 85u8, 240u8, ] } pub mod system { @@ -3985,6 +3951,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remark`]."] pub struct Remark { pub remark: remark::Remark, } @@ -3997,7 +3964,6 @@ pub mod api { const CALL: &'static str = "remark"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -4007,6 +3973,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_heap_pages`]."] pub struct SetHeapPages { pub pages: set_heap_pages::Pages, } @@ -4028,6 +3995,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_code`]."] pub struct SetCode { pub code: set_code::Code, } @@ -4049,6 +4017,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_code_without_checks`]."] pub struct SetCodeWithoutChecks { pub code: set_code_without_checks::Code, } @@ -4070,6 +4039,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_storage`]."] pub struct SetStorage { pub items: set_storage::Items, } @@ -4094,6 +4064,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::kill_storage`]."] pub struct KillStorage { pub keys: kill_storage::Keys, } @@ -4115,6 +4086,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::kill_prefix`]."] pub struct KillPrefix { pub prefix: kill_prefix::Prefix, pub subkeys: kill_prefix::Subkeys, @@ -4138,6 +4110,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remark_with_event`]."] pub struct RemarkWithEvent { pub remark: remark_with_event::Remark, } @@ -4797,9 +4770,9 @@ pub mod api { "Events", vec![], [ - 232u8, 10u8, 118u8, 183u8, 198u8, 124u8, 103u8, 205u8, 8u8, 42u8, 16u8, - 168u8, 10u8, 62u8, 35u8, 14u8, 184u8, 41u8, 145u8, 158u8, 5u8, 154u8, - 128u8, 80u8, 68u8, 171u8, 161u8, 114u8, 47u8, 42u8, 7u8, 235u8, + 203u8, 185u8, 202u8, 46u8, 60u8, 247u8, 185u8, 43u8, 177u8, 237u8, + 118u8, 62u8, 238u8, 44u8, 3u8, 32u8, 190u8, 212u8, 99u8, 224u8, 24u8, + 233u8, 250u8, 1u8, 75u8, 204u8, 1u8, 179u8, 199u8, 201u8, 61u8, 228u8, ], ) } @@ -5099,6 +5072,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::report_equivocation`]."] pub struct ReportEquivocation { pub equivocation_proof: ::std::boxed::Box, @@ -5129,6 +5103,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::report_equivocation_unsigned`]."] pub struct ReportEquivocationUnsigned { pub equivocation_proof: ::std::boxed::Box, @@ -5159,6 +5134,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::plan_config_change`]."] pub struct PlanConfigChange { pub config: plan_config_change::Config, } @@ -5605,10 +5581,9 @@ pub mod api { "Initialized", vec![], [ - 169u8, 217u8, 237u8, 78u8, 186u8, 202u8, 206u8, 213u8, 54u8, 85u8, - 206u8, 166u8, 22u8, 138u8, 236u8, 60u8, 211u8, 169u8, 12u8, 183u8, - 23u8, 69u8, 194u8, 236u8, 112u8, 21u8, 62u8, 219u8, 92u8, 131u8, 134u8, - 145u8, + 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, ], ) } @@ -5859,6 +5834,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set`]."] pub struct Set { #[codec(compact)] pub now: set::Now, @@ -5993,7 +5969,6 @@ pub mod api { pub mod types { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -6003,6 +5978,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::claim`]."] pub struct Claim { pub index: claim::Index, } @@ -6024,6 +6000,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::transfer`]."] pub struct Transfer { pub new: transfer::New, pub index: transfer::Index, @@ -6038,7 +6015,6 @@ pub mod api { const CALL: &'static str = "transfer"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -6048,6 +6024,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::free`]."] pub struct Free { pub index: free::Index, } @@ -6069,6 +6046,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_transfer`]."] pub struct ForceTransfer { pub new: force_transfer::New, pub index: force_transfer::Index, @@ -6085,7 +6063,6 @@ pub mod api { const CALL: &'static str = "force_transfer"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -6095,6 +6072,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::freeze`]."] pub struct Freeze { pub index: freeze::Index, } @@ -6224,7 +6202,6 @@ pub mod api { const EVENT: &'static str = "IndexAssigned"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -6378,6 +6355,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::transfer_allow_death`]."] pub struct TransferAllowDeath { pub dest: transfer_allow_death::Dest, #[codec(compact)] @@ -6402,6 +6380,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_transfer`]."] pub struct ForceTransfer { pub source: force_transfer::Source, pub dest: force_transfer::Dest, @@ -6428,6 +6407,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::transfer_keep_alive`]."] pub struct TransferKeepAlive { pub dest: transfer_keep_alive::Dest, #[codec(compact)] @@ -6452,6 +6432,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::transfer_all`]."] pub struct TransferAll { pub dest: transfer_all::Dest, pub keep_alive: transfer_all::KeepAlive, @@ -6475,6 +6456,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_unreserve`]."] pub struct ForceUnreserve { pub who: force_unreserve::Who, pub amount: force_unreserve::Amount, @@ -6498,6 +6480,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::upgrade_accounts`]."] pub struct UpgradeAccounts { pub who: upgrade_accounts::Who, } @@ -6519,6 +6502,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_set_balance`]."] pub struct ForceSetBalance { pub who: force_set_balance::Who, #[codec(compact)] @@ -7035,7 +7019,6 @@ pub mod api { const EVENT: &'static str = "Upgraded"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -7058,7 +7041,6 @@ pub mod api { const EVENT: &'static str = "Issued"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -8021,6 +8003,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::report_equivocation`]."] pub struct ReportEquivocation { pub equivocation_proof: ::std::boxed::Box, @@ -8050,6 +8033,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::report_equivocation_unsigned`]."] pub struct ReportEquivocationUnsigned { pub equivocation_proof: ::std::boxed::Box, @@ -8070,7 +8054,6 @@ pub mod api { const CALL: &'static str = "report_equivocation_unsigned"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -8080,6 +8063,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_new_genesis`]."] pub struct SetNewGenesis { pub delay_in_blocks: set_new_genesis::DelayInBlocks, } @@ -8611,6 +8595,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_keys`]."] pub struct SetKeys { pub keys: set_keys::Keys, pub proof: set_keys::Proof, @@ -8634,6 +8619,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::purge_keys`]."] pub struct PurgeKeys; impl ::subxt::blocks::StaticExtrinsic for PurgeKeys { const PALLET: &'static str = "Session"; @@ -8653,10 +8639,9 @@ pub mod api { "set_keys", types::SetKeys { keys, proof }, [ - 160u8, 137u8, 167u8, 56u8, 165u8, 202u8, 149u8, 39u8, 16u8, 52u8, - 173u8, 215u8, 250u8, 158u8, 78u8, 126u8, 236u8, 153u8, 173u8, 68u8, - 237u8, 8u8, 47u8, 77u8, 119u8, 226u8, 248u8, 220u8, 139u8, 68u8, 145u8, - 207u8, + 50u8, 154u8, 235u8, 252u8, 160u8, 25u8, 233u8, 90u8, 76u8, 227u8, 22u8, + 129u8, 221u8, 129u8, 95u8, 124u8, 117u8, 117u8, 43u8, 17u8, 109u8, + 252u8, 39u8, 115u8, 150u8, 80u8, 38u8, 34u8, 62u8, 237u8, 248u8, 246u8, ], ) } @@ -8681,7 +8666,6 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -8829,10 +8813,9 @@ pub mod api { "QueuedKeys", vec![], [ - 123u8, 8u8, 241u8, 219u8, 141u8, 50u8, 254u8, 247u8, 130u8, 71u8, - 105u8, 18u8, 149u8, 204u8, 28u8, 104u8, 184u8, 6u8, 165u8, 31u8, 153u8, - 54u8, 235u8, 78u8, 48u8, 182u8, 83u8, 221u8, 243u8, 110u8, 249u8, - 212u8, + 251u8, 240u8, 64u8, 86u8, 241u8, 74u8, 141u8, 38u8, 46u8, 18u8, 92u8, + 101u8, 227u8, 161u8, 58u8, 222u8, 17u8, 29u8, 248u8, 237u8, 74u8, 69u8, + 18u8, 16u8, 129u8, 187u8, 172u8, 249u8, 162u8, 96u8, 218u8, 186u8, ], ) } @@ -8876,10 +8859,9 @@ pub mod api { "NextKeys", vec![], [ - 13u8, 219u8, 184u8, 220u8, 199u8, 150u8, 34u8, 166u8, 125u8, 46u8, - 26u8, 160u8, 113u8, 243u8, 227u8, 6u8, 121u8, 176u8, 222u8, 250u8, - 108u8, 240u8, 0u8, 15u8, 177u8, 220u8, 206u8, 94u8, 179u8, 41u8, 209u8, - 23u8, + 87u8, 61u8, 243u8, 159u8, 164u8, 196u8, 130u8, 218u8, 136u8, 189u8, + 253u8, 151u8, 230u8, 9u8, 214u8, 58u8, 102u8, 67u8, 61u8, 138u8, 242u8, + 214u8, 80u8, 166u8, 130u8, 47u8, 141u8, 197u8, 11u8, 73u8, 100u8, 16u8, ], ) } @@ -8901,10 +8883,9 @@ pub mod api { _0.borrow(), )], [ - 13u8, 219u8, 184u8, 220u8, 199u8, 150u8, 34u8, 166u8, 125u8, 46u8, - 26u8, 160u8, 113u8, 243u8, 227u8, 6u8, 121u8, 176u8, 222u8, 250u8, - 108u8, 240u8, 0u8, 15u8, 177u8, 220u8, 206u8, 94u8, 179u8, 41u8, 209u8, - 23u8, + 87u8, 61u8, 243u8, 159u8, 164u8, 196u8, 130u8, 218u8, 136u8, 189u8, + 253u8, 151u8, 230u8, 9u8, 214u8, 58u8, 102u8, 67u8, 61u8, 138u8, 242u8, + 214u8, 80u8, 166u8, 130u8, 47u8, 141u8, 197u8, 11u8, 73u8, 100u8, 16u8, ], ) } @@ -9008,6 +8989,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::report_equivocation`]."] pub struct ReportEquivocation { pub equivocation_proof: ::std::boxed::Box, @@ -9036,6 +9018,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::report_equivocation_unsigned`]."] pub struct ReportEquivocationUnsigned { pub equivocation_proof: ::std::boxed::Box, @@ -9064,6 +9047,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::note_stalled`]."] pub struct NoteStalled { pub delay: note_stalled::Delay, pub best_finalized_block_number: note_stalled::BestFinalizedBlockNumber, @@ -9235,14 +9219,6 @@ pub mod api { pub type SetIdSession = ::core::primitive::u32; pub type Param0 = ::core::primitive::u64; } - pub mod authorities { - use super::runtime_types; - pub type Authorities = - runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( - runtime_types::sp_consensus_grandpa::app::Public, - ::core::primitive::u64, - )>; - } } pub struct StorageApi; impl StorageApi { @@ -9417,28 +9393,6 @@ pub mod api { ], ) } - #[doc = " The current list of authorities."] - pub fn authorities( - &self, - ) -> ::subxt::storage::address::Address< - ::subxt::storage::address::StaticStorageMapKey, - types::authorities::Authorities, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::Address::new_static( - "Grandpa", - "Authorities", - vec![], - [ - 67u8, 196u8, 244u8, 13u8, 246u8, 245u8, 198u8, 98u8, 81u8, 55u8, 182u8, - 187u8, 214u8, 5u8, 181u8, 76u8, 251u8, 213u8, 144u8, 166u8, 36u8, - 153u8, 234u8, 181u8, 252u8, 55u8, 198u8, 175u8, 55u8, 211u8, 105u8, - 85u8, - ], - ) - } } } pub mod constants { @@ -9498,6 +9452,394 @@ pub mod api { } } } + pub mod im_online { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_im_online::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + 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; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::heartbeat`]."] + pub struct Heartbeat { + pub heartbeat: heartbeat::Heartbeat, + pub signature: heartbeat::Signature, + } + pub mod heartbeat { + use super::runtime_types; + pub type Heartbeat = + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>; + pub type Signature = + runtime_types::pallet_im_online::sr25519::app_sr25519::Signature; + } + impl ::subxt::blocks::StaticExtrinsic for Heartbeat { + const PALLET: &'static str = "ImOnline"; + const CALL: &'static str = "heartbeat"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "See [`Pallet::heartbeat`]."] + pub fn heartbeat( + &self, + heartbeat: types::heartbeat::Heartbeat, + signature: types::heartbeat::Signature, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ImOnline", + "heartbeat", + types::Heartbeat { + heartbeat, + signature, + }, + [ + 41u8, 78u8, 115u8, 250u8, 94u8, 34u8, 215u8, 28u8, 33u8, 175u8, 203u8, + 205u8, 14u8, 40u8, 197u8, 51u8, 24u8, 198u8, 173u8, 32u8, 119u8, 154u8, + 213u8, 125u8, 219u8, 3u8, 128u8, 52u8, 166u8, 223u8, 241u8, 129u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_im_online::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new heartbeat was received from `AuthorityId`."] + pub struct HeartbeatReceived { + pub authority_id: heartbeat_received::AuthorityId, + } + pub mod heartbeat_received { + use super::runtime_types; + pub type AuthorityId = + runtime_types::pallet_im_online::sr25519::app_sr25519::Public; + } + impl ::subxt::events::StaticEvent for HeartbeatReceived { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "HeartbeatReceived"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "At the end of the session, no offence was committed."] + pub struct AllGood; + impl ::subxt::events::StaticEvent for AllGood { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "AllGood"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "At the end of the session, at least one validator was found to be offline."] + pub struct SomeOffline { + pub offline: some_offline::Offline, + } + pub mod some_offline { + use super::runtime_types; + pub type Offline = ::std::vec::Vec<(::subxt::utils::AccountId32, ())>; + } + impl ::subxt::events::StaticEvent for SomeOffline { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "SomeOffline"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod heartbeat_after { + use super::runtime_types; + pub type HeartbeatAfter = ::core::primitive::u32; + } + pub mod keys { + use super::runtime_types; + pub type Keys = + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + >; + } + pub mod received_heartbeats { + use super::runtime_types; + pub type ReceivedHeartbeats = ::core::primitive::bool; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::core::primitive::u32; + } + pub mod authored_blocks { + use super::runtime_types; + pub type AuthoredBlocks = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The block number after which it's ok to send heartbeats in the current"] + #[doc = " session."] + #[doc = ""] + #[doc = " At the beginning of each session we set this to a value that should fall"] + #[doc = " roughly in the middle of the session duration. The idea is to first wait for"] + #[doc = " the validators to produce a block in the current session, so that the"] + #[doc = " heartbeat later on will not be necessary."] + #[doc = ""] + #[doc = " This value will only be used as a fallback if we fail to get a proper session"] + #[doc = " progress estimate from `NextSessionRotation`, as those estimates should be"] + #[doc = " more accurate then the value we calculate for `HeartbeatAfter`."] + pub fn heartbeat_after( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::heartbeat_after::HeartbeatAfter, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "HeartbeatAfter", + vec![], + [ + 36u8, 179u8, 76u8, 254u8, 3u8, 184u8, 154u8, 142u8, 70u8, 104u8, 44u8, + 244u8, 39u8, 97u8, 31u8, 31u8, 93u8, 228u8, 185u8, 224u8, 13u8, 160u8, + 231u8, 210u8, 110u8, 143u8, 116u8, 29u8, 0u8, 215u8, 217u8, 137u8, + ], + ) + } + #[doc = " The current set of keys that may issue a heartbeat."] + pub fn keys( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::keys::Keys, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "Keys", + vec![], + [ + 111u8, 104u8, 188u8, 46u8, 152u8, 140u8, 137u8, 244u8, 52u8, 214u8, + 115u8, 156u8, 39u8, 239u8, 15u8, 168u8, 193u8, 125u8, 57u8, 195u8, + 250u8, 156u8, 234u8, 222u8, 222u8, 253u8, 135u8, 232u8, 196u8, 163u8, + 29u8, 218u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`."] + pub fn received_heartbeats_iter( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::received_heartbeats::ReceivedHeartbeats, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "ReceivedHeartbeats", + vec![], + [ + 30u8, 155u8, 42u8, 200u8, 223u8, 48u8, 127u8, 31u8, 253u8, 195u8, + 234u8, 108u8, 64u8, 27u8, 247u8, 17u8, 187u8, 199u8, 41u8, 138u8, 55u8, + 163u8, 94u8, 226u8, 10u8, 3u8, 132u8, 129u8, 8u8, 138u8, 137u8, 171u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`."] + pub fn received_heartbeats_iter1( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::received_heartbeats::ReceivedHeartbeats, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "ReceivedHeartbeats", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 30u8, 155u8, 42u8, 200u8, 223u8, 48u8, 127u8, 31u8, 253u8, 195u8, + 234u8, 108u8, 64u8, 27u8, 247u8, 17u8, 187u8, 199u8, 41u8, 138u8, 55u8, + 163u8, 94u8, 226u8, 10u8, 3u8, 132u8, 129u8, 8u8, 138u8, 137u8, 171u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`."] + pub fn received_heartbeats( + &self, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::received_heartbeats::ReceivedHeartbeats, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "ReceivedHeartbeats", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 30u8, 155u8, 42u8, 200u8, 223u8, 48u8, 127u8, 31u8, 253u8, 195u8, + 234u8, 108u8, 64u8, 27u8, 247u8, 17u8, 187u8, 199u8, 41u8, 138u8, 55u8, + 163u8, 94u8, 226u8, 10u8, 3u8, 132u8, 129u8, 8u8, 138u8, 137u8, 171u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_iter( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::authored_blocks::AuthoredBlocks, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", + vec![], + [ + 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, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_iter1( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::authored_blocks::AuthoredBlocks, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", + vec![::subxt::storage::address::make_static_storage_map_key( + _0.borrow(), + )], + [ + 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, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks( + &self, + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + types::authored_blocks::AuthoredBlocks, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", + vec![ + ::subxt::storage::address::make_static_storage_map_key(_0.borrow()), + ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), + ], + [ + 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 { + #[doc = " A configuration for base priority of unsigned transactions."] + #[doc = ""] + #[doc = " This is exposed so that it can be tuned for particular runtime, when"] + #[doc = " multiple pallets send unsigned transactions."] + pub fn unsigned_priority( + &self, + ) -> ::subxt::constants::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; @@ -9525,6 +9867,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::propose_spend`]."] pub struct ProposeSpend { #[codec(compact)] pub value: propose_spend::Value, @@ -9550,6 +9893,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::reject_proposal`]."] pub struct RejectProposal { #[codec(compact)] pub proposal_id: reject_proposal::ProposalId, @@ -9572,6 +9916,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::approve_proposal`]."] pub struct ApproveProposal { #[codec(compact)] pub proposal_id: approve_proposal::ProposalId, @@ -9594,6 +9939,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::spend_local`]."] pub struct SpendLocal { #[codec(compact)] pub amount: spend_local::Amount, @@ -9619,6 +9965,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_approval`]."] pub struct RemoveApproval { #[codec(compact)] pub proposal_id: remove_approval::ProposalId, @@ -9641,6 +9988,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::spend`]."] pub struct Spend { pub asset_kind: ::std::boxed::Box, #[codec(compact)] @@ -9661,7 +10009,6 @@ pub mod api { const CALL: &'static str = "spend"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -9671,6 +10018,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::payout`]."] pub struct Payout { pub index: payout::Index, } @@ -9683,7 +10031,6 @@ pub mod api { const CALL: &'static str = "payout"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -9693,6 +10040,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::check_status`]."] pub struct CheckStatus { pub index: check_status::Index, } @@ -9705,7 +10053,6 @@ pub mod api { const CALL: &'static str = "check_status"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -9715,6 +10062,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::void_spend`]."] pub struct VoidSpend { pub index: void_spend::Index, } @@ -9833,10 +10181,10 @@ pub mod api { valid_from, }, [ - 190u8, 97u8, 190u8, 133u8, 0u8, 178u8, 196u8, 199u8, 26u8, 226u8, - 124u8, 247u8, 195u8, 125u8, 54u8, 80u8, 249u8, 225u8, 44u8, 99u8, 86u8, - 119u8, 0u8, 64u8, 206u8, 125u8, 171u8, 117u8, 67u8, 160u8, 204u8, - 220u8, + 124u8, 75u8, 215u8, 13u8, 48u8, 105u8, 201u8, 35u8, 199u8, 228u8, 38u8, + 229u8, 147u8, 255u8, 237u8, 249u8, 114u8, 154u8, 129u8, 209u8, 177u8, + 17u8, 70u8, 107u8, 74u8, 175u8, 244u8, 132u8, 206u8, 24u8, 224u8, + 156u8, ], ) } @@ -9895,7 +10243,6 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -9918,7 +10265,6 @@ pub mod api { const EVENT: &'static str = "Proposed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -9991,7 +10337,6 @@ pub mod api { const EVENT: &'static str = "Rejected"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -10014,7 +10359,6 @@ pub mod api { const EVENT: &'static str = "Burnt"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -10037,7 +10381,6 @@ pub mod api { const EVENT: &'static str = "Rollover"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -10143,7 +10486,6 @@ pub mod api { const EVENT: &'static str = "AssetSpendApproved"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -10214,7 +10556,6 @@ pub mod api { const EVENT: &'static str = "PaymentFailed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -10431,10 +10772,10 @@ pub mod api { "Spends", vec![], [ - 115u8, 59u8, 91u8, 50u8, 105u8, 230u8, 229u8, 228u8, 174u8, 182u8, - 176u8, 110u8, 231u8, 121u8, 185u8, 199u8, 3u8, 150u8, 42u8, 106u8, - 32u8, 161u8, 71u8, 248u8, 203u8, 84u8, 124u8, 47u8, 162u8, 223u8, - 207u8, 145u8, + 231u8, 192u8, 40u8, 149u8, 163u8, 98u8, 111u8, 136u8, 44u8, 162u8, + 87u8, 181u8, 233u8, 204u8, 87u8, 111u8, 210u8, 225u8, 235u8, 73u8, + 217u8, 8u8, 129u8, 51u8, 54u8, 85u8, 33u8, 103u8, 186u8, 128u8, 61u8, + 5u8, ], ) } @@ -10456,10 +10797,10 @@ pub mod api { _0.borrow(), )], [ - 115u8, 59u8, 91u8, 50u8, 105u8, 230u8, 229u8, 228u8, 174u8, 182u8, - 176u8, 110u8, 231u8, 121u8, 185u8, 199u8, 3u8, 150u8, 42u8, 106u8, - 32u8, 161u8, 71u8, 248u8, 203u8, 84u8, 124u8, 47u8, 162u8, 223u8, - 207u8, 145u8, + 231u8, 192u8, 40u8, 149u8, 163u8, 98u8, 111u8, 136u8, 44u8, 162u8, + 87u8, 181u8, 233u8, 204u8, 87u8, 111u8, 210u8, 225u8, 235u8, 73u8, + 217u8, 8u8, 129u8, 51u8, 54u8, 85u8, 33u8, 103u8, 186u8, 128u8, 61u8, + 5u8, ], ) } @@ -10612,6 +10953,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vote`]."] pub struct Vote { #[codec(compact)] pub poll_index: vote::PollIndex, @@ -10638,6 +10980,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::delegate`]."] pub struct Delegate { pub class: delegate::Class, pub to: delegate::To, @@ -10657,7 +11000,6 @@ pub mod api { const CALL: &'static str = "delegate"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -10667,6 +11009,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::undelegate`]."] pub struct Undelegate { pub class: undelegate::Class, } @@ -10688,6 +11031,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unlock`]."] pub struct Unlock { pub class: unlock::Class, pub target: unlock::Target, @@ -10711,6 +11055,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_vote`]."] pub struct RemoveVote { pub class: remove_vote::Class, pub index: remove_vote::Index, @@ -10734,6 +11079,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_other_vote`]."] pub struct RemoveOtherVote { pub target: remove_other_vote::Target, pub class: remove_other_vote::Class, @@ -11133,6 +11479,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::submit`]."] pub struct Submit { pub proposal_origin: ::std::boxed::Box, pub proposal: submit::Proposal, @@ -11155,7 +11502,6 @@ pub mod api { const CALL: &'static str = "submit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11165,6 +11511,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::place_decision_deposit`]."] pub struct PlaceDecisionDeposit { pub index: place_decision_deposit::Index, } @@ -11177,7 +11524,6 @@ pub mod api { const CALL: &'static str = "place_decision_deposit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11187,6 +11533,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::refund_decision_deposit`]."] pub struct RefundDecisionDeposit { pub index: refund_decision_deposit::Index, } @@ -11199,7 +11546,6 @@ pub mod api { const CALL: &'static str = "refund_decision_deposit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11209,6 +11555,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel`]."] pub struct Cancel { pub index: cancel::Index, } @@ -11221,7 +11568,6 @@ pub mod api { const CALL: &'static str = "cancel"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11231,6 +11577,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::kill`]."] pub struct Kill { pub index: kill::Index, } @@ -11243,7 +11590,6 @@ pub mod api { const CALL: &'static str = "kill"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11253,6 +11599,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::nudge_referendum`]."] pub struct NudgeReferendum { pub index: nudge_referendum::Index, } @@ -11265,7 +11612,6 @@ pub mod api { const CALL: &'static str = "nudge_referendum"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11275,6 +11621,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::one_fewer_deciding`]."] pub struct OneFewerDeciding { pub track: one_fewer_deciding::Track, } @@ -11287,7 +11634,6 @@ pub mod api { const CALL: &'static str = "one_fewer_deciding"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11297,6 +11643,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::refund_submission_deposit`]."] pub struct RefundSubmissionDeposit { pub index: refund_submission_deposit::Index, } @@ -11318,6 +11665,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_metadata`]."] pub struct SetMetadata { pub index: set_metadata::Index, pub maybe_hash: set_metadata::MaybeHash, @@ -11350,9 +11698,10 @@ pub mod api { enactment_moment, }, [ - 171u8, 209u8, 202u8, 114u8, 160u8, 189u8, 214u8, 3u8, 30u8, 136u8, - 81u8, 98u8, 182u8, 133u8, 206u8, 79u8, 26u8, 53u8, 154u8, 240u8, 6u8, - 240u8, 68u8, 29u8, 219u8, 70u8, 210u8, 1u8, 134u8, 43u8, 173u8, 88u8, + 116u8, 212u8, 158u8, 18u8, 89u8, 136u8, 153u8, 97u8, 43u8, 197u8, + 200u8, 161u8, 145u8, 102u8, 19u8, 25u8, 135u8, 13u8, 199u8, 101u8, + 107u8, 221u8, 244u8, 15u8, 192u8, 176u8, 3u8, 154u8, 248u8, 70u8, + 113u8, 69u8, ], ) } @@ -11631,7 +11980,6 @@ pub mod api { const EVENT: &'static str = "DecisionStarted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11653,7 +12001,6 @@ pub mod api { const EVENT: &'static str = "ConfirmStarted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11700,7 +12047,6 @@ pub mod api { const EVENT: &'static str = "Confirmed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -11984,10 +12330,9 @@ pub mod api { "ReferendumInfoFor", vec![], [ - 194u8, 175u8, 254u8, 203u8, 143u8, 103u8, 190u8, 113u8, 52u8, 177u8, - 204u8, 109u8, 158u8, 95u8, 150u8, 247u8, 196u8, 160u8, 105u8, 190u8, - 212u8, 35u8, 246u8, 90u8, 129u8, 126u8, 146u8, 26u8, 137u8, 33u8, 8u8, - 93u8, + 82u8, 199u8, 121u8, 36u8, 81u8, 129u8, 79u8, 226u8, 19u8, 57u8, 26u8, + 76u8, 195u8, 60u8, 78u8, 91u8, 198u8, 250u8, 105u8, 111u8, 235u8, 11u8, + 195u8, 4u8, 39u8, 92u8, 156u8, 53u8, 248u8, 89u8, 26u8, 112u8, ], ) } @@ -12009,10 +12354,9 @@ pub mod api { _0.borrow(), )], [ - 194u8, 175u8, 254u8, 203u8, 143u8, 103u8, 190u8, 113u8, 52u8, 177u8, - 204u8, 109u8, 158u8, 95u8, 150u8, 247u8, 196u8, 160u8, 105u8, 190u8, - 212u8, 35u8, 246u8, 90u8, 129u8, 126u8, 146u8, 26u8, 137u8, 33u8, 8u8, - 93u8, + 82u8, 199u8, 121u8, 36u8, 81u8, 129u8, 79u8, 226u8, 19u8, 57u8, 26u8, + 76u8, 195u8, 60u8, 78u8, 91u8, 198u8, 250u8, 105u8, 111u8, 235u8, 11u8, + 195u8, 4u8, 39u8, 92u8, 156u8, 53u8, 248u8, 89u8, 26u8, 112u8, ], ) } @@ -12286,6 +12630,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_member`]."] pub struct AddMember { pub who: add_member::Who, } @@ -12307,6 +12652,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::promote_member`]."] pub struct PromoteMember { pub who: promote_member::Who, } @@ -12328,6 +12674,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::demote_member`]."] pub struct DemoteMember { pub who: demote_member::Who, } @@ -12349,6 +12696,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_member`]."] pub struct RemoveMember { pub who: remove_member::Who, pub min_rank: remove_member::MinRank, @@ -12372,6 +12720,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vote`]."] pub struct Vote { pub poll: vote::Poll, pub aye: vote::Aye, @@ -12395,6 +12744,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cleanup_poll`]."] pub struct CleanupPoll { pub poll_index: cleanup_poll::PollIndex, pub max: cleanup_poll::Max, @@ -13048,6 +13398,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::submit`]."] pub struct Submit { pub proposal_origin: ::std::boxed::Box, pub proposal: submit::Proposal, @@ -13070,7 +13421,6 @@ pub mod api { const CALL: &'static str = "submit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13080,6 +13430,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::place_decision_deposit`]."] pub struct PlaceDecisionDeposit { pub index: place_decision_deposit::Index, } @@ -13092,7 +13443,6 @@ pub mod api { const CALL: &'static str = "place_decision_deposit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13102,6 +13452,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::refund_decision_deposit`]."] pub struct RefundDecisionDeposit { pub index: refund_decision_deposit::Index, } @@ -13114,7 +13465,6 @@ pub mod api { const CALL: &'static str = "refund_decision_deposit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13124,6 +13474,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel`]."] pub struct Cancel { pub index: cancel::Index, } @@ -13136,7 +13487,6 @@ pub mod api { const CALL: &'static str = "cancel"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13146,6 +13496,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::kill`]."] pub struct Kill { pub index: kill::Index, } @@ -13158,7 +13509,6 @@ pub mod api { const CALL: &'static str = "kill"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13168,6 +13518,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::nudge_referendum`]."] pub struct NudgeReferendum { pub index: nudge_referendum::Index, } @@ -13180,7 +13531,6 @@ pub mod api { const CALL: &'static str = "nudge_referendum"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13190,6 +13540,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::one_fewer_deciding`]."] pub struct OneFewerDeciding { pub track: one_fewer_deciding::Track, } @@ -13202,7 +13553,6 @@ pub mod api { const CALL: &'static str = "one_fewer_deciding"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13212,6 +13562,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::refund_submission_deposit`]."] pub struct RefundSubmissionDeposit { pub index: refund_submission_deposit::Index, } @@ -13233,6 +13584,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_metadata`]."] pub struct SetMetadata { pub index: set_metadata::Index, pub maybe_hash: set_metadata::MaybeHash, @@ -13265,9 +13617,10 @@ pub mod api { enactment_moment, }, [ - 171u8, 209u8, 202u8, 114u8, 160u8, 189u8, 214u8, 3u8, 30u8, 136u8, - 81u8, 98u8, 182u8, 133u8, 206u8, 79u8, 26u8, 53u8, 154u8, 240u8, 6u8, - 240u8, 68u8, 29u8, 219u8, 70u8, 210u8, 1u8, 134u8, 43u8, 173u8, 88u8, + 116u8, 212u8, 158u8, 18u8, 89u8, 136u8, 153u8, 97u8, 43u8, 197u8, + 200u8, 161u8, 145u8, 102u8, 19u8, 25u8, 135u8, 13u8, 199u8, 101u8, + 107u8, 221u8, 244u8, 15u8, 192u8, 176u8, 3u8, 154u8, 248u8, 70u8, + 113u8, 69u8, ], ) } @@ -13545,7 +13898,6 @@ pub mod api { const EVENT: &'static str = "DecisionStarted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13567,7 +13919,6 @@ pub mod api { const EVENT: &'static str = "ConfirmStarted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13613,7 +13964,6 @@ pub mod api { const EVENT: &'static str = "Confirmed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -13891,9 +14241,9 @@ pub mod api { "ReferendumInfoFor", vec![], [ - 233u8, 248u8, 251u8, 170u8, 112u8, 77u8, 94u8, 232u8, 67u8, 166u8, - 112u8, 21u8, 133u8, 75u8, 163u8, 20u8, 76u8, 197u8, 10u8, 86u8, 213u8, - 0u8, 5u8, 131u8, 53u8, 181u8, 162u8, 206u8, 133u8, 213u8, 27u8, 80u8, + 154u8, 115u8, 139u8, 27u8, 56u8, 76u8, 212u8, 73u8, 155u8, 177u8, 26u8, + 156u8, 1u8, 163u8, 243u8, 143u8, 10u8, 188u8, 63u8, 63u8, 190u8, 158u8, + 142u8, 61u8, 245u8, 254u8, 11u8, 109u8, 170u8, 98u8, 77u8, 95u8, ], ) } @@ -13915,9 +14265,9 @@ pub mod api { _0.borrow(), )], [ - 233u8, 248u8, 251u8, 170u8, 112u8, 77u8, 94u8, 232u8, 67u8, 166u8, - 112u8, 21u8, 133u8, 75u8, 163u8, 20u8, 76u8, 197u8, 10u8, 86u8, 213u8, - 0u8, 5u8, 131u8, 53u8, 181u8, 162u8, 206u8, 133u8, 213u8, 27u8, 80u8, + 154u8, 115u8, 139u8, 27u8, 56u8, 76u8, 212u8, 73u8, 155u8, 177u8, 26u8, + 156u8, 1u8, 163u8, 243u8, 143u8, 10u8, 188u8, 63u8, 63u8, 190u8, 158u8, + 142u8, 61u8, 245u8, 254u8, 11u8, 109u8, 170u8, 98u8, 77u8, 95u8, ], ) } @@ -14193,6 +14543,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::whitelist_call`]."] pub struct WhitelistCall { pub call_hash: whitelist_call::CallHash, } @@ -14214,6 +14565,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_whitelisted_call`]."] pub struct RemoveWhitelistedCall { pub call_hash: remove_whitelisted_call::CallHash, } @@ -14235,6 +14587,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::dispatch_whitelisted_call`]."] pub struct DispatchWhitelistedCall { pub call_hash: dispatch_whitelisted_call::CallHash, pub call_encoded_len: dispatch_whitelisted_call::CallEncodedLen, @@ -14260,6 +14613,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::dispatch_whitelisted_call_with_preimage`]."] pub struct DispatchWhitelistedCallWithPreimage { pub call: ::std::boxed::Box, } @@ -14344,9 +14698,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 212u8, 193u8, 14u8, 54u8, 51u8, 114u8, 50u8, 216u8, 212u8, 194u8, - 119u8, 107u8, 64u8, 40u8, 193u8, 90u8, 196u8, 64u8, 22u8, 17u8, 196u8, - 184u8, 5u8, 105u8, 30u8, 92u8, 210u8, 106u8, 68u8, 133u8, 95u8, 41u8, + 149u8, 115u8, 81u8, 76u8, 235u8, 167u8, 31u8, 227u8, 153u8, 46u8, + 233u8, 199u8, 94u8, 30u8, 253u8, 19u8, 189u8, 77u8, 151u8, 249u8, 68u8, + 207u8, 139u8, 67u8, 6u8, 193u8, 131u8, 123u8, 101u8, 100u8, 13u8, + 222u8, ], ) } @@ -14508,6 +14863,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::claim`]."] pub struct Claim { pub dest: claim::Dest, pub ethereum_signature: claim::EthereumSignature, @@ -14532,6 +14888,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::mint_claim`]."] pub struct MintClaim { pub who: mint_claim::Who, pub value: mint_claim::Value, @@ -14565,6 +14922,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::claim_attest`]."] pub struct ClaimAttest { pub dest: claim_attest::Dest, pub ethereum_signature: claim_attest::EthereumSignature, @@ -14591,6 +14949,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::attest`]."] pub struct Attest { pub statement: attest::Statement, } @@ -14612,6 +14971,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::move_claim`]."] pub struct MoveClaim { pub old: move_claim::Old, pub new: move_claim::New, @@ -15069,6 +15429,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::batch`]."] pub struct Batch { pub calls: batch::Calls, } @@ -15090,6 +15451,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::as_derivative`]."] pub struct AsDerivative { pub index: as_derivative::Index, pub call: ::std::boxed::Box, @@ -15113,6 +15475,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::batch_all`]."] pub struct BatchAll { pub calls: batch_all::Calls, } @@ -15134,6 +15497,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::dispatch_as`]."] pub struct DispatchAs { pub as_origin: ::std::boxed::Box, pub call: ::std::boxed::Box, @@ -15157,6 +15521,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_batch`]."] pub struct ForceBatch { pub calls: force_batch::Calls, } @@ -15178,6 +15543,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::with_weight`]."] pub struct WithWeight { pub call: ::std::boxed::Box, pub weight: with_weight::Weight, @@ -15204,10 +15570,9 @@ pub mod api { "batch", types::Batch { calls }, [ - 141u8, 1u8, 119u8, 192u8, 189u8, 35u8, 196u8, 238u8, 78u8, 195u8, - 239u8, 74u8, 210u8, 239u8, 12u8, 189u8, 63u8, 74u8, 102u8, 164u8, - 191u8, 18u8, 172u8, 242u8, 106u8, 242u8, 194u8, 132u8, 246u8, 210u8, - 146u8, 128u8, + 78u8, 111u8, 192u8, 46u8, 34u8, 172u8, 232u8, 158u8, 67u8, 231u8, + 116u8, 182u8, 17u8, 178u8, 31u8, 98u8, 146u8, 71u8, 226u8, 56u8, 105u8, + 184u8, 75u8, 175u8, 78u8, 225u8, 25u8, 5u8, 226u8, 195u8, 199u8, 41u8, ], ) } @@ -15225,9 +15590,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 69u8, 204u8, 77u8, 100u8, 152u8, 126u8, 231u8, 108u8, 246u8, 127u8, - 54u8, 99u8, 60u8, 70u8, 48u8, 102u8, 117u8, 185u8, 163u8, 22u8, 11u8, - 137u8, 85u8, 214u8, 138u8, 129u8, 47u8, 90u8, 141u8, 43u8, 62u8, 238u8, + 112u8, 49u8, 70u8, 206u8, 54u8, 117u8, 186u8, 83u8, 25u8, 68u8, 8u8, + 255u8, 91u8, 43u8, 254u8, 165u8, 230u8, 24u8, 104u8, 176u8, 236u8, + 166u8, 147u8, 244u8, 103u8, 208u8, 164u8, 26u8, 72u8, 44u8, 143u8, + 209u8, ], ) } @@ -15241,9 +15607,10 @@ pub mod api { "batch_all", types::BatchAll { calls }, [ - 99u8, 223u8, 83u8, 133u8, 180u8, 206u8, 98u8, 134u8, 218u8, 192u8, - 94u8, 80u8, 35u8, 198u8, 25u8, 193u8, 203u8, 185u8, 16u8, 201u8, 151u8, - 113u8, 191u8, 188u8, 30u8, 36u8, 62u8, 170u8, 112u8, 44u8, 19u8, 0u8, + 163u8, 4u8, 232u8, 21u8, 56u8, 119u8, 67u8, 62u8, 223u8, 193u8, 23u8, + 181u8, 202u8, 55u8, 186u8, 155u8, 169u8, 187u8, 213u8, 34u8, 153u8, + 255u8, 210u8, 170u8, 187u8, 212u8, 71u8, 92u8, 173u8, 145u8, 91u8, + 218u8, ], ) } @@ -15261,9 +15628,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 225u8, 201u8, 69u8, 67u8, 231u8, 172u8, 12u8, 242u8, 109u8, 75u8, 89u8, - 220u8, 76u8, 132u8, 121u8, 199u8, 67u8, 132u8, 174u8, 143u8, 3u8, - 191u8, 200u8, 87u8, 219u8, 96u8, 67u8, 148u8, 61u8, 22u8, 83u8, 214u8, + 91u8, 220u8, 144u8, 201u8, 69u8, 201u8, 58u8, 205u8, 190u8, 98u8, + 138u8, 115u8, 107u8, 54u8, 190u8, 44u8, 9u8, 46u8, 109u8, 80u8, 102u8, + 167u8, 139u8, 162u8, 61u8, 191u8, 159u8, 217u8, 207u8, 236u8, 20u8, + 213u8, ], ) } @@ -15277,9 +15645,10 @@ pub mod api { "force_batch", types::ForceBatch { calls }, [ - 117u8, 108u8, 209u8, 75u8, 135u8, 228u8, 168u8, 227u8, 134u8, 141u8, - 49u8, 23u8, 59u8, 156u8, 20u8, 202u8, 19u8, 62u8, 204u8, 127u8, 153u8, - 52u8, 159u8, 197u8, 129u8, 4u8, 195u8, 161u8, 231u8, 23u8, 22u8, 14u8, + 255u8, 125u8, 65u8, 157u8, 224u8, 195u8, 44u8, 249u8, 206u8, 224u8, + 11u8, 66u8, 67u8, 139u8, 24u8, 136u8, 57u8, 79u8, 85u8, 26u8, 51u8, + 170u8, 205u8, 52u8, 181u8, 94u8, 125u8, 250u8, 163u8, 126u8, 140u8, + 43u8, ], ) } @@ -15297,9 +15666,10 @@ pub mod api { weight, }, [ - 5u8, 208u8, 14u8, 248u8, 162u8, 54u8, 154u8, 120u8, 79u8, 129u8, 156u8, - 76u8, 97u8, 214u8, 200u8, 1u8, 176u8, 94u8, 189u8, 148u8, 240u8, 107u8, - 142u8, 195u8, 82u8, 127u8, 45u8, 142u8, 93u8, 82u8, 112u8, 174u8, + 187u8, 254u8, 162u8, 240u8, 54u8, 31u8, 44u8, 138u8, 164u8, 40u8, + 207u8, 170u8, 80u8, 220u8, 64u8, 162u8, 39u8, 87u8, 132u8, 169u8, 14u8, + 193u8, 69u8, 251u8, 171u8, 148u8, 107u8, 163u8, 73u8, 193u8, 46u8, + 26u8, ], ) } @@ -15473,6 +15843,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_registrar`]."] pub struct AddRegistrar { pub account: add_registrar::Account, } @@ -15495,6 +15866,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_identity`]."] pub struct SetIdentity { pub info: ::std::boxed::Box, } @@ -15516,6 +15888,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_subs`]."] pub struct SetSubs { pub subs: set_subs::Subs, } @@ -15540,6 +15913,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::clear_identity`]."] pub struct ClearIdentity; impl ::subxt::blocks::StaticExtrinsic for ClearIdentity { const PALLET: &'static str = "Identity"; @@ -15555,6 +15929,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::request_judgement`]."] pub struct RequestJudgement { #[codec(compact)] pub reg_index: request_judgement::RegIndex, @@ -15571,7 +15946,6 @@ pub mod api { const CALL: &'static str = "request_judgement"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -15581,6 +15955,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel_request`]."] pub struct CancelRequest { pub reg_index: cancel_request::RegIndex, } @@ -15602,6 +15977,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_fee`]."] pub struct SetFee { #[codec(compact)] pub index: set_fee::Index, @@ -15627,6 +16003,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_account_id`]."] pub struct SetAccountId { #[codec(compact)] pub index: set_account_id::Index, @@ -15651,6 +16028,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_fields`]."] pub struct SetFields { #[codec(compact)] pub index: set_fields::Index, @@ -15675,6 +16053,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::provide_judgement`]."] pub struct ProvideJudgement { #[codec(compact)] pub reg_index: provide_judgement::RegIndex, @@ -15704,6 +16083,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::kill_identity`]."] pub struct KillIdentity { pub target: kill_identity::Target, } @@ -15725,6 +16105,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_sub`]."] pub struct AddSub { pub sub: add_sub::Sub, pub data: add_sub::Data, @@ -15748,6 +16129,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::rename_sub`]."] pub struct RenameSub { pub sub: rename_sub::Sub, pub data: rename_sub::Data, @@ -15771,6 +16153,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_sub`]."] pub struct RemoveSub { pub sub: remove_sub::Sub, } @@ -15792,6 +16175,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::quit_sub`]."] pub struct QuitSub; impl ::subxt::blocks::StaticExtrinsic for QuitSub { const PALLET: &'static str = "Identity"; @@ -16210,7 +16594,6 @@ pub mod api { const EVENT: &'static str = "JudgementGiven"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16630,7 +17013,6 @@ pub mod api { pub mod types { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16640,6 +17022,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::bid`]."] pub struct Bid { pub value: bid::Value, } @@ -16661,6 +17044,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unbid`]."] pub struct Unbid; impl ::subxt::blocks::StaticExtrinsic for Unbid { const PALLET: &'static str = "Society"; @@ -16676,6 +17060,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vouch`]."] pub struct Vouch { pub who: vouch::Who, pub value: vouch::Value, @@ -16701,6 +17086,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unvouch`]."] pub struct Unvouch; impl ::subxt::blocks::StaticExtrinsic for Unvouch { const PALLET: &'static str = "Society"; @@ -16716,6 +17102,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vote`]."] pub struct Vote { pub candidate: vote::Candidate, pub approve: vote::Approve, @@ -16740,6 +17127,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::defender_vote`]."] pub struct DefenderVote { pub approve: defender_vote::Approve, } @@ -16761,13 +17149,13 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::payout`]."] pub struct Payout; impl ::subxt::blocks::StaticExtrinsic for Payout { const PALLET: &'static str = "Society"; const CALL: &'static str = "payout"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16777,6 +17165,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::waive_repay`]."] pub struct WaiveRepay { pub amount: waive_repay::Amount, } @@ -16798,6 +17187,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::found_society`]."] pub struct FoundSociety { pub founder: found_society::Founder, pub max_members: found_society::MaxMembers, @@ -16830,6 +17220,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::dissolve`]."] pub struct Dissolve; impl ::subxt::blocks::StaticExtrinsic for Dissolve { const PALLET: &'static str = "Society"; @@ -16845,6 +17236,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::judge_suspended_member`]."] pub struct JudgeSuspendedMember { pub who: judge_suspended_member::Who, pub forgive: judge_suspended_member::Forgive, @@ -16868,6 +17260,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_parameters`]."] pub struct SetParameters { pub max_members: set_parameters::MaxMembers, pub max_intake: set_parameters::MaxIntake, @@ -16895,6 +17288,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::punish_skeptic`]."] pub struct PunishSkeptic; impl ::subxt::blocks::StaticExtrinsic for PunishSkeptic { const PALLET: &'static str = "Society"; @@ -16910,6 +17304,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::claim_membership`]."] pub struct ClaimMembership; impl ::subxt::blocks::StaticExtrinsic for ClaimMembership { const PALLET: &'static str = "Society"; @@ -16925,6 +17320,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::bestow_membership`]."] pub struct BestowMembership { pub candidate: bestow_membership::Candidate, } @@ -16946,6 +17342,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::kick_candidate`]."] pub struct KickCandidate { pub candidate: kick_candidate::Candidate, } @@ -16967,6 +17364,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::resign_candidacy`]."] pub struct ResignCandidacy; impl ::subxt::blocks::StaticExtrinsic for ResignCandidacy { const PALLET: &'static str = "Society"; @@ -16982,6 +17380,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::drop_candidate`]."] pub struct DropCandidate { pub candidate: drop_candidate::Candidate, } @@ -17003,6 +17402,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cleanup_candidacy`]."] pub struct CleanupCandidacy { pub candidate: cleanup_candidacy::Candidate, pub max: cleanup_candidacy::Max, @@ -17026,6 +17426,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cleanup_challenge`]."] pub struct CleanupChallenge { pub challenge_round: cleanup_challenge::ChallengeRound, pub max: cleanup_challenge::Max, @@ -17734,7 +18135,6 @@ pub mod api { const EVENT: &'static str = "Unfounded"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -18743,6 +19143,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::as_recovered`]."] pub struct AsRecovered { pub account: as_recovered::Account, pub call: ::std::boxed::Box, @@ -18767,6 +19168,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_recovered`]."] pub struct SetRecovered { pub lost: set_recovered::Lost, pub rescuer: set_recovered::Rescuer, @@ -18791,6 +19193,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::create_recovery`]."] pub struct CreateRecovery { pub friends: create_recovery::Friends, pub threshold: create_recovery::Threshold, @@ -18816,6 +19219,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::initiate_recovery`]."] pub struct InitiateRecovery { pub account: initiate_recovery::Account, } @@ -18838,6 +19242,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vouch_recovery`]."] pub struct VouchRecovery { pub lost: vouch_recovery::Lost, pub rescuer: vouch_recovery::Rescuer, @@ -18862,6 +19267,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::claim_recovery`]."] pub struct ClaimRecovery { pub account: claim_recovery::Account, } @@ -18884,6 +19290,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::close_recovery`]."] pub struct CloseRecovery { pub rescuer: close_recovery::Rescuer, } @@ -18906,6 +19313,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_recovery`]."] pub struct RemoveRecovery; impl ::subxt::blocks::StaticExtrinsic for RemoveRecovery { const PALLET: &'static str = "Recovery"; @@ -18921,6 +19329,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel_recovered`]."] pub struct CancelRecovered { pub account: cancel_recovered::Account, } @@ -18950,10 +19359,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 75u8, 108u8, 108u8, 139u8, 143u8, 235u8, 161u8, 87u8, 41u8, 248u8, - 216u8, 128u8, 138u8, 80u8, 36u8, 144u8, 73u8, 31u8, 148u8, 233u8, - 244u8, 221u8, 6u8, 145u8, 147u8, 50u8, 45u8, 181u8, 189u8, 17u8, 235u8, - 131u8, + 226u8, 94u8, 208u8, 74u8, 163u8, 132u8, 180u8, 25u8, 34u8, 222u8, + 242u8, 194u8, 224u8, 188u8, 18u8, 229u8, 55u8, 248u8, 19u8, 244u8, + 182u8, 148u8, 138u8, 228u8, 2u8, 55u8, 50u8, 36u8, 32u8, 115u8, 147u8, + 149u8, ], ) } @@ -19560,6 +19969,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vest`]."] pub struct Vest; impl ::subxt::blocks::StaticExtrinsic for Vest { const PALLET: &'static str = "Vesting"; @@ -19575,6 +19985,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vest_other`]."] pub struct VestOther { pub target: vest_other::Target, } @@ -19596,6 +20007,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::vested_transfer`]."] pub struct VestedTransfer { pub target: vested_transfer::Target, pub schedule: vested_transfer::Schedule, @@ -19622,6 +20034,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_vested_transfer`]."] pub struct ForceVestedTransfer { pub source: force_vested_transfer::Source, pub target: force_vested_transfer::Target, @@ -19650,6 +20063,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::merge_schedules`]."] pub struct MergeSchedules { pub schedule1_index: merge_schedules::Schedule1Index, pub schedule2_index: merge_schedules::Schedule2Index, @@ -19673,6 +20087,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_remove_vesting_schedule`]."] pub struct ForceRemoveVestingSchedule { pub target: force_remove_vesting_schedule::Target, pub schedule_index: force_remove_vesting_schedule::ScheduleIndex, @@ -20004,6 +20419,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::schedule`]."] pub struct Schedule { pub when: schedule::When, pub maybe_periodic: schedule::MaybePeriodic, @@ -20032,6 +20448,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel`]."] pub struct Cancel { pub when: cancel::When, pub index: cancel::Index, @@ -20055,6 +20472,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::schedule_named`]."] pub struct ScheduleNamed { pub id: schedule_named::Id, pub when: schedule_named::When, @@ -20085,6 +20503,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel_named`]."] pub struct CancelNamed { pub id: cancel_named::Id, } @@ -20106,6 +20525,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::schedule_after`]."] pub struct ScheduleAfter { pub after: schedule_after::After, pub maybe_periodic: schedule_after::MaybePeriodic, @@ -20134,6 +20554,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::schedule_named_after`]."] pub struct ScheduleNamedAfter { pub id: schedule_named_after::Id, pub after: schedule_named_after::After, @@ -20175,10 +20596,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 180u8, 16u8, 255u8, 35u8, 36u8, 60u8, 175u8, 232u8, 143u8, 121u8, - 248u8, 186u8, 7u8, 164u8, 143u8, 188u8, 61u8, 254u8, 6u8, 163u8, 247u8, - 212u8, 231u8, 34u8, 50u8, 21u8, 145u8, 219u8, 209u8, 153u8, 86u8, - 163u8, + 122u8, 88u8, 251u8, 25u8, 239u8, 91u8, 220u8, 116u8, 155u8, 219u8, + 129u8, 170u8, 81u8, 4u8, 224u8, 195u8, 83u8, 196u8, 48u8, 159u8, 222u8, + 72u8, 2u8, 131u8, 14u8, 204u8, 21u8, 234u8, 2u8, 237u8, 69u8, 28u8, ], ) } @@ -20220,10 +20640,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 58u8, 133u8, 35u8, 192u8, 156u8, 22u8, 193u8, 122u8, 202u8, 119u8, - 97u8, 24u8, 177u8, 93u8, 112u8, 10u8, 183u8, 95u8, 46u8, 151u8, 192u8, - 128u8, 220u8, 230u8, 118u8, 99u8, 240u8, 133u8, 83u8, 226u8, 8u8, - 165u8, + 4u8, 172u8, 69u8, 211u8, 77u8, 162u8, 70u8, 8u8, 60u8, 79u8, 223u8, + 222u8, 210u8, 64u8, 116u8, 53u8, 161u8, 251u8, 28u8, 236u8, 12u8, + 212u8, 174u8, 0u8, 10u8, 78u8, 132u8, 232u8, 163u8, 44u8, 9u8, 200u8, ], ) } @@ -20261,10 +20680,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 11u8, 188u8, 117u8, 224u8, 181u8, 45u8, 153u8, 145u8, 101u8, 184u8, - 109u8, 247u8, 23u8, 204u8, 181u8, 150u8, 139u8, 138u8, 118u8, 210u8, - 93u8, 9u8, 42u8, 96u8, 195u8, 141u8, 96u8, 107u8, 167u8, 20u8, 58u8, - 183u8, + 218u8, 190u8, 254u8, 33u8, 44u8, 21u8, 3u8, 225u8, 106u8, 85u8, 42u8, + 102u8, 206u8, 52u8, 225u8, 78u8, 220u8, 205u8, 130u8, 191u8, 223u8, + 152u8, 7u8, 46u8, 168u8, 251u8, 167u8, 72u8, 186u8, 102u8, 239u8, 95u8, ], ) } @@ -20288,9 +20706,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 3u8, 170u8, 118u8, 254u8, 181u8, 37u8, 250u8, 41u8, 151u8, 124u8, 81u8, - 6u8, 93u8, 220u8, 186u8, 79u8, 39u8, 92u8, 6u8, 234u8, 114u8, 186u8, - 16u8, 211u8, 59u8, 41u8, 221u8, 68u8, 255u8, 86u8, 182u8, 95u8, + 87u8, 222u8, 30u8, 136u8, 12u8, 96u8, 70u8, 211u8, 190u8, 75u8, 247u8, + 231u8, 71u8, 59u8, 62u8, 126u8, 22u8, 4u8, 237u8, 153u8, 26u8, 180u8, + 88u8, 128u8, 69u8, 55u8, 31u8, 201u8, 227u8, 95u8, 38u8, 67u8, ], ) } @@ -20517,9 +20935,9 @@ pub mod api { "Agenda", vec![], [ - 62u8, 186u8, 197u8, 43u8, 38u8, 150u8, 246u8, 25u8, 205u8, 11u8, 111u8, - 230u8, 45u8, 231u8, 186u8, 80u8, 203u8, 153u8, 148u8, 169u8, 55u8, - 22u8, 169u8, 233u8, 22u8, 93u8, 129u8, 43u8, 34u8, 24u8, 0u8, 198u8, + 247u8, 226u8, 115u8, 70u8, 172u8, 69u8, 26u8, 24u8, 46u8, 202u8, 118u8, + 250u8, 111u8, 236u8, 77u8, 255u8, 26u8, 125u8, 18u8, 8u8, 24u8, 230u8, + 222u8, 140u8, 179u8, 235u8, 19u8, 161u8, 40u8, 78u8, 26u8, 173u8, ], ) } @@ -20541,9 +20959,9 @@ pub mod api { _0.borrow(), )], [ - 62u8, 186u8, 197u8, 43u8, 38u8, 150u8, 246u8, 25u8, 205u8, 11u8, 111u8, - 230u8, 45u8, 231u8, 186u8, 80u8, 203u8, 153u8, 148u8, 169u8, 55u8, - 22u8, 169u8, 233u8, 22u8, 93u8, 129u8, 43u8, 34u8, 24u8, 0u8, 198u8, + 247u8, 226u8, 115u8, 70u8, 172u8, 69u8, 26u8, 24u8, 46u8, 202u8, 118u8, + 250u8, 111u8, 236u8, 77u8, 255u8, 26u8, 125u8, 18u8, 8u8, 24u8, 230u8, + 222u8, 140u8, 179u8, 235u8, 19u8, 161u8, 40u8, 78u8, 26u8, 173u8, ], ) } @@ -20665,6 +21083,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::proxy`]."] pub struct Proxy { pub real: proxy::Real, pub force_proxy_type: proxy::ForceProxyType, @@ -20691,6 +21110,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_proxy`]."] pub struct AddProxy { pub delegate: add_proxy::Delegate, pub proxy_type: add_proxy::ProxyType, @@ -20717,6 +21137,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_proxy`]."] pub struct RemoveProxy { pub delegate: remove_proxy::Delegate, pub proxy_type: remove_proxy::ProxyType, @@ -20743,6 +21164,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_proxies`]."] pub struct RemoveProxies; impl ::subxt::blocks::StaticExtrinsic for RemoveProxies { const PALLET: &'static str = "Proxy"; @@ -20758,6 +21180,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::create_pure`]."] pub struct CreatePure { pub proxy_type: create_pure::ProxyType, pub delay: create_pure::Delay, @@ -20783,6 +21206,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::kill_pure`]."] pub struct KillPure { pub spawner: kill_pure::Spawner, pub proxy_type: kill_pure::ProxyType, @@ -20815,6 +21239,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::announce`]."] pub struct Announce { pub real: announce::Real, pub call_hash: announce::CallHash, @@ -20838,6 +21263,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_announcement`]."] pub struct RemoveAnnouncement { pub real: remove_announcement::Real, pub call_hash: remove_announcement::CallHash, @@ -20861,6 +21287,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::reject_announcement`]."] pub struct RejectAnnouncement { pub delegate: reject_announcement::Delegate, pub call_hash: reject_announcement::CallHash, @@ -20885,6 +21312,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::proxy_announced`]."] pub struct ProxyAnnounced { pub delegate: proxy_announced::Delegate, pub real: proxy_announced::Real, @@ -20923,10 +21351,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 236u8, 220u8, 19u8, 139u8, 42u8, 187u8, 224u8, 41u8, 173u8, 128u8, - 201u8, 54u8, 148u8, 222u8, 90u8, 185u8, 183u8, 198u8, 220u8, 33u8, - 14u8, 93u8, 157u8, 187u8, 36u8, 186u8, 190u8, 41u8, 129u8, 186u8, - 238u8, 244u8, + 244u8, 249u8, 206u8, 185u8, 48u8, 156u8, 194u8, 100u8, 198u8, 133u8, + 26u8, 248u8, 122u8, 194u8, 19u8, 42u8, 6u8, 201u8, 112u8, 79u8, 19u8, + 134u8, 145u8, 157u8, 129u8, 237u8, 139u8, 133u8, 227u8, 43u8, 56u8, + 153u8, ], ) } @@ -21110,10 +21538,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 16u8, 202u8, 189u8, 106u8, 126u8, 243u8, 220u8, 235u8, 217u8, 178u8, - 231u8, 116u8, 39u8, 159u8, 101u8, 241u8, 77u8, 187u8, 146u8, 32u8, - 247u8, 49u8, 172u8, 87u8, 218u8, 102u8, 60u8, 39u8, 252u8, 186u8, - 144u8, 215u8, + 217u8, 199u8, 199u8, 95u8, 222u8, 27u8, 176u8, 48u8, 0u8, 226u8, 245u8, + 221u8, 226u8, 48u8, 29u8, 233u8, 28u8, 187u8, 52u8, 17u8, 172u8, 42u8, + 88u8, 107u8, 61u8, 104u8, 65u8, 42u8, 35u8, 53u8, 80u8, 48u8, ], ) } @@ -21514,11 +21941,12 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::as_multi_threshold_1`]."] pub struct AsMultiThreshold1 { - pub other_signatories: as_multi_threshold_1::OtherSignatories, - pub call: ::std::boxed::Box, + pub other_signatories: as_multi_threshold1::OtherSignatories, + pub call: ::std::boxed::Box, } - pub mod as_multi_threshold_1 { + pub mod as_multi_threshold1 { use super::runtime_types; pub type OtherSignatories = ::std::vec::Vec<::subxt::utils::AccountId32>; pub type Call = runtime_types::rococo_runtime::RuntimeCall; @@ -21537,6 +21965,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::as_multi`]."] pub struct AsMulti { pub threshold: as_multi::Threshold, pub other_signatories: as_multi::OtherSignatories, @@ -21568,6 +21997,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::approve_as_multi`]."] pub struct ApproveAsMulti { pub threshold: approve_as_multi::Threshold, pub other_signatories: approve_as_multi::OtherSignatories, @@ -21599,6 +22029,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel_as_multi`]."] pub struct CancelAsMulti { pub threshold: cancel_as_multi::Threshold, pub other_signatories: cancel_as_multi::OtherSignatories, @@ -21623,8 +22054,8 @@ pub mod api { #[doc = "See [`Pallet::as_multi_threshold_1`]."] pub fn as_multi_threshold_1( &self, - other_signatories: types::as_multi_threshold_1::OtherSignatories, - call: types::as_multi_threshold_1::Call, + other_signatories: types::as_multi_threshold1::OtherSignatories, + call: types::as_multi_threshold1::Call, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Multisig", @@ -21634,9 +22065,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 207u8, 245u8, 33u8, 132u8, 16u8, 230u8, 82u8, 159u8, 115u8, 197u8, - 30u8, 73u8, 47u8, 104u8, 76u8, 120u8, 20u8, 66u8, 165u8, 228u8, 54u8, - 218u8, 47u8, 52u8, 124u8, 175u8, 221u8, 120u8, 25u8, 51u8, 102u8, 18u8, + 228u8, 69u8, 114u8, 33u8, 253u8, 99u8, 173u8, 184u8, 219u8, 170u8, + 155u8, 9u8, 231u8, 77u8, 180u8, 97u8, 26u8, 0u8, 97u8, 107u8, 112u8, + 223u8, 207u8, 156u8, 86u8, 17u8, 115u8, 211u8, 188u8, 122u8, 51u8, + 55u8, ], ) } @@ -21660,10 +22092,10 @@ pub mod api { max_weight, }, [ - 175u8, 100u8, 107u8, 233u8, 67u8, 246u8, 40u8, 1u8, 217u8, 152u8, - 122u8, 124u8, 255u8, 124u8, 35u8, 141u8, 215u8, 178u8, 70u8, 231u8, - 241u8, 250u8, 146u8, 17u8, 126u8, 247u8, 89u8, 203u8, 207u8, 80u8, - 123u8, 64u8, + 110u8, 238u8, 2u8, 11u8, 232u8, 202u8, 100u8, 39u8, 103u8, 211u8, + 204u8, 203u8, 228u8, 31u8, 206u8, 103u8, 97u8, 57u8, 217u8, 24u8, + 229u8, 237u8, 56u8, 84u8, 220u8, 240u8, 169u8, 211u8, 26u8, 98u8, 37u8, + 0u8, ], ) } @@ -22008,6 +22440,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::note_preimage`]."] pub struct NotePreimage { pub bytes: note_preimage::Bytes, } @@ -22029,6 +22462,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unnote_preimage`]."] pub struct UnnotePreimage { pub hash: unnote_preimage::Hash, } @@ -22050,6 +22484,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::request_preimage`]."] pub struct RequestPreimage { pub hash: request_preimage::Hash, } @@ -22071,6 +22506,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unrequest_preimage`]."] pub struct UnrequestPreimage { pub hash: unrequest_preimage::Hash, } @@ -22092,6 +22528,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::ensure_updated`]."] pub struct EnsureUpdated { pub hashes: ensure_updated::Hashes, } @@ -22483,6 +22920,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::create`]."] pub struct Create { pub asset_kind: ::std::boxed::Box, pub rate: create::Rate, @@ -22507,6 +22945,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::update`]."] pub struct Update { pub asset_kind: ::std::boxed::Box, pub rate: update::Rate, @@ -22531,6 +22970,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove`]."] pub struct Remove { pub asset_kind: ::std::boxed::Box, } @@ -22560,10 +23000,10 @@ pub mod api { rate, }, [ - 144u8, 94u8, 181u8, 24u8, 145u8, 102u8, 209u8, 195u8, 219u8, 86u8, - 91u8, 235u8, 101u8, 93u8, 102u8, 224u8, 38u8, 7u8, 162u8, 42u8, 44u8, - 61u8, 60u8, 247u8, 158u8, 168u8, 123u8, 121u8, 255u8, 138u8, 33u8, - 242u8, + 154u8, 152u8, 38u8, 160u8, 110u8, 48u8, 11u8, 80u8, 92u8, 50u8, 177u8, + 170u8, 43u8, 6u8, 192u8, 234u8, 105u8, 114u8, 165u8, 178u8, 173u8, + 134u8, 92u8, 233u8, 123u8, 191u8, 176u8, 154u8, 222u8, 224u8, 32u8, + 183u8, ], ) } @@ -22581,9 +23021,10 @@ pub mod api { rate, }, [ - 72u8, 159u8, 145u8, 29u8, 92u8, 184u8, 218u8, 23u8, 28u8, 166u8, 129u8, - 23u8, 99u8, 39u8, 49u8, 2u8, 57u8, 156u8, 3u8, 230u8, 123u8, 86u8, - 13u8, 159u8, 39u8, 206u8, 239u8, 90u8, 94u8, 219u8, 248u8, 98u8, + 188u8, 71u8, 197u8, 156u8, 105u8, 63u8, 11u8, 90u8, 124u8, 227u8, + 146u8, 78u8, 93u8, 216u8, 100u8, 41u8, 128u8, 115u8, 66u8, 243u8, + 198u8, 61u8, 115u8, 30u8, 170u8, 218u8, 254u8, 203u8, 37u8, 141u8, + 67u8, 179u8, ], ) } @@ -22599,10 +23040,10 @@ pub mod api { asset_kind: ::std::boxed::Box::new(asset_kind), }, [ - 112u8, 56u8, 198u8, 140u8, 116u8, 100u8, 203u8, 229u8, 203u8, 28u8, - 217u8, 231u8, 55u8, 95u8, 254u8, 18u8, 16u8, 47u8, 2u8, 218u8, 169u8, - 84u8, 17u8, 35u8, 251u8, 229u8, 197u8, 245u8, 72u8, 131u8, 167u8, - 212u8, + 229u8, 203u8, 96u8, 158u8, 162u8, 236u8, 80u8, 239u8, 106u8, 193u8, + 85u8, 234u8, 99u8, 87u8, 214u8, 214u8, 157u8, 55u8, 70u8, 91u8, 9u8, + 187u8, 105u8, 99u8, 134u8, 181u8, 56u8, 212u8, 152u8, 136u8, 100u8, + 32u8, ], ) } @@ -22716,10 +23157,9 @@ pub mod api { "ConversionRateToNative", vec![], [ - 228u8, 209u8, 34u8, 96u8, 59u8, 195u8, 128u8, 180u8, 187u8, 213u8, - 108u8, 68u8, 133u8, 63u8, 133u8, 38u8, 18u8, 91u8, 150u8, 139u8, 74u8, - 115u8, 154u8, 13u8, 240u8, 186u8, 84u8, 98u8, 161u8, 255u8, 205u8, - 151u8, + 211u8, 210u8, 178u8, 27u8, 157u8, 1u8, 68u8, 252u8, 84u8, 174u8, 141u8, + 185u8, 177u8, 39u8, 49u8, 35u8, 65u8, 254u8, 204u8, 246u8, 132u8, 59u8, + 190u8, 228u8, 135u8, 237u8, 161u8, 35u8, 21u8, 114u8, 88u8, 174u8, ], ) } @@ -22743,10 +23183,9 @@ pub mod api { _0.borrow(), )], [ - 228u8, 209u8, 34u8, 96u8, 59u8, 195u8, 128u8, 180u8, 187u8, 213u8, - 108u8, 68u8, 133u8, 63u8, 133u8, 38u8, 18u8, 91u8, 150u8, 139u8, 74u8, - 115u8, 154u8, 13u8, 240u8, 186u8, 84u8, 98u8, 161u8, 255u8, 205u8, - 151u8, + 211u8, 210u8, 178u8, 27u8, 157u8, 1u8, 68u8, 252u8, 84u8, 174u8, 141u8, + 185u8, 177u8, 39u8, 49u8, 35u8, 65u8, 254u8, 204u8, 246u8, 132u8, 59u8, + 190u8, 228u8, 135u8, 237u8, 161u8, 35u8, 21u8, 114u8, 88u8, 174u8, ], ) } @@ -22776,6 +23215,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::propose_bounty`]."] pub struct ProposeBounty { #[codec(compact)] pub value: propose_bounty::Value, @@ -22800,6 +23240,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::approve_bounty`]."] pub struct ApproveBounty { #[codec(compact)] pub bounty_id: approve_bounty::BountyId, @@ -22822,6 +23263,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::propose_curator`]."] pub struct ProposeCurator { #[codec(compact)] pub bounty_id: propose_curator::BountyId, @@ -22850,6 +23292,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unassign_curator`]."] pub struct UnassignCurator { #[codec(compact)] pub bounty_id: unassign_curator::BountyId, @@ -22872,6 +23315,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::accept_curator`]."] pub struct AcceptCurator { #[codec(compact)] pub bounty_id: accept_curator::BountyId, @@ -22894,6 +23338,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::award_bounty`]."] pub struct AwardBounty { #[codec(compact)] pub bounty_id: award_bounty::BountyId, @@ -22919,6 +23364,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::claim_bounty`]."] pub struct ClaimBounty { #[codec(compact)] pub bounty_id: claim_bounty::BountyId, @@ -22941,6 +23387,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::close_bounty`]."] pub struct CloseBounty { #[codec(compact)] pub bounty_id: close_bounty::BountyId, @@ -22963,6 +23410,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::extend_bounty_expiry`]."] pub struct ExtendBountyExpiry { #[codec(compact)] pub bounty_id: extend_bounty_expiry::BountyId, @@ -23148,7 +23596,6 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23195,7 +23642,6 @@ pub mod api { const EVENT: &'static str = "BountyRejected"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23268,7 +23714,6 @@ pub mod api { const EVENT: &'static str = "BountyClaimed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23291,7 +23736,6 @@ pub mod api { const EVENT: &'static str = "BountyCanceled"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23314,7 +23758,6 @@ pub mod api { const EVENT: &'static str = "BountyExtended"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23361,7 +23804,6 @@ pub mod api { const EVENT: &'static str = "CuratorProposed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23749,6 +24191,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_child_bounty`]."] pub struct AddChildBounty { #[codec(compact)] pub parent_bounty_id: add_child_bounty::ParentBountyId, @@ -23776,6 +24219,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::propose_curator`]."] pub struct ProposeCurator { #[codec(compact)] pub parent_bounty_id: propose_curator::ParentBountyId, @@ -23807,6 +24251,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::accept_curator`]."] pub struct AcceptCurator { #[codec(compact)] pub parent_bounty_id: accept_curator::ParentBountyId, @@ -23832,6 +24277,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unassign_curator`]."] pub struct UnassignCurator { #[codec(compact)] pub parent_bounty_id: unassign_curator::ParentBountyId, @@ -23857,6 +24303,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::award_child_bounty`]."] pub struct AwardChildBounty { #[codec(compact)] pub parent_bounty_id: award_child_bounty::ParentBountyId, @@ -23885,6 +24332,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::claim_child_bounty`]."] pub struct ClaimChildBounty { #[codec(compact)] pub parent_bounty_id: claim_child_bounty::ParentBountyId, @@ -23910,6 +24358,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::close_child_bounty`]."] pub struct CloseChildBounty { #[codec(compact)] pub parent_bounty_id: close_child_bounty::ParentBountyId, @@ -24520,6 +24969,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::place_bid`]."] pub struct PlaceBid { #[codec(compact)] pub amount: place_bid::Amount, @@ -24544,6 +24994,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::retract_bid`]."] pub struct RetractBid { #[codec(compact)] pub amount: retract_bid::Amount, @@ -24568,6 +25019,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::fund_deficit`]."] pub struct FundDeficit; impl ::subxt::blocks::StaticExtrinsic for FundDeficit { const PALLET: &'static str = "Nis"; @@ -24583,6 +25035,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::thaw_private`]."] pub struct ThawPrivate { #[codec(compact)] pub index: thaw_private::Index, @@ -24609,6 +25062,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::thaw_communal`]."] pub struct ThawCommunal { #[codec(compact)] pub index: thaw_communal::Index, @@ -24631,6 +25085,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::communify`]."] pub struct Communify { #[codec(compact)] pub index: communify::Index, @@ -24653,6 +25108,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::privatize`]."] pub struct Privatize { #[codec(compact)] pub index: privatize::Index, @@ -24933,7 +25389,6 @@ pub mod api { const EVENT: &'static str = "Thawed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25356,6 +25811,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::transfer_allow_death`]."] pub struct TransferAllowDeath { pub dest: transfer_allow_death::Dest, #[codec(compact)] @@ -25380,6 +25836,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_transfer`]."] pub struct ForceTransfer { pub source: force_transfer::Source, pub dest: force_transfer::Dest, @@ -25406,6 +25863,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::transfer_keep_alive`]."] pub struct TransferKeepAlive { pub dest: transfer_keep_alive::Dest, #[codec(compact)] @@ -25430,6 +25888,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::transfer_all`]."] pub struct TransferAll { pub dest: transfer_all::Dest, pub keep_alive: transfer_all::KeepAlive, @@ -25453,6 +25912,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_unreserve`]."] pub struct ForceUnreserve { pub who: force_unreserve::Who, pub amount: force_unreserve::Amount, @@ -25476,6 +25936,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::upgrade_accounts`]."] pub struct UpgradeAccounts { pub who: upgrade_accounts::Who, } @@ -25497,6 +25958,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_set_balance`]."] pub struct ForceSetBalance { pub who: force_set_balance::Who, #[codec(compact)] @@ -26013,7 +26475,6 @@ pub mod api { const EVENT: &'static str = "Upgraded"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26036,7 +26497,6 @@ pub mod api { const EVENT: &'static str = "Issued"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26635,7 +27095,6 @@ pub mod api { pub mod types { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26645,6 +27104,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_validation_upgrade_cooldown`]."] pub struct SetValidationUpgradeCooldown { pub new: set_validation_upgrade_cooldown::New, } @@ -26657,7 +27117,6 @@ pub mod api { const CALL: &'static str = "set_validation_upgrade_cooldown"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26667,6 +27126,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_validation_upgrade_delay`]."] pub struct SetValidationUpgradeDelay { pub new: set_validation_upgrade_delay::New, } @@ -26679,7 +27139,6 @@ pub mod api { const CALL: &'static str = "set_validation_upgrade_delay"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26689,6 +27148,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_code_retention_period`]."] pub struct SetCodeRetentionPeriod { pub new: set_code_retention_period::New, } @@ -26701,7 +27161,6 @@ pub mod api { const CALL: &'static str = "set_code_retention_period"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26711,6 +27170,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_code_size`]."] pub struct SetMaxCodeSize { pub new: set_max_code_size::New, } @@ -26723,7 +27183,6 @@ pub mod api { const CALL: &'static str = "set_max_code_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26733,6 +27192,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_pov_size`]."] pub struct SetMaxPovSize { pub new: set_max_pov_size::New, } @@ -26745,7 +27205,6 @@ pub mod api { const CALL: &'static str = "set_max_pov_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26755,6 +27214,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_head_data_size`]."] pub struct SetMaxHeadDataSize { pub new: set_max_head_data_size::New, } @@ -26767,7 +27227,6 @@ pub mod api { const CALL: &'static str = "set_max_head_data_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26777,6 +27236,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_on_demand_cores`]."] pub struct SetOnDemandCores { pub new: set_on_demand_cores::New, } @@ -26789,7 +27249,6 @@ pub mod api { const CALL: &'static str = "set_on_demand_cores"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26799,6 +27258,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_on_demand_retries`]."] pub struct SetOnDemandRetries { pub new: set_on_demand_retries::New, } @@ -26811,7 +27271,6 @@ pub mod api { const CALL: &'static str = "set_on_demand_retries"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26821,6 +27280,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_group_rotation_frequency`]."] pub struct SetGroupRotationFrequency { pub new: set_group_rotation_frequency::New, } @@ -26833,7 +27293,6 @@ pub mod api { const CALL: &'static str = "set_group_rotation_frequency"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26843,6 +27302,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_paras_availability_period`]."] pub struct SetParasAvailabilityPeriod { pub new: set_paras_availability_period::New, } @@ -26855,7 +27315,6 @@ pub mod api { const CALL: &'static str = "set_paras_availability_period"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26865,6 +27324,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_scheduling_lookahead`]."] pub struct SetSchedulingLookahead { pub new: set_scheduling_lookahead::New, } @@ -26886,6 +27346,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_validators_per_core`]."] pub struct SetMaxValidatorsPerCore { pub new: set_max_validators_per_core::New, } @@ -26907,6 +27368,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_validators`]."] pub struct SetMaxValidators { pub new: set_max_validators::New, } @@ -26919,7 +27381,6 @@ pub mod api { const CALL: &'static str = "set_max_validators"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26929,6 +27390,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_dispute_period`]."] pub struct SetDisputePeriod { pub new: set_dispute_period::New, } @@ -26941,7 +27403,6 @@ pub mod api { const CALL: &'static str = "set_dispute_period"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26951,6 +27412,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_dispute_post_conclusion_acceptance_period`]."] pub struct SetDisputePostConclusionAcceptancePeriod { pub new: set_dispute_post_conclusion_acceptance_period::New, } @@ -26963,7 +27425,6 @@ pub mod api { const CALL: &'static str = "set_dispute_post_conclusion_acceptance_period"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26973,6 +27434,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_no_show_slots`]."] pub struct SetNoShowSlots { pub new: set_no_show_slots::New, } @@ -26985,7 +27447,6 @@ pub mod api { const CALL: &'static str = "set_no_show_slots"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26995,6 +27456,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_n_delay_tranches`]."] pub struct SetNDelayTranches { pub new: set_n_delay_tranches::New, } @@ -27007,7 +27469,6 @@ pub mod api { const CALL: &'static str = "set_n_delay_tranches"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27017,6 +27478,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_zeroth_delay_tranche_width`]."] pub struct SetZerothDelayTrancheWidth { pub new: set_zeroth_delay_tranche_width::New, } @@ -27029,7 +27491,6 @@ pub mod api { const CALL: &'static str = "set_zeroth_delay_tranche_width"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27039,6 +27500,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_needed_approvals`]."] pub struct SetNeededApprovals { pub new: set_needed_approvals::New, } @@ -27051,7 +27513,6 @@ pub mod api { const CALL: &'static str = "set_needed_approvals"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27061,6 +27522,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_relay_vrf_modulo_samples`]."] pub struct SetRelayVrfModuloSamples { pub new: set_relay_vrf_modulo_samples::New, } @@ -27073,7 +27535,6 @@ pub mod api { const CALL: &'static str = "set_relay_vrf_modulo_samples"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27083,6 +27544,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_upward_queue_count`]."] pub struct SetMaxUpwardQueueCount { pub new: set_max_upward_queue_count::New, } @@ -27095,7 +27557,6 @@ pub mod api { const CALL: &'static str = "set_max_upward_queue_count"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27105,6 +27566,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_upward_queue_size`]."] pub struct SetMaxUpwardQueueSize { pub new: set_max_upward_queue_size::New, } @@ -27117,7 +27579,6 @@ pub mod api { const CALL: &'static str = "set_max_upward_queue_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27127,6 +27588,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_downward_message_size`]."] pub struct SetMaxDownwardMessageSize { pub new: set_max_downward_message_size::New, } @@ -27139,7 +27601,6 @@ pub mod api { const CALL: &'static str = "set_max_downward_message_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27149,6 +27610,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_upward_message_size`]."] pub struct SetMaxUpwardMessageSize { pub new: set_max_upward_message_size::New, } @@ -27161,7 +27623,6 @@ pub mod api { const CALL: &'static str = "set_max_upward_message_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27171,6 +27632,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_upward_message_num_per_candidate`]."] pub struct SetMaxUpwardMessageNumPerCandidate { pub new: set_max_upward_message_num_per_candidate::New, } @@ -27183,7 +27645,6 @@ pub mod api { const CALL: &'static str = "set_max_upward_message_num_per_candidate"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27193,6 +27654,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_open_request_ttl`]."] pub struct SetHrmpOpenRequestTtl { pub new: set_hrmp_open_request_ttl::New, } @@ -27205,7 +27667,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_open_request_ttl"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27215,6 +27676,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_sender_deposit`]."] pub struct SetHrmpSenderDeposit { pub new: set_hrmp_sender_deposit::New, } @@ -27227,7 +27689,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_sender_deposit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27237,6 +27698,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_recipient_deposit`]."] pub struct SetHrmpRecipientDeposit { pub new: set_hrmp_recipient_deposit::New, } @@ -27249,7 +27711,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_recipient_deposit"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27259,6 +27720,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_channel_max_capacity`]."] pub struct SetHrmpChannelMaxCapacity { pub new: set_hrmp_channel_max_capacity::New, } @@ -27271,7 +27733,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_channel_max_capacity"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27281,6 +27742,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_channel_max_total_size`]."] pub struct SetHrmpChannelMaxTotalSize { pub new: set_hrmp_channel_max_total_size::New, } @@ -27293,7 +27755,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_channel_max_total_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27303,6 +27764,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_max_parachain_inbound_channels`]."] pub struct SetHrmpMaxParachainInboundChannels { pub new: set_hrmp_max_parachain_inbound_channels::New, } @@ -27315,7 +27777,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_max_parachain_inbound_channels"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27325,6 +27786,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_channel_max_message_size`]."] pub struct SetHrmpChannelMaxMessageSize { pub new: set_hrmp_channel_max_message_size::New, } @@ -27337,7 +27799,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_channel_max_message_size"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27347,6 +27808,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_max_parachain_outbound_channels`]."] pub struct SetHrmpMaxParachainOutboundChannels { pub new: set_hrmp_max_parachain_outbound_channels::New, } @@ -27359,7 +27821,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_max_parachain_outbound_channels"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27369,6 +27830,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_hrmp_max_message_num_per_candidate`]."] pub struct SetHrmpMaxMessageNumPerCandidate { pub new: set_hrmp_max_message_num_per_candidate::New, } @@ -27381,7 +27843,6 @@ pub mod api { const CALL: &'static str = "set_hrmp_max_message_num_per_candidate"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27391,6 +27852,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_pvf_voting_ttl`]."] pub struct SetPvfVotingTtl { pub new: set_pvf_voting_ttl::New, } @@ -27403,7 +27865,6 @@ pub mod api { const CALL: &'static str = "set_pvf_voting_ttl"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27413,6 +27874,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_minimum_validation_upgrade_delay`]."] pub struct SetMinimumValidationUpgradeDelay { pub new: set_minimum_validation_upgrade_delay::New, } @@ -27434,6 +27896,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_bypass_consistency_check`]."] pub struct SetBypassConsistencyCheck { pub new: set_bypass_consistency_check::New, } @@ -27455,6 +27918,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_async_backing_params`]."] pub struct SetAsyncBackingParams { pub new: set_async_backing_params::New, } @@ -27477,6 +27941,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_executor_params`]."] pub struct SetExecutorParams { pub new: set_executor_params::New, } @@ -27490,7 +27955,6 @@ pub mod api { const CALL: &'static str = "set_executor_params"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27500,6 +27964,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_on_demand_base_fee`]."] pub struct SetOnDemandBaseFee { pub new: set_on_demand_base_fee::New, } @@ -27521,6 +27986,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_on_demand_fee_variability`]."] pub struct SetOnDemandFeeVariability { pub new: set_on_demand_fee_variability::New, } @@ -27533,7 +27999,6 @@ pub mod api { const CALL: &'static str = "set_on_demand_fee_variability"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27543,6 +28008,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_on_demand_queue_max_size`]."] pub struct SetOnDemandQueueMaxSize { pub new: set_on_demand_queue_max_size::New, } @@ -27564,6 +28030,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_on_demand_target_queue_utilization`]."] pub struct SetOnDemandTargetQueueUtilization { pub new: set_on_demand_target_queue_utilization::New, } @@ -27576,7 +28043,6 @@ pub mod api { const CALL: &'static str = "set_on_demand_target_queue_utilization"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27586,6 +28052,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_on_demand_ttl`]."] pub struct SetOnDemandTtl { pub new: set_on_demand_ttl::New, } @@ -27598,7 +28065,6 @@ pub mod api { const CALL: &'static str = "set_on_demand_ttl"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27608,6 +28074,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_minimum_backing_votes`]."] pub struct SetMinimumBackingVotes { pub new: set_minimum_backing_votes::New, } @@ -27619,29 +28086,6 @@ pub mod api { const PALLET: &'static str = "Configuration"; const CALL: &'static str = "set_minimum_backing_votes"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNodeFeature { - pub index: set_node_feature::Index, - pub value: set_node_feature::Value, - } - pub mod set_node_feature { - use super::runtime_types; - pub type Index = ::core::primitive::u8; - pub type Value = ::core::primitive::bool; - } - impl ::subxt::blocks::StaticExtrinsic for SetNodeFeature { - const PALLET: &'static str = "Configuration"; - const CALL: &'static str = "set_node_feature"; - } } pub struct TransactionApi; impl TransactionApi { @@ -28290,9 +28734,9 @@ pub mod api { "set_executor_params", types::SetExecutorParams { new }, [ - 79u8, 167u8, 242u8, 14u8, 22u8, 177u8, 240u8, 134u8, 154u8, 77u8, - 233u8, 188u8, 110u8, 223u8, 25u8, 52u8, 58u8, 241u8, 226u8, 255u8, 2u8, - 26u8, 8u8, 241u8, 125u8, 33u8, 63u8, 204u8, 93u8, 31u8, 229u8, 0u8, + 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, ], ) } @@ -28396,23 +28840,6 @@ pub mod api { ], ) } - #[doc = "See [`Pallet::set_node_feature`]."] - pub fn set_node_feature( - &self, - index: types::set_node_feature::Index, - value: types::set_node_feature::Value, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Configuration", - "set_node_feature", - types::SetNodeFeature { index, value }, - [ - 255u8, 19u8, 208u8, 76u8, 122u8, 6u8, 42u8, 182u8, 118u8, 151u8, 245u8, - 80u8, 162u8, 243u8, 45u8, 57u8, 122u8, 148u8, 98u8, 170u8, 157u8, 40u8, - 92u8, 234u8, 12u8, 141u8, 54u8, 80u8, 97u8, 249u8, 115u8, 27u8, - ], - ) - } } } pub mod storage { @@ -28449,10 +28876,10 @@ pub mod api { "ActiveConfig", vec![], [ - 145u8, 251u8, 153u8, 14u8, 18u8, 9u8, 82u8, 90u8, 133u8, 202u8, 132u8, - 123u8, 13u8, 121u8, 114u8, 101u8, 52u8, 95u8, 219u8, 230u8, 116u8, - 223u8, 139u8, 142u8, 84u8, 219u8, 240u8, 97u8, 18u8, 184u8, 200u8, - 222u8, + 126u8, 223u8, 107u8, 199u8, 21u8, 114u8, 19u8, 172u8, 27u8, 108u8, + 189u8, 165u8, 33u8, 220u8, 57u8, 81u8, 137u8, 242u8, 204u8, 148u8, + 61u8, 161u8, 156u8, 36u8, 20u8, 172u8, 117u8, 30u8, 152u8, 210u8, + 207u8, 161u8, ], ) } @@ -28477,9 +28904,10 @@ pub mod api { "PendingConfigs", vec![], [ - 130u8, 18u8, 145u8, 42u8, 85u8, 142u8, 125u8, 44u8, 13u8, 63u8, 64u8, - 135u8, 239u8, 11u8, 29u8, 127u8, 46u8, 83u8, 150u8, 215u8, 110u8, - 128u8, 74u8, 54u8, 40u8, 158u8, 132u8, 239u8, 8u8, 172u8, 168u8, 25u8, + 105u8, 89u8, 53u8, 156u8, 60u8, 53u8, 196u8, 187u8, 5u8, 122u8, 186u8, + 196u8, 162u8, 133u8, 254u8, 178u8, 130u8, 143u8, 90u8, 23u8, 234u8, + 105u8, 9u8, 121u8, 142u8, 123u8, 136u8, 166u8, 95u8, 215u8, 176u8, + 46u8, ], ) } @@ -28962,6 +29390,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::enter`]."] pub struct Enter { pub data: enter::Data, } @@ -29230,6 +29659,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_set_current_code`]."] pub struct ForceSetCurrentCode { pub para: force_set_current_code::Para, pub new_code: force_set_current_code::NewCode, @@ -29254,6 +29684,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_set_current_head`]."] pub struct ForceSetCurrentHead { pub para: force_set_current_head::Para, pub new_head: force_set_current_head::NewHead, @@ -29278,6 +29709,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_schedule_code_upgrade`]."] pub struct ForceScheduleCodeUpgrade { pub para: force_schedule_code_upgrade::Para, pub new_code: force_schedule_code_upgrade::NewCode, @@ -29304,6 +29736,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_note_new_head`]."] pub struct ForceNoteNewHead { pub para: force_note_new_head::Para, pub new_head: force_note_new_head::NewHead, @@ -29328,6 +29761,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_queue_action`]."] pub struct ForceQueueAction { pub para: force_queue_action::Para, } @@ -29349,6 +29783,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_trusted_validation_code`]."] pub struct AddTrustedValidationCode { pub validation_code: add_trusted_validation_code::ValidationCode, } @@ -29371,6 +29806,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::poke_unused_validation_code`]."] pub struct PokeUnusedValidationCode { pub validation_code_hash: poke_unused_validation_code::ValidationCodeHash, } @@ -29392,6 +29828,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::include_pvf_check_statement`]."] pub struct IncludePvfCheckStatement { pub stmt: include_pvf_check_statement::Stmt, pub signature: include_pvf_check_statement::Signature, @@ -29416,6 +29853,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_set_most_recent_context`]."] pub struct ForceSetMostRecentContext { pub para: force_set_most_recent_context::Para, pub context: force_set_most_recent_context::Context, @@ -30854,7 +31292,6 @@ pub mod api { pub mod types { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -30864,6 +31301,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_approve`]."] pub struct ForceApprove { pub up_to: force_approve::UpTo, } @@ -31175,6 +31613,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::hrmp_init_open_channel`]."] pub struct HrmpInitOpenChannel { pub recipient: hrmp_init_open_channel::Recipient, pub proposed_max_capacity: hrmp_init_open_channel::ProposedMaxCapacity, @@ -31201,6 +31640,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::hrmp_accept_open_channel`]."] pub struct HrmpAcceptOpenChannel { pub sender: hrmp_accept_open_channel::Sender, } @@ -31222,6 +31662,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::hrmp_close_channel`]."] pub struct HrmpCloseChannel { pub channel_id: hrmp_close_channel::ChannelId, } @@ -31244,6 +31685,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_clean_hrmp`]."] pub struct ForceCleanHrmp { pub para: force_clean_hrmp::Para, pub num_inbound: force_clean_hrmp::NumInbound, @@ -31260,7 +31702,6 @@ pub mod api { const CALL: &'static str = "force_clean_hrmp"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -31270,6 +31711,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_process_hrmp_open`]."] pub struct ForceProcessHrmpOpen { pub channels: force_process_hrmp_open::Channels, } @@ -31282,7 +31724,6 @@ pub mod api { const CALL: &'static str = "force_process_hrmp_open"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -31292,6 +31733,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_process_hrmp_close`]."] pub struct ForceProcessHrmpClose { pub channels: force_process_hrmp_close::Channels, } @@ -31313,6 +31755,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::hrmp_cancel_open_request`]."] pub struct HrmpCancelOpenRequest { pub channel_id: hrmp_cancel_open_request::ChannelId, pub open_requests: hrmp_cancel_open_request::OpenRequests, @@ -31337,6 +31780,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_open_hrmp_channel`]."] pub struct ForceOpenHrmpChannel { pub sender: force_open_hrmp_channel::Sender, pub recipient: force_open_hrmp_channel::Recipient, @@ -31365,6 +31809,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::establish_system_channel`]."] pub struct EstablishSystemChannel { pub sender: establish_system_channel::Sender, pub recipient: establish_system_channel::Recipient, @@ -31389,6 +31834,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::poke_channel_deposits`]."] pub struct PokeChannelDeposits { pub sender: poke_channel_deposits::Sender, pub recipient: poke_channel_deposits::Recipient, @@ -32648,9 +33094,10 @@ pub mod api { "SessionExecutorParams", vec![], [ - 38u8, 80u8, 118u8, 112u8, 189u8, 55u8, 95u8, 184u8, 19u8, 8u8, 114u8, - 6u8, 173u8, 80u8, 254u8, 98u8, 107u8, 202u8, 215u8, 107u8, 149u8, - 157u8, 145u8, 8u8, 249u8, 255u8, 83u8, 199u8, 47u8, 179u8, 208u8, 83u8, + 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, ], ) } @@ -32672,9 +33119,10 @@ pub mod api { _0.borrow(), )], [ - 38u8, 80u8, 118u8, 112u8, 189u8, 55u8, 95u8, 184u8, 19u8, 8u8, 114u8, - 6u8, 173u8, 80u8, 254u8, 98u8, 107u8, 202u8, 215u8, 107u8, 149u8, - 157u8, 145u8, 8u8, 249u8, 255u8, 83u8, 199u8, 47u8, 179u8, 208u8, 83u8, + 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, ], ) } @@ -32704,6 +33152,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_unfreeze`]."] pub struct ForceUnfreeze; impl ::subxt::blocks::StaticExtrinsic for ForceUnfreeze { const PALLET: &'static str = "ParasDisputes"; @@ -32783,7 +33232,6 @@ pub mod api { const EVENT: &'static str = "DisputeConcluded"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -33146,6 +33594,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::report_dispute_lost_unsigned`]."] pub struct ReportDisputeLostUnsigned { pub dispute_proof: ::std::boxed::Box, @@ -33351,6 +33800,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::reap_page`]."] pub struct ReapPage { pub message_origin: reap_page::MessageOrigin, pub page_index: reap_page::PageIndex, @@ -33374,6 +33824,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::execute_overweight`]."] pub struct ExecuteOverweight { pub message_origin: execute_overweight::MessageOrigin, pub page: execute_overweight::Page, @@ -33821,6 +34272,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::place_order_allow_death`]."] pub struct PlaceOrderAllowDeath { pub max_amount: place_order_allow_death::MaxAmount, pub para_id: place_order_allow_death::ParaId, @@ -33844,6 +34296,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::place_order_keep_alive`]."] pub struct PlaceOrderKeepAlive { pub max_amount: place_order_keep_alive::MaxAmount, pub para_id: place_order_keep_alive::ParaId, @@ -34123,6 +34576,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::register`]."] pub struct Register { pub id: register::Id, pub genesis_head: register::GenesisHead, @@ -34150,6 +34604,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_register`]."] pub struct ForceRegister { pub who: force_register::Who, pub deposit: force_register::Deposit, @@ -34181,6 +34636,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::deregister`]."] pub struct Deregister { pub id: deregister::Id, } @@ -34202,6 +34658,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::swap`]."] pub struct Swap { pub id: swap::Id, pub other: swap::Other, @@ -34225,6 +34682,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::remove_lock`]."] pub struct RemoveLock { pub para: remove_lock::Para, } @@ -34246,6 +34704,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::reserve`]."] pub struct Reserve; impl ::subxt::blocks::StaticExtrinsic for Reserve { const PALLET: &'static str = "Registrar"; @@ -34261,6 +34720,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_lock`]."] pub struct AddLock { pub para: add_lock::Para, } @@ -34282,6 +34742,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::schedule_code_upgrade`]."] pub struct ScheduleCodeUpgrade { pub para: schedule_code_upgrade::Para, pub new_code: schedule_code_upgrade::NewCode, @@ -34306,6 +34767,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_current_head`]."] pub struct SetCurrentHead { pub para: set_current_head::Para, pub new_head: set_current_head::NewHead, @@ -34790,6 +35252,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_lease`]."] pub struct ForceLease { pub para: force_lease::Para, pub leaser: force_lease::Leaser, @@ -34819,6 +35282,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::clear_all_leases`]."] pub struct ClearAllLeases { pub para: clear_all_leases::Para, } @@ -34840,6 +35304,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::trigger_onboard`]."] pub struct TriggerOnboard { pub para: trigger_onboard::Para, } @@ -34920,7 +35385,6 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -35129,6 +35593,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::new_auction`]."] pub struct NewAuction { #[codec(compact)] pub duration: new_auction::Duration, @@ -35154,6 +35619,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::bid`]."] pub struct Bid { #[codec(compact)] pub para: bid::Para, @@ -35188,6 +35654,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::cancel_auction`]."] pub struct CancelAuction; impl ::subxt::blocks::StaticExtrinsic for CancelAuction { const PALLET: &'static str = "Auctions"; @@ -35290,7 +35757,6 @@ pub mod api { const EVENT: &'static str = "AuctionStarted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -35736,6 +36202,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::create`]."] pub struct Create { #[codec(compact)] pub index: create::Index, @@ -35773,6 +36240,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::contribute`]."] pub struct Contribute { #[codec(compact)] pub index: contribute::Index, @@ -35801,6 +36269,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::withdraw`]."] pub struct Withdraw { pub who: withdraw::Who, #[codec(compact)] @@ -35825,6 +36294,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::refund`]."] pub struct Refund { #[codec(compact)] pub index: refund::Index, @@ -35847,6 +36317,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::dissolve`]."] pub struct Dissolve { #[codec(compact)] pub index: dissolve::Index, @@ -35869,6 +36340,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::edit`]."] pub struct Edit { #[codec(compact)] pub index: edit::Index, @@ -35906,6 +36378,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::add_memo`]."] pub struct AddMemo { pub index: add_memo::Index, pub memo: add_memo::Memo, @@ -35929,6 +36402,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::poke`]."] pub struct Poke { pub index: poke::Index, } @@ -35950,6 +36424,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::contribute_all`]."] pub struct ContributeAll { #[codec(compact)] pub index: contribute_all::Index, @@ -36613,6 +37088,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::send`]."] pub struct Send { pub dest: ::std::boxed::Box, pub message: ::std::boxed::Box, @@ -36636,6 +37112,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::teleport_assets`]."] pub struct TeleportAssets { pub dest: ::std::boxed::Box, pub beneficiary: ::std::boxed::Box, @@ -36663,6 +37140,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::reserve_transfer_assets`]."] pub struct ReserveTransferAssets { pub dest: ::std::boxed::Box, pub beneficiary: ::std::boxed::Box, @@ -36690,6 +37168,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::execute`]."] pub struct Execute { pub message: ::std::boxed::Box, pub max_weight: execute::MaxWeight, @@ -36713,6 +37192,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_xcm_version`]."] pub struct ForceXcmVersion { pub location: ::std::boxed::Box, pub version: force_xcm_version::Version, @@ -36737,6 +37217,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_default_xcm_version`]."] pub struct ForceDefaultXcmVersion { pub maybe_xcm_version: force_default_xcm_version::MaybeXcmVersion, } @@ -36758,6 +37239,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_subscribe_version_notify`]."] pub struct ForceSubscribeVersionNotify { pub location: ::std::boxed::Box, } @@ -36779,6 +37261,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_unsubscribe_version_notify`]."] pub struct ForceUnsubscribeVersionNotify { pub location: ::std::boxed::Box, } @@ -36800,6 +37283,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::limited_reserve_transfer_assets`]."] pub struct LimitedReserveTransferAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -36830,6 +37314,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::limited_teleport_assets`]."] pub struct LimitedTeleportAssets { pub dest: ::std::boxed::Box, pub beneficiary: ::std::boxed::Box, @@ -36859,6 +37344,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_suspension`]."] pub struct ForceSuspension { pub suspended: force_suspension::Suspended, } @@ -36870,35 +37356,6 @@ pub mod api { const PALLET: &'static str = "XcmPallet"; const CALL: &'static str = "force_suspension"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: transfer_assets::FeeAssetItem, - pub weight_limit: transfer_assets::WeightLimit, - } - pub mod transfer_assets { - use super::runtime_types; - pub type Dest = runtime_types::xcm::VersionedMultiLocation; - pub type Beneficiary = runtime_types::xcm::VersionedMultiLocation; - pub type Assets = runtime_types::xcm::VersionedMultiAssets; - pub type FeeAssetItem = ::core::primitive::u32; - pub type WeightLimit = runtime_types::xcm::v3::WeightLimit; - } - impl ::subxt::blocks::StaticExtrinsic for TransferAssets { - const PALLET: &'static str = "XcmPallet"; - const CALL: &'static str = "transfer_assets"; - } } pub struct TransactionApi; impl TransactionApi { @@ -36916,10 +37373,9 @@ pub mod api { message: ::std::boxed::Box::new(message), }, [ - 145u8, 12u8, 109u8, 216u8, 135u8, 198u8, 98u8, 133u8, 12u8, 38u8, 17u8, - 105u8, 67u8, 120u8, 170u8, 96u8, 202u8, 234u8, 96u8, 157u8, 40u8, - 213u8, 72u8, 21u8, 189u8, 220u8, 71u8, 194u8, 227u8, 243u8, 171u8, - 229u8, + 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, ], ) } @@ -36941,10 +37397,9 @@ pub mod api { fee_asset_item, }, [ - 253u8, 2u8, 191u8, 130u8, 244u8, 135u8, 195u8, 160u8, 160u8, 196u8, - 62u8, 195u8, 157u8, 228u8, 57u8, 59u8, 131u8, 69u8, 125u8, 44u8, 48u8, - 120u8, 176u8, 53u8, 191u8, 69u8, 151u8, 77u8, 245u8, 97u8, 169u8, - 117u8, + 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, ], ) } @@ -36966,9 +37421,9 @@ pub mod api { fee_asset_item, }, [ - 204u8, 40u8, 10u8, 224u8, 175u8, 80u8, 228u8, 202u8, 250u8, 27u8, 70u8, - 126u8, 166u8, 36u8, 53u8, 125u8, 96u8, 107u8, 121u8, 130u8, 44u8, - 214u8, 174u8, 80u8, 113u8, 45u8, 10u8, 194u8, 179u8, 4u8, 181u8, 70u8, + 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, ], ) } @@ -36986,9 +37441,9 @@ pub mod api { max_weight, }, [ - 207u8, 172u8, 34u8, 97u8, 82u8, 80u8, 131u8, 47u8, 27u8, 79u8, 124u8, - 134u8, 97u8, 106u8, 139u8, 230u8, 77u8, 85u8, 109u8, 40u8, 139u8, 56u8, - 234u8, 181u8, 180u8, 31u8, 157u8, 135u8, 75u8, 218u8, 43u8, 157u8, + 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, ], ) } @@ -37006,10 +37461,9 @@ pub mod api { version, }, [ - 169u8, 8u8, 18u8, 107u8, 12u8, 180u8, 217u8, 141u8, 188u8, 250u8, - 112u8, 51u8, 122u8, 138u8, 204u8, 44u8, 169u8, 166u8, 36u8, 84u8, 0u8, - 95u8, 138u8, 137u8, 119u8, 226u8, 146u8, 85u8, 53u8, 65u8, 188u8, - 169u8, + 110u8, 11u8, 78u8, 255u8, 66u8, 2u8, 55u8, 108u8, 92u8, 151u8, 231u8, + 175u8, 75u8, 156u8, 34u8, 191u8, 0u8, 56u8, 104u8, 197u8, 70u8, 204u8, + 73u8, 234u8, 173u8, 251u8, 88u8, 226u8, 3u8, 136u8, 228u8, 136u8, ], ) } @@ -37042,9 +37496,9 @@ pub mod api { location: ::std::boxed::Box::new(location), }, [ - 79u8, 2u8, 202u8, 173u8, 179u8, 250u8, 48u8, 28u8, 168u8, 183u8, 59u8, - 45u8, 193u8, 132u8, 141u8, 240u8, 65u8, 182u8, 31u8, 85u8, 98u8, 124u8, - 21u8, 169u8, 133u8, 107u8, 221u8, 235u8, 230u8, 56u8, 81u8, 201u8, + 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, ], ) } @@ -37060,10 +37514,10 @@ pub mod api { location: ::std::boxed::Box::new(location), }, [ - 144u8, 180u8, 158u8, 178u8, 165u8, 54u8, 105u8, 207u8, 194u8, 105u8, - 190u8, 142u8, 253u8, 133u8, 61u8, 83u8, 199u8, 147u8, 199u8, 69u8, - 144u8, 22u8, 174u8, 138u8, 168u8, 131u8, 241u8, 221u8, 151u8, 148u8, - 129u8, 22u8, + 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, ], ) } @@ -37087,10 +37541,10 @@ pub mod api { weight_limit, }, [ - 126u8, 160u8, 23u8, 48u8, 47u8, 7u8, 124u8, 99u8, 32u8, 91u8, 133u8, - 116u8, 204u8, 133u8, 22u8, 216u8, 188u8, 247u8, 10u8, 41u8, 204u8, - 182u8, 38u8, 200u8, 55u8, 117u8, 86u8, 119u8, 225u8, 133u8, 16u8, - 129u8, + 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, ], ) } @@ -37114,9 +37568,10 @@ pub mod api { weight_limit, }, [ - 58u8, 84u8, 105u8, 56u8, 164u8, 58u8, 78u8, 24u8, 68u8, 83u8, 172u8, - 145u8, 14u8, 85u8, 1u8, 52u8, 188u8, 81u8, 36u8, 60u8, 31u8, 203u8, - 72u8, 195u8, 198u8, 128u8, 116u8, 197u8, 69u8, 15u8, 235u8, 252u8, + 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, ], ) } @@ -37136,32 +37591,6 @@ pub mod api { ], ) } - #[doc = "See [`Pallet::transfer_assets`]."] - pub fn transfer_assets( - &self, - dest: types::transfer_assets::Dest, - beneficiary: types::transfer_assets::Beneficiary, - assets: types::transfer_assets::Assets, - fee_asset_item: types::transfer_assets::FeeAssetItem, - weight_limit: types::transfer_assets::WeightLimit, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "XcmPallet", - "transfer_assets", - types::TransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, - [ - 73u8, 16u8, 172u8, 19u8, 161u8, 78u8, 81u8, 191u8, 123u8, 205u8, 224u8, - 69u8, 27u8, 180u8, 15u8, 230u8, 10u8, 218u8, 61u8, 81u8, 21u8, 192u8, - 16u8, 158u8, 210u8, 186u8, 5u8, 68u8, 24u8, 204u8, 158u8, 171u8, - ], - ) - } } } #[doc = "The `Event` enum of this pallet"] @@ -37444,7 +37873,6 @@ pub mod api { const EVENT: &'static str = "InvalidResponderVersion"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -37912,9 +38340,9 @@ pub mod api { "Queries", vec![], [ - 68u8, 247u8, 165u8, 128u8, 238u8, 192u8, 246u8, 53u8, 248u8, 238u8, - 7u8, 235u8, 89u8, 176u8, 223u8, 130u8, 45u8, 135u8, 235u8, 66u8, 24u8, - 64u8, 116u8, 97u8, 2u8, 139u8, 89u8, 79u8, 87u8, 250u8, 229u8, 46u8, + 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, ], ) } @@ -37936,9 +38364,9 @@ pub mod api { _0.borrow(), )], [ - 68u8, 247u8, 165u8, 128u8, 238u8, 192u8, 246u8, 53u8, 248u8, 238u8, - 7u8, 235u8, 89u8, 176u8, 223u8, 130u8, 45u8, 135u8, 235u8, 66u8, 24u8, - 64u8, 116u8, 97u8, 2u8, 139u8, 89u8, 79u8, 87u8, 250u8, 229u8, 46u8, + 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, ], ) } @@ -38031,10 +38459,9 @@ pub mod api { "SupportedVersion", vec![], [ - 76u8, 134u8, 202u8, 57u8, 10u8, 29u8, 58u8, 88u8, 141u8, 0u8, 189u8, - 133u8, 140u8, 204u8, 126u8, 143u8, 71u8, 186u8, 9u8, 233u8, 188u8, - 74u8, 184u8, 158u8, 40u8, 17u8, 223u8, 129u8, 144u8, 189u8, 211u8, - 194u8, + 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, ], ) } @@ -38056,10 +38483,9 @@ pub mod api { _0.borrow(), )], [ - 76u8, 134u8, 202u8, 57u8, 10u8, 29u8, 58u8, 88u8, 141u8, 0u8, 189u8, - 133u8, 140u8, 204u8, 126u8, 143u8, 71u8, 186u8, 9u8, 233u8, 188u8, - 74u8, 184u8, 158u8, 40u8, 17u8, 223u8, 129u8, 144u8, 189u8, 211u8, - 194u8, + 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, ], ) } @@ -38083,10 +38509,9 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 76u8, 134u8, 202u8, 57u8, 10u8, 29u8, 58u8, 88u8, 141u8, 0u8, 189u8, - 133u8, 140u8, 204u8, 126u8, 143u8, 71u8, 186u8, 9u8, 233u8, 188u8, - 74u8, 184u8, 158u8, 40u8, 17u8, 223u8, 129u8, 144u8, 189u8, 211u8, - 194u8, + 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, ], ) } @@ -38105,9 +38530,9 @@ pub mod api { "VersionNotifiers", vec![], [ - 212u8, 132u8, 8u8, 249u8, 16u8, 112u8, 47u8, 251u8, 73u8, 100u8, 218u8, - 194u8, 197u8, 252u8, 146u8, 31u8, 196u8, 234u8, 187u8, 14u8, 126u8, - 29u8, 7u8, 81u8, 30u8, 11u8, 167u8, 95u8, 46u8, 124u8, 66u8, 184u8, + 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, ], ) } @@ -38129,9 +38554,9 @@ pub mod api { _0.borrow(), )], [ - 212u8, 132u8, 8u8, 249u8, 16u8, 112u8, 47u8, 251u8, 73u8, 100u8, 218u8, - 194u8, 197u8, 252u8, 146u8, 31u8, 196u8, 234u8, 187u8, 14u8, 126u8, - 29u8, 7u8, 81u8, 30u8, 11u8, 167u8, 95u8, 46u8, 124u8, 66u8, 184u8, + 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, ], ) } @@ -38155,9 +38580,9 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 212u8, 132u8, 8u8, 249u8, 16u8, 112u8, 47u8, 251u8, 73u8, 100u8, 218u8, - 194u8, 197u8, 252u8, 146u8, 31u8, 196u8, 234u8, 187u8, 14u8, 126u8, - 29u8, 7u8, 81u8, 30u8, 11u8, 167u8, 95u8, 46u8, 124u8, 66u8, 184u8, + 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, ], ) } @@ -38177,10 +38602,10 @@ pub mod api { "VersionNotifyTargets", vec![], [ - 147u8, 115u8, 179u8, 91u8, 230u8, 102u8, 121u8, 203u8, 88u8, 26u8, - 69u8, 115u8, 168u8, 176u8, 234u8, 155u8, 200u8, 220u8, 33u8, 49u8, - 199u8, 97u8, 232u8, 9u8, 5u8, 2u8, 144u8, 58u8, 108u8, 236u8, 127u8, - 130u8, + 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, ], ) } @@ -38203,10 +38628,10 @@ pub mod api { _0.borrow(), )], [ - 147u8, 115u8, 179u8, 91u8, 230u8, 102u8, 121u8, 203u8, 88u8, 26u8, - 69u8, 115u8, 168u8, 176u8, 234u8, 155u8, 200u8, 220u8, 33u8, 49u8, - 199u8, 97u8, 232u8, 9u8, 5u8, 2u8, 144u8, 58u8, 108u8, 236u8, 127u8, - 130u8, + 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, ], ) } @@ -38231,10 +38656,10 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 147u8, 115u8, 179u8, 91u8, 230u8, 102u8, 121u8, 203u8, 88u8, 26u8, - 69u8, 115u8, 168u8, 176u8, 234u8, 155u8, 200u8, 220u8, 33u8, 49u8, - 199u8, 97u8, 232u8, 9u8, 5u8, 2u8, 144u8, 58u8, 108u8, 236u8, 127u8, - 130u8, + 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, ], ) } @@ -38255,10 +38680,9 @@ pub mod api { "VersionDiscoveryQueue", vec![], [ - 139u8, 46u8, 46u8, 247u8, 93u8, 78u8, 193u8, 202u8, 133u8, 178u8, - 213u8, 171u8, 145u8, 167u8, 119u8, 135u8, 255u8, 7u8, 34u8, 90u8, - 208u8, 229u8, 49u8, 119u8, 12u8, 198u8, 46u8, 23u8, 119u8, 192u8, - 255u8, 147u8, + 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, ], ) } @@ -38298,9 +38722,9 @@ pub mod api { "RemoteLockedFungibles", vec![], [ - 179u8, 227u8, 131u8, 21u8, 47u8, 223u8, 117u8, 21u8, 16u8, 43u8, 225u8, - 132u8, 222u8, 97u8, 158u8, 211u8, 8u8, 26u8, 157u8, 136u8, 92u8, 244u8, - 158u8, 239u8, 94u8, 70u8, 8u8, 132u8, 53u8, 61u8, 212u8, 179u8, + 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, ], ) } @@ -38322,9 +38746,9 @@ pub mod api { _0.borrow(), )], [ - 179u8, 227u8, 131u8, 21u8, 47u8, 223u8, 117u8, 21u8, 16u8, 43u8, 225u8, - 132u8, 222u8, 97u8, 158u8, 211u8, 8u8, 26u8, 157u8, 136u8, 92u8, 244u8, - 158u8, 239u8, 94u8, 70u8, 8u8, 132u8, 53u8, 61u8, 212u8, 179u8, + 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, ], ) } @@ -38348,9 +38772,9 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_1.borrow()), ], [ - 179u8, 227u8, 131u8, 21u8, 47u8, 223u8, 117u8, 21u8, 16u8, 43u8, 225u8, - 132u8, 222u8, 97u8, 158u8, 211u8, 8u8, 26u8, 157u8, 136u8, 92u8, 244u8, - 158u8, 239u8, 94u8, 70u8, 8u8, 132u8, 53u8, 61u8, 212u8, 179u8, + 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, ], ) } @@ -38376,9 +38800,9 @@ pub mod api { ::subxt::storage::address::make_static_storage_map_key(_2.borrow()), ], [ - 179u8, 227u8, 131u8, 21u8, 47u8, 223u8, 117u8, 21u8, 16u8, 43u8, 225u8, - 132u8, 222u8, 97u8, 158u8, 211u8, 8u8, 26u8, 157u8, 136u8, 92u8, 244u8, - 158u8, 239u8, 94u8, 70u8, 8u8, 132u8, 53u8, 61u8, 212u8, 179u8, + 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, ], ) } @@ -38397,9 +38821,10 @@ pub mod api { "LockedFungibles", vec![], [ - 209u8, 60u8, 254u8, 70u8, 62u8, 118u8, 99u8, 28u8, 153u8, 68u8, 40u8, - 239u8, 30u8, 90u8, 201u8, 178u8, 219u8, 37u8, 34u8, 153u8, 115u8, 99u8, - 100u8, 240u8, 36u8, 110u8, 8u8, 2u8, 45u8, 58u8, 131u8, 137u8, + 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, ], ) } @@ -38421,9 +38846,10 @@ pub mod api { _0.borrow(), )], [ - 209u8, 60u8, 254u8, 70u8, 62u8, 118u8, 99u8, 28u8, 153u8, 68u8, 40u8, - 239u8, 30u8, 90u8, 201u8, 178u8, 219u8, 37u8, 34u8, 153u8, 115u8, 99u8, - 100u8, 240u8, 36u8, 110u8, 8u8, 2u8, 45u8, 58u8, 131u8, 137u8, + 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, ], ) } @@ -38451,153 +38877,6 @@ pub mod api { } } } - pub mod identity_migrator { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub type Call = runtime_types::polkadot_runtime_common::identity_migrator::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; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReapIdentity { - pub who: reap_identity::Who, - } - pub mod reap_identity { - use super::runtime_types; - pub type Who = ::subxt::utils::AccountId32; - } - impl ::subxt::blocks::StaticExtrinsic for ReapIdentity { - const PALLET: &'static str = "IdentityMigrator"; - const CALL: &'static str = "reap_identity"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PokeDeposit { - pub who: poke_deposit::Who, - } - pub mod poke_deposit { - use super::runtime_types; - pub type Who = ::subxt::utils::AccountId32; - } - impl ::subxt::blocks::StaticExtrinsic for PokeDeposit { - const PALLET: &'static str = "IdentityMigrator"; - const CALL: &'static str = "poke_deposit"; - } - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "See [`Pallet::reap_identity`]."] - pub fn reap_identity( - &self, - who: types::reap_identity::Who, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "IdentityMigrator", - "reap_identity", - types::ReapIdentity { who }, - [ - 187u8, 110u8, 202u8, 220u8, 54u8, 240u8, 242u8, 171u8, 5u8, 83u8, - 129u8, 93u8, 213u8, 208u8, 21u8, 236u8, 121u8, 128u8, 127u8, 121u8, - 153u8, 118u8, 232u8, 44u8, 20u8, 124u8, 214u8, 185u8, 249u8, 182u8, - 136u8, 96u8, - ], - ) - } - #[doc = "See [`Pallet::poke_deposit`]."] - pub fn poke_deposit( - &self, - who: types::poke_deposit::Who, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "IdentityMigrator", - "poke_deposit", - types::PokeDeposit { who }, - [ - 42u8, 67u8, 168u8, 124u8, 75u8, 32u8, 143u8, 173u8, 14u8, 28u8, 76u8, - 35u8, 196u8, 255u8, 250u8, 33u8, 128u8, 159u8, 132u8, 124u8, 51u8, - 243u8, 166u8, 55u8, 208u8, 101u8, 188u8, 133u8, 36u8, 18u8, 119u8, - 146u8, - ], - ) - } - } - } - #[doc = "The `Event` enum of this pallet"] - pub type Event = runtime_types::polkadot_runtime_common::identity_migrator::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The identity and all sub accounts were reaped for `who`."] - pub struct IdentityReaped { - pub who: identity_reaped::Who, - } - pub mod identity_reaped { - use super::runtime_types; - pub type Who = ::subxt::utils::AccountId32; - } - impl ::subxt::events::StaticEvent for IdentityReaped { - const PALLET: &'static str = "IdentityMigrator"; - const EVENT: &'static str = "IdentityReaped"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The deposits held for `who` were updated. `identity` is the new deposit held for"] - #[doc = "identity info, and `subs` is the new deposit held for the sub-accounts."] - pub struct DepositUpdated { - pub who: deposit_updated::Who, - pub identity: deposit_updated::Identity, - pub subs: deposit_updated::Subs, - } - pub mod deposit_updated { - use super::runtime_types; - pub type Who = ::subxt::utils::AccountId32; - pub type Identity = ::core::primitive::u128; - pub type Subs = ::core::primitive::u128; - } - impl ::subxt::events::StaticEvent for DepositUpdated { - const PALLET: &'static str = "IdentityMigrator"; - const EVENT: &'static str = "DepositUpdated"; - } - } - } pub mod paras_sudo_wrapper { use super::root_mod; use super::runtime_types; @@ -38621,6 +38900,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_schedule_para_initialize`]."] pub struct SudoScheduleParaInitialize { pub id: sudo_schedule_para_initialize::Id, pub genesis: sudo_schedule_para_initialize::Genesis, @@ -38645,6 +38925,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_schedule_para_cleanup`]."] pub struct SudoScheduleParaCleanup { pub id: sudo_schedule_para_cleanup::Id, } @@ -38666,6 +38947,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_schedule_parathread_upgrade`]."] pub struct SudoScheduleParathreadUpgrade { pub id: sudo_schedule_parathread_upgrade::Id, } @@ -38687,6 +38969,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_schedule_parachain_downgrade`]."] pub struct SudoScheduleParachainDowngrade { pub id: sudo_schedule_parachain_downgrade::Id, } @@ -38708,6 +38991,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_queue_downward_xcm`]."] pub struct SudoQueueDownwardXcm { pub id: sudo_queue_downward_xcm::Id, pub xcm: ::std::boxed::Box, @@ -38731,6 +39015,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_establish_hrmp_channel`]."] pub struct SudoEstablishHrmpChannel { pub sender: sudo_establish_hrmp_channel::Sender, pub recipient: sudo_establish_hrmp_channel::Recipient, @@ -38833,9 +39118,10 @@ pub mod api { xcm: ::std::boxed::Box::new(xcm), }, [ - 95u8, 158u8, 88u8, 29u8, 226u8, 30u8, 97u8, 232u8, 60u8, 188u8, 46u8, - 178u8, 57u8, 47u8, 81u8, 155u8, 15u8, 33u8, 102u8, 137u8, 13u8, 131u8, - 110u8, 216u8, 36u8, 169u8, 152u8, 43u8, 88u8, 55u8, 103u8, 175u8, + 144u8, 179u8, 113u8, 39u8, 46u8, 58u8, 218u8, 220u8, 98u8, 232u8, + 121u8, 119u8, 127u8, 99u8, 52u8, 189u8, 232u8, 28u8, 233u8, 54u8, + 122u8, 206u8, 155u8, 7u8, 88u8, 167u8, 203u8, 251u8, 96u8, 156u8, 23u8, + 54u8, ], ) } @@ -38889,6 +39175,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::assign_perm_parachain_slot`]."] pub struct AssignPermParachainSlot { pub id: assign_perm_parachain_slot::Id, } @@ -38910,6 +39197,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::assign_temp_parachain_slot`]."] pub struct AssignTempParachainSlot { pub id: assign_temp_parachain_slot::Id, pub lease_period_start: assign_temp_parachain_slot::LeasePeriodStart, @@ -38933,6 +39221,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::unassign_parachain_slot`]."] pub struct UnassignParachainSlot { pub id: unassign_parachain_slot::Id, } @@ -38945,7 +39234,6 @@ pub mod api { const CALL: &'static str = "unassign_parachain_slot"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -38955,6 +39243,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_permanent_slots`]."] pub struct SetMaxPermanentSlots { pub slots: set_max_permanent_slots::Slots, } @@ -38967,7 +39256,6 @@ pub mod api { const CALL: &'static str = "set_max_permanent_slots"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -38977,6 +39265,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_max_temporary_slots`]."] pub struct SetMaxTemporarySlots { pub slots: set_max_temporary_slots::Slots, } @@ -39125,7 +39414,6 @@ pub mod api { const EVENT: &'static str = "TemporarySlotAssigned"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -39148,7 +39436,6 @@ pub mod api { const EVENT: &'static str = "MaxPermanentSlotsChanged"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -39485,6 +39772,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::register_validators`]."] pub struct RegisterValidators { pub validators: register_validators::Validators, } @@ -39506,6 +39794,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::deregister_validators`]."] pub struct DeregisterValidators { pub validators: deregister_validators::Validators, } @@ -39685,6 +39974,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::control_auto_migration`]."] pub struct ControlAutoMigration { pub maybe_config: control_auto_migration::MaybeConfig, } @@ -39708,6 +39998,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::continue_migrate`]."] pub struct ContinueMigrate { pub limits: continue_migrate::Limits, pub real_size_upper: continue_migrate::RealSizeUpper, @@ -39735,6 +40026,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::migrate_custom_top`]."] pub struct MigrateCustomTop { pub keys: migrate_custom_top::Keys, pub witness_size: migrate_custom_top::WitnessSize, @@ -39758,6 +40050,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::migrate_custom_child`]."] pub struct MigrateCustomChild { pub root: migrate_custom_child::Root, pub child_keys: migrate_custom_child::ChildKeys, @@ -39783,6 +40076,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_signed_max_limits`]."] pub struct SetSignedMaxLimits { pub limits: set_signed_max_limits::Limits, } @@ -39805,6 +40099,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::force_set_progress`]."] pub struct ForceSetProgress { pub progress_top: force_set_progress::ProgressTop, pub progress_child: force_set_progress::ProgressChild, @@ -40192,6 +40487,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See `Pallet::fill_block`."] pub struct FillBlock { pub ratio: fill_block::Ratio, } @@ -40213,6 +40509,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See `Pallet::trigger_defensive`."] pub struct TriggerDefensive; impl ::subxt::blocks::StaticExtrinsic for TriggerDefensive { const PALLET: &'static str = "RootTesting"; @@ -40286,7 +40583,7 @@ pub mod api { pub mod sudo { use super::root_mod; use super::runtime_types; - #[doc = "Error for the Sudo pallet."] + #[doc = "Error for the Sudo pallet"] pub type Error = runtime_types::pallet_sudo::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] pub type Call = runtime_types::pallet_sudo::pallet::Call; @@ -40306,6 +40603,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo`]."] pub struct Sudo { pub call: ::std::boxed::Box, } @@ -40327,6 +40625,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_unchecked_weight`]."] pub struct SudoUncheckedWeight { pub call: ::std::boxed::Box, pub weight: sudo_unchecked_weight::Weight, @@ -40350,6 +40649,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::set_key`]."] pub struct SetKey { pub new: set_key::New, } @@ -40371,6 +40671,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "See [`Pallet::sudo_as`]."] pub struct SudoAs { pub who: sudo_as::Who, pub call: ::std::boxed::Box, @@ -40384,21 +40685,6 @@ pub mod api { const PALLET: &'static str = "Sudo"; const CALL: &'static str = "sudo_as"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveKey; - impl ::subxt::blocks::StaticExtrinsic for RemoveKey { - const PALLET: &'static str = "Sudo"; - const CALL: &'static str = "remove_key"; - } } pub struct TransactionApi; impl TransactionApi { @@ -40411,10 +40697,10 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 237u8, 221u8, 200u8, 216u8, 181u8, 131u8, 94u8, 3u8, 26u8, 176u8, - 103u8, 60u8, 78u8, 18u8, 27u8, 152u8, 103u8, 185u8, 222u8, 216u8, - 209u8, 71u8, 63u8, 166u8, 105u8, 11u8, 198u8, 251u8, 223u8, 13u8, - 245u8, 112u8, + 230u8, 66u8, 61u8, 240u8, 132u8, 75u8, 17u8, 14u8, 12u8, 233u8, 24u8, + 192u8, 91u8, 200u8, 209u8, 133u8, 251u8, 154u8, 221u8, 95u8, 165u8, + 112u8, 49u8, 192u8, 126u8, 134u8, 46u8, 221u8, 150u8, 120u8, 178u8, + 103u8, ], ) } @@ -40432,10 +40718,10 @@ pub mod api { weight, }, [ - 51u8, 199u8, 168u8, 58u8, 167u8, 69u8, 150u8, 67u8, 175u8, 175u8, - 127u8, 220u8, 122u8, 103u8, 138u8, 159u8, 147u8, 146u8, 162u8, 69u8, - 198u8, 137u8, 249u8, 107u8, 115u8, 25u8, 200u8, 156u8, 138u8, 198u8, - 54u8, 164u8, + 39u8, 207u8, 214u8, 172u8, 135u8, 112u8, 167u8, 27u8, 210u8, 182u8, + 160u8, 163u8, 128u8, 207u8, 98u8, 136u8, 35u8, 14u8, 163u8, 243u8, + 224u8, 232u8, 254u8, 35u8, 244u8, 13u8, 212u8, 137u8, 99u8, 158u8, + 249u8, 164u8, ], ) } @@ -40469,24 +40755,9 @@ pub mod api { call: ::std::boxed::Box::new(call), }, [ - 189u8, 204u8, 141u8, 132u8, 190u8, 252u8, 211u8, 252u8, 184u8, 233u8, - 39u8, 131u8, 52u8, 193u8, 68u8, 145u8, 189u8, 76u8, 183u8, 202u8, 85u8, - 116u8, 108u8, 119u8, 176u8, 86u8, 78u8, 52u8, 19u8, 241u8, 216u8, - 178u8, - ], - ) - } - #[doc = "See [`Pallet::remove_key`]."] - pub fn remove_key(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Sudo", - "remove_key", - types::RemoveKey {}, - [ - 133u8, 253u8, 54u8, 175u8, 202u8, 239u8, 5u8, 198u8, 180u8, 138u8, - 25u8, 28u8, 109u8, 40u8, 30u8, 56u8, 126u8, 100u8, 52u8, 205u8, 250u8, - 191u8, 61u8, 195u8, 172u8, 142u8, 184u8, 239u8, 247u8, 10u8, 211u8, - 79u8, + 97u8, 37u8, 226u8, 52u8, 181u8, 51u8, 13u8, 232u8, 250u8, 246u8, 195u8, + 219u8, 186u8, 236u8, 187u8, 3u8, 246u8, 172u8, 203u8, 35u8, 30u8, + 227u8, 242u8, 134u8, 51u8, 90u8, 105u8, 119u8, 1u8, 65u8, 79u8, 36u8, ], ) } @@ -40531,13 +40802,11 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The sudo key has been updated."] pub struct KeyChanged { - pub old: key_changed::Old, - pub new: key_changed::New, + pub old_sudoer: key_changed::OldSudoer, } pub mod key_changed { use super::runtime_types; - pub type Old = ::core::option::Option<::subxt::utils::AccountId32>; - pub type New = ::subxt::utils::AccountId32; + pub type OldSudoer = ::core::option::Option<::subxt::utils::AccountId32>; } impl ::subxt::events::StaticEvent for KeyChanged { const PALLET: &'static str = "Sudo"; @@ -40553,22 +40822,6 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The key was permanently removed."] - pub struct KeyRemoved; - impl ::subxt::events::StaticEvent for KeyRemoved { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "KeyRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] pub struct SudoAsDone { pub sudo_result: sudo_as_done::SudoResult, @@ -42746,7 +42999,7 @@ pub mod api { 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>, + pub __ignore: ::core::marker::PhantomData<_2>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -43384,6 +43637,121 @@ pub mod api { } } } + pub mod pallet_im_online { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "See [`Pallet::heartbeat`]."] + heartbeat { + heartbeat: + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, + signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Non existent public key."] + InvalidKey, + #[codec(index = 1)] + #[doc = "Duplicated heartbeat."] + DuplicatedHeartbeat, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new heartbeat was received from `AuthorityId`."] + HeartbeatReceived { + authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + }, + #[codec(index = 1)] + #[doc = "At the end of the session, no offence was committed."] + AllGood, + #[codec(index = 2)] + #[doc = "At the end of the session, at least one validator was found to be offline."] + SomeOffline { + offline: ::std::vec::Vec<(::subxt::utils::AccountId32, ())>, + }, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod app_sr25519 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (crate = :: subxt :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + # [codec (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 session_index: ::core::primitive::u32, + pub authority_index: ::core::primitive::u32, + pub validators_len: ::core::primitive::u32, + } + } pub mod pallet_indices { use super::runtime_types; pub mod pallet { @@ -45656,7 +46024,7 @@ pub mod api { pub maybe_periodic: ::core::option::Option<(_2, _2)>, pub origin: _3, #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_4>, + pub __ignore: ::core::marker::PhantomData<_4>, } } pub mod pallet_session { @@ -46453,9 +46821,6 @@ pub mod api { who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call: ::std::boxed::Box, }, - #[codec(index = 4)] - #[doc = "See [`Pallet::remove_key`]."] - remove_key, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -46467,10 +46832,10 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Error for the Sudo pallet."] + #[doc = "Error for the Sudo pallet"] pub enum Error { #[codec(index = 0)] - #[doc = "Sender must be the Sudo account."] + #[doc = "Sender must be the Sudo account"] RequireSudo, } #[derive( @@ -46494,13 +46859,9 @@ pub mod api { #[codec(index = 1)] #[doc = "The sudo key has been updated."] KeyChanged { - old: ::core::option::Option<::subxt::utils::AccountId32>, - new: ::subxt::utils::AccountId32, + old_sudoer: ::core::option::Option<::subxt::utils::AccountId32>, }, #[codec(index = 2)] - #[doc = "The key was permanently removed."] - KeyRemoved, - #[codec(index = 3)] #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] SudoAsDone { sudo_result: @@ -47336,15 +47697,6 @@ pub mod api { #[codec(index = 10)] #[doc = "See [`Pallet::force_suspension`]."] force_suspension { suspended: ::core::primitive::bool }, - #[codec(index = 11)] - #[doc = "See [`Pallet::transfer_assets`]."] - transfer_assets { - dest: ::std::boxed::Box, - beneficiary: ::std::boxed::Box, - assets: ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v3::WeightLimit, - }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -47401,8 +47753,8 @@ pub mod api { #[doc = "The location is invalid since it already has a subscription from us."] AlreadySubscribed, #[codec(index = 13)] - #[doc = "Could not check-out the assets for teleportation to the destination chain."] - CannotCheckOutTeleport, + #[doc = "Invalid asset for the operation."] + InvalidAsset, #[codec(index = 14)] #[doc = "The owner does not own (all) of the asset that they wish to do the operation on."] LowBalance, @@ -47421,21 +47773,6 @@ pub mod api { #[codec(index = 19)] #[doc = "The unlock operation cannot succeed because there are still consumers of the lock."] InUse, - #[codec(index = 20)] - #[doc = "Invalid non-concrete asset."] - InvalidAssetNotConcrete, - #[codec(index = 21)] - #[doc = "Invalid asset, reserve chain could not be determined for it."] - InvalidAssetUnknownReserve, - #[codec(index = 22)] - #[doc = "Invalid asset, do not support remote asset reserves with different fees reserves."] - InvalidAssetUnsupportedReserve, - #[codec(index = 23)] - #[doc = "Too many assets with different reserve locations have been attempted for transfer."] - TooManyReserves, - #[codec(index = 24)] - #[doc = "Local XCM execution incomplete."] - LocalExecutionIncomplete, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -48002,12 +48339,12 @@ pub mod api { PrecheckingMaxMemory(::core::primitive::u64), #[codec(index = 5)] PvfPrepTimeout( - runtime_types::polkadot_primitives::v6::PvfPrepKind, + runtime_types::polkadot_primitives::v6::PvfPrepTimeoutKind, ::core::primitive::u64, ), #[codec(index = 6)] PvfExecTimeout( - runtime_types::polkadot_primitives::v6::PvfExecKind, + runtime_types::polkadot_primitives::v6::PvfExecTimeoutKind, ::core::primitive::u64, ), #[codec(index = 7)] @@ -48047,7 +48384,7 @@ pub mod api { pub signature: runtime_types::polkadot_primitives::v6::validator_app::Signature, #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + pub __ignore: ::core::marker::PhantomData<_1>, } } pub mod slashing { @@ -48548,7 +48885,7 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PvfExecKind { + pub enum PvfExecTimeoutKind { #[codec(index = 0)] Backing, #[codec(index = 1)] @@ -48564,11 +48901,11 @@ pub mod api { # [codec (crate = :: subxt :: ext :: codec)] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PvfPrepKind { + pub enum PvfPrepTimeoutKind { #[codec(index = 0)] Precheck, #[codec(index = 1)] - Prepare, + Lenient, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -49439,55 +49776,6 @@ pub mod api { Ending(_0), } } - pub mod identity_migrator { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] - pub enum Call { - #[codec(index = 0)] - #[doc = "See [`Pallet::reap_identity`]."] - reap_identity { who: ::subxt::utils::AccountId32 }, - #[codec(index = 1)] - #[doc = "See [`Pallet::poke_deposit`]."] - poke_deposit { who: ::subxt::utils::AccountId32 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - # [codec (crate = :: subxt :: ext :: codec)] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The `Event` enum of this pallet"] - pub enum Event { - #[codec(index = 0)] - #[doc = "The identity and all sub accounts were reaped for `who`."] - IdentityReaped { who: ::subxt::utils::AccountId32 }, - #[codec(index = 1)] - #[doc = "The deposits held for `who` were updated. `identity` is the new deposit held for"] - #[doc = "identity info, and `subs` is the new deposit held for the sub-accounts."] - DepositUpdated { - who: ::subxt::utils::AccountId32, - identity: ::core::primitive::u128, - subs: ::core::primitive::u128, - }, - } - } - } pub mod impls { use super::runtime_types; #[derive( @@ -49927,7 +50215,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] pub enum Call { - # [codec (index = 0)] # [doc = "See [`Pallet::set_validation_upgrade_cooldown`]."] set_validation_upgrade_cooldown { new : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "See [`Pallet::set_validation_upgrade_delay`]."] set_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 2)] # [doc = "See [`Pallet::set_code_retention_period`]."] set_code_retention_period { new : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "See [`Pallet::set_max_code_size`]."] set_max_code_size { new : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "See [`Pallet::set_max_pov_size`]."] set_max_pov_size { new : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "See [`Pallet::set_max_head_data_size`]."] set_max_head_data_size { new : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "See [`Pallet::set_on_demand_cores`]."] set_on_demand_cores { new : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "See [`Pallet::set_on_demand_retries`]."] set_on_demand_retries { new : :: core :: primitive :: u32 , } , # [codec (index = 8)] # [doc = "See [`Pallet::set_group_rotation_frequency`]."] set_group_rotation_frequency { new : :: core :: primitive :: u32 , } , # [codec (index = 9)] # [doc = "See [`Pallet::set_paras_availability_period`]."] set_paras_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 11)] # [doc = "See [`Pallet::set_scheduling_lookahead`]."] set_scheduling_lookahead { new : :: core :: primitive :: u32 , } , # [codec (index = 12)] # [doc = "See [`Pallet::set_max_validators_per_core`]."] set_max_validators_per_core { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] # [doc = "See [`Pallet::set_max_validators`]."] set_max_validators { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 14)] # [doc = "See [`Pallet::set_dispute_period`]."] set_dispute_period { new : :: core :: primitive :: u32 , } , # [codec (index = 15)] # [doc = "See [`Pallet::set_dispute_post_conclusion_acceptance_period`]."] set_dispute_post_conclusion_acceptance_period { new : :: core :: primitive :: u32 , } , # [codec (index = 18)] # [doc = "See [`Pallet::set_no_show_slots`]."] set_no_show_slots { new : :: core :: primitive :: u32 , } , # [codec (index = 19)] # [doc = "See [`Pallet::set_n_delay_tranches`]."] set_n_delay_tranches { new : :: core :: primitive :: u32 , } , # [codec (index = 20)] # [doc = "See [`Pallet::set_zeroth_delay_tranche_width`]."] set_zeroth_delay_tranche_width { new : :: core :: primitive :: u32 , } , # [codec (index = 21)] # [doc = "See [`Pallet::set_needed_approvals`]."] set_needed_approvals { new : :: core :: primitive :: u32 , } , # [codec (index = 22)] # [doc = "See [`Pallet::set_relay_vrf_modulo_samples`]."] set_relay_vrf_modulo_samples { new : :: core :: primitive :: u32 , } , # [codec (index = 23)] # [doc = "See [`Pallet::set_max_upward_queue_count`]."] set_max_upward_queue_count { new : :: core :: primitive :: u32 , } , # [codec (index = 24)] # [doc = "See [`Pallet::set_max_upward_queue_size`]."] set_max_upward_queue_size { new : :: core :: primitive :: u32 , } , # [codec (index = 25)] # [doc = "See [`Pallet::set_max_downward_message_size`]."] set_max_downward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 27)] # [doc = "See [`Pallet::set_max_upward_message_size`]."] set_max_upward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 28)] # [doc = "See [`Pallet::set_max_upward_message_num_per_candidate`]."] set_max_upward_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 29)] # [doc = "See [`Pallet::set_hrmp_open_request_ttl`]."] set_hrmp_open_request_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 30)] # [doc = "See [`Pallet::set_hrmp_sender_deposit`]."] set_hrmp_sender_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 31)] # [doc = "See [`Pallet::set_hrmp_recipient_deposit`]."] set_hrmp_recipient_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 32)] # [doc = "See [`Pallet::set_hrmp_channel_max_capacity`]."] set_hrmp_channel_max_capacity { new : :: core :: primitive :: u32 , } , # [codec (index = 33)] # [doc = "See [`Pallet::set_hrmp_channel_max_total_size`]."] set_hrmp_channel_max_total_size { new : :: core :: primitive :: u32 , } , # [codec (index = 34)] # [doc = "See [`Pallet::set_hrmp_max_parachain_inbound_channels`]."] set_hrmp_max_parachain_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 36)] # [doc = "See [`Pallet::set_hrmp_channel_max_message_size`]."] set_hrmp_channel_max_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 37)] # [doc = "See [`Pallet::set_hrmp_max_parachain_outbound_channels`]."] set_hrmp_max_parachain_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 39)] # [doc = "See [`Pallet::set_hrmp_max_message_num_per_candidate`]."] set_hrmp_max_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 42)] # [doc = "See [`Pallet::set_pvf_voting_ttl`]."] set_pvf_voting_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 43)] # [doc = "See [`Pallet::set_minimum_validation_upgrade_delay`]."] set_minimum_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 44)] # [doc = "See [`Pallet::set_bypass_consistency_check`]."] set_bypass_consistency_check { new : :: core :: primitive :: bool , } , # [codec (index = 45)] # [doc = "See [`Pallet::set_async_backing_params`]."] set_async_backing_params { new : runtime_types :: polkadot_primitives :: v6 :: async_backing :: AsyncBackingParams , } , # [codec (index = 46)] # [doc = "See [`Pallet::set_executor_params`]."] set_executor_params { new : runtime_types :: polkadot_primitives :: v6 :: executor_params :: ExecutorParams , } , # [codec (index = 47)] # [doc = "See [`Pallet::set_on_demand_base_fee`]."] set_on_demand_base_fee { new : :: core :: primitive :: u128 , } , # [codec (index = 48)] # [doc = "See [`Pallet::set_on_demand_fee_variability`]."] set_on_demand_fee_variability { new : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 49)] # [doc = "See [`Pallet::set_on_demand_queue_max_size`]."] set_on_demand_queue_max_size { new : :: core :: primitive :: u32 , } , # [codec (index = 50)] # [doc = "See [`Pallet::set_on_demand_target_queue_utilization`]."] set_on_demand_target_queue_utilization { new : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 51)] # [doc = "See [`Pallet::set_on_demand_ttl`]."] set_on_demand_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 52)] # [doc = "See [`Pallet::set_minimum_backing_votes`]."] set_minimum_backing_votes { new : :: core :: primitive :: u32 , } , # [codec (index = 53)] # [doc = "See [`Pallet::set_node_feature`]."] set_node_feature { index : :: core :: primitive :: u8 , value : :: core :: primitive :: bool , } , } + # [codec (index = 0)] # [doc = "See [`Pallet::set_validation_upgrade_cooldown`]."] set_validation_upgrade_cooldown { new : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "See [`Pallet::set_validation_upgrade_delay`]."] set_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 2)] # [doc = "See [`Pallet::set_code_retention_period`]."] set_code_retention_period { new : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "See [`Pallet::set_max_code_size`]."] set_max_code_size { new : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "See [`Pallet::set_max_pov_size`]."] set_max_pov_size { new : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "See [`Pallet::set_max_head_data_size`]."] set_max_head_data_size { new : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "See [`Pallet::set_on_demand_cores`]."] set_on_demand_cores { new : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "See [`Pallet::set_on_demand_retries`]."] set_on_demand_retries { new : :: core :: primitive :: u32 , } , # [codec (index = 8)] # [doc = "See [`Pallet::set_group_rotation_frequency`]."] set_group_rotation_frequency { new : :: core :: primitive :: u32 , } , # [codec (index = 9)] # [doc = "See [`Pallet::set_paras_availability_period`]."] set_paras_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 11)] # [doc = "See [`Pallet::set_scheduling_lookahead`]."] set_scheduling_lookahead { new : :: core :: primitive :: u32 , } , # [codec (index = 12)] # [doc = "See [`Pallet::set_max_validators_per_core`]."] set_max_validators_per_core { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] # [doc = "See [`Pallet::set_max_validators`]."] set_max_validators { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 14)] # [doc = "See [`Pallet::set_dispute_period`]."] set_dispute_period { new : :: core :: primitive :: u32 , } , # [codec (index = 15)] # [doc = "See [`Pallet::set_dispute_post_conclusion_acceptance_period`]."] set_dispute_post_conclusion_acceptance_period { new : :: core :: primitive :: u32 , } , # [codec (index = 18)] # [doc = "See [`Pallet::set_no_show_slots`]."] set_no_show_slots { new : :: core :: primitive :: u32 , } , # [codec (index = 19)] # [doc = "See [`Pallet::set_n_delay_tranches`]."] set_n_delay_tranches { new : :: core :: primitive :: u32 , } , # [codec (index = 20)] # [doc = "See [`Pallet::set_zeroth_delay_tranche_width`]."] set_zeroth_delay_tranche_width { new : :: core :: primitive :: u32 , } , # [codec (index = 21)] # [doc = "See [`Pallet::set_needed_approvals`]."] set_needed_approvals { new : :: core :: primitive :: u32 , } , # [codec (index = 22)] # [doc = "See [`Pallet::set_relay_vrf_modulo_samples`]."] set_relay_vrf_modulo_samples { new : :: core :: primitive :: u32 , } , # [codec (index = 23)] # [doc = "See [`Pallet::set_max_upward_queue_count`]."] set_max_upward_queue_count { new : :: core :: primitive :: u32 , } , # [codec (index = 24)] # [doc = "See [`Pallet::set_max_upward_queue_size`]."] set_max_upward_queue_size { new : :: core :: primitive :: u32 , } , # [codec (index = 25)] # [doc = "See [`Pallet::set_max_downward_message_size`]."] set_max_downward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 27)] # [doc = "See [`Pallet::set_max_upward_message_size`]."] set_max_upward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 28)] # [doc = "See [`Pallet::set_max_upward_message_num_per_candidate`]."] set_max_upward_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 29)] # [doc = "See [`Pallet::set_hrmp_open_request_ttl`]."] set_hrmp_open_request_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 30)] # [doc = "See [`Pallet::set_hrmp_sender_deposit`]."] set_hrmp_sender_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 31)] # [doc = "See [`Pallet::set_hrmp_recipient_deposit`]."] set_hrmp_recipient_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 32)] # [doc = "See [`Pallet::set_hrmp_channel_max_capacity`]."] set_hrmp_channel_max_capacity { new : :: core :: primitive :: u32 , } , # [codec (index = 33)] # [doc = "See [`Pallet::set_hrmp_channel_max_total_size`]."] set_hrmp_channel_max_total_size { new : :: core :: primitive :: u32 , } , # [codec (index = 34)] # [doc = "See [`Pallet::set_hrmp_max_parachain_inbound_channels`]."] set_hrmp_max_parachain_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 36)] # [doc = "See [`Pallet::set_hrmp_channel_max_message_size`]."] set_hrmp_channel_max_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 37)] # [doc = "See [`Pallet::set_hrmp_max_parachain_outbound_channels`]."] set_hrmp_max_parachain_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 39)] # [doc = "See [`Pallet::set_hrmp_max_message_num_per_candidate`]."] set_hrmp_max_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 42)] # [doc = "See [`Pallet::set_pvf_voting_ttl`]."] set_pvf_voting_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 43)] # [doc = "See [`Pallet::set_minimum_validation_upgrade_delay`]."] set_minimum_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 44)] # [doc = "See [`Pallet::set_bypass_consistency_check`]."] set_bypass_consistency_check { new : :: core :: primitive :: bool , } , # [codec (index = 45)] # [doc = "See [`Pallet::set_async_backing_params`]."] set_async_backing_params { new : runtime_types :: polkadot_primitives :: v6 :: async_backing :: AsyncBackingParams , } , # [codec (index = 46)] # [doc = "See [`Pallet::set_executor_params`]."] set_executor_params { new : runtime_types :: polkadot_primitives :: v6 :: executor_params :: ExecutorParams , } , # [codec (index = 47)] # [doc = "See [`Pallet::set_on_demand_base_fee`]."] set_on_demand_base_fee { new : :: core :: primitive :: u128 , } , # [codec (index = 48)] # [doc = "See [`Pallet::set_on_demand_fee_variability`]."] set_on_demand_fee_variability { new : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 49)] # [doc = "See [`Pallet::set_on_demand_queue_max_size`]."] set_on_demand_queue_max_size { new : :: core :: primitive :: u32 , } , # [codec (index = 50)] # [doc = "See [`Pallet::set_on_demand_target_queue_utilization`]."] set_on_demand_target_queue_utilization { new : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 51)] # [doc = "See [`Pallet::set_on_demand_ttl`]."] set_on_demand_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 52)] # [doc = "See [`Pallet::set_minimum_backing_votes`]."] set_minimum_backing_votes { new : :: core :: primitive :: u32 , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -50003,10 +50291,6 @@ pub mod api { pub pvf_voting_ttl: ::core::primitive::u32, pub minimum_validation_upgrade_delay: _0, pub minimum_backing_votes: ::core::primitive::u32, - pub node_features: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, } } pub mod disputes { @@ -51193,6 +51477,8 @@ pub mod api { Session(runtime_types::pallet_session::pallet::Call), #[codec(index = 10)] Grandpa(runtime_types::pallet_grandpa::pallet::Call), + #[codec(index = 11)] + ImOnline(runtime_types::pallet_im_online::pallet::Call), #[codec(index = 18)] Treasury(runtime_types::pallet_treasury::pallet::Call), #[codec(index = 20)] @@ -51275,10 +51561,6 @@ pub mod api { Crowdloan(runtime_types::polkadot_runtime_common::crowdloan::pallet::Call), #[codec(index = 99)] XcmPallet(runtime_types::pallet_xcm::pallet::Call), - #[codec(index = 248)] - IdentityMigrator( - runtime_types::polkadot_runtime_common::identity_migrator::pallet::Call, - ), #[codec(index = 250)] ParasSudoWrapper( runtime_types::polkadot_runtime_common::paras_sudo_wrapper::pallet::Call, @@ -51319,6 +51601,8 @@ pub mod api { Session(runtime_types::pallet_session::pallet::Error), #[codec(index = 10)] Grandpa(runtime_types::pallet_grandpa::pallet::Error), + #[codec(index = 11)] + ImOnline(runtime_types::pallet_im_online::pallet::Error), #[codec(index = 18)] Treasury(runtime_types::pallet_treasury::pallet::Error), #[codec(index = 20)] @@ -51435,6 +51719,8 @@ pub mod api { Session(runtime_types::pallet_session::pallet::Event), #[codec(index = 10)] Grandpa(runtime_types::pallet_grandpa::pallet::Event), + #[codec(index = 11)] + ImOnline(runtime_types::pallet_im_online::pallet::Event), #[codec(index = 18)] Treasury(runtime_types::pallet_treasury::pallet::Event), #[codec(index = 20)] @@ -51501,10 +51787,6 @@ pub mod api { Crowdloan(runtime_types::polkadot_runtime_common::crowdloan::pallet::Event), #[codec(index = 99)] XcmPallet(runtime_types::pallet_xcm::pallet::Event), - #[codec(index = 248)] - IdentityMigrator( - runtime_types::polkadot_runtime_common::identity_migrator::pallet::Event, - ), #[codec(index = 251)] AssignedSlots( runtime_types::polkadot_runtime_common::assigned_slots::pallet::Event, @@ -51547,6 +51829,7 @@ pub mod api { 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::v6::validator_app::Public, pub para_assignment: runtime_types::polkadot_primitives::v6::assignment_app::Public, pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, @@ -52172,7 +52455,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct VrfSignature { - pub pre_output: [::core::primitive::u8; 32usize], + pub output: [::core::primitive::u8; 32usize], pub proof: [::core::primitive::u8; 64usize], } } @@ -54353,8 +54636,6 @@ pub mod api { BitcoinCore, #[codec(index = 9)] BitcoinCash, - #[codec(index = 10)] - PolkadotBulletin, } } pub mod junctions { diff --git a/testing/ui-tests/src/incorrect/substitute_path_not_absolute.stderr b/testing/ui-tests/src/incorrect/substitute_path_not_absolute.stderr index 8dc2631f8f..c372d5067f 100644 --- a/testing/ui-tests/src/incorrect/substitute_path_not_absolute.stderr +++ b/testing/ui-tests/src/incorrect/substitute_path_not_absolute.stderr @@ -1,4 +1,4 @@ -error: Type substitution error: `substitute_type(with = )` must be a path prefixed with 'crate::' or '::' +error: Type Generation failed: Type substitution error: `substitute_type(with = )` must be a path prefixed with 'crate::' or '::' --> src/incorrect/substitute_path_not_absolute.rs:5:16 | 5 | with = "sp_runtime::Perbill"