diff --git a/.gitignore b/.gitignore index ec90a305..80b49d9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/target +target/ **/*.rs.bk .cargo-remote.toml .idea/ diff --git a/Cargo.lock b/Cargo.lock index 2278ab7c..52abe8bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "Inflector" version = "0.11.4" @@ -12,30 +14,35 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" +checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" dependencies = [ "gimli", ] [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.3.8" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" +checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +dependencies = [ + "getrandom 0.2.3", + "once_cell", + "version_check", +] [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] @@ -60,15 +67,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.34" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" +checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" [[package]] name = "approx" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" dependencies = [ "num-traits", ] @@ -94,11 +101,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" + [[package]] name = "async-trait" -version = "0.1.42" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" dependencies = [ "proc-macro2", "quote", @@ -124,11 +137,12 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.55" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" +checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" dependencies = [ "addr2line", + "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", @@ -144,16 +158,15 @@ checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" [[package]] name = "bindgen" -version = "0.55.1" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b13ce559e6433d360c26305643803cb52cfbabbc2b9c47ce04a58493dfb443" +checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239" dependencies = [ "bitflags", "cexpr", - "cfg-if 0.1.10", "clang-sys", "clap", - "env_logger", + "env_logger 0.8.4", "lazy_static", "lazycell", "log", @@ -168,18 +181,21 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" -version = "0.17.4" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" dependencies = [ - "either", + "funty", "radium", + "serde", + "tap", + "wyz", ] [[package]] @@ -201,7 +217,7 @@ dependencies = [ "block-padding", "byte-tools", "byteorder", - "generic-array 0.12.3", + "generic-array 0.12.4", ] [[package]] @@ -222,11 +238,17 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "bumpalo" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" + [[package]] name = "byte-slice-cast" -version = "0.3.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" +checksum = "ca0796d76a983651b4a0ddda16203032759f2fd9103d9181f7c65c06ee8872e6" [[package]] name = "byte-tools" @@ -236,15 +258,18 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.3.4" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.65" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15" +checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +dependencies = [ + "jobserver", +] [[package]] name = "cexpr" @@ -276,15 +301,14 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time", "winapi", ] [[package]] name = "clang-sys" -version = "1.0.3" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0659001ab56b791be01d4b729c44376edc6718cf389a502e579b77b758f3296c" +checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" dependencies = [ "glob", "libc", @@ -315,15 +339,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -dependencies = [ - "bitflags", -] - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -331,10 +346,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "cpuid-bool" -version = "0.1.2" +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +dependencies = [ + "libc", +] [[package]] name = "crunchy" @@ -348,7 +372,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" dependencies = [ - "generic-array 0.12.3", + "generic-array 0.12.4", "subtle 1.0.0", ] @@ -359,43 +383,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.4", - "subtle 2.3.0", + "subtle 2.4.1", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.1", ] [[package]] name = "curve25519-dalek" -version = "2.1.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" dependencies = [ "byteorder", "digest 0.8.1", - "rand_core", - "subtle 2.3.0", + "rand_core 0.5.1", + "subtle 2.4.1", "zeroize", ] [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core", - "subtle 2.3.0", + "rand_core 0.5.1", + "subtle 2.4.1", "zeroize", ] [[package]] name = "derive_more" -version = "0.99.11" +version = "0.99.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" +checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version", "syn", ] @@ -403,25 +439,25 @@ dependencies = [ name = "desub-core" version = "0.0.1" dependencies = [ + "bitvec", "derive_more", "desub-extras", "dyn-clone", - "frame-metadata", + "frame-metadata 14.0.0", "frame-metadatav10", "frame-metadatav11", "frame-metadatav8", "frame-metadatav9", + "frame-support", "hex", "log", "onig", "pallet-democracy", - "pallet-identity", - "pallet-indices", "parity-scale-codec", "pretty_env_logger", "serde", "serde_json", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", "sp-runtime", "sp-version", "thiserror", @@ -432,11 +468,12 @@ name = "desub-extras" version = "0.0.1" dependencies = [ "desub-core", - "env_logger", "log", "parity-scale-codec", + "phf", "serde", "serde_json", + "syn", "thiserror", ] @@ -446,7 +483,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array 0.12.3", + "generic-array 0.12.4", ] [[package]] @@ -458,6 +495,12 @@ dependencies = [ "generic-array 0.14.4", ] +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -481,15 +524,15 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d55796afa1b20c2945ca8eabfc421839f2b766619209f1ede813cf2484f31804" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "ed25519" -version = "1.0.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" +checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" dependencies = [ "signature", ] @@ -500,11 +543,11 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "curve25519-dalek 3.0.0", + "curve25519-dalek 3.2.0", "ed25519", - "rand", + "rand 0.7.3", "serde", - "sha2 0.9.2", + "sha2 0.9.8", "zeroize", ] @@ -515,33 +558,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] -name = "enumflags2" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" -dependencies = [ - "enumflags2_derive", -] - -[[package]] -name = "enumflags2_derive" -version = "0.6.4" +name = "env_logger" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ - "proc-macro2", - "quote", - "syn", + "atty", + "humantime 1.3.0", + "log", + "regex", + "termcolor", ] [[package]] name = "env_logger" -version = "0.7.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" dependencies = [ "atty", - "humantime", + "humantime 2.1.0", "log", "regex", "termcolor", @@ -549,30 +585,17 @@ dependencies = [ [[package]] name = "environmental" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e" - -[[package]] -name = "failure" -version = "0.1.8" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] -name = "failure_derive" -version = "0.1.8" +name = "erased-serde" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +checksum = "3de9ad4541d99dc22b59134e7ff8dc3d6c988c89ecd7324bf10a8362b07a2afa" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "serde", ] [[package]] @@ -583,119 +606,130 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fixed-hash" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ "byteorder", - "rand", + "rand 0.8.4", "rustc-hex", "static_assertions", ] [[package]] name = "frame-benchmarking" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "frame-support", "frame-system", "linregress", + "log", "parity-scale-codec", - "paste 0.1.18", + "paste", "sp-api", "sp-io", "sp-runtime", - "sp-runtime-interface 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-storage 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-runtime-interface", + "sp-std 4.0.0-dev", + "sp-storage", +] + +[[package]] +name = "frame-metadata" +version = "14.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-std 4.0.0-dev", ] [[package]] name = "frame-metadata" -version = "12.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96616f82e069102b95a72c87de4c84d2f87ef7f0f20630e78ce3824436483110" dependencies = [ + "cfg-if 1.0.0", "parity-scale-codec", + "scale-info", "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", ] [[package]] name = "frame-metadatav10" version = "10.0.0" -source = "git+https://github.com/insipx/substrate-metadata-versions?branch=master#ae8bf3acbc2d790838571df7fa30248fee0fb923" dependencies = [ + "frame-metadata 14.0.0", "parity-scale-codec", "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", + "sp-std 2.0.0", ] [[package]] name = "frame-metadatav11" version = "11.0.0-rc6" -source = "git+https://github.com/insipx/substrate-metadata-versions?branch=master#ae8bf3acbc2d790838571df7fa30248fee0fb923" dependencies = [ + "frame-metadata 14.0.0", "parity-scale-codec", "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", + "sp-std 2.0.0", ] [[package]] name = "frame-metadatav8" version = "2.0.0" -source = "git+https://github.com/insipx/substrate-metadata-versions?branch=master#ae8bf3acbc2d790838571df7fa30248fee0fb923" dependencies = [ + "frame-metadata 14.0.0", "parity-scale-codec", "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", + "sp-std 2.0.0", ] [[package]] name = "frame-metadatav9" version = "2.0.0" -source = "git+https://github.com/insipx/substrate-metadata-versions?branch=master#ae8bf3acbc2d790838571df7fa30248fee0fb923" dependencies = [ + "frame-metadata 14.0.0", "parity-scale-codec", "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", + "sp-std 2.0.0", ] [[package]] name = "frame-support" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "bitflags", - "frame-metadata", + "frame-metadata 14.0.0-dev", "frame-support-procedural", "impl-trait-for-tuples", "log", "once_cell", "parity-scale-codec", - "paste 0.1.18", + "paste", "serde", "smallvec", "sp-arithmetic", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", "sp-inherents", "sp-io", "sp-runtime", + "sp-staking", "sp-state-machine", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-tracing 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", + "sp-tracing", ] [[package]] name = "frame-support-procedural" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ + "Inflector", "frame-support-procedural-tools", "proc-macro2", "quote", @@ -704,8 +738,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -716,8 +750,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "proc-macro2", "quote", @@ -726,25 +760,32 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "frame-support", "impl-trait-for-tuples", + "log", "parity-scale-codec", "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", "sp-io", "sp-runtime", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", "sp-version", ] +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "futures" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" dependencies = [ "futures-channel", "futures-core", @@ -757,9 +798,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" dependencies = [ "futures-core", "futures-sink", @@ -767,15 +808,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" +checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" [[package]] name = "futures-executor" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" +checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" dependencies = [ "futures-core", "futures-task", @@ -785,16 +826,17 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" +checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" [[package]] name = "futures-macro" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" dependencies = [ + "autocfg", "proc-macro-hack", "proc-macro2", "quote", @@ -803,25 +845,23 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" +checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" [[package]] name = "futures-task" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" -dependencies = [ - "once_cell", -] +checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" [[package]] name = "futures-util" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" +checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" dependencies = [ + "autocfg", "futures-channel", "futures-core", "futures-io", @@ -829,70 +869,61 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project", + "pin-project-lite", "pin-utils", "proc-macro-hack", "proc-macro-nested", "slab", ] -[[package]] -name = "generator" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cdc09201b2e8ca1b19290cf7e65de2246b8e91fb6874279722189c4de7b94dc" -dependencies = [ - "cc", - "libc", - "log", - "rustc_version", - "winapi", -] - [[package]] name = "generic-array" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ "typenum", ] [[package]] name = "generic-array" -version = "0.13.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ "typenum", + "version_check", ] [[package]] -name = "generic-array" -version = "0.14.4" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "typenum", - "version_check", + "cfg-if 1.0.0", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.1.15" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] name = "gimli" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" [[package]] name = "glob" @@ -917,43 +948,27 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.8.2" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ "ahash", - "autocfg", -] - -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" - -[[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -dependencies = [ - "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] [[package]] name = "hex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" @@ -975,6 +990,16 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.1", + "digest 0.9.0", +] + [[package]] name = "hmac-drbg" version = "0.2.0" @@ -982,7 +1007,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" dependencies = [ "digest 0.8.1", - "generic-array 0.12.3", + "generic-array 0.12.4", "hmac 0.7.1", ] @@ -995,11 +1020,17 @@ dependencies = [ "quick-error", ] +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "impl-codec" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" dependencies = [ "parity-scale-codec", ] @@ -1015,9 +1046,9 @@ dependencies = [ [[package]] name = "impl-trait-for-tuples" -version = "0.1.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" dependencies = [ "proc-macro2", "quote", @@ -1026,19 +1057,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ "autocfg", - "hashbrown 0.9.1", + "hashbrown", ] [[package]] name = "instant" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +checksum = "716d3d89f35ac6a34fd0eed635395f4c3b76fa889338a4632e5231a8684216bd" dependencies = [ "cfg-if 1.0.0", ] @@ -1056,6 +1087,7 @@ dependencies = [ name = "integration_tests" version = "0.1.0" dependencies = [ + "anyhow", "desub-core", "desub-extras", "frame-system", @@ -1063,18 +1095,36 @@ dependencies = [ "log", "pallet-balances", "parity-scale-codec", - "paste 1.0.3", + "paste", "pretty_env_logger", "serde", "serde_json", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", ] [[package]] name = "itoa" -version = "0.4.6" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "jobserver" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +dependencies = [ + "wasm-bindgen", +] [[package]] name = "keccak" @@ -1096,15 +1146,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.80" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" [[package]] name = "libloading" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9367bdfa836b7e3cf895867f7a570283444da90562980ec2263d6e1569b16bc" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" dependencies = [ "cfg-if 1.0.0", "winapi", @@ -1126,17 +1176,17 @@ dependencies = [ "crunchy", "digest 0.8.1", "hmac-drbg", - "rand", + "rand 0.7.3", "sha2 0.8.2", - "subtle 2.3.0", + "subtle 2.4.1", "typenum", ] [[package]] name = "linregress" -version = "0.4.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0ad4b5cc8385a881c561fac3501353d63d2a2b7a357b5064d71815c9a92724" +checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" dependencies = [ "nalgebra", "statrs", @@ -1153,33 +1203,20 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.2" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" dependencies = [ "scopeguard", ] [[package]] name = "log" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if 0.1.10", -] - -[[package]] -name = "loom" -version = "0.3.6" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e8460f2f2121162705187214720353c517b97bdfb3494c0b1e33d83ebe4bed" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 0.1.10", - "generator", - "scoped-tls", - "serde", - "serde_json", + "cfg-if 1.0.0", ] [[package]] @@ -1193,27 +1230,27 @@ dependencies = [ [[package]] name = "matrixmultiply" -version = "0.2.3" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f" +checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" dependencies = [ "rawpointer", ] [[package]] name = "memchr" -version = "2.3.4" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memory-db" -version = "0.24.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f36ddb0b2cdc25d38babba472108798e3477f02be5165f038c5e393e50c57a" +checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" dependencies = [ "hash-db", - "hashbrown 0.8.2", + "hashbrown", "parity-util-mem", ] @@ -1225,21 +1262,21 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merlin" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" dependencies = [ "byteorder", "keccak", - "rand_core", + "rand_core 0.5.1", "zeroize", ] [[package]] name = "miniz_oxide" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", "autocfg", @@ -1247,22 +1284,33 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.21.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6147c3d50b4f3cdabfe2ecc94a0191fd3d6ad58aefd9664cf396285883486" +checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" dependencies = [ "approx", - "generic-array 0.13.2", "matrixmultiply", + "nalgebra-macros", "num-complex", - "num-rational", + "num-rational 0.4.0", "num-traits", - "rand", + "rand 0.8.4", "rand_distr", "simba", "typenum", ] +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "nodrop" version = "0.1.14" @@ -1292,11 +1340,10 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.2.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" dependencies = [ - "autocfg", "num-traits", ] @@ -1322,6 +1369,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.14" @@ -1344,18 +1402,18 @@ dependencies = [ [[package]] name = "object" -version = "0.22.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" +checksum = "39f37e50073ccad23b6d09bcb5b263f4e76d3bb6038e4a3c08e52162ffa8abc2" +dependencies = [ + "memchr", +] [[package]] name = "once_cell" -version = "1.5.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" -dependencies = [ - "parking_lot 0.11.1", -] +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" [[package]] name = "onig" @@ -1371,9 +1429,9 @@ dependencies = [ [[package]] name = "onig_sys" -version = "69.6.0" +version = "69.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed063c96cf4c0f2e5d09324409d158b38a0a85a7b90fbd68c8cad75c495d5775" +checksum = "5dd3eee045c84695b53b20255bb7317063df090b68e18bfac0abb6c39cf7f33e" dependencies = [ "bindgen", "cc", @@ -1394,22 +1452,22 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "pallet-balances" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", - "serde", "sp-runtime", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", ] [[package]] name = "pallet-democracy" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "frame-benchmarking", "frame-support", @@ -1418,59 +1476,28 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", ] [[package]] -name = "pallet-identity" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "sp-io", - "sp-runtime", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", -] - -[[package]] -name = "pallet-indices" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", -] - -[[package]] -name = "parity-scale-codec" -version = "1.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c740e5fbcb6847058b40ac7e5574766c6388f585e184d769910fe0d3a2ca861" -dependencies = [ - "arrayvec 0.5.2", - "bitvec", - "byte-slice-cast", - "parity-scale-codec-derive", + "arrayvec 0.7.1", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "1.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db82bb1c18fc00176004462dd809b2a6d851669550aa17af6dacd21ae0c14" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1480,15 +1507,15 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c" +checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ - "cfg-if 0.1.10", - "hashbrown 0.8.2", + "cfg-if 1.0.0", + "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.10.2", + "parking_lot 0.11.2", "primitive-types", "winapi", ] @@ -1506,9 +1533,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "parking_lot" @@ -1522,13 +1549,13 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.2", - "parking_lot_core 0.8.0", + "lock_api 0.4.5", + "parking_lot_core 0.8.5", ] [[package]] @@ -1538,103 +1565,115 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ "cfg-if 0.1.10", - "cloudabi 0.0.3", + "cloudabi", "libc", - "redox_syscall", + "redox_syscall 0.1.57", "smallvec", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.8.0" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 0.1.10", - "cloudabi 0.1.0", + "cfg-if 1.0.0", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.10", "smallvec", "winapi", ] [[package]] name = "paste" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] - -[[package]] -name = "paste" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7151b083b0664ed58ed669fcdd92f01c3d2fdbf10af4931a301474950b52bfa9" +checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" [[package]] -name = "paste-impl" -version = "0.1.18" +name = "pbkdf2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" dependencies = [ - "proc-macro-hack", + "crypto-mac 0.8.0", ] [[package]] name = "pbkdf2" -version = "0.3.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "byteorder", - "crypto-mac 0.7.0", + "crypto-mac 0.11.1", ] [[package]] -name = "pbkdf2" -version = "0.4.0" +name = "peeking_take_while" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" dependencies = [ - "crypto-mac 0.8.0", + "ucd-trie", ] [[package]] -name = "peeking_take_while" -version = "0.1.2" +name = "phf" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +checksum = "b9fc3db1018c4b59d7d582a739436478b6035138b6aecbce989fc91c3e98409f" +dependencies = [ + "phf_macros", + "phf_shared", + "proc-macro-hack", +] [[package]] -name = "pin-project" -version = "1.0.2" +name = "phf_generator" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ - "pin-project-internal", + "phf_shared", + "rand 0.8.4", ] [[package]] -name = "pin-project-internal" -version = "1.0.2" +name = "phf_macros" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro-hack", "proc-macro2", "quote", "syn", ] +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project-lite" -version = "0.2.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pin-utils" @@ -1644,9 +1683,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" [[package]] name = "ppv-lite86" @@ -1660,15 +1699,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" dependencies = [ - "env_logger", + "env_logger 0.7.1", "log", ] [[package]] name = "primitive-types" -version = "0.7.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", "impl-codec", @@ -1678,10 +1717,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "0.1.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" dependencies = [ + "thiserror", "toml", ] @@ -1693,15 +1733,15 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro-nested" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" dependencies = [ "unicode-xid", ] @@ -1714,18 +1754,18 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.7" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] [[package]] name = "radium" -version = "0.3.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] name = "rand" @@ -1733,14 +1773,26 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.16", "libc", - "rand_chacha", - "rand_core", - "rand_hc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", "rand_pcg", ] +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -1748,7 +1800,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", ] [[package]] @@ -1757,16 +1819,26 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", ] [[package]] name = "rand_distr" -version = "0.2.2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2" +checksum = "964d548f8e7d12e102ef183a0de7e98180c9f8729f555897a857b96e48122d2f" dependencies = [ - "rand", + "num-traits", + "rand 0.8.4", ] [[package]] @@ -1775,7 +1847,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", ] [[package]] @@ -1784,7 +1865,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" dependencies = [ - "rand_core", + "rand_core 0.5.1", ] [[package]] @@ -1799,20 +1880,29 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + [[package]] name = "ref-cast" -version = "1.0.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17626b2f4bcf35b84bf379072a66e28cfe5c3c6ae58b38e4914bb8891dabece" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c523ccaed8ac4b0288948849a350b37d3035827413c458b6a40ddb614bb4f72" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ "proc-macro2", "quote", @@ -1821,37 +1911,35 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.2" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] name = "regex-automata" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "byteorder", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.21" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "rustc-demangle" -version = "0.1.18" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" @@ -1867,19 +1955,55 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.2.3" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" dependencies = [ "semver", ] +[[package]] +name = "ruzstd" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cada0ef59efa6a5f4dc5e491f93d9f31e3fc7758df421ff1de8a706338e1100" +dependencies = [ + "byteorder", + "twox-hash", +] + [[package]] name = "ryu" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +[[package]] +name = "scale-info" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +dependencies = [ + "bitvec", + "cfg-if 1.0.0", + "derive_more", + "parity-scale-codec", + "scale-info-derive", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "schnorrkel" version = "0.9.1" @@ -1888,37 +2012,22 @@ checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" dependencies = [ "arrayref", "arrayvec 0.5.2", - "curve25519-dalek 2.1.0", - "getrandom", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", "merlin", - "rand", - "rand_core", + "rand 0.7.3", + "rand_core 0.5.1", "sha2 0.8.2", - "subtle 2.3.0", + "subtle 2.4.1", "zeroize", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "secrecy" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f" -dependencies = [ - "zeroize", -] - [[package]] name = "secrecy" version = "0.7.0" @@ -1930,33 +2039,36 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ "semver-parser", ] [[package]] name = "semver-parser" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] [[package]] name = "serde" -version = "1.0.117" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2", "quote", @@ -1965,9 +2077,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.60" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" +checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" dependencies = [ "indexmap", "itoa", @@ -1989,25 +2101,24 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e7aab86fe2149bad8c507606bdb3f4ef5e7b2380eb92350f56122cca72a42a8" +checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool", + "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", ] [[package]] name = "sharded-slab" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4921be914e16899a80adefb821f8ddb7974e3f1250223575a44ed994882127" +checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" dependencies = [ "lazy_static", - "loom", ] [[package]] @@ -2018,54 +2129,70 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "signature" -version = "1.2.2" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" +checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" [[package]] name = "simba" -version = "0.1.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb931b1367faadea6b1ab1c306a860ec17aaa5fa39f367d0c744e69d971a1fb2" +checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" dependencies = [ "approx", "num-complex", "num-traits", - "paste 0.1.18", + "paste", ] +[[package]] +name = "siphasher" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" + [[package]] name = "slab" -version = "0.4.2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" + +[[package]] +name = "slog" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] [[package]] name = "smallvec" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "sp-api" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "hash-db", + "log", "parity-scale-codec", "sp-api-proc-macro", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", "sp-runtime", "sp-state-machine", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", "sp-version", "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -2076,77 +2203,34 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "parity-scale-codec", "serde", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", "sp-io", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", ] [[package]] name = "sp-arithmetic" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "serde", - "sp-debug-derive 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", -] - -[[package]] -name = "sp-core" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" -dependencies = [ - "base58", - "blake2-rfc", - "byteorder", - "derive_more", - "dyn-clonable", - "ed25519-dalek", - "futures", - "hash-db", - "hash256-std-hasher", - "hex", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin", - "num-traits", - "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.10.2", - "primitive-types", - "rand", - "regex", - "schnorrkel", - "secrecy 0.6.0", - "serde", - "sha2 0.8.2", - "sp-debug-derive 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-externalities 0.8.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-runtime-interface 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-storage 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "substrate-bip39", - "tiny-bip39 0.7.3", - "tiny-keccak", - "twox-hash", - "wasmi", - "zeroize", + "sp-debug-derive", + "sp-std 4.0.0-dev", + "static_assertions", ] [[package]] name = "sp-core" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "base58", "blake2-rfc", @@ -2165,22 +2249,22 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.2", "primitive-types", - "rand", + "rand 0.7.3", "regex", "schnorrkel", - "secrecy 0.7.0", + "secrecy", "serde", - "sha2 0.8.2", - "sp-debug-derive 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-externalities 0.8.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-runtime-interface 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-storage 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sha2 0.9.8", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std 4.0.0-dev", + "sp-storage", "substrate-bip39", "thiserror", - "tiny-bip39 0.8.0", + "tiny-bip39", "tiny-keccak", "twox-hash", "wasmi", @@ -2189,18 +2273,8 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sp-debug-derive" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "proc-macro2", "quote", @@ -2209,101 +2283,91 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-storage 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", -] - -[[package]] -name = "sp-externalities" -version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-storage 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", + "sp-storage", ] [[package]] name = "sp-inherents" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ + "async-trait", + "impl-trait-for-tuples", "parity-scale-codec", - "parking_lot 0.10.2", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", + "sp-runtime", + "sp-std 4.0.0-dev", "thiserror", ] [[package]] name = "sp-io" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "futures", "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.10.2", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-externalities 0.8.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "parking_lot 0.11.2", + "sp-core", + "sp-externalities", "sp-keystore", - "sp-runtime-interface 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-maybe-compressed-blob", + "sp-runtime-interface", "sp-state-machine", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-tracing 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", + "sp-tracing", "sp-trie", - "sp-wasm-interface 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-wasm-interface", "tracing", "tracing-core", ] -[[package]] -name = "sp-keyring" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" -dependencies = [ - "lazy_static", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-runtime", - "strum", -] - [[package]] name = "sp-keystore" -version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "async-trait", "derive_more", "futures", "merlin", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.2", "schnorrkel", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-externalities 0.8.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", + "sp-externalities", +] + +[[package]] +name = "sp-maybe-compressed-blob" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "ruzstd", + "zstd", ] [[package]] name = "sp-panic-handler" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "backtrace", ] [[package]] name = "sp-runtime" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "either", "hash256-std-hasher", @@ -2311,52 +2375,37 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "paste 0.1.18", - "rand", + "paste", + "rand 0.7.3", "serde", "sp-application-crypto", "sp-arithmetic", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", "sp-io", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", -] - -[[package]] -name = "sp-runtime-interface" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" -dependencies = [ - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.8.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-runtime-interface-proc-macro 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-storage 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-tracing 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-wasm-interface 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "static_assertions", + "sp-std 4.0.0-dev", ] [[package]] name = "sp-runtime-interface" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.8.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-runtime-interface-proc-macro 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-storage 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-tracing 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-wasm-interface 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std 4.0.0-dev", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "Inflector", "proc-macro-crate", @@ -2366,35 +2415,34 @@ dependencies = [ ] [[package]] -name = "sp-runtime-interface-proc-macro" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +name = "sp-staking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ - "Inflector", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", + "parity-scale-codec", + "sp-runtime", + "sp-std 4.0.0-dev", ] [[package]] name = "sp-state-machine" -version = "0.8.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.10.2", - "rand", + "parking_lot 0.11.2", + "rand 0.7.3", "smallvec", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-externalities 0.8.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", + "sp-externalities", "sp-panic-handler", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", "sp-trie", "thiserror", + "tracing", "trie-db", "trie-root", ] @@ -2406,56 +2454,35 @@ source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef [[package]] name = "sp-std" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" - -[[package]] -name = "sp-storage" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", -] +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" [[package]] name = "sp-storage" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-debug-derive", + "sp-std 4.0.0-dev", ] [[package]] name = "sp-tracing" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ + "erased-serde", "log", "parity-scale-codec", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "sp-tracing" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" -dependencies = [ - "log", - "parity-scale-codec", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "parking_lot 0.10.2", + "serde", + "serde_json", + "slog", + "sp-std 4.0.0-dev", "tracing", "tracing-core", "tracing-subscriber", @@ -2463,49 +2490,53 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", - "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-core", + "sp-std 4.0.0-dev", "trie-db", "trie-root", ] [[package]] name = "sp-version" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "impl-serde", "parity-scale-codec", + "parity-wasm", "serde", "sp-runtime", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", + "sp-version-proc-macro", + "thiserror", ] [[package]] -name = "sp-wasm-interface" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +name = "sp-version-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2)", - "wasmi", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "sp-wasm-interface" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3#a364e27d6e3971d756d28435efc468d95add52d3" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", - "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?rev=a364e27d6e3971d756d28435efc468d95add52d3)", + "sp-std 4.0.0-dev", "wasmi", ] @@ -2517,11 +2548,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "statrs" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce16f6de653e88beca7bd13780d08e09d4489dbca1f9210e041bc4852481382" +checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" dependencies = [ - "rand", + "approx", + "lazy_static", + "nalgebra", + "num-traits", + "rand 0.8.4", ] [[package]] @@ -2530,37 +2565,16 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -[[package]] -name = "strum" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "substrate-bip39" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236" +checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" dependencies = [ - "hmac 0.7.1", - "pbkdf2 0.3.0", + "hmac 0.11.0", + "pbkdf2 0.8.0", "schnorrkel", - "sha2 0.8.2", + "sha2 0.9.8", "zeroize", ] @@ -2572,15 +2586,15 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.53" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8833e20724c24de12bbaba5ad230ea61c3eafb05b881c7c9d3cfe8638b187e68" +checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" dependencies = [ "proc-macro2", "quote", @@ -2589,9 +2603,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" dependencies = [ "proc-macro2", "quote", @@ -2599,6 +2613,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "termcolor" version = "1.1.2" @@ -2619,18 +2639,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.22" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" +checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.22" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" +checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" dependencies = [ "proc-macro2", "quote", @@ -2639,55 +2659,29 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "tiny-bip39" -version = "0.7.3" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" dependencies = [ - "failure", - "hmac 0.7.1", "once_cell", - "pbkdf2 0.3.0", - "rand", - "rustc-hash", - "sha2 0.8.2", - "unicode-normalization", ] [[package]] name = "tiny-bip39" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e44c4759bae7f1032e286a7ef990bd9ed23fe831b7eeba0beb97484c2e59b8" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" dependencies = [ "anyhow", "hmac 0.8.1", "once_cell", "pbkdf2 0.4.0", - "rand", + "rand 0.7.3", "rustc-hash", - "sha2 0.9.2", + "sha2 0.9.8", "thiserror", "unicode-normalization", + "wasm-bindgen", "zeroize", ] @@ -2702,9 +2696,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" +checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" dependencies = [ "tinyvec_macros", ] @@ -2717,18 +2711,18 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "toml" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ "serde", ] [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" dependencies = [ "cfg-if 1.0.0", "pin-project-lite", @@ -2738,9 +2732,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ "proc-macro2", "quote", @@ -2749,18 +2743,18 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" dependencies = [ "lazy_static", ] [[package]] name = "tracing-log" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" dependencies = [ "lazy_static", "log", @@ -2779,9 +2773,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.2.15" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fa8f0c8f4c594e4fc9debc1990deab13238077271ba84dd853d54902ee3401" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" dependencies = [ "ansi_term 0.12.1", "chrono", @@ -2801,12 +2795,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.22.1" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e55f7ace33d6237e14137e386f4e1672e2a5c6bbc97fef9f438581a143971f0" +checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" dependencies = [ "hash-db", - "hashbrown 0.8.2", + "hashbrown", "log", "rustc-hex", "smallvec", @@ -2823,59 +2817,59 @@ dependencies = [ [[package]] name = "twox-hash" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59" +checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" dependencies = [ - "cfg-if 0.1.10", - "rand", + "cfg-if 1.0.0", + "rand 0.8.4", "static_assertions", ] [[package]] name = "typenum" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "uint" -version = "0.8.5" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177" +checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" dependencies = [ "byteorder", "crunchy", - "rustc-hex", + "hex", "static_assertions", ] [[package]] name = "unicode-normalization" -version = "0.1.16" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" - [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "vec_map" @@ -2885,9 +2879,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "wasi" @@ -2897,19 +2891,74 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasm-bindgen" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmi" -version = "0.6.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" dependencies = [ + "downcast-rs", "libc", "memory_units", - "num-rational", + "num-rational 0.2.4", "num-traits", "parity-wasm", "wasmi-validation", @@ -2917,9 +2966,9 @@ dependencies = [ [[package]] name = "wasmi-validation" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" dependencies = [ "parity-wasm", ] @@ -2964,23 +3013,58 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "zeroize" -version = "1.1.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" +checksum = "bf68b08513768deaa790264a7fac27a58cbf2705cfcdc9448362229217d7e970" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.0.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" +checksum = "bdff2024a851a322b08f179173ae2ba620445aef1e838f0c196820eade4ae0c7" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] + +[[package]] +name = "zstd" +version = "0.6.1+zstd.1.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de55e77f798f205d8561b8fe2ef57abfb6e0ff2abe7fd3c089e119cdb5631a3" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "3.0.1+zstd.1.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1387cabcd938127b30ce78c4bf00b30387dddf704e3f0881dbc4ff62b5566f8c" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "1.4.20+zstd.1.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd5b733d7cf2d9447e2c3e76a5589b4f5e5ae065c22a2bc0b023cbc331b6c8e" +dependencies = [ + "cc", + "libc", +] diff --git a/Cargo.toml b/Cargo.toml index 89d58e6b..f6012a3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,14 @@ members = [ "core", "extras", "integration_tests", + "substrate-metadata-versions/metadatav8", + "substrate-metadata-versions/metadatav9", + "substrate-metadata-versions/metadatav10", + "substrate-metadata-versions/metadatav11", +] + +exclude = [ + "bin/tx-decoder" ] [patch.crates-io] diff --git a/README.md b/README.md index 96ccba5d..92cf92f2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Encompassing decoder for substrate/polkadot/kusama types. Gets type definitions from polkadot-js via JSON and decodes them into components that outline types and make decoding byte-strings possible, as long as the -module/generic type name are known. +module/generic type name are known. Supports Metadata versions from v8, which means all of Kusama (from CC1). Older networks are not supported (E.G Alexander). - makes decoding generic types from the substrate rpc possible @@ -30,9 +30,19 @@ Supports Metadata versions from v8, which means all of Kusama (from CC1). Older | Kulupu | | | | | | | | - Currently Supported Metadata Versions (From Kusama CC1): - [x] V8 - [x] V9 - [x] V10 - [x] V11 +- [x] V12 +- [x] V13 +- [ ] V14 + +### (Tentative) Release & Maintenence +#### Note: Release description is in no way complete because of current & active development for legacy desub types & scale-info based types. it is purely here as a record for things that _should_ be taken into account in the future + +- Depending on changes in legacy desub code, bump version in Cargo.toml for `extras/`, `core/` +- note `upgrade-blocks` present [here](https://github.com/polkadot-js/api/tree/master/packages/types-known/src/upgrades) and modify the hard-coded upgrade blocks as necessary in the desub `runtimes.rs` file. + - NOTE: this step may-or-may not be necessary depending on `scale-info` integration in the future. + diff --git a/TODO.md b/TODO.md deleted file mode 100644 index ab809ea1..00000000 --- a/TODO.md +++ /dev/null @@ -1,2 +0,0 @@ -- Don't expose regex public functions -- move `RustTypeMarker` into its own file diff --git a/bin/tx-decoder/Cargo.lock b/bin/tx-decoder/Cargo.lock new file mode 100644 index 00000000..ab1c234d --- /dev/null +++ b/bin/tx-decoder/Cargo.lock @@ -0,0 +1,4006 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +dependencies = [ + "getrandom 0.2.3", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" + +[[package]] +name = "approx" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" +dependencies = [ + "num-traits", +] + +[[package]] +name = "argh" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f023c76cd7975f9969f8e29f0e461decbdc7f51048ce43427107a3d192f1c9bf" +dependencies = [ + "argh_derive", + "argh_shared", +] + +[[package]] +name = "argh_derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48ad219abc0c06ca788aface2e3a1970587e3413ab70acd20e54b6ec524c1f8f" +dependencies = [ + "argh_shared", + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "argh_shared" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38de00daab4eac7d753e97697066238d67ce9d7e2d823ab4f72fe14af29f3f33" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" + +[[package]] +name = "async-attributes" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "async-channel" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "once_cell", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" +dependencies = [ + "async-channel", + "async-executor", + "async-io", + "async-mutex", + "blocking", + "futures-lite", + "num_cpus", + "once_cell", +] + +[[package]] +name = "async-io" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" +dependencies = [ + "concurrent-queue", + "futures-lite", + "libc", + "log", + "once_cell", + "parking", + "polling", + "slab", + "socket2", + "waker-fn", + "winapi", +] + +[[package]] +name = "async-lock" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-process" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b21b63ab5a0db0369deb913540af2892750e42d949faacc7a61495ac418a1692" +dependencies = [ + "async-io", + "blocking", + "cfg-if 1.0.0", + "event-listener", + "futures-lite", + "libc", + "once_cell", + "signal-hook", + "winapi", +] + +[[package]] +name = "async-rustls" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c86f33abd5a4f3e2d6d9251a9e0c6a7e52eb1113caf893dae8429bf4a53f378" +dependencies = [ + "futures-lite", + "rustls", + "webpki", +] + +[[package]] +name = "async-std" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" +dependencies = [ + "async-attributes", + "async-channel", + "async-global-executor", + "async-io", + "async-lock", + "async-process", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "num_cpus", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-stream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-task" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" + +[[package]] +name = "async-trait" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atoi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base58" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bindgen" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "which", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitvec" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty", + "radium", + "serde", + "tap", + "wyz", +] + +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "blocking" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9" +dependencies = [ + "async-channel", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", + "once_cell", +] + +[[package]] +name = "bumpalo" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" + +[[package]] +name = "byte-slice-cast" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0796d76a983651b4a0ddda16203032759f2fd9103d9181f7c65c06ee8872e6" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" + +[[package]] +name = "cache-padded" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" + +[[package]] +name = "cc" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cexpr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom 5.1.2", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "winapi", +] + +[[package]] +name = "clang-sys" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term 0.11.0", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "colored" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + +[[package]] +name = "colored" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + +[[package]] +name = "concurrent-queue" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +dependencies = [ + "cache-padded", +] + +[[package]] +name = "console" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "terminal_size", + "winapi", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10c2722795460108a7872e1cd933a85d6ec38abc4baecad51028f702da28889f" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" + +[[package]] +name = "crossbeam-channel" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b10ddc024425c88c2ad148c1b0fd53f4c6d38db9697c9f1588381212fa657c9" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +dependencies = [ + "cfg-if 1.0.0", + "lazy_static", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.1", +] + +[[package]] +name = "crypto-mac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.1", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.1", +] + +[[package]] +name = "ctor" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "desub-core" +version = "0.0.1" +dependencies = [ + "bitvec", + "derive_more", + "dyn-clone", + "frame-metadata 14.0.0", + "frame-metadatav10", + "frame-metadatav11", + "frame-metadatav8", + "frame-metadatav9", + "frame-support", + "hex", + "log", + "onig", + "pallet-democracy", + "parity-scale-codec", + "serde", + "serde_json", + "sp-core", + "sp-runtime", + "sp-version", + "thiserror", +] + +[[package]] +name = "desub-extras" +version = "0.0.1" +dependencies = [ + "desub-core", + "log", + "parity-scale-codec", + "phf", + "serde", + "serde_json", + "syn", + "thiserror", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "dirs" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dyn-clone" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" + +[[package]] +name = "ed25519" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.8", + "zeroize", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "env_logger" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "environmental" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" + +[[package]] +name = "erased-serde" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3de9ad4541d99dc22b59134e7ff8dc3d6c988c89ecd7324bf10a8362b07a2afa" +dependencies = [ + "serde", +] + +[[package]] +name = "event-listener" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fastrand" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b394ed3d285a429378d3b384b9eb1285267e7df4b166df24b7a6939a04dc392e" +dependencies = [ + "instant", +] + +[[package]] +name = "fern" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9a4820f0ccc8a7afd67c39a0f1a0f4b07ca1725164271a64939d7aeb9af065" +dependencies = [ + "colored 1.9.3", + "log", +] + +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "byteorder", + "rand 0.8.4", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +dependencies = [ + "matches", + "percent-encoding", +] + +[[package]] +name = "frame-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "frame-support", + "frame-system", + "linregress", + "log", + "parity-scale-codec", + "paste", + "sp-api", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std 4.0.0-dev", + "sp-storage", +] + +[[package]] +name = "frame-metadata" +version = "14.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-std 4.0.0-dev", +] + +[[package]] +name = "frame-metadata" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96616f82e069102b95a72c87de4c84d2f87ef7f0f20630e78ce3824436483110" +dependencies = [ + "cfg-if 1.0.0", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "frame-metadatav10" +version = "10.0.0" +dependencies = [ + "frame-metadata 14.0.0", + "parity-scale-codec", + "serde", + "sp-std 2.0.0", +] + +[[package]] +name = "frame-metadatav11" +version = "11.0.0-rc6" +dependencies = [ + "frame-metadata 14.0.0", + "parity-scale-codec", + "serde", + "sp-std 2.0.0", +] + +[[package]] +name = "frame-metadatav8" +version = "2.0.0" +dependencies = [ + "frame-metadata 14.0.0", + "parity-scale-codec", + "serde", + "sp-std 2.0.0", +] + +[[package]] +name = "frame-metadatav9" +version = "2.0.0" +dependencies = [ + "frame-metadata 14.0.0", + "parity-scale-codec", + "serde", + "sp-std 2.0.0", +] + +[[package]] +name = "frame-support" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "bitflags", + "frame-metadata 14.0.0-dev", + "frame-support-procedural", + "impl-trait-for-tuples", + "log", + "once_cell", + "parity-scale-codec", + "paste", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std 4.0.0-dev", + "sp-tracing", +] + +[[package]] +name = "frame-support-procedural" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "Inflector", + "frame-support-procedural-tools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-support-procedural-tools-derive" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "frame-support", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 4.0.0-dev", + "sp-version", +] + +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + +[[package]] +name = "futures" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" + +[[package]] +name = "futures-executor" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-intrusive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" +dependencies = [ + "futures-core", + "lock_api 0.4.5", + "parking_lot 0.11.2", +] + +[[package]] +name = "futures-io" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" + +[[package]] +name = "futures-lite" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-macro" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +dependencies = [ + "autocfg", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" + +[[package]] +name = "futures-task" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" + +[[package]] +name = "futures-util" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +dependencies = [ + "autocfg", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "gloo-timers" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashlink" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac 0.7.0", + "digest 0.8.1", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +dependencies = [ + "crypto-mac 0.10.1", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.1", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.4", + "hmac 0.7.1", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "indexmap" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "indicatif" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "rayon", + "regex", +] + +[[package]] +name = "instant" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + +[[package]] +name = "itertools" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "jobserver" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a5ac8f984bfcf3a823267e5fde638acc3325f6496633a5da6bb6eb2171e103" + +[[package]] +name = "libloading" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + +[[package]] +name = "libm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.4.1", + "typenum", +] + +[[package]] +name = "linregress" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" +dependencies = [ + "nalgebra", + "statrs", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lock_api" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", + "value-bag", +] + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matches" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" + +[[package]] +name = "matrixmultiply" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" +dependencies = [ + "rawpointer", +] + +[[package]] +name = "md-5" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "memoffset" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memory-db" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" +dependencies = [ + "hash-db", + "hashbrown", + "parity-util-mem", +] + +[[package]] +name = "memory_units" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" + +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "minimal-lexical" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c835948974f68e0bd58636fc6c5b1fbff7b297e3046f11b3b3c18bbac012c6d" + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "nalgebra" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational 0.4.0", + "num-traits", + "rand 0.8.4", + "rand_distr", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "nom" +version = "5.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +dependencies = [ + "memchr", + "version_check", +] + +[[package]] +name = "nom" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffd9d26838a953b4af82cbeb9f1592c6798916983959be223a7124e992742c1" +dependencies = [ + "memchr", + "minimal-lexical", + "version_check", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39f37e50073ccad23b6d09bcb5b263f4e76d3bb6038e4a3c08e52162ffa8abc2" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +dependencies = [ + "parking_lot 0.11.2", +] + +[[package]] +name = "onig" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e723fc996fff1aeab8f62205f3e8528bf498bdd5eadb2784d2d31f30077947" +dependencies = [ + "bitflags", + "lazy_static", + "libc", + "onig_sys", +] + +[[package]] +name = "onig_sys" +version = "69.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd9442a09e4fbd08d196ddf419b2c79a43c3a46c800320cc841d45c2449a240" +dependencies = [ + "bindgen", + "cc", + "pkg-config", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "pallet-democracy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-io", + "sp-runtime", + "sp-std 4.0.0-dev", +] + +[[package]] +name = "parity-scale-codec" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11263a97373b43da4b426edbb52ef99a7b51e2d9752ef56a7f8b356f48495a5" +dependencies = [ + "arrayvec 0.7.1", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b157dc92b3db2bae522afb31b3843e91ae097eb01d66c72dda66a2e86bc3ca14" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parity-util-mem" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ad6f1acec69b95caf435bbd158d486e5a0a44fcf51531e84922c59ff09e8457" +dependencies = [ + "cfg-if 1.0.0", + "hashbrown", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "parking_lot 0.11.2", + "primitive-types", + "winapi", +] + +[[package]] +name = "parity-util-mem-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" +dependencies = [ + "proc-macro2", + "syn", + "synstructure", +] + +[[package]] +name = "parity-wasm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" + +[[package]] +name = "parking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api 0.4.5", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.10", + "smallvec", + "winapi", +] + +[[package]] +name = "paste" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac 0.8.0", +] + +[[package]] +name = "pbkdf2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +dependencies = [ + "crypto-mac 0.11.1", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "phf" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9fc3db1018c4b59d7d582a739436478b6035138b6aecbce989fc91c3e98409f" +dependencies = [ + "phf_macros", + "phf_shared", + "proc-macro-hack", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared", + "rand 0.8.4", +] + +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" + +[[package]] +name = "polling" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "log", + "wepoll-ffi", + "winapi", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +dependencies = [ + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" + +[[package]] +name = "proc-macro2" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", +] + +[[package]] +name = "rand_distr" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051b398806e42b9cd04ad9ec8f81e355d0a382c543ac6672c62f5a5b452ef142" +dependencies = [ + "num-traits", + "rand 0.8.4", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rayon" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +dependencies = [ + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +dependencies = [ + "getrandom 0.2.3", + "redox_syscall 0.2.10", +] + +[[package]] +name = "ref-cast" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "ruzstd" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cada0ef59efa6a5f4dc5e491f93d9f31e3fc7758df421ff1de8a706338e1100" +dependencies = [ + "byteorder", + "twox-hash", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "scale-info" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +dependencies = [ + "bitvec", + "cfg-if 1.0.0", + "derive_more", + "parity-scale-codec", + "scale-info-derive", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secrecy" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sharded-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" + +[[package]] +name = "signal-hook" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c98891d737e271a2954825ef19e46bd16bdb98e2746f2eec4f7a4ef7946efd1" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" + +[[package]] +name = "simba" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", +] + +[[package]] +name = "siphasher" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" + +[[package]] +name = "slab" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" + +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "socket2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "sp-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "sp-api-proc-macro", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std 4.0.0-dev", + "sp-version", + "thiserror", +] + +[[package]] +name = "sp-api-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "blake2-rfc", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-application-crypto" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-std 4.0.0-dev", +] + +[[package]] +name = "sp-arithmetic" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "serde", + "sp-debug-derive", + "sp-std 4.0.0-dev", + "static_assertions", +] + +[[package]] +name = "sp-core" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "base58", + "blake2-rfc", + "byteorder", + "dyn-clonable", + "ed25519-dalek", + "futures", + "hash-db", + "hash256-std-hasher", + "hex", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "num-traits", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.11.2", + "primitive-types", + "rand 0.7.3", + "regex", + "schnorrkel", + "secrecy", + "serde", + "sha2 0.9.8", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std 4.0.0-dev", + "sp-storage", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "tiny-keccak", + "twox-hash", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-debug-derive" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-externalities" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 4.0.0-dev", + "sp-storage", +] + +[[package]] +name = "sp-inherents" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-core", + "sp-runtime", + "sp-std 4.0.0-dev", + "thiserror", +] + +[[package]] +name = "sp-io" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "futures", + "hash-db", + "libsecp256k1", + "log", + "parity-scale-codec", + "parking_lot 0.11.2", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-maybe-compressed-blob", + "sp-runtime-interface", + "sp-state-machine", + "sp-std 4.0.0-dev", + "sp-tracing", + "sp-trie", + "sp-wasm-interface", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keystore" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "async-trait", + "derive_more", + "futures", + "merlin", + "parity-scale-codec", + "parking_lot 0.11.2", + "schnorrkel", + "sp-core", + "sp-externalities", +] + +[[package]] +name = "sp-maybe-compressed-blob" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "ruzstd", + "zstd", +] + +[[package]] +name = "sp-panic-handler" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "backtrace", +] + +[[package]] +name = "sp-runtime" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "parity-util-mem", + "paste", + "rand 0.7.3", + "serde", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std 4.0.0-dev", +] + +[[package]] +name = "sp-runtime-interface" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std 4.0.0-dev", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-staking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "parity-scale-codec", + "sp-runtime", + "sp-std 4.0.0-dev", +] + +[[package]] +name = "sp-state-machine" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "hash-db", + "log", + "num-traits", + "parity-scale-codec", + "parking_lot 0.11.2", + "rand 0.7.3", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std 4.0.0-dev", + "sp-trie", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-std" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" + +[[package]] +name = "sp-std" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" + +[[package]] +name = "sp-storage" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std 4.0.0-dev", +] + +[[package]] +name = "sp-tracing" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "erased-serde", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "serde", + "serde_json", + "slog", + "sp-std 4.0.0-dev", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-trie" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "hash-db", + "memory-db", + "parity-scale-codec", + "sp-core", + "sp-std 4.0.0-dev", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-version" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "serde", + "sp-runtime", + "sp-std 4.0.0-dev", + "sp-version-proc-macro", + "thiserror", +] + +[[package]] +name = "sp-version-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "parity-scale-codec", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-wasm-interface" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.9#91061a7d925b5bc597804293da283477512ba4ff" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-std 4.0.0-dev", + "wasmi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "sqlformat" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" +dependencies = [ + "itertools", + "nom 7.0.0", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4b94ab0f8c21ee4899b93b06451ef5d965f1a355982ee73684338228498440" +dependencies = [ + "sqlx-core", + "sqlx-macros", +] + +[[package]] +name = "sqlx-core" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec28b91a01e1fe286d6ba66f68289a2286df023fc97444e1fd86c2fd6d5dc026" +dependencies = [ + "ahash", + "atoi", + "base64", + "bitflags", + "byteorder", + "bytes", + "crc", + "crossbeam-channel", + "crossbeam-queue", + "crossbeam-utils", + "dirs", + "either", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-util", + "hashlink", + "hex", + "hmac 0.10.1", + "itoa", + "libc", + "log", + "md-5", + "memchr", + "once_cell", + "parking_lot 0.11.2", + "percent-encoding", + "rand 0.8.4", + "rustls", + "serde", + "serde_json", + "sha-1", + "sha2 0.9.8", + "smallvec", + "sqlformat", + "sqlx-rt", + "stringprep", + "thiserror", + "url", + "webpki", + "webpki-roots", + "whoami", +] + +[[package]] +name = "sqlx-macros" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dc33c35d54774eed73d54568d47a6ac099aed8af5e1556a017c131be88217d5" +dependencies = [ + "dotenv", + "either", + "futures", + "heck", + "once_cell", + "proc-macro2", + "quote", + "sha2 0.9.8", + "sqlx-core", + "sqlx-rt", + "syn", + "url", +] + +[[package]] +name = "sqlx-rt" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14302b678d9c76b28f2e60115211e25e0aabc938269991745a169753dc00e35c" +dependencies = [ + "async-rustls", + "async-std", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "statrs" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" +dependencies = [ + "approx", + "lazy_static", + "nalgebra", + "num-traits", + "rand 0.8.4", +] + +[[package]] +name = "stringprep" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "substrate-bip39" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "schnorrkel", + "sha2 0.9.8", + "zeroize", +] + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e44c4759bae7f1032e286a7ef990bd9ed23fe831b7eeba0beb97484c2e59b8" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.8", + "thiserror", + "unicode-normalization", + "zeroize", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5241dd6f21443a3606b432718b166d3cedc962fd4b8bea54a8bc7f514ebda986" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84f96e095c0c82419687c20ddf5cb3eadb61f4e1405923c9dc8e53a1adacbda8" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98863d0dd09fa59a1b79c6750ad80dbda6b75f4e71c437a6a1a8cb91a8bcbd77" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46125608c26121c81b0c6d693eab5a420e416da7e43c426d2e8f7df8da8a3acf" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "tracing-log" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c42e73a9d277d4d2b6a88389a137ccf3c58599660b17e8f5fc39305e490669" +dependencies = [ + "ansi_term 0.12.1", + "chrono", + "lazy_static", + "matchers", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "trie-db" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" +dependencies = [ + "hash-db", + "hashbrown", + "log", + "rustc-hex", + "smallvec", +] + +[[package]] +name = "trie-root" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" +dependencies = [ + "hash-db", +] + +[[package]] +name = "twox-hash" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" +dependencies = [ + "cfg-if 1.0.0", + "rand 0.8.4", + "static_assertions", +] + +[[package]] +name = "tx-decoder" +version = "0.1.0" +dependencies = [ + "anyhow", + "argh", + "async-std", + "async-stream", + "colored 2.0.0", + "desub-core", + "desub-extras", + "fern", + "futures", + "indicatif", + "log", + "num_cpus", + "parking_lot 0.11.2", + "rayon", + "serde", + "serde_json", + "sqlx", +] + +[[package]] +name = "typenum" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "uint" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" + +[[package]] +name = "unicode-normalization" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" + +[[package]] +name = "unicode-width" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +dependencies = [ + "form_urlencoded", + "idna", + "matches", + "percent-encoding", +] + +[[package]] +name = "value-bag" +version = "1.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae" +dependencies = [ + "ctor", + "version_check", +] + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasm-bindgen" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" + +[[package]] +name = "wasmi" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ee05bba3d1d994652079893941a2ef9324d2b58a63c31b40678fb7eddd7a5a" +dependencies = [ + "downcast-rs", + "libc", + "memory_units", + "num-rational 0.2.4", + "num-traits", + "parity-wasm", + "wasmi-validation", +] + +[[package]] +name = "wasmi-validation" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb8e860796d8be48efef530b60eebf84e74a88bce107374fffb0da97d504b8" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "web-sys" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +dependencies = [ + "webpki", +] + +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + +[[package]] +name = "which" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +dependencies = [ + "libc", +] + +[[package]] +name = "whoami" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7741161a40200a867c96dfa5574544efa4178cf4c8f770b62dd1cc0362d7ae1" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + +[[package]] +name = "zeroize" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zstd" +version = "0.6.1+zstd.1.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de55e77f798f205d8561b8fe2ef57abfb6e0ff2abe7fd3c089e119cdb5631a3" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "3.0.1+zstd.1.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1387cabcd938127b30ce78c4bf00b30387dddf704e3f0881dbc4ff62b5566f8c" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "1.4.20+zstd.1.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd5b733d7cf2d9447e2c3e76a5589b4f5e5ae065c22a2bc0b023cbc331b6c8e" +dependencies = [ + "cc", + "libc", +] diff --git a/bin/tx-decoder/Cargo.toml b/bin/tx-decoder/Cargo.toml new file mode 100644 index 00000000..744c4b20 --- /dev/null +++ b/bin/tx-decoder/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "tx-decoder" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +async-std = { version = "1.10.0", features = [ "attributes" ] } +async-stream = "0.3.2" +sqlx = { version = "0.5", features = [ "runtime-async-std-rustls", "postgres" ]} +desub = { path = "../../core/", package = "desub-core" } +desub-extras = { path = "../../extras", features = [ "polkadot" ]} +anyhow = "1.0.43" +futures = "0.3.17" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0.67" +log = "0.4.14" +argh = "0.1.6" +fern = {version = "0.6.0", features = [ "colored" ] } +colored = "2.0.0" +indicatif = { version = "0.16.2", features = [ "rayon" ] } +rayon = "1.5.1" +parking_lot = "0.11.2" +num_cpus = "1.13.0" diff --git a/bin/tx-decoder/README.md b/bin/tx-decoder/README.md new file mode 100644 index 00000000..f994e7bc --- /dev/null +++ b/bin/tx-decoder/README.md @@ -0,0 +1,12 @@ +# Tx Decoder +### Tool that decodes transactions in a given SQL database + + +The goal of TxDecoder is to be a handy CLI tool for decoding extrinsics/storage that exist in an archive SQL database. +- Decode all extrinsics of a certain spec (one or multiple or every), and return all those that were not succesful +- Decode a specific extrinsic based on block_num & optional extrinsic index (no index will decode all ext). +- Decode storage entries of a specific prefix of all blocks in a specific spec version/time period/etc +- Decode specific storage entry of a specific block +- Decode all storage entries of a specific block + + diff --git a/bin/tx-decoder/src/app.rs b/bin/tx-decoder/src/app.rs new file mode 100644 index 00000000..8e4ceb1e --- /dev/null +++ b/bin/tx-decoder/src/app.rs @@ -0,0 +1,259 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of substrate-desub. +// +// substrate-desub is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// substrate-desub is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with substrate-desub. If not, see . + +use crate::queries::*; + +use desub::decoder::{Chain, Decoder}; +use desub_extras::runtimes; + +use anyhow::Error; +use argh::FromArgs; +use async_std::task; +use futures::StreamExt; +use indicatif::{ProgressBar, ProgressStyle}; +use parking_lot::{Mutex, RwLock}; +use rayon::prelude::*; +use sqlx::postgres::{PgConnection, PgPool, PgPoolOptions}; + +use std::{ + borrow::Cow, + convert::TryInto, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, + }, +}; + +type SpecVersion = i32; + +#[derive(FromArgs, PartialEq, Debug)] +/// Decode Extrinsics And Storage from Substrate Archive +pub struct App { + #[argh(option, default = "default_database_url()", short = 'd')] + /// database url containing encoded information. + database_url: String, + #[argh(option, default = "Chain::Polkadot", short = 'n')] + /// chain + network: Chain, + #[argh(option, short = 's')] + /// decode blocks only in this spec version. + spec: Option, + #[argh(option, short = 'b')] + /// decode only a specific block. + block: Option, + #[argh(switch, short = 'a')] + /// decode all blocks + all: bool, + #[argh(option, short = 'u')] + /// decode all blocks up to a spec version. + to: Option, + #[argh(switch, short = 'v')] + /// extra information about the programs execution. + pub verbose: bool, + #[argh(switch, short = 'p')] + /// show decoding progress. + pub progress: bool, +} + +struct AppState<'a> { + app: &'a App, + decoder: &'a RwLock, + pool: &'a PgPool, + pb: Option<&'a ProgressBar>, +} + +impl<'a> AppState<'a> { + fn new(app: &'a App, decoder: &'a RwLock, pool: &'a PgPool, pb: Option<&'a ProgressBar>) -> Self { + Self { app, decoder, pool, pb } + } + + fn print_blocks(&self, versions: Vec, errors: &mut Vec) -> Result<(usize, usize), Error> { + let error_count = AtomicUsize::new(0); + let length = AtomicUsize::new(0); + let errors = Arc::new(Mutex::new(errors)); + versions.into_par_iter().try_for_each(|version| { + let mut conn = task::block_on(self.pool.acquire())?; + let previous = task::block_on(self.register_metadata(&mut conn, version.try_into()?))?.map(|v| v as i32); + let mut errors = (*errors).lock(); + let (err, len) = + task::block_on(self.print_blocks_by_spec(&mut conn, version as i32, previous, &mut errors))?; + error_count.fetch_add(err, Ordering::SeqCst); + length.fetch_add(len, Ordering::SeqCst); + Ok::<_, Error>(()) + })?; + Ok((error_count.into_inner(), length.into_inner())) + } + + async fn print_blocks_by_spec( + &self, + conn: &mut PgConnection, + version: i32, + previous: Option, + errors: &mut Vec, + ) -> Result<(usize, usize), Error> { + let mut blocks = blocks_by_spec(conn, version); + let upgrade_block = get_upgrade_block(&self.app.network, version.try_into()?); + let mut len = 0; + let mut error_count = 0; + let decoder = self.decoder.read(); + while let Some(Ok(block)) = blocks.next().await { + let version = if upgrade_block == Some(block.block_num.try_into()?) && upgrade_block != Some(0) { + previous.expect("Upgrade block must have previous version; qed") + } else { + version + }; + if Self::decode(&decoder, block, version, errors).is_err() { + error_count += 1; + } + len += 1; + self.pb.map(|p| p.inc(1)); + } + Ok((error_count, len)) + } + + fn decode(decoder: &Decoder, block: BlockModel, spec: SpecVersion, errors: &mut Vec) -> Result<(), Error> { + log::debug!("-<<-<<-<<-<<-<<-<<-<<-<<-<< Decoding block {}, ext length {}", block.block_num, block.ext.len()); + match decoder.decode_extrinsics(spec.try_into()?, block.ext.as_slice()) { + Err(e) => { + let e: Error = e.into(); + let e = e.context(format!("Failed to decode block {}", block.block_num)); + errors.push(format!("{}", e)); + Err(e) + } + Ok(d) => { + log::info!("Block {} Decoded Succesfully. {}", block.block_num, serde_json::to_string_pretty(&d)?); + Ok(()) + } + } + } + + /// Register the metadata with Decoder + /// returns the previous spec version. + async fn register_metadata(&self, conn: &mut PgConnection, version: SpecVersion) -> Result, Error> { + let (past, present) = past_and_present_version(conn, version).await?; + let mut decoder = self.decoder.write(); + if !decoder.has_version(present) { + let meta = metadata(conn, present.try_into()?).await?; + decoder.register_version(present, meta); + } + + if let Some(p) = past { + if !decoder.has_version(p) { + let meta = metadata(conn, p.try_into()?).await?; + decoder.register_version(p, meta); + } + } + Ok(past.try_into()?) + } + + fn set_message(&self, msg: impl Into>) { + self.pb.map(|p| p.set_message(msg)); + } + + fn set_length(&self, len: u64) { + self.pb.map(|p| p.set_length(len)); + } + + fn finish_and_clear(&self) { + self.pb.map(|p| p.finish_and_clear()); + } +} + +pub async fn app(app: App) -> Result<(), Error> { + let pool = PgPoolOptions::new().max_connections(num_cpus::get() as u32).connect(&app.database_url).await?; + + let mut conn = pool.acquire().await?; + + let types = desub_extras::TypeResolver::default(); + let decoder = Arc::new(RwLock::new(Decoder::new(types, app.network.clone()))); + let mut errors = Vec::new(); + + let pb = if app.progress { Some(construct_progress_bar(1000)) } else { None }; + + let state = AppState::new(&app, &decoder, &pool, pb.as_ref()); + + if let Some(block) = &app.block { + let version = version_by_block(&mut conn, *block).await?; + let previous = state.register_metadata(&mut conn, version).await?; + let block = single_block(&mut conn, *block as i32).await?; + let version = if get_upgrade_block(&app.network, version.try_into()?) == Some(block.block_num.try_into()?) { + previous.expect("Upgrade block must have previous version; qed") + } else { + version as u32 + }; + AppState::decode(&decoder.read(), block, version.try_into()?, &mut errors)?; + } + + if let Some(spec) = app.spec { + let now = std::time::Instant::now(); + let count = blocks_in_spec(&mut conn, spec).await?; + state.set_message(format!("decoding blocks for spec {}", spec)); + state.set_length(count as u64); + let (error_count, len) = state.print_blocks(vec![spec.try_into()?], &mut errors)?; + state.finish_and_clear(); + println!("Took {:?} to decode {} blocks with {} errors.", now.elapsed(), len, error_count); + } + + if let Some(to) = app.to { + let spec_versions = spec_versions_upto(&mut conn, to).await?; + let now = std::time::Instant::now(); + let count = count_upto_spec(&mut conn, to).await?; + state.set_message(format!("decoding blocks up to spec {}", to)); + state.set_length(count as u64); + let (error_count, length) = state.print_blocks(spec_versions, &mut errors)?; + state.finish_and_clear(); + println!("Took {:?} to decode {} blocks with {} errors.", now.elapsed(), length, error_count); + } + + if app.all { + let spec_versions = spec_versions(&mut conn).await?; + let now = std::time::Instant::now(); + let count = total_block_count(&mut conn).await?; + pb.as_ref().map(|p| p.set_message("decoding all blocks")); + pb.as_ref().map(|p| p.set_length(count as u64)); + let (error_count, length) = state.print_blocks(spec_versions, &mut errors)?; + state.finish_and_clear(); + println!("Took {:?} to decode {} blocks with {} errors.", now.elapsed(), length, error_count); + } + + for e in errors.iter() { + println!("{}", e); + } + Ok(()) +} + +fn default_database_url() -> String { + "postgres://postgres@localhost:5432/postgres".to_string() +} + +fn construct_progress_bar(count: usize) -> ProgressBar { + let bar = ProgressBar::new(count as u64); + bar.set_style( + ProgressStyle::default_bar() + .template("{spinner:.cyan} {msg} [{elapsed_precise}] [{bar:40.cyan/blue}] {percent}% ({eta}) ({pos}/{len})") + .progress_chars("#>-"), + ); + bar +} + +fn get_upgrade_block(chain: &Chain, version: u32) -> Option { + match chain { + Chain::Kusama => runtimes::kusama_upgrade_block(&version), + Chain::Polkadot => runtimes::polkadot_upgrade_block(&version), + Chain::Westend => runtimes::westend_upgrade_block(&version), + _ => None, + } +} diff --git a/bin/tx-decoder/src/main.rs b/bin/tx-decoder/src/main.rs new file mode 100644 index 00000000..2cd4ad5e --- /dev/null +++ b/bin/tx-decoder/src/main.rs @@ -0,0 +1,53 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of substrate-desub. +// +// substrate-desub is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// substrate-desub is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with substrate-desub. If not, see . + +mod app; +mod queries; + +use anyhow::Error; +use colored::Colorize; +use fern::colors::{Color, ColoredLevelConfig}; + +#[async_std::main] +async fn main() -> Result<(), Error> { + let app: self::app::App = argh::from_env(); + let level = if app.verbose { log::LevelFilter::Trace } else { log::LevelFilter::Warn }; + let colors = + ColoredLevelConfig::new().trace(Color::Magenta).error(Color::Red).debug(Color::Blue).info(Color::Green); + + // Configure logger at runtime + fern::Dispatch::new() + .level(log::LevelFilter::Error) + .level_for("desub_core", level) + .level_for("desub_extras", level) + .level_for("tx_decoder", level) + .format(move |out, message, record| { + out.finish(format_args!( + " {} {}::{} >{} ", + colors.color(record.level()), + record.target().bold(), + record.line().map(|l| l.to_string()).unwrap_or_default(), + message.to_string(), + )) + }) + // Output to stdout, files, and other Dispatch configurations + .chain(std::io::stdout()) + // Apply globally + .apply()?; + + app::app(app).await?; + Ok(()) +} diff --git a/bin/tx-decoder/src/queries.rs b/bin/tx-decoder/src/queries.rs new file mode 100644 index 00000000..7f76dc7d --- /dev/null +++ b/bin/tx-decoder/src/queries.rs @@ -0,0 +1,158 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of substrate-desub. +// +// substrate-desub is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// substrate-desub is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with substrate-desub. If not, see . + +use anyhow::{Context, Error}; +use futures::{Stream, TryStreamExt}; +use serde::{Deserialize, Serialize}; +use sqlx::{FromRow, PgConnection}; + +/// Struct modeling data returned from database when querying for a block +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, FromRow)] +pub struct BlockModel { + pub id: i32, + pub parent_hash: Vec, + pub hash: Vec, + pub block_num: i32, + pub state_root: Vec, + pub extrinsics_root: Vec, + pub digest: Vec, + pub ext: Vec, + pub spec: i32, +} + +#[derive(FromRow)] +struct Count { + count: i64, +} + +/// returns how many blocks exist for a spec version. +pub async fn blocks_in_spec(conn: &mut PgConnection, spec: i32) -> Result { + Ok(sqlx::query_as::<_, Count>("SELECT COUNT(*) FROM blocks WHERE spec = $1") + .bind(spec) + .fetch_one(conn) + .await? + .count) +} + +/// returns the total amount of blocks +pub async fn total_block_count(conn: &mut PgConnection) -> Result { + Ok(sqlx::query_as::<_, Count>("SELECT COUNT(*) FROM blocks").fetch_one(conn).await?.count) +} + +/// returns how many blocks exist up to a spec version +pub async fn count_upto_spec(conn: &mut PgConnection, spec: i32) -> Result { + Ok(sqlx::query_as::<_, Count>("SELECT COUNT(*) FROM blocks WHERE spec < $1") + .bind(spec) + .fetch_one(conn) + .await? + .count) +} + +/// returns all blocks in the database of a specific spec as a stream +pub fn blocks_by_spec(conn: &mut PgConnection, spec: i32) -> impl Stream> + '_ { + sqlx::query_as!(BlockModel, "SELECT * FROM blocks WHERE spec = $1", spec).fetch(conn).map_err(Into::into) +} + +/// get a single block +pub async fn single_block(conn: &mut PgConnection, number: i32) -> Result { + sqlx::query_as!(BlockModel, "SELECT * FROM blocks WHERE block_num = $1", number) + .fetch_one(conn) + .await + .map_err(Into::into) +} + +#[derive(FromRow)] +struct Meta { + pub meta: Vec, +} + +pub async fn metadata(conn: &mut PgConnection, spec: i32) -> Result, Error> { + sqlx::query_as!(Meta, "SELECT meta FROM metadata WHERE version = $1", spec) + .fetch_one(conn) + .await + .map_err(Into::into) + .map(|m| m.meta) +} + +#[derive(FromRow)] +struct Version { + pub version: i32, +} + +/// Gets all spec versions +pub async fn spec_versions(conn: &mut PgConnection) -> Result, Error> { + sqlx::query_as!(Version, "SELECT version FROM metadata") + .fetch_all(conn) + .await + .map_err(Into::into) + .map(|r| r.iter().map(|v| v.version as u32).collect()) +} + +/// returns all spec versions up to a specified version +pub async fn spec_versions_upto(conn: &mut PgConnection, upto: i32) -> Result, Error> { + sqlx::query_as!(Version, "SELECT version FROM metadata WHERE version < $1", upto) + .fetch_all(conn) + .await + .map_err(Into::into) + .map(|r| r.iter().map(|v| v.version as u32).collect()) +} + +#[derive(FromRow)] +struct PastAndPresentVersion { + pub present: i32, + pub past: Option, +} + +pub async fn past_and_present_version(conn: &mut PgConnection, spec: i32) -> Result<(Option, u32), Error> { + let version = sqlx::query_as::<_, PastAndPresentVersion>( + " + SELECT version as present, past_version as past FROM ( + SELECT version, metadata, + LAG(version, 1) OVER (ORDER BY version) as past_version + FROM metadata + ) as z WHERE version = $1;", + ) + .bind(spec) + .fetch_one(conn) + .await + .map(|v| (v.past.map(|p| p as u32), v.present as u32)) + .context(format!("Failed to get previous version of {}", spec))?; + + Ok(version) +} + +#[derive(FromRow)] +struct MetaAndVersion { + pub version: i32, +} + +pub async fn version_by_block(conn: &mut PgConnection, number: u32) -> Result { + sqlx::query_as!( + MetaAndVersion, + "SELECT version FROM ( + SELECT block_num, blocks.spec, metadata.version FROM blocks, metadata + WHERE + block_num = $1 + AND + blocks.spec = metadata.version + ) as z;", + number as i32 + ) + .fetch_one(conn) + .await + .map_err(Into::into) + .map(|v| v.version) +} diff --git a/core/Cargo.toml b/core/Cargo.toml index f18d43ae..7b4d9af4 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -8,27 +8,28 @@ repository = "https://github.com/paritytech/desub" [dependencies] log = "0.4" thiserror = "1.0.22" -codec = { version = "1", package = "parity-scale-codec" } -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0", features = ["preserve_order"] } +codec = { version = "2", package = "parity-scale-codec", features = ["bit-vec"] } +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1", features = ["preserve_order"] } onig = { version = "5.0", default-features = false } derive_more = "0.99.3" dyn-clone = "1.0" hex = "0.4" +bitvec = { version = "0.20.2", features = ["serde", "alloc"] } -runtime-version = { package = "sp-version", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } -pallet-indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } -pallet-democracy = { package = "pallet-democracy", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } -pallet-identity = { package = "pallet-identity", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } +runtime-version = { package = "sp-version", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } +pallet-democracy = { package = "pallet-democracy", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } +frame-support = { package = "frame-support", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } -runtime-primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } +primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } +runtime-primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } -runtime-metadata-latest = { package = "frame-metadata", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } -runtime-metadata11 = { git = "https://github.com/insipx/substrate-metadata-versions", package = "frame-metadatav11", branch = "master" } -runtime-metadata10 = { git = "https://github.com/insipx/substrate-metadata-versions", package = "frame-metadatav10", branch = "master" } -runtime-metadata09 = { git = "https://github.com/insipx/substrate-metadata-versions", package = "frame-metadatav9", branch = "master" } -runtime-metadata08 = { git = "https://github.com/insipx/substrate-metadata-versions", package = "frame-metadatav8", branch = "master" } +frame-metadata = { package = "frame-metadata", version = "14.0.0", features = ["v12", "v13", "v14"] } + +runtime-metadata11 = { path = "../substrate-metadata-versions/metadatav11", package = "frame-metadatav11" } +runtime-metadata10 = { path = "../substrate-metadata-versions/metadatav10", package = "frame-metadatav10" } +runtime-metadata09 = { path = "../substrate-metadata-versions/metadatav9", package = "frame-metadatav9" } +runtime-metadata08 = { path = "../substrate-metadata-versions/metadatav8", package = "frame-metadatav8" } [dev-dependencies] pretty_env_logger = "0.4" diff --git a/core/src/decoder.rs b/core/src/decoder.rs index 1e63fbcc..3268937b 100644 --- a/core/src/decoder.rs +++ b/core/src/decoder.rs @@ -1,4 +1,4 @@ -// Copyright 2019 Parity Technologies (UK) Ltd. +// Copyright 2019-2021 Parity Technologies (UK) Ltd. // This file is part of substrate-desub. // // substrate-desub is free software: you can redistribute it and/or modify @@ -33,16 +33,27 @@ pub use self::storage::{GenericStorage, StorageInfo, StorageKey, StorageKeyData, #[cfg(test)] pub use self::metadata::test_suite; -pub use self::metadata::{Metadata, MetadataError, ModuleIndex, StorageType}; -pub use runtime_metadata_latest::{StorageEntryModifier, StorageEntryType, StorageHasher}; +pub use self::metadata::{ + CallMetadata, Metadata, MetadataError, ModuleIndex, ModuleMetadata, StorageEntryModifier, StorageHasher, + StorageType, +}; +pub use frame_metadata::v14::StorageEntryType; use crate::{ error::Error, - substrate_types::{self, StructField, StructUnitOrTuple, SubstrateType}, + substrate_types::{self, StructField, SubstrateType}, CommonTypes, RustTypeMarker, TypeDetective, }; -use codec::{Compact, CompactLen, Decode}; -use std::{collections::HashMap, convert::TryFrom}; +use bitvec::order::Lsb0 as BitOrderLsb0; +use codec::{Compact, CompactLen, Decode, Input}; +use std::{ + cell::RefCell, + collections::HashMap, + convert::TryFrom, + rc::Rc, + str::FromStr, + sync::atomic::{AtomicUsize, Ordering}, +}; type SpecVersion = u32; /// Decoder for substrate types @@ -78,7 +89,7 @@ pub enum Entry { Constant, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum Chain { Polkadot, Kusama, @@ -101,6 +112,212 @@ impl std::fmt::Display for Chain { } } +impl FromStr for Chain { + type Err = Error; + + fn from_str(s: &str) -> Result { + match s.to_lowercase().as_str() { + "polkadot" | "dot" => Ok(Chain::Polkadot), + "kusama" | "ksm" => Ok(Chain::Kusama), + "westend" | "wnd" => Ok(Chain::Westend), + "centrifuge" => Ok(Chain::Centrifuge), + "rococo" => Ok(Chain::Rococo), + _ => Ok(Chain::Custom(s.to_string())), + } + } +} + +#[derive(Debug)] +struct Module<'a> { + // no module, means we are probably decoding a signature. + // A signature is decoded before we know which module/call the extrinsic actually represents. + module: Option<&'a ModuleMetadata>, +} + +impl<'a> Module<'a> { + fn new(module: Option<&'a ModuleMetadata>) -> Self { + Module { module } + } + + fn set(&mut self, module: &'a ModuleMetadata) { + self.module = Some(module); + } + + fn reset(&mut self) { + self.module = None; + } + + fn name(&self) -> &'a str { + self.module.map(ModuleMetadata::name).unwrap_or("runtime") + } + + fn call(&self, index: u8) -> Result, MetadataError> { + self.module.map(|m| m.call(index)).transpose() + } +} + +#[derive(Debug)] +struct DecodeState<'a> { + module: Module<'a>, + call: Rc>>, + metadata: &'a Metadata, + cursor: AtomicUsize, + spec: SpecVersion, + data: &'a [u8], +} + +impl<'a> DecodeState<'a> { + fn new( + module: Option<&'a ModuleMetadata>, + call: Option, + metadata: &'a Metadata, + cursor: usize, + spec: SpecVersion, + data: &'a [u8], + ) -> Self { + let call = Rc::new(RefCell::new(call)); + let cursor = AtomicUsize::new(cursor); + let module = Module::new(module); + Self { module, call, metadata, cursor, spec, data } + } + + fn module_name(&'a self) -> &'a str { + self.module.name() + } + + /// Loads the module at the current index. + /// Increments the cursor by 1. + fn load_module(&mut self) -> Result<(), Error> { + log::trace!("Loading module in index {}", self.index()); + let module = self + .metadata + .module_by_index(ModuleIndex::Call(self.index())) + .map_err(|e| Error::DetailedMetaFail(e, self.cursor(), hex::encode(self.data)))?; + self.increment(); + self.module.set(module); + Ok(()) + } + + // Gets the call at the current index. Increments cursor by 1. + // Sets the call for the state. + // Panics if there is no module loaded + fn call(&self) -> Result { + let call = self.data[self.cursor.load(Ordering::Relaxed)]; + let call = self.module.call(call)?.expect("No module in state"); + self.increment(); + self.call.replace(Some(call.clone())); + Ok(self.call.borrow().as_ref().expect("Just set call").clone()) + } + + /// Interprets the version at the current byte offset. + /// Returns whether the extrinsic is signed. + fn interpret_version(&self) -> bool { + let version = self.do_index(); + let is_signed = version & 0b1000_0000 != 0; + let version = version & 0b0111_1111; + log::trace!("Extrinsic Version: {}", version); + is_signed + } + + /// Get the scale length at the current point in time. + /// Increment cursor accordingly to the length. + fn scale_length(&mut self) -> Result { + let length = Decoder::scale_length(&self.data[self.cursor.load(Ordering::Relaxed)..])?; + log::trace!("Scale Byte Length {}, actual items: {}", length.1, length.0); + self.cursor.fetch_add(length.1, Ordering::Relaxed); + Ok(length.0) + } + + fn reset(&mut self, data: &'a [u8]) { + self.data = data; + self.module.reset(); + self.call.replace(None); + self.set_cursor(0); + } + + /// Current value at cursor. + /// In other words: data[cursor] + fn index(&self) -> u8 { + self.data[self.cursor()] + } + + /// Current value at cursor (data[cursor]). + /// Increment the cursor by 1. + fn do_index(&self) -> u8 { + let number = self.data[self.cursor.load(Ordering::Relaxed)]; + self.add(1); + number + } + + /// Decode a value, automatically incrementing `cursor` + /// the correct number of bytes. + fn decode(&self) -> Result { + let input = &mut &self.data[self.cursor.load(Ordering::Relaxed)..]; + let remaining_len = input.remaining_len()?.expect("&'a u8 is always Some()"); + let ty = Decode::decode(input)?; + let after_remaining_len = input.remaining_len()?.expect("&'a u8 is always Some()"); + let inc = remaining_len - after_remaining_len; + self.add(inc); + Ok(ty) + } + + fn add(&self, inc: usize) { + self.cursor.fetch_add(inc, Ordering::Relaxed); + } + + fn increment(&self) { + self.cursor.fetch_add(1, Ordering::Relaxed); + } + + fn set_cursor(&self, new: usize) { + self.cursor.store(new, Ordering::Relaxed); + } + + fn cursor(&self) -> usize { + self.cursor.load(Ordering::Relaxed) + } + + /// Prints out a succinct debug snapshot of the current state. + fn observe(&self, line: u32) { + let module = self.module.name(); + let cursor = self.cursor.load(Ordering::Relaxed); + let value_at_cursor = &self.data[cursor]; + let data_at_cursor = &self.data[cursor..]; + + log::debug!( + "line: {}, module = {}, call = {:?}, cursor = {}, data[cursor] = {}, data[cursor..] = {:?}", + line, + module, + self.call.borrow().as_ref().map(|c| c.name()), + cursor, + value_at_cursor, + data_at_cursor, + ) + } +} + +struct ChunkedExtrinsic<'a> { + data: &'a [u8], + cursor: usize, +} + +impl<'a> ChunkedExtrinsic<'a> { + /// Create new ChunkedExtrinsic. + fn new(data: &'a [u8]) -> Self { + Self { data, cursor: 0 } + } +} + +impl<'a> Iterator for ChunkedExtrinsic<'a> { + type Item = &'a [u8]; + fn next(&mut self) -> Option<&'a [u8]> { + let (length, prefix) = Decoder::scale_length(&self.data[self.cursor..]).ok()?; + let extrinsic = &self.data[(self.cursor + prefix)..(self.cursor + length + prefix)]; + self.cursor += length + prefix; + Some(extrinsic) + } +} + impl Decoder { /// Create new Decoder with specified types pub fn new(types: impl TypeDetective + 'static, chain: Chain) -> Self { @@ -182,6 +399,7 @@ impl Decoder { }), } } + StorageType::NMap { .. } => unimplemented!(), } } @@ -208,110 +426,91 @@ impl Decoder { match &storage_info.meta.ty { StorageType::Plain(rtype) => { log::trace!("{:?}, module {}, spec {}", rtype, storage_info.module.name(), spec); - let mut cursor = 0; - let value = self.decode_single(storage_info.module.name(), spec, rtype, value, &mut cursor, false)?; + let mut state = DecodeState::new(Some(&storage_info.module), None, meta, 0, spec, value); + let value = self.decode_single(&mut state, rtype, false)?; let key = self.get_key_data(key, storage_info, &lookup_table); let storage = GenericStorage::new(key, Some(StorageValue::new(value))); Ok(storage) } StorageType::Map { value: val_rtype, unused: _unused, .. } => { + log::trace!( + "Resolving storage `Map`. Value: {:?}, module {}, spec {}", + val_rtype, + storage_info.module.name(), + spec + ); let key = self.get_key_data(key, storage_info, &lookup_table); - let mut cursor = 0; - let value = - self.decode_single(storage_info.module.name(), spec, val_rtype, value, &mut cursor, false)?; + let mut state = DecodeState::new(Some(&storage_info.module), None, meta, 0, spec, value); + let value = self.decode_single(&mut state, val_rtype, false)?; let storage = GenericStorage::new(key, Some(StorageValue::new(value))); Ok(storage) } StorageType::DoubleMap { value: val_rtype, .. } => { + log::trace!( + "Resolving storage `DoubleMap`. Value: {:?}, module {}, spec {}", + value, + storage_info.module.name(), + spec + ); let key = self.get_key_data(key, storage_info, &lookup_table); - let mut cursor = 0; - let value = - self.decode_single(storage_info.module.name(), spec, val_rtype, value, &mut cursor, false)?; + let mut state = DecodeState::new(Some(&storage_info.module), None, meta, 0, spec, value); + let value = self.decode_single(&mut state, val_rtype, false)?; let storage = GenericStorage::new(key, Some(StorageValue::new(value))); Ok(storage) } + StorageType::NMap { .. } => unimplemented!(), } } - /// Decode an extrinsic - pub fn decode_extrinsic(&self, spec: SpecVersion, data: &[u8]) -> Result { - let meta = self.versions.get(&spec).expect("Spec does not exist"); - - // first byte -> vector length - // second byte -> extrinsic version - // third byte -> Outer enum index - // fourth byte -> inner enum index (function index) - // can check if signed via a simple & too - let length = Self::scale_length(data)?; - let mut cursor: usize = length.1; - - let signature = self.decode_signature(spec, data, &mut cursor)?; - - if let Some(s) = &signature { - log::debug!("signature={}", s); + /// Decode a Vec. (Vec>) + pub fn decode_extrinsics(&self, spec: SpecVersion, data: &[u8]) -> Result, Error> { + let mut ext = Vec::new(); + let (length, prefix) = Self::scale_length(data)?; + let meta = self.versions.get(&spec).ok_or(Error::MissingSpec(spec))?; + log::trace!("Decoding {} Total Extrinsics. CALLS: {:#?}", length, meta.modules_by_call_index); + + let mut state = DecodeState::new(None, None, meta, prefix, spec, data); + for (idx, extrinsic) in ChunkedExtrinsic::new(&data[prefix..]).enumerate() { + log::trace!("Extrinsic {}:{:?}", idx, extrinsic); + state.reset(extrinsic); + ext.push(self.decode_extrinsic(&mut state)?); + log::info!("Success! {}", serde_json::to_string_pretty(&ext).unwrap()); } - let mut temp_cursor = cursor; - let module = meta - .module_by_index(ModuleIndex::Call(data[temp_cursor])) - .map_err(|e| Error::DetailedMetaFail(e, temp_cursor, hex::encode(data)))?; - temp_cursor += 1; - let call_meta = - module.call(data[temp_cursor]).map_err(|e| Error::DetailedMetaFail(e, temp_cursor, hex::encode(data)))?; - let types = self.decode_call(spec, data, &mut cursor)?; + Ok(ext) + } - Ok(GenericExtrinsic::new(signature, types, call_meta.name(), module.name().into())) + /// Decode an extrinsic + fn decode_extrinsic(&self, state: &mut DecodeState) -> Result { + let signature = if state.interpret_version() { Some(self.decode_signature(state)?) } else { None }; + + state.load_module()?; + let types = self.decode_call(state)?; + log::debug!("Finished cursor length={}", state.cursor()); + let call = state.call.borrow().as_ref().map(|c| c.name()).unwrap_or_else(|| "unknown".into()); + Ok(GenericExtrinsic::new(signature, types, call, state.module_name().into())) } /// Decode the signature part of an UncheckedExtrinsic - fn decode_signature( - &self, - spec: SpecVersion, - data: &[u8], - cursor: &mut usize, - ) -> Result, Error> { - let version = data[*cursor]; - let is_signed = version & 0b1000_0000 != 0; - let version = version & 0b0111_1111; - log::trace!("Extrinsic Version: {}", version); - *cursor += 1; - - if is_signed { - log::trace!("SIGNED EXTRINSIC"); - log::trace!("Getting signature for spec: {}, chain: {}", spec, self.chain.as_str()); - let signature = self - .types - .get_extrinsic_ty(self.chain.as_str(), spec, "signature") - .expect("Signature must not be empty"); - Ok(Some(self.decode_single("runtime", spec, signature, data, cursor, false)?)) - } else { - Ok(None) - } + fn decode_signature(&self, state: &mut DecodeState) -> Result { + log::trace!("SIGNED EXTRINSIC"); + log::trace!("Getting signature for spec: {}, chain: {}", state.spec, self.chain.as_str()); + let signature = self + .types + .get_extrinsic_ty(self.chain.as_str(), state.spec, "signature") + .expect("Signature must not be empty"); + log::trace!("Signature type is: {}", signature); + state.observe(line!()); + self.decode_single(state, signature, false) } - fn decode_call( - &self, - spec: SpecVersion, - data: &[u8], - cursor: &mut usize, - ) -> Result, Error> { - let meta = self.versions.get(&spec).expect("Spec does not exist"); - - log::trace!("data = {:?}", &data[*cursor..]); - log::trace!("cursor = {}", cursor); - let module = meta.module_by_index(ModuleIndex::Call(data[*cursor]))?; - *cursor += 1; - log::trace!("cursor = {}", cursor); - let call_meta = module.call(data[*cursor])?; - *cursor += 1; - log::trace!("cursor = {}", cursor); - log::trace!("data = {:X?}", &data[*cursor..]); - - // TODO: tuple of argument name -> value + fn decode_call(&self, state: &mut DecodeState) -> Result, Error> { let mut types: Vec<(String, SubstrateType)> = Vec::new(); - for arg in call_meta.arguments() { - log::trace!("arg = {:?}", arg); - let val = self.decode_single(module.name(), spec, &arg.ty, data, cursor, false)?; + let call = state.call()?; + for arg in call.arguments() { + state.observe(line!()); + log::trace!("Decoding {:?} for call {}", &arg.ty, call); + let val = self.decode_single(state, &arg.ty, false)?; types.push((arg.name.to_string(), val)); } Ok(types) @@ -326,82 +525,83 @@ impl Decoder { #[track_caller] fn decode_single( &self, - module: &str, - spec: SpecVersion, + state: &mut DecodeState, ty: &RustTypeMarker, - data: &[u8], - cursor: &mut usize, is_compact: bool, ) -> Result { let ty = match ty { RustTypeMarker::TypePointer(v) => { log::trace!("Resolving: {}", v); - if let Some(t) = self.decode_sub_type(spec, v, data, cursor, is_compact)? { + if let Some(t) = self.decode_sub_type(state, v, is_compact)? { t } else { - let new_type = self.types.get(self.chain.as_str(), spec, module, v).ok_or_else(|| { - Error::from(format!( - "Name Resolution Failure: module={}, v={}, spec={}, chain={}", - module, - v, - spec, - self.chain.as_str() - )) - })?; + let new_type = + self.types.get(self.chain.as_str(), state.spec, state.module_name(), v).ok_or_else(|| { + Error::from(format!( + "Name Resolution Failure: module={}, v={}, spec={}, chain={}", + state.module_name(), + v, + state.spec, + self.chain.as_str() + )) + })?; log::trace!("Resolved {:?}", new_type); - self.decode_single(module, spec, new_type, data, cursor, is_compact)? + let saved_cursor = state.cursor(); + let resolved = self.decode_single(state, new_type, is_compact); + if resolved.is_err() { + if let Some(fallback) = self.types.try_fallback(state.module_name(), v) { + log::trace!("Falling back to type: {}", fallback); + state.set_cursor(saved_cursor); + return self.decode_single(state, fallback, is_compact); + } + } + resolved? } } + RustTypeMarker::Unit(u) => SubstrateType::Unit(u.to_string()), RustTypeMarker::Struct(v) => { - log::trace!("Struct::cursor = {:?}", cursor); - let ty = self.decode_structlike(v, module, spec, data, cursor, is_compact)?; + log::trace!("Struct::cursor = {:?}", state.cursor); + let ty = self.decode_structlike(v, state, is_compact)?; SubstrateType::Struct(ty) } - // TODO: test RustTypeMarker::Set(v) => { - log::trace!("Set::cursor = {}", *cursor); + log::trace!("Set::cursor = {}", state.cursor()); // a set item must be an u8 // can decode this right away - let index = data[*cursor]; - *cursor += 1; + let index = state.do_index(); SubstrateType::Set(v[index as usize].clone()) } RustTypeMarker::Tuple(v) => { - log::trace!("Tuple::cursor={}", *cursor); + log::trace!("Tuple::cursor={}", state.cursor()); let ty = v .iter() - .map(|v| self.decode_single(module, spec, v, data, cursor, is_compact)) + .map(|v| self.decode_single(state, v, is_compact)) .collect::, Error>>(); SubstrateType::Composite(ty?) } RustTypeMarker::Enum(v) => { - log::trace!("Enum::cursor={}", *cursor); - let index = data[*cursor]; - *cursor += 1; + log::trace!("Enum::cursor={}", state.cursor()); + state.observe(line!()); + let index = state.do_index(); let variant = &v[index as usize]; - match &variant.ty { - crate::StructUnitOrTuple::Struct(ref v) => { - let ty = self.decode_structlike(v, module, spec, data, cursor, is_compact)?; - SubstrateType::Enum(StructUnitOrTuple::Struct(ty)) - } - crate::StructUnitOrTuple::Unit(v) => SubstrateType::Enum(StructUnitOrTuple::Unit(v.clone())), - crate::StructUnitOrTuple::Tuple(ref v) => { - let ty = self.decode_single(module, spec, v, data, cursor, is_compact)?; - let name = variant.variant_name.as_ref().expect("Tuple Variant must have a name").clone(); - SubstrateType::Enum(StructUnitOrTuple::Tuple { name, ty: Box::new(ty) }) - } - } + let value = variant.value.as_ref().map(|v| self.decode_single(state, v, is_compact)).transpose()?; + log::debug!("Enum: {:?}", value); + SubstrateType::Enum(substrate_types::EnumField { + name: variant.name.clone(), + value: value.map(Box::new), + }) } RustTypeMarker::Array { size, ty } => { - log::trace!("Array::cursor={}", *cursor); + log::trace!("Array::cursor={}", state.cursor()); let mut decoded_arr = Vec::with_capacity(*size); - if *size == 0_usize { - log::trace!("Returning Empty Vector"); + + if *size == 0 { + log::trace!("Returning Empty Array"); return Ok(SubstrateType::Composite(Vec::new())); } else { for _ in 0..*size { - decoded_arr.push(self.decode_single(module, spec, ty, data, cursor, is_compact)?) + decoded_arr.push(self.decode_single(state, ty, is_compact)?) } } // rely on cursor increments in sub-types (U32/substrate specific types) @@ -409,31 +609,28 @@ impl Decoder { } RustTypeMarker::Std(v) => match v { CommonTypes::Vec(v) => { - log::trace!("Vec::cursor={}", *cursor); - let length = Self::scale_length(&data[*cursor..])?; - *cursor += length.1; - // we can just decode this as an "array" now - self.decode_single( - module, - spec, - &RustTypeMarker::Array { size: length.0, ty: v.clone() }, - data, - cursor, - is_compact, - )? + log::trace!("Vec::cursor={}", state.cursor()); + let length = state.scale_length()?; + let mut vec = Vec::new(); + if length == 0 { + return Ok(SubstrateType::Composite(Vec::new())); + } else { + for _ in 0..length { + state.observe(line!()); + let decoded = self.decode_single(state, v, is_compact)?; + vec.push(decoded); + } + } + SubstrateType::Composite(vec) } CommonTypes::Option(v) => { - log::trace!("Option::cursor={}", *cursor); - match data[*cursor] { + log::trace!("Option::cursor={}", state.cursor()); + match state.do_index() { // None - 0x00 => { - *cursor += 1; - SubstrateType::Option(Box::new(None)) - } + 0x00 => SubstrateType::Option(Box::new(None)), // Some 0x01 => { - *cursor += 1; - let ty = self.decode_single(module, spec, v, data, cursor, is_compact)?; + let ty = self.decode_single(state, v, is_compact)?; SubstrateType::Option(Box::new(Some(ty))) } _ => { @@ -442,18 +639,16 @@ impl Decoder { } } CommonTypes::Result(v, e) => { - log::trace!("Result::cursor={}", *cursor); - match data[*cursor] { + log::trace!("Result::cursor={}", state.cursor()); + match state.do_index() { // Ok 0x00 => { - *cursor += 1; - let ty = self.decode_single(module, spec, v, data, cursor, is_compact)?; + let ty = self.decode_single(state, v, is_compact)?; SubstrateType::Result(Box::new(Ok(ty))) } // Err 0x01 => { - *cursor += 1; - let ty = self.decode_single(module, spec, e, data, cursor, is_compact)?; + let ty = self.decode_single(state, e, is_compact)?; SubstrateType::Result(Box::new(Err(ty))) } _ => { @@ -461,150 +656,110 @@ impl Decoder { } } } - // TODO: test CommonTypes::Compact(v) => { - log::trace!("Compact::cursor={}", cursor); - self.decode_single(module, spec, v, data, cursor, true)? + log::trace!("COMPACT SWITCHED! Compact::cursor={}", state.cursor()); + self.decode_single(state, v, true)? } }, RustTypeMarker::Generic(outer, _) => { log::trace!("Generic Type"); // disregard 'inner' type of a generic - self.decode_single(module, spec, outer, data, cursor, is_compact)? + self.decode_single(state, outer, is_compact)? + } + RustTypeMarker::Number => { + panic!("number decoding not possible"); } RustTypeMarker::U8 => { let num: u8 = if is_compact { - let num: Compact = Decode::decode(&mut &data[*cursor..])?; - *cursor += Compact::compact_len(&u8::from(num)); + let num: Compact = state.decode()?; num.into() } else { - let num: u8 = Decode::decode(&mut &data[*cursor..])?; - *cursor += 1; + let num: u8 = state.decode()?; num }; num.into() } RustTypeMarker::U16 => { + log::trace!("Decoding u16"); let num: u16 = if is_compact { - let num: Compact = Decode::decode(&mut &data[*cursor..])?; - *cursor += Compact::compact_len(&u16::from(num)); + let num: Compact = state.decode()?; num.into() } else { - let num: u16 = Decode::decode(&mut &data[*cursor..])?; - *cursor += 2; + let num: u16 = state.decode()?; num }; num.into() } RustTypeMarker::U32 => { + log::trace!("Decoding u32"); + state.observe(line!()); let num: u32 = if is_compact { - let num: Compact = Decode::decode(&mut &data[*cursor..])?; - let len = Compact::compact_len(&u32::from(num)); - log::trace!("Compact len: {}", len); - *cursor += len; + let num: Compact = state.decode()?; num.into() } else { - let num: u32 = Decode::decode(&mut &data[*cursor..])?; - *cursor += 4; + let num: u32 = state.decode()?; + log::trace!("u32:{}", num); num }; num.into() } RustTypeMarker::U64 => { - let num: u64 = if is_compact { - let num: Compact = Decode::decode(&mut &data[*cursor..])?; - *cursor += Compact::compact_len(&u64::from(num)); + log::trace!("Decoding u64"); + let num = if is_compact { + let num: Compact = state.decode()?; num.into() } else { - let num: u64 = Decode::decode(&mut &data[*cursor..])?; - *cursor += 8; + let num: u64 = state.decode()?; num }; num.into() } RustTypeMarker::U128 => { - log::trace!("data = {:?}", &data[*cursor..]); - let num: u128 = if is_compact { - let num: Compact = Decode::decode(&mut &data[*cursor..])?; - *cursor += Compact::compact_len(&u128::from(num)); + log::trace!("Decoding u128"); + state.observe(line!()); + let num = if is_compact { + let num: Compact = state.decode()?; num.into() } else { - let num: u128 = Decode::decode(&mut &data[*cursor..])?; - *cursor += 16; + let num: u128 = state.decode()?; num }; num.into() } - RustTypeMarker::USize => { - panic!("usize decoding not possible!") - /* let size = std::mem::size_of::(); - let num: usize = - Decode::decode(&mut &data[*cursor..=*cursor+size])?; - *cursor += std::mem::size_of::(); - num.into() - */ - } RustTypeMarker::I8 => { - let num: i8 = if is_compact { unimplemented!() } else { Decode::decode(&mut &data[*cursor..])? }; - *cursor += 1; + log::trace!("Decoding i8"); + let num: i8 = if is_compact { unimplemented!() } else { state.decode()? }; num.into() } RustTypeMarker::I16 => { - let num: i16 = if is_compact { unimplemented!() } else { Decode::decode(&mut &data[*cursor..])? }; - *cursor += 2; + log::trace!("Decoding i16"); + let num: i16 = if is_compact { unimplemented!() } else { state.decode()? }; num.into() } RustTypeMarker::I32 => { - let num: i32 = if is_compact { unimplemented!() } else { Decode::decode(&mut &data[*cursor..])? }; - *cursor += 4; + log::trace!("Decoding i32"); + let num: i32 = if is_compact { unimplemented!() } else { state.decode()? }; num.into() } RustTypeMarker::I64 => { + log::trace!("Decoding i64"); let num: i64 = if is_compact { // let num: Compact = Decode::decode(&mut &data[*cursor..*cursor+8])?; // num.into() unimplemented!() } else { - Decode::decode(&mut &data[*cursor..])? + state.decode()? }; - *cursor += 8; num.into() } RustTypeMarker::I128 => { - let num: i128 = if is_compact { unimplemented!() } else { Decode::decode(&mut &data[*cursor..])? }; - *cursor += 16; - num.into() - } - RustTypeMarker::ISize => { - panic!("isize decoding impossible!") - /* - let idx = std::mem::size_of::(); - let num: isize = - Decode::decode(&mut &data[*cursor..=*cursor + idx])?; - *cursor += std::mem::size_of::(); - num.into() - */ - } - RustTypeMarker::F32 => { - /* - let num: f32 = Decode::decode(&mut &data[*cursor..=*cursor + 4])?; - *cursor += 5; + log::trace!("Decoding i128"); + let num: i128 = if is_compact { unimplemented!() } else { state.decode()? }; num.into() - */ - panic!("f32 decoding impossible!"); } - RustTypeMarker::F64 => { - /* - let num: f64 = Decode::decode(&mut &data[*cursor..=*cursor + 8])?; - *cursor += 9; - num.into() - */ - panic!("f64 decoding impossible!"); - } - RustTypeMarker::String => unimplemented!(), RustTypeMarker::Bool => { - let boo: bool = Decode::decode(&mut &data[*cursor..=*cursor])?; - *cursor += 1; + log::trace!("Decoding boolean"); + let boo: bool = state.decode()?; // . - . // ( o o ) // | 0 \ @@ -625,75 +780,60 @@ impl Decoder { /// These types override anything defined in JSON /// Tries to decode a type that is native to substrate /// for example, H256. Returns none if type cannot be deduced - /// Supported types: - /// - H256 - /// - H512 - // TODO: test this with the substrate types used fn decode_sub_type( &self, - spec: SpecVersion, + state: &mut DecodeState, ty: &str, - data: &[u8], - cursor: &mut usize, is_compact: bool, ) -> Result, Error> { match ty { // checks if the metadata includes types for the SignedExtensions // If not defaults to whatever is in extrinsics.json "SignedExtra" => { - let meta = self.versions.get(&spec).ok_or(format!("Metadata for spec {} not found", spec))?; + log::trace!("Decoding SignedExtra"); + let meta = + self.versions.get(&state.spec).ok_or(format!("Metadata for spec {} not found", state.spec))?; if let Some(extensions) = meta.signed_extensions() { let extensions = RustTypeMarker::Tuple(extensions.to_vec()); - self.decode_single("", spec, &extensions, data, cursor, is_compact).map(Option::Some) + self.decode_single(state, &extensions, is_compact).map(Option::Some) } else { let ty = self .types - .get_extrinsic_ty(self.chain.as_str(), spec, "SignedExtra") + .get_extrinsic_ty(self.chain.as_str(), state.spec, "SignedExtra") .ok_or_else(|| Error::from("Could not find type `SignedExtra`"))?; - self.decode_single("", spec, ty, data, cursor, is_compact).map(Option::Some) + self.decode_single(state, ty, is_compact).map(Option::Some) } } // identity info may be added to in the future "IdentityInfo" => { + log::trace!("Decoding IdentityInfo"); let additional = self.decode_single( - "identity", - spec, + state, &RustTypeMarker::Std(CommonTypes::Vec(Box::new(RustTypeMarker::TypePointer( "IdentityInfoAdditional".to_string(), )))), - data, - cursor, is_compact, )?; - let display = self - .decode_sub_type(spec, "Data", data, cursor, is_compact)? - .ok_or_else(|| Error::from("Data not resolved"))?; - let legal = self - .decode_sub_type(spec, "Data", data, cursor, is_compact)? - .ok_or_else(|| Error::from("Data not resolved"))?; - let web = self - .decode_sub_type(spec, "Data", data, cursor, is_compact)? - .ok_or_else(|| Error::from("Data not resolved"))?; - let riot = self - .decode_sub_type(spec, "Data", data, cursor, is_compact)? - .ok_or_else(|| Error::from("Data not resolved"))?; - let email = self - .decode_sub_type(spec, "Data", data, cursor, is_compact)? - .ok_or_else(|| Error::from("Data not resolved"))?; + let display = + self.decode_sub_type(state, "Data", is_compact)?.ok_or_else(|| Error::from("Data not resolved"))?; + let legal = + self.decode_sub_type(state, "Data", is_compact)?.ok_or_else(|| Error::from("Data not resolved"))?; + let web = + self.decode_sub_type(state, "Data", is_compact)?.ok_or_else(|| Error::from("Data not resolved"))?; + let riot = + self.decode_sub_type(state, "Data", is_compact)?.ok_or_else(|| Error::from("Data not resolved"))?; + let email = + self.decode_sub_type(state, "Data", is_compact)?.ok_or_else(|| Error::from("Data not resolved"))?; let pgp_fingerprint = self.decode_single( - "identity", - spec, + state, &RustTypeMarker::Std(CommonTypes::Option(Box::new(RustTypeMarker::TypePointer( "H160".to_string(), )))), - data, - cursor, is_compact, )?; - let image = self - .decode_sub_type(spec, "Data", data, cursor, is_compact)? - .ok_or_else(|| Error::from("Data not resolved"))?; - let twitter = self.decode_sub_type(spec, "Data", data, cursor, is_compact); + let image = + self.decode_sub_type(state, "Data", is_compact)?.ok_or_else(|| Error::from("Data not resolved"))?; + let twitter = self.decode_sub_type(state, "Data", is_compact); Ok(Some(SubstrateType::Struct(vec![ StructField::new(Some("additional"), additional), @@ -711,69 +851,65 @@ impl Decoder { ]))) } "Data" => { - log::trace!("Data::cursor={}", *cursor); - let identity_data: pallet_identity::Data = Decode::decode(&mut &data[*cursor..])?; - match &identity_data { - pallet_identity::Data::None => (), - pallet_identity::Data::Raw(v) => *cursor += v.len(), - _ => *cursor += 32, - }; - // for the enum byte - *cursor += 1; + log::trace!("Decoding Data"); + let identity_data: substrate_types::Data = state.decode()?; Ok(Some(SubstrateType::Data(identity_data))) } + "IdentityFields" => { + log::trace!("Decoding Identity Fields"); + // identity field are just bitflags that can be interpreted by a frontend + let field: u64 = state.decode()?; + Ok(Some(SubstrateType::IdentityField(field))) + } + "BitVec" => { + log::trace!("Decoding BitVec"); + let bit_vec: bitvec::vec::BitVec = state.decode()?; + Ok(Some(SubstrateType::BitVec(bit_vec))) + } "Call" | "GenericCall" => { - let types = self.decode_call(spec, data, cursor)?; + log::trace!("Decoding Call | GenericCall"); + state.load_module()?; + let types = self.decode_call(state)?; + log::trace!("Call is {:?}", types); Ok(Some(SubstrateType::Call(types))) } "GenericVote" => { - let vote: pallet_democracy::Vote = Decode::decode(&mut &data[*cursor..])?; - // a vote is one byte - *cursor += 1; + log::trace!("Decoding GenericVote"); + let vote: pallet_democracy::Vote = state.decode()?; Ok(Some(SubstrateType::GenericVote(vote))) } // Old Address Format for backwards-compatibility https://github.com/paritytech/substrate/pull/7380 "Lookup" | "GenericAddress" | "GenericLookupSource" | "GenericAccountId" => { - // a specific type that is ::Lookup concatenated to just 'Lookup' - log::trace!("cursor={}, data length={}", cursor, data.len()); - - let val: substrate_types::Address = decode_old_address(data, cursor)?; + log::trace!("Decoding Lookup | GenericAddress | GenericLookupSource | GenericAccountId"); + state.observe(line!()); + let val: substrate_types::Address = decode_old_address(state)?; + log::trace!("Decode Successful {:?}", &val); Ok(Some(SubstrateType::Address(val))) } + "::Source" => { + log::trace!("Decoding ::Source"); + state.observe(line!()); + Ok(Some(self.decode_single(state, &RustTypeMarker::TypePointer("LookupSource".into()), is_compact)?)) + } "GenericMultiAddress" => { - let val: substrate_types::Address = Decode::decode(&mut &data[*cursor..])?; - let cursor_offset = match &val { - substrate_types::Address::Id(_) => 32, - substrate_types::Address::Index(_) => 1, - substrate_types::Address::Raw(v) => v.len(), - substrate_types::Address::Address32(_) => 32, - substrate_types::Address::Address20(_) => 20, - }; - *cursor += cursor_offset; + let val: substrate_types::Address = state.decode()?; + log::trace!("Address: {:?}", val); Ok(Some(SubstrateType::Address(val))) } "Era" => { - log::trace!("ERA DATA: {:X?}", &data[*cursor..]); - let val: runtime_primitives::generic::Era = Decode::decode(&mut &data[*cursor..])?; + log::trace!("ERA DATA: {:X?}", &state.data[state.cursor()]); + let val: runtime_primitives::generic::Era = state.decode()?; log::trace!("Resolved Era: {:?}", val); - match val { - // although phase and period are both u64, era is Encoded - // in only two bytes - runtime_primitives::generic::Era::Immortal => *cursor += 1, - runtime_primitives::generic::Era::Mortal(_, _) => *cursor += 2, - }; Ok(Some(SubstrateType::Era(val))) } "H256" => { - let val: primitives::H256 = Decode::decode(&mut &data[*cursor..])?; - *cursor += 32; + let val: primitives::H256 = state.decode()?; Ok(Some(SubstrateType::H256(val))) } "H512" => { - let val: primitives::H512 = Decode::decode(&mut &data[*cursor..])?; + let val: primitives::H512 = state.decode()?; log::trace!("H512: {}", hex::encode(val.as_bytes())); - *cursor += 64; Ok(Some(SubstrateType::H512(val))) } _ => Ok(None), @@ -786,28 +922,24 @@ impl Decoder { /// in the encoded data fn scale_length(mut data: &[u8]) -> Result<(usize, usize), Error> { // alternative to `DecodeLength` trait, to avoid casting from a trait - let u32_length = u32::from(Compact::::decode(&mut data)?); - let length_of_prefix: usize = Compact::compact_len(&u32_length); - let usize_length = - usize::try_from(u32_length).map_err(|_| Error::from("Failed convert decoded size into usize."))?; - Ok((usize_length, length_of_prefix)) + let length = u32::from(Compact::::decode(&mut data)?); + let prefix = Compact::::compact_len(&length); + let length = usize::try_from(length).map_err(|_| Error::from("Failed convert decoded size into usize."))?; + Ok((length, prefix)) } - /// internal api to decode a vector of struct IdentityFields + /// internal api to decode a vector of struct fn decode_structlike( &self, fields: &[crate::StructField], - module: &str, - spec: SpecVersion, - data: &[u8], - cursor: &mut usize, + state: &mut DecodeState, is_compact: bool, ) -> Result, Error> { fields .iter() .map(|field| { log::trace!("name={:?}, field={}", field.name, field.ty); - let ty = self.decode_single(module, spec, &field.ty, data, cursor, is_compact)?; + let ty = self.decode_single(state, &field.ty, is_compact)?; Ok(StructField { name: Some(field.name.clone()), ty }) }) .collect::, Error>>() @@ -816,7 +948,7 @@ impl Decoder { /// Decodes old address pre-refactor (https://github.com/paritytech/substrate/pull/7380) /// and converts it to a MultiAddress, where "old" here means anything before v0.8.26 or 26/2026/46 on polkadot/kusama/westend respectively. -fn decode_old_address(data: &[u8], cursor: &mut usize) -> Result { +fn decode_old_address(state: &DecodeState) -> Result { /// Kept around for backwards-compatibility with old address struct fn need_more_than(a: T, b: T) -> Result { if a < b { @@ -827,33 +959,36 @@ fn decode_old_address(data: &[u8], cursor: &mut usize) -> Result { inc = 0; substrate_types::Address::Index(x as u32) } 0xfc => { inc = 2; - substrate_types::Address::Index(need_more_than(0xef, u16::decode(&mut &data[(*cursor + 1)..])?)? as u32) + substrate_types::Address::Index( + need_more_than(0xef, u16::decode(&mut &state.data[(state.cursor())..])?)? as u32 + ) } 0xfd => { inc = 4; - substrate_types::Address::Index(need_more_than(0xffff, u32::decode(&mut &data[(*cursor + 1)..])?)?) + substrate_types::Address::Index(need_more_than(0xffff, u32::decode(&mut &state.data[(state.cursor())..])?)?) } 0xfe => { inc = 8; substrate_types::Address::Index(need_more_than( 0xffff_ffff_u32, - Decode::decode(&mut &data[(*cursor + 1)..])?, + Decode::decode(&mut &state.data[(state.cursor())..])?, )?) } 0xff => { inc = 32; - substrate_types::Address::Id(Decode::decode(&mut &data[(*cursor + 1)..])?) + substrate_types::Address::Id(Decode::decode(&mut &state.data[(state.cursor())..])?) } _ => return Err(Error::Fail("Invalid Address".to_string())), }; - *cursor += inc + 1; // +1 for byte 0x00-0xff + state.add(inc); Ok(addr) } @@ -861,7 +996,9 @@ fn decode_old_address(data: &[u8], cursor: &mut usize) -> Result Option<&RustTypeMarker> { + None + } + fn get_extrinsic_ty(&self, _chain: &str, _spec: u32, _ty: &str) -> Option<&RustTypeMarker> { None } @@ -895,7 +1036,7 @@ mod tests { let mut decoder = Decoder::new(GenericTypes, Chain::Kusama); let rt_version = test_suite::mock_runtime(0); let meta = meta_test_suite::test_metadata(); - decoder.register_version(rt_version.spec_version.clone(), &meta); + decoder.register_version(rt_version.spec_version, &meta); let _other_meta = decoder.get_version_metadata(rt_version.spec_version); assert_eq!(Some(&meta), _other_meta.clone()) } @@ -914,10 +1055,11 @@ mod tests { ( $v: expr, $x:expr, $r: expr) => {{ let val = $v.encode(); let decoder = Decoder::new(GenericTypes, Chain::Kusama); - let res = decoder.decode_single("", 1031, &$x, val.as_slice(), &mut 0, false).unwrap(); - + let meta = meta_test_suite::test_metadata(); + let mut state = DecodeState::new(None, None, &meta, 0, 1031, val.as_slice()); + let res = decoder.decode_single(&mut state, &$x, false).unwrap(); assert_eq!($r, res) - }}; + }}; } #[test] @@ -1059,11 +1201,11 @@ mod tests { decode_test!( val, RustTypeMarker::Enum(vec![ - EnumField::new(None, crate::StructUnitOrTuple::Unit("Zoo".into())), - EnumField::new(None, crate::StructUnitOrTuple::Unit("Wraith".into())), - EnumField::new(None, crate::StructUnitOrTuple::Unit("Spree".into())), + RustEnumField::new("Zoo".into(), None), + RustEnumField::new("Wraith".into(), None), + RustEnumField::new("Spree".into(), None), ]), - SubstrateType::Enum(StructUnitOrTuple::Unit("Wraith".into())) + SubstrateType::Enum(EnumField::new("Wraith".into(), None)) ); } @@ -1081,19 +1223,10 @@ mod tests { decode_test!( val, RustTypeMarker::Enum(vec![ - EnumField::new( - Some("Zoo".into()), - crate::StructUnitOrTuple::Tuple(RustTypeMarker::TypePointer("TestStruct".into(),)), - ), - EnumField::new( - Some("Wraith".into()), - crate::StructUnitOrTuple::Tuple(RustTypeMarker::TypePointer("TestStruct".into(),)), - ), + RustEnumField::new("Zoo".into(), Some(RustTypeMarker::TypePointer("TestStruct".into())),), + RustEnumField::new("Wraith".into(), Some(RustTypeMarker::TypePointer("TestStruct".into())),), ]), - SubstrateType::Enum(StructUnitOrTuple::Tuple { - name: "Wraith".into(), - ty: Box::new(SubstrateType::I128(0x1337)) - }) + SubstrateType::Enum(EnumField::new("Wraith".into(), Some(Box::new(SubstrateType::I128(0x1337))))) ); } @@ -1109,34 +1242,48 @@ mod tests { decode_test!( val, RustTypeMarker::Enum(vec![ - EnumField::new( - Some("Zoo".into()), - crate::StructUnitOrTuple::Struct(vec![ + RustEnumField::new( + "Zoo".into(), + Some(RustTypeMarker::Struct(vec![ crate::StructField::new( "name", RustTypeMarker::Std(CommonTypes::Vec(Box::new(RustTypeMarker::U8,))), ), crate::StructField::new("id", RustTypeMarker::U32), - ]), + ])), ), - EnumField::new( - Some("Wraith".into()), - crate::StructUnitOrTuple::Struct(vec![ + RustEnumField::new( + "Wraith".into(), + Some(RustTypeMarker::Struct(vec![ crate::StructField::new( "name", RustTypeMarker::Std(CommonTypes::Vec(Box::new(RustTypeMarker::U16,))), ), crate::StructField::new("id", RustTypeMarker::U64), - ]), + ])), ), ]), - SubstrateType::Enum(StructUnitOrTuple::Struct(vec![ - StructField { - name: Some("name".into()), - ty: SubstrateType::Composite(vec![SubstrateType::U16(0x13), SubstrateType::U16(0x37)]) - }, - StructField { name: Some("id".into()), ty: SubstrateType::U64(15) } - ])) + SubstrateType::Enum(EnumField::new( + "Wraith".into(), + Some(Box::new(SubstrateType::Struct(vec![ + StructField { + name: Some("name".into()), + ty: SubstrateType::Composite(vec![SubstrateType::U16(0x13), SubstrateType::U16(0x37)]) + }, + StructField { name: Some("id".into()), ty: SubstrateType::U64(15) } + ]))) + )) ); } + + #[test] + fn should_chunk_extrinsic() { + let test = vec![vec![0u8, 1, 2], vec![3, 4, 5], vec![6, 7, 8]]; + let encoded: Vec = test.encode(); + let (_length, prefix) = Decoder::scale_length(encoded.as_slice()).unwrap(); // get the overall length first + let mut chunked = ChunkedExtrinsic::new(&encoded[prefix..]); + assert_eq!(chunked.next(), Some(vec![0, 1, 2].as_slice())); + assert_eq!(chunked.next(), Some(vec![3, 4, 5].as_slice())); + assert_eq!(chunked.next(), Some(vec![6, 7, 8].as_slice())); + } } diff --git a/core/src/decoder/metadata.rs b/core/src/decoder/metadata.rs index ea9e626a..2bd76a7c 100644 --- a/core/src/decoder/metadata.rs +++ b/core/src/decoder/metadata.rs @@ -33,18 +33,19 @@ mod version_09; mod version_10; mod version_11; mod version_12; -mod versions; +mod version_13; + +pub use frame_metadata::{decode_different::DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed}; use super::storage::{StorageInfo, StorageLookupTable}; use crate::RustTypeMarker; use codec::{Decode, Encode, EncodeAsRef, HasCompact}; -// use codec411::Decode as OldDecode; use primitives::{storage::StorageKey, twox_128}; -use runtime_metadata_latest::{StorageEntryModifier, StorageHasher}; +use serde::{Deserialize, Serialize}; use std::{ collections::{HashMap, HashSet}, - convert::TryInto, + convert::{TryFrom, TryInto}, fmt, marker::PhantomData, str::FromStr, @@ -95,11 +96,11 @@ pub enum ModuleIndex { /// Metadata struct encompassing calls, storage, and events pub struct Metadata { /// Hashmap of Modules (name -> module-specific metadata) - modules: HashMap>, + modules: HashMap>, /// modules by their index in the event enum modules_by_event_index: HashMap, /// modules by their index in the Call Enum - modules_by_call_index: HashMap, + pub modules_by_call_index: HashMap, /// Optional extrinsic metadata. Only chains which use meta /// version 11+ support this. extrinsics: Option, @@ -123,7 +124,7 @@ impl From<&Metadata> for Metadata { } } -impl Metadata { +impl<'a> Metadata { /// Create a new Metadata type from raw encoded bytes /// /// # Panics @@ -142,11 +143,6 @@ impl Metadata { let version = bytes[4]; match version { - /* 0x07 => { - let meta: runtime_metadata07::RuntimeMetadataPrefixed = - OldDecode::decode(&mut &*bytes).expect("Decode failed"); - meta.try_into().expect("Conversion failed") - } */ 0x08 => { log::debug!("Metadata V8"); let meta: runtime_metadata08::RuntimeMetadataPrefixed = @@ -173,10 +169,22 @@ impl Metadata { } 0xC => { log::debug!("Metadata V12"); - let meta: runtime_metadata_latest::RuntimeMetadataPrefixed = + let meta: frame_metadata::RuntimeMetadataPrefixed = Decode::decode(&mut &*bytes).expect("Decode failed"); meta.try_into().expect("Conversion failed") } + 0xD => { + log::debug!("Metadata V13"); + let meta: frame_metadata::RuntimeMetadataPrefixed = + Decode::decode(&mut &*bytes).expect("decode failed"); + meta.try_into().expect("Conversion failed") + } + 0xE => { + log::debug!("Metadata V14"); + let meta: frame_metadata::RuntimeMetadataPrefixed = + Decode::decode(&mut &*bytes).expect("decode failed"); + meta.try_into().expect("Conversion failed") + } /* TODO remove panics */ e => panic!("substrate metadata version {} is unknown, invalid or unsupported", e), } @@ -218,21 +226,21 @@ impl Metadata { } /// get a module by it's index - pub fn module_by_index(&self, module_index: ModuleIndex) -> Result, MetadataError> { + pub fn module_by_index(&'a self, module_index: ModuleIndex) -> Result<&'a ModuleMetadata, MetadataError> { Ok(match module_index { ModuleIndex::Call(i) => { let name = self .modules_by_call_index .get(&i) .ok_or(MetadataError::ModuleIndexNotFound(ModuleIndex::Call(i)))?; - self.modules.get(name).ok_or_else(|| MetadataError::ModuleNotFound(name.to_string()))?.clone() + self.modules.get(name).ok_or_else(|| MetadataError::ModuleNotFound(name.to_string()))? } ModuleIndex::Event(i) => { let name = self .modules_by_event_index .get(&i) .ok_or(MetadataError::ModuleIndexNotFound(ModuleIndex::Event(i)))?; - self.modules.get(name).ok_or_else(|| MetadataError::ModuleNotFound(name.to_string()))?.clone() + self.modules.get(name).ok_or_else(|| MetadataError::ModuleNotFound(name.to_string()))? } ModuleIndex::Storage(_) => { // TODO remove panics @@ -254,9 +262,8 @@ impl Metadata { StorageLookupTable::new(lookup) } - fn generate_key>(prefix: S) -> Vec { - let prefix: String = prefix.into(); - prefix.split_ascii_whitespace().map(|s| twox_128(s.as_bytes()).to_vec()).flatten().collect() + fn generate_key>(prefix: S) -> Vec { + prefix.as_ref().split_ascii_whitespace().map(|s| twox_128(s.as_bytes()).to_vec()).flatten().collect() } /// print out a detailed but human readable description of the module @@ -421,6 +428,17 @@ impl fmt::Display for CallArgMetadata { } } +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, Serialize, Deserialize)] +pub enum StorageHasher { + Blake2_128, + Blake2_256, + Blake2_128Concat, + Twox128, + Twox256, + Twox64Concat, + Identity, +} + #[derive(Clone, Debug, PartialEq)] pub enum StorageType { Plain(RustTypeMarker), @@ -437,6 +455,17 @@ pub enum StorageType { value: RustTypeMarker, key2_hasher: StorageHasher, }, + NMap { + keys: Vec, + hashers: Vec, + value: RustTypeMarker, + }, +} + +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] +pub enum StorageEntryModifier { + Optional, + Default, } #[derive(Clone, Debug, PartialEq)] @@ -554,6 +583,19 @@ impl EventArg { } } +impl TryFrom for Metadata { + type Error = Error; + + fn try_from(metadata: RuntimeMetadataPrefixed) -> Result { + match metadata.1 { + RuntimeMetadata::V12(meta) => meta.try_into(), + RuntimeMetadata::V13(meta) => meta.try_into(), + RuntimeMetadata::V14(_meta) => unimplemented!(), + _ => Err(Error::InvalidVersion), + } + } +} + #[derive(Error, Debug)] pub enum Error { #[error("Invalid Prefix")] diff --git a/core/src/decoder/metadata/test_suite.rs b/core/src/decoder/metadata/test_suite.rs index f33bb5a2..080341a7 100644 --- a/core/src/decoder/metadata/test_suite.rs +++ b/core/src/decoder/metadata/test_suite.rs @@ -72,7 +72,7 @@ fn storage_mock() -> HashMap { let mut map = HashMap::new(); let moment = RustTypeMarker::TypePointer("T::Moment".to_string()); let precision = RustTypeMarker::U32; - let usize_t = RustTypeMarker::USize; + let u64_t = RustTypeMarker::U64; map.insert( "TestStorage0".to_string(), @@ -90,7 +90,7 @@ fn storage_mock() -> HashMap { StorageMetadata { prefix: "TestStorage1".to_string(), modifier: StorageEntryModifier::Default, - ty: StorageType::Plain(usize_t), + ty: StorageType::Plain(u64_t), default: vec![0, 0, 0, 0, 0, 0, 0, 0], documentation: vec!["Some Kind of docs 2".to_string()], }, @@ -150,14 +150,6 @@ fn call_mock() -> HashMap { }], }, ); - map.insert( - "TestCall3".to_string(), - CallMetadata { - name: "foo_function3".to_string(), - index: 0, - arguments: vec![CallArgMetadata { name: "foo_arg".to_string(), ty: RustTypeMarker::F32 }], - }, - ); map } diff --git a/core/src/decoder/metadata/version_07.rs b/core/src/decoder/metadata/version_07.rs deleted file mode 100644 index 3c0a1956..00000000 --- a/core/src/decoder/metadata/version_07.rs +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright 2019 Parity Technologies (UK) Ltd. -// This file is part of substrate-desub. -// -// substrate-desub is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// substrate-desub is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with substrate-desub. If not, see . - -// taken directly and modified from substrate-subxt: -// https://github.com/paritytech/substrate-subxt - -use super::{ - CallArgMetadata, CallMetadata, Error, EventArg, Metadata, ModuleEventMetadata, - ModuleMetadata, StorageMetadata, -}; -use crate::regex; -use runtime_metadata07::{ - DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, - StorageEntryType, StorageHasher, META_RESERVED, -}; - -use std::{ - collections::{HashMap, HashSet}, - convert::TryFrom, -}; - -type DecodeDifferentStr = DecodeDifferent<&'static str, String>; -type LatestDecodeDifferentStr = - runtime_metadata_latest::DecodeDifferent<&'static str, String>; - -impl TryFrom for Metadata { - type Error = Error; - - fn try_from(metadata: RuntimeMetadataPrefixed) -> Result { - if metadata.0 != META_RESERVED { - // 'meta' warn endiannes - return Err(Error::InvalidPrefix); - } - let meta = match metadata.1 { - RuntimeMetadata::V7(meta) => meta, - _ => return Err(Error::InvalidVersion), - }; - let mut modules = HashMap::new(); - let (mut modules_by_event_index, mut modules_by_call_index) = - (HashMap::new(), HashMap::new()); - let (mut event_index, mut call_index) = (0, 0); - for (i, module) in convert(meta.modules)?.into_iter().enumerate() { - let module_name = convert(module.name.clone())?; - if module.calls.is_some() { - modules_by_call_index.insert(call_index, module_name.clone()); - call_index += 1; - } - if module.event.is_none() { - modules_by_event_index.insert(event_index, module_name.clone()); - event_index += 1; - } - let module_metadata = convert_module(i, module)?; - modules.insert(module_name, module_metadata); - } - Ok(Metadata { - modules, - modules_by_event_index, - modules_by_call_index, - }) - } -} - -fn convert(dd: DecodeDifferent) -> Result { - match dd { - DecodeDifferent::Decoded(value) => Ok(value), - _ => Err(Error::ExpectedDecoded), - } -} - -fn convert_module( - index: usize, - module: runtime_metadata07::ModuleMetadata, -) -> Result { - let mut storage_map = HashMap::new(); - if let Some(storage) = module.storage { - let storage = convert(storage)?; - let prefix = convert(storage.prefix)?; - for entry in convert(storage.entries)?.into_iter() { - let entry_name = convert(entry.name.clone())?; - let entry_prefix = format!("{} {}", prefix, entry_name); - let entry = convert_entry(entry_prefix, entry)?; - storage_map.insert(entry_name, entry); - } - } - let mut call_map = HashMap::new(); - if let Some(calls) = module.calls { - for (index, call) in convert(calls)?.into_iter().enumerate() { - let name = convert(call.name)?; - let args = convert(call.arguments)? - .iter() - .map(|a| { - let ty = convert(a.ty.clone())?; - let name = convert(a.name.clone())?; - let arg = CallArgMetadata { - name, - ty: regex::parse(&ty).ok_or(Error::InvalidType(ty))?, - }; - Ok(arg) - }) - .collect::, Error>>()?; - let meta = CallMetadata { - name: name.clone(), - index: index as u8, - arguments: args, - }; - call_map.insert(name, meta); - } - } - let mut event_map = HashMap::new(); - if let Some(events) = module.event { - for (index, event) in convert(events)?.into_iter().enumerate() { - event_map.insert(index as u8, convert_event(event)?); - } - } - - Ok(ModuleMetadata { - index: index as u8, - name: convert(module.name)?, - storage: storage_map, - calls: call_map, - events: event_map, - }) -} - -fn convert_event( - event: runtime_metadata07::EventMetadata, -) -> Result { - let name = convert(event.name)?; - let mut arguments = HashSet::new(); - for arg in convert(event.arguments)? { - let arg = arg.parse::()?; - arguments.insert(arg); - } - Ok(ModuleEventMetadata { name, arguments }) -} - -fn convert_entry( - prefix: String, - entry: runtime_metadata07::StorageEntryMetadata, -) -> Result { - let default = convert(entry.default)?; - let documentation = convert(entry.documentation)?; - Ok(StorageMetadata { - prefix, - modifier: StorageEntryModifierTemp(entry.modifier).into(), - ty: StorageEntryTypeTemp(entry.ty).into(), - default, - documentation: documentation - .iter() - .map(|s| s.to_string()) - .collect::>(), - }) -} - -/// Temporary struct for converting between `StorageEntryModifier` -/// and `runtime_metadata_latest::StorageEntryModifier` -struct StorageEntryModifierTemp(StorageEntryModifier); -impl From for runtime_metadata_latest::StorageEntryModifier { - fn from( - entry: StorageEntryModifierTemp, - ) -> runtime_metadata_latest::StorageEntryModifier { - let entry = entry.0; - match entry { - StorageEntryModifier::Optional => { - runtime_metadata_latest::StorageEntryModifier::Optional - } - StorageEntryModifier::Default => { - runtime_metadata_latest::StorageEntryModifier::Default - } - } - } -} - -/// Temporary struct for converting between `StorageEntryType` -/// and `runtime_metadata_latest::StorageEntryType` -struct StorageEntryTypeTemp(StorageEntryType); -impl From for runtime_metadata_latest::StorageEntryType { - fn from(entry: StorageEntryTypeTemp) -> runtime_metadata_latest::StorageEntryType { - let entry = entry.0; - match entry { - StorageEntryType::Plain(d) => { - runtime_metadata_latest::StorageEntryType::Plain( - TempDecodeDifferentStr(d).into(), - ) - } - StorageEntryType::Map { - hasher, - key, - value, - is_linked, - } => runtime_metadata_latest::StorageEntryType::Map { - hasher: TempStorageHasher(hasher).into(), - key: TempDecodeDifferentStr(key).into(), - value: TempDecodeDifferentStr(value).into(), - unused: is_linked, - }, - StorageEntryType::DoubleMap { - hasher, - key1, - key2, - value, - key2_hasher, - } => runtime_metadata_latest::StorageEntryType::DoubleMap { - hasher: TempStorageHasher(hasher).into(), - key1: TempDecodeDifferentStr(key1).into(), - key2: TempDecodeDifferentStr(key2).into(), - value: TempDecodeDifferentStr(value).into(), - key2_hasher: TempStorageHasher(key2_hasher).into(), - }, - } - } -} - -/// Temprorary struct for converting between `StorageHasher` and -/// `runtime_metadata_latest::StorageHasher` -struct TempStorageHasher(StorageHasher); -impl From for runtime_metadata_latest::StorageHasher { - fn from(hasher: TempStorageHasher) -> runtime_metadata_latest::StorageHasher { - let hasher = hasher.0; - match hasher { - StorageHasher::Blake2_128 => { - runtime_metadata_latest::StorageHasher::Blake2_128 - } - StorageHasher::Blake2_256 => { - runtime_metadata_latest::StorageHasher::Blake2_256 - } - StorageHasher::Twox128 => runtime_metadata_latest::StorageHasher::Twox128, - StorageHasher::Twox256 => runtime_metadata_latest::StorageHasher::Twox256, - StorageHasher::Twox64Concat => { - runtime_metadata_latest::StorageHasher::Twox64Concat - } - } - } -} - -/// Temporary struct for converting between `DecodeDifferentStr` and -/// `DecodeDifferentStrLatest` -struct TempDecodeDifferentStr(DecodeDifferentStr); -impl From for LatestDecodeDifferentStr { - fn from(decode_str: TempDecodeDifferentStr) -> LatestDecodeDifferentStr { - let decode_str = decode_str.0; - match decode_str { - DecodeDifferent::Encode(b) => { - runtime_metadata_latest::DecodeDifferent::Encode(b) - } - DecodeDifferent::Decoded(o) => { - runtime_metadata_latest::DecodeDifferent::Decoded(o) - } - } - } -} diff --git a/core/src/decoder/metadata/version_08.rs b/core/src/decoder/metadata/version_08.rs index 95419d79..5e94006b 100644 --- a/core/src/decoder/metadata/version_08.rs +++ b/core/src/decoder/metadata/version_08.rs @@ -18,22 +18,20 @@ // https://github.com/paritytech/substrate-subxt use super::{ - CallArgMetadata, CallMetadata, Error, EventArg, Metadata, ModuleEventMetadata, ModuleMetadata, StorageMetadata, + CallArgMetadata, CallMetadata, Error, EventArg, Metadata, ModuleEventMetadata, ModuleMetadata, + StorageEntryModifier as DesubStorageEntryModifier, StorageHasher as DesubStorageHasher, StorageMetadata, StorageType, }; use crate::regex; +use frame_metadata::decode_different::*; use runtime_metadata08::{ - DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, - META_RESERVED, + RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, META_RESERVED, }; use std::{ collections::{HashMap, HashSet}, convert::{TryFrom, TryInto}, }; -type DecodeDifferentStr = DecodeDifferent<&'static str, String>; -type LatestDecodeDifferentStr = runtime_metadata_latest::DecodeDifferent<&'static str, String>; - impl TryFrom for Metadata { type Error = Error; @@ -142,43 +140,30 @@ fn convert_entry(prefix: String, entry: runtime_metadata08::StorageEntryMetadata } /// Temporary struct for converting between `StorageEntryModifier` -/// and `runtime_metadata_latest::StorageEntryModifier` +/// and `DesubStorageEntryModifier` struct StorageEntryModifierTemp(StorageEntryModifier); -impl From for runtime_metadata_latest::StorageEntryModifier { - fn from(entry: StorageEntryModifierTemp) -> runtime_metadata_latest::StorageEntryModifier { +impl From for DesubStorageEntryModifier { + fn from(entry: StorageEntryModifierTemp) -> DesubStorageEntryModifier { let entry = entry.0; match entry { - StorageEntryModifier::Optional => runtime_metadata_latest::StorageEntryModifier::Optional, - StorageEntryModifier::Default => runtime_metadata_latest::StorageEntryModifier::Default, + StorageEntryModifier::Optional => DesubStorageEntryModifier::Optional, + StorageEntryModifier::Default => DesubStorageEntryModifier::Default, } } } /// Temprorary struct for converting between `StorageHasher` and -/// `runtime_metadata_latest::StorageHasher` +/// `DesubStorageHasher` struct TempStorageHasher(StorageHasher); -impl From for runtime_metadata_latest::StorageHasher { - fn from(hasher: TempStorageHasher) -> runtime_metadata_latest::StorageHasher { +impl From for DesubStorageHasher { + fn from(hasher: TempStorageHasher) -> DesubStorageHasher { let hasher = hasher.0; match hasher { - StorageHasher::Blake2_128 => runtime_metadata_latest::StorageHasher::Blake2_128, - StorageHasher::Blake2_256 => runtime_metadata_latest::StorageHasher::Blake2_256, - StorageHasher::Twox128 => runtime_metadata_latest::StorageHasher::Twox128, - StorageHasher::Twox256 => runtime_metadata_latest::StorageHasher::Twox256, - StorageHasher::Twox64Concat => runtime_metadata_latest::StorageHasher::Twox64Concat, - } - } -} - -/// Temporary struct for converting between `DecodeDifferentStr` and -/// `DecodeDifferentStrLatest` -struct TempDecodeDifferentStr(DecodeDifferentStr); -impl From for LatestDecodeDifferentStr { - fn from(decode_str: TempDecodeDifferentStr) -> LatestDecodeDifferentStr { - let decode_str = decode_str.0; - match decode_str { - DecodeDifferent::Encode(b) => runtime_metadata_latest::DecodeDifferent::Encode(b), - DecodeDifferent::Decoded(o) => runtime_metadata_latest::DecodeDifferent::Decoded(o), + StorageHasher::Blake2_128 => DesubStorageHasher::Blake2_128, + StorageHasher::Blake2_256 => DesubStorageHasher::Blake2_256, + StorageHasher::Twox128 => DesubStorageHasher::Twox128, + StorageHasher::Twox256 => DesubStorageHasher::Twox256, + StorageHasher::Twox64Concat => DesubStorageHasher::Twox64Concat, } } } diff --git a/core/src/decoder/metadata/version_09.rs b/core/src/decoder/metadata/version_09.rs index 790e6fa8..d2bb9c7b 100644 --- a/core/src/decoder/metadata/version_09.rs +++ b/core/src/decoder/metadata/version_09.rs @@ -18,22 +18,20 @@ // https://github.com/paritytech/substrate-subxt use super::{ - CallArgMetadata, CallMetadata, Error, EventArg, Metadata, ModuleEventMetadata, ModuleMetadata, StorageMetadata, + CallArgMetadata, CallMetadata, Error, EventArg, Metadata, ModuleEventMetadata, ModuleMetadata, + StorageEntryModifier as DesubStorageEntryModifier, StorageHasher as DesubStorageHasher, StorageMetadata, StorageType, }; use crate::regex; +use frame_metadata::decode_different::*; use runtime_metadata09::{ - DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, - META_RESERVED, + RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, META_RESERVED, }; use std::{ collections::{HashMap, HashSet}, convert::{TryFrom, TryInto}, }; -type DecodeDifferentStr = DecodeDifferent<&'static str, String>; -type LatestDecodeDifferentStr = runtime_metadata_latest::DecodeDifferent<&'static str, String>; - impl TryFrom for Metadata { type Error = Error; @@ -142,44 +140,31 @@ fn convert_entry(prefix: String, entry: runtime_metadata09::StorageEntryMetadata } /// Temporary struct for converting between `StorageEntryModifier` -/// and `runtime_metadata_latest::StorageEntryModifier` +/// and `DesubStorageEntryModifier` struct StorageEntryModifierTemp(StorageEntryModifier); -impl From for runtime_metadata_latest::StorageEntryModifier { - fn from(entry: StorageEntryModifierTemp) -> runtime_metadata_latest::StorageEntryModifier { +impl From for DesubStorageEntryModifier { + fn from(entry: StorageEntryModifierTemp) -> DesubStorageEntryModifier { let entry = entry.0; match entry { - StorageEntryModifier::Optional => runtime_metadata_latest::StorageEntryModifier::Optional, - StorageEntryModifier::Default => runtime_metadata_latest::StorageEntryModifier::Default, + StorageEntryModifier::Optional => DesubStorageEntryModifier::Optional, + StorageEntryModifier::Default => DesubStorageEntryModifier::Default, } } } /// Temprorary struct for converting between `StorageHasher` and -/// `runtime_metadata_latest::StorageHasher` +/// `DesubStorageHasher` struct TempStorageHasher(StorageHasher); -impl From for runtime_metadata_latest::StorageHasher { - fn from(hasher: TempStorageHasher) -> runtime_metadata_latest::StorageHasher { +impl From for DesubStorageHasher { + fn from(hasher: TempStorageHasher) -> DesubStorageHasher { let hasher = hasher.0; match hasher { - StorageHasher::Blake2_128 => runtime_metadata_latest::StorageHasher::Blake2_128, - StorageHasher::Blake2_256 => runtime_metadata_latest::StorageHasher::Blake2_256, - StorageHasher::Blake2_128Concat => runtime_metadata_latest::StorageHasher::Blake2_128Concat, - StorageHasher::Twox128 => runtime_metadata_latest::StorageHasher::Twox128, - StorageHasher::Twox256 => runtime_metadata_latest::StorageHasher::Twox256, - StorageHasher::Twox64Concat => runtime_metadata_latest::StorageHasher::Twox64Concat, - } - } -} - -/// Temporary struct for converting between `DecodeDifferentStr` and -/// `DecodeDifferentStrLatest` -struct TempDecodeDifferentStr(DecodeDifferentStr); -impl From for LatestDecodeDifferentStr { - fn from(decode_str: TempDecodeDifferentStr) -> LatestDecodeDifferentStr { - let decode_str = decode_str.0; - match decode_str { - DecodeDifferent::Encode(b) => runtime_metadata_latest::DecodeDifferent::Encode(b), - DecodeDifferent::Decoded(o) => runtime_metadata_latest::DecodeDifferent::Decoded(o), + StorageHasher::Blake2_128 => DesubStorageHasher::Blake2_128, + StorageHasher::Blake2_256 => DesubStorageHasher::Blake2_256, + StorageHasher::Blake2_128Concat => DesubStorageHasher::Blake2_128Concat, + StorageHasher::Twox128 => DesubStorageHasher::Twox128, + StorageHasher::Twox256 => DesubStorageHasher::Twox256, + StorageHasher::Twox64Concat => DesubStorageHasher::Twox64Concat, } } } diff --git a/core/src/decoder/metadata/version_10.rs b/core/src/decoder/metadata/version_10.rs index 522aad9b..0f5e0b46 100644 --- a/core/src/decoder/metadata/version_10.rs +++ b/core/src/decoder/metadata/version_10.rs @@ -15,22 +15,20 @@ // along with substrate-desub. If not, see . use super::{ - CallArgMetadata, CallMetadata, Error, EventArg, Metadata, ModuleEventMetadata, ModuleMetadata, StorageMetadata, + CallArgMetadata, CallMetadata, Error, EventArg, Metadata, ModuleEventMetadata, ModuleMetadata, + StorageEntryModifier as DesubStorageEntryModifier, StorageHasher as DesubStorageHasher, StorageMetadata, StorageType, }; use crate::regex; +use frame_metadata::decode_different::*; use runtime_metadata10::{ - DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, - META_RESERVED, + RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, META_RESERVED, }; use std::{ collections::{HashMap, HashSet}, convert::{TryFrom, TryInto}, }; -type DecodeDifferentStr = DecodeDifferent<&'static str, String>; -type LatestDecodeDifferentStr = runtime_metadata_latest::DecodeDifferent<&'static str, String>; - impl TryFrom for Metadata { type Error = Error; @@ -138,44 +136,31 @@ fn convert_entry(prefix: String, entry: runtime_metadata10::StorageEntryMetadata } /// Temporary struct for converting between `StorageEntryModifier` -/// and `runtime_metadata_latest::StorageEntryModifier` +/// and `DesubStorageEntryModifier` struct StorageEntryModifierTemp(StorageEntryModifier); -impl From for runtime_metadata_latest::StorageEntryModifier { - fn from(entry: StorageEntryModifierTemp) -> runtime_metadata_latest::StorageEntryModifier { +impl From for DesubStorageEntryModifier { + fn from(entry: StorageEntryModifierTemp) -> DesubStorageEntryModifier { let entry = entry.0; match entry { - StorageEntryModifier::Optional => runtime_metadata_latest::StorageEntryModifier::Optional, - StorageEntryModifier::Default => runtime_metadata_latest::StorageEntryModifier::Default, + StorageEntryModifier::Optional => DesubStorageEntryModifier::Optional, + StorageEntryModifier::Default => DesubStorageEntryModifier::Default, } } } /// Temprorary struct for converting between `StorageHasher` and -/// `runtime_metadata_latest::StorageHasher` +/// `DesubStorageHasher` struct TempStorageHasher(StorageHasher); -impl From for runtime_metadata_latest::StorageHasher { - fn from(hasher: TempStorageHasher) -> runtime_metadata_latest::StorageHasher { +impl From for DesubStorageHasher { + fn from(hasher: TempStorageHasher) -> DesubStorageHasher { let hasher = hasher.0; match hasher { - StorageHasher::Blake2_128 => runtime_metadata_latest::StorageHasher::Blake2_128, - StorageHasher::Blake2_128Concat => runtime_metadata_latest::StorageHasher::Blake2_128, - StorageHasher::Blake2_256 => runtime_metadata_latest::StorageHasher::Blake2_256, - StorageHasher::Twox128 => runtime_metadata_latest::StorageHasher::Twox128, - StorageHasher::Twox256 => runtime_metadata_latest::StorageHasher::Twox256, - StorageHasher::Twox64Concat => runtime_metadata_latest::StorageHasher::Twox64Concat, - } - } -} - -/// Temporary struct for converting between `DecodeDifferentStr` and -/// `DecodeDifferentStrLatest` -struct TempDecodeDifferentStr(DecodeDifferentStr); -impl From for LatestDecodeDifferentStr { - fn from(decode_str: TempDecodeDifferentStr) -> LatestDecodeDifferentStr { - let decode_str = decode_str.0; - match decode_str { - DecodeDifferent::Encode(b) => runtime_metadata_latest::DecodeDifferent::Encode(b), - DecodeDifferent::Decoded(o) => runtime_metadata_latest::DecodeDifferent::Decoded(o), + StorageHasher::Blake2_128 => DesubStorageHasher::Blake2_128, + StorageHasher::Blake2_128Concat => DesubStorageHasher::Blake2_128, + StorageHasher::Blake2_256 => DesubStorageHasher::Blake2_256, + StorageHasher::Twox128 => DesubStorageHasher::Twox128, + StorageHasher::Twox256 => DesubStorageHasher::Twox256, + StorageHasher::Twox64Concat => DesubStorageHasher::Twox64Concat, } } } diff --git a/core/src/decoder/metadata/version_11.rs b/core/src/decoder/metadata/version_11.rs index 4085a917..62465518 100644 --- a/core/src/decoder/metadata/version_11.rs +++ b/core/src/decoder/metadata/version_11.rs @@ -31,14 +31,14 @@ use super::{ CallArgMetadata, CallMetadata, Error, EventArg, ExtrinsicMetadata, Metadata, ModuleEventMetadata, ModuleMetadata, - StorageMetadata, StorageType, + StorageEntryModifier as DesubStorageEntryModifier, StorageHasher as DesubStorageHasher, StorageMetadata, + StorageType, }; use crate::{regex, RustTypeMarker}; +use frame_metadata::decode_different::*; use runtime_metadata11::{ - DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, - META_RESERVED, + RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryModifier, StorageEntryType, StorageHasher, META_RESERVED, }; - use std::{ collections::{HashMap, HashSet}, convert::{TryFrom, TryInto}, @@ -163,30 +163,30 @@ fn convert_entry(prefix: String, entry: runtime_metadata11::StorageEntryMetadata /// Temporary struct for converting between `StorageEntryModifier` /// and `runtime_metadata11::StorageEntryModifier` struct StorageEntryModifierTemp(StorageEntryModifier); -impl From for runtime_metadata_latest::StorageEntryModifier { - fn from(entry: StorageEntryModifierTemp) -> runtime_metadata_latest::StorageEntryModifier { +impl From for DesubStorageEntryModifier { + fn from(entry: StorageEntryModifierTemp) -> DesubStorageEntryModifier { let entry = entry.0; match entry { - StorageEntryModifier::Optional => runtime_metadata_latest::StorageEntryModifier::Optional, - StorageEntryModifier::Default => runtime_metadata_latest::StorageEntryModifier::Default, + StorageEntryModifier::Optional => DesubStorageEntryModifier::Optional, + StorageEntryModifier::Default => DesubStorageEntryModifier::Default, } } } /// Temprorary struct for converting between `StorageHasher` and -/// `runtime_metadata_latest::StorageHasher` +/// `DesubStorageHasher` struct TempStorageHasher(StorageHasher); -impl From for runtime_metadata_latest::StorageHasher { - fn from(hasher: TempStorageHasher) -> runtime_metadata_latest::StorageHasher { +impl From for DesubStorageHasher { + fn from(hasher: TempStorageHasher) -> DesubStorageHasher { let hasher = hasher.0; match hasher { - StorageHasher::Blake2_128 => runtime_metadata_latest::StorageHasher::Blake2_128, - StorageHasher::Blake2_128Concat => runtime_metadata_latest::StorageHasher::Blake2_128, - StorageHasher::Blake2_256 => runtime_metadata_latest::StorageHasher::Blake2_256, - StorageHasher::Twox128 => runtime_metadata_latest::StorageHasher::Twox128, - StorageHasher::Twox256 => runtime_metadata_latest::StorageHasher::Twox256, - StorageHasher::Twox64Concat => runtime_metadata_latest::StorageHasher::Twox64Concat, - StorageHasher::Identity => runtime_metadata_latest::StorageHasher::Identity, + StorageHasher::Blake2_128 => DesubStorageHasher::Blake2_128, + StorageHasher::Blake2_128Concat => DesubStorageHasher::Blake2_128, + StorageHasher::Blake2_256 => DesubStorageHasher::Blake2_256, + StorageHasher::Twox128 => DesubStorageHasher::Twox128, + StorageHasher::Twox256 => DesubStorageHasher::Twox256, + StorageHasher::Twox64Concat => DesubStorageHasher::Twox64Concat, + StorageHasher::Identity => DesubStorageHasher::Identity, } } } diff --git a/core/src/decoder/metadata/version_12.rs b/core/src/decoder/metadata/version_12.rs index ce936d38..9c8a7595 100644 --- a/core/src/decoder/metadata/version_12.rs +++ b/core/src/decoder/metadata/version_12.rs @@ -1,4 +1,4 @@ -// Copyright 2019 Parity Technologies (UK) Ltd. +// Copyright 2019-2021 Parity Technologies (UK) Ltd. // This file is part of substrate-desub. // // substrate-desub is free software: you can redistribute it and/or modify @@ -31,11 +31,18 @@ use super::{ CallArgMetadata, CallMetadata, Error, EventArg, ExtrinsicMetadata, Metadata, ModuleEventMetadata, ModuleMetadata, - StorageMetadata, StorageType, + StorageEntryModifier as DesubStorageEntryModifier, StorageHasher as DesubStorageHasher, StorageMetadata, + StorageType, }; use crate::{regex, RustTypeMarker}; -use runtime_metadata_latest::{ - DecodeDifferent, RuntimeMetadata, RuntimeMetadataPrefixed, StorageEntryType, META_RESERVED, + +use frame_metadata::{ + decode_different::DecodeDifferent, + v12::{ + EventMetadata as EventMetadatav12, ModuleMetadata as ModuleMetadatav12, RuntimeMetadataV12, + StorageEntryMetadata as StorageEntryMetadatav12, StorageEntryModifier as StorageEntryModifierv12, + StorageEntryType, StorageHasher as StorageHasherv12, + }, }; use std::{ @@ -43,43 +50,33 @@ use std::{ convert::{TryFrom, TryInto}, }; -impl TryFrom for Metadata { +impl TryFrom for Metadata { type Error = Error; - - fn try_from(metadata: RuntimeMetadataPrefixed) -> Result { - if metadata.0 != META_RESERVED { - // 'meta' warn endiannes - return Err(Error::InvalidPrefix); - } - let meta = match metadata.1 { - RuntimeMetadata::V12(meta) => meta, - _ => return Err(Error::InvalidVersion), - }; + fn try_from(metadata: RuntimeMetadataV12) -> Result { let mut modules = HashMap::new(); let (mut modules_by_event_index, mut modules_by_call_index) = (HashMap::new(), HashMap::new()); - let (mut event_index, mut call_index) = (0, 0); - for (i, module) in convert(meta.modules)?.into_iter().enumerate() { + let mut event_index = 0; + for module in convert(metadata.modules)?.into_iter() { let module_name = convert(module.name.clone())?; if module.calls.is_some() { - modules_by_call_index.insert(call_index, module_name.clone()); - call_index += 1; + modules_by_call_index.insert(module.index, module_name.clone()); } if module.event.is_none() { modules_by_event_index.insert(event_index, module_name.clone()); event_index += 1; } - let module_metadata = convert_module(i, module)?; + let module_metadata = convert_module(module)?; modules.insert(module_name, std::sync::Arc::new(module_metadata)); } let mut extensions: Vec = Vec::new(); - for ext in meta.extrinsic.signed_extensions.iter() { + for ext in metadata.extrinsic.signed_extensions.iter() { let name: String = convert(ext.clone())?; let ty = regex::parse(&name).ok_or(Error::InvalidType(name))?; extensions.push(ty); } - let extrinsics = ExtrinsicMetadata::new(meta.extrinsic.version, extensions); + let extrinsics = ExtrinsicMetadata::new(metadata.extrinsic.version, extensions); Ok(Metadata { modules, modules_by_event_index, modules_by_call_index, extrinsics: Some(extrinsics) }) } @@ -92,7 +89,7 @@ fn convert(dd: DecodeDifferent) -> Result Result { +fn convert_module(module: ModuleMetadatav12) -> Result { let mut storage_map = HashMap::new(); if let Some(storage) = module.storage { let storage = convert(storage)?; @@ -129,7 +126,7 @@ fn convert_module(index: usize, module: runtime_metadata_latest::ModuleMetadata) } Ok(ModuleMetadata { - index: index as u8, + index: module.index, name: convert(module.name)?, storage: storage_map, calls: call_map, @@ -137,7 +134,7 @@ fn convert_module(index: usize, module: runtime_metadata_latest::ModuleMetadata) }) } -fn convert_event(event: runtime_metadata_latest::EventMetadata) -> Result { +fn convert_event(event: EventMetadatav12) -> Result { let name = convert(event.name)?; let mut arguments = HashSet::new(); for arg in convert(event.arguments)? { @@ -147,21 +144,49 @@ fn convert_event(event: runtime_metadata_latest::EventMetadata) -> Result Result { +fn convert_entry(prefix: String, entry: StorageEntryMetadatav12) -> Result { let default = convert(entry.default)?; let documentation = convert(entry.documentation)?; Ok(StorageMetadata { prefix, - modifier: entry.modifier, + modifier: StorageEntryModifierTemp(entry.modifier).into(), ty: entry.ty.try_into()?, default, documentation: documentation.iter().map(|s| s.to_string()).collect::>(), }) } +/// Temporary struct for converting between `StorageEntryModifier` +/// and `DesubStorageEntryModifier` +struct StorageEntryModifierTemp(StorageEntryModifierv12); +impl From for DesubStorageEntryModifier { + fn from(entry: StorageEntryModifierTemp) -> DesubStorageEntryModifier { + let entry = entry.0; + match entry { + StorageEntryModifierv12::Optional => DesubStorageEntryModifier::Optional, + StorageEntryModifierv12::Default => DesubStorageEntryModifier::Default, + } + } +} + +/// Temprorary struct for converting between `StorageHasher` and +/// `DesubStorageHasher` +struct TempStorageHasher(StorageHasherv12); +impl From for DesubStorageHasher { + fn from(hasher: TempStorageHasher) -> DesubStorageHasher { + let hasher = hasher.0; + match hasher { + StorageHasherv12::Blake2_128 => DesubStorageHasher::Blake2_128, + StorageHasherv12::Blake2_128Concat => DesubStorageHasher::Blake2_128, + StorageHasherv12::Blake2_256 => DesubStorageHasher::Blake2_256, + StorageHasherv12::Twox128 => DesubStorageHasher::Twox128, + StorageHasherv12::Twox256 => DesubStorageHasher::Twox256, + StorageHasherv12::Twox64Concat => DesubStorageHasher::Twox64Concat, + StorageHasherv12::Identity => DesubStorageHasher::Identity, + } + } +} + impl TryFrom for StorageType { type Error = Error; fn try_from(entry: StorageEntryType) -> Result { @@ -174,7 +199,7 @@ impl TryFrom for StorageType { let key = convert(key)?; let value = convert(value)?; StorageType::Map { - hasher, + hasher: TempStorageHasher(hasher).into(), key: regex::parse(&key).ok_or(Error::InvalidType(key))?, value: regex::parse(&value).ok_or(Error::InvalidType(value))?, unused, @@ -185,11 +210,11 @@ impl TryFrom for StorageType { let key2 = convert(key2)?; let value = convert(value)?; StorageType::DoubleMap { - hasher, + hasher: TempStorageHasher(hasher).into(), key1: regex::parse(&key1).ok_or(Error::InvalidType(key1))?, key2: regex::parse(&key2).ok_or(Error::InvalidType(key2))?, value: regex::parse(&value).ok_or(Error::InvalidType(value))?, - key2_hasher, + key2_hasher: TempStorageHasher(key2_hasher).into(), } } }; diff --git a/core/src/decoder/metadata/version_13.rs b/core/src/decoder/metadata/version_13.rs new file mode 100644 index 00000000..1d247d3d --- /dev/null +++ b/core/src/decoder/metadata/version_13.rs @@ -0,0 +1,237 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// This file is part of substrate-desub. +// +// substrate-desub is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// substrate-desub is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with substrate-desub. If not, see . +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of substrate-desub. +// +// substrate-desub is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// substrate-desub is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with substrate-desub. If not, see . + +use super::{ + CallArgMetadata, CallMetadata, Error, EventArg, ExtrinsicMetadata, Metadata, ModuleEventMetadata, ModuleMetadata, + StorageEntryModifier as DesubStorageEntryModifier, StorageHasher as DesubStorageHasher, StorageMetadata, + StorageType, +}; +use crate::{regex, RustTypeMarker}; + +use frame_metadata::{ + decode_different::DecodeDifferent, + v13::{ + EventMetadata as EventMetadataV13, ModuleMetadata as ModuleMetadataV13, RuntimeMetadataV13, + StorageEntryMetadata as StorageEntryMetadataV13, StorageEntryModifier as StorageEntryModifierV13, + StorageEntryType, StorageHasher as StorageHasherV13, + }, +}; + +use std::{ + collections::{HashMap, HashSet}, + convert::{TryFrom, TryInto}, +}; + +impl TryFrom for Metadata { + type Error = Error; + + fn try_from(metadata: RuntimeMetadataV13) -> Result { + let mut modules = HashMap::new(); + let (mut modules_by_event_index, mut modules_by_call_index) = (HashMap::new(), HashMap::new()); + let mut event_index = 0; + for module in convert(metadata.modules)?.into_iter() { + let module_name = convert(module.name.clone())?; + if module.calls.is_some() { + modules_by_call_index.insert(module.index, module_name.clone()); + } + if module.event.is_none() { + modules_by_event_index.insert(event_index, module_name.clone()); + event_index += 1; + } + let module_metadata = convert_module(module)?; + modules.insert(module_name, std::sync::Arc::new(module_metadata)); + } + + let mut extensions: Vec = Vec::new(); + for ext in metadata.extrinsic.signed_extensions.iter() { + let name: String = convert(ext.clone())?; + let ty = regex::parse(&name).ok_or(Error::InvalidType(name))?; + extensions.push(ty); + } + + let extrinsics = ExtrinsicMetadata::new(metadata.extrinsic.version, extensions); + + Ok(Metadata { modules, modules_by_event_index, modules_by_call_index, extrinsics: Some(extrinsics) }) + } +} + +fn convert(dd: DecodeDifferent) -> Result { + match dd { + DecodeDifferent::Decoded(value) => Ok(value), + _ => Err(Error::ExpectedDecoded), + } +} + +fn convert_module(module: ModuleMetadataV13) -> Result { + let mut storage_map = HashMap::new(); + if let Some(storage) = module.storage { + let storage = convert(storage)?; + let prefix = convert(storage.prefix)?; + for entry in convert(storage.entries)?.into_iter() { + let entry_name = convert(entry.name.clone())?; + let entry_prefix = format!("{} {}", prefix, entry_name); + let entry = convert_entry(entry_prefix, entry)?; + storage_map.insert(entry_name, entry); + } + } + let mut call_map = HashMap::new(); + if let Some(calls) = module.calls { + for (index, call) in convert(calls)?.into_iter().enumerate() { + let name = convert(call.name)?; + let args = convert(call.arguments)? + .iter() + .map(|a| { + let ty = convert(a.ty.clone())?; + let name = convert(a.name.clone())?; + let arg = CallArgMetadata { name, ty: regex::parse(&ty).ok_or(Error::InvalidType(ty))? }; + Ok(arg) + }) + .collect::, Error>>()?; + let meta = CallMetadata { name: name.clone(), index: index as u8, arguments: args }; + call_map.insert(name, meta); + } + } + let mut event_map = HashMap::new(); + if let Some(events) = module.event { + for (index, event) in convert(events)?.into_iter().enumerate() { + event_map.insert(index as u8, convert_event(event)?); + } + } + + Ok(ModuleMetadata { + index: module.index, + name: convert(module.name)?, + storage: storage_map, + calls: call_map, + events: event_map, + }) +} + +fn convert_event(event: EventMetadataV13) -> Result { + let name = convert(event.name)?; + let mut arguments = HashSet::new(); + for arg in convert(event.arguments)? { + let arg = arg.parse::()?; + arguments.insert(arg); + } + Ok(ModuleEventMetadata { name, arguments }) +} + +fn convert_entry(prefix: String, entry: StorageEntryMetadataV13) -> Result { + let default = convert(entry.default)?; + let documentation = convert(entry.documentation)?; + Ok(StorageMetadata { + prefix, + modifier: StorageEntryModifierTemp(entry.modifier).into(), + ty: entry.ty.try_into()?, + default, + documentation: documentation.iter().map(|s| s.to_string()).collect::>(), + }) +} + +/// Temporary struct for converting between `StorageEntryModifier` +/// and `DesubStorageEntryModifier` +struct StorageEntryModifierTemp(StorageEntryModifierV13); +impl From for DesubStorageEntryModifier { + fn from(entry: StorageEntryModifierTemp) -> DesubStorageEntryModifier { + let entry = entry.0; + match entry { + StorageEntryModifierV13::Optional => DesubStorageEntryModifier::Optional, + StorageEntryModifierV13::Default => DesubStorageEntryModifier::Default, + } + } +} + +/// Temprorary struct for converting between `StorageHasher` and +/// `DesubStorageHasher` +struct TempStorageHasher(StorageHasherV13); +impl From for DesubStorageHasher { + fn from(hasher: TempStorageHasher) -> DesubStorageHasher { + let hasher = hasher.0; + match hasher { + StorageHasherV13::Blake2_128 => DesubStorageHasher::Blake2_128, + StorageHasherV13::Blake2_128Concat => DesubStorageHasher::Blake2_128, + StorageHasherV13::Blake2_256 => DesubStorageHasher::Blake2_256, + StorageHasherV13::Twox128 => DesubStorageHasher::Twox128, + StorageHasherV13::Twox256 => DesubStorageHasher::Twox256, + StorageHasherV13::Twox64Concat => DesubStorageHasher::Twox64Concat, + StorageHasherV13::Identity => DesubStorageHasher::Identity, + } + } +} + +impl TryFrom for StorageType { + type Error = Error; + fn try_from(entry: StorageEntryType) -> Result { + let entry = match entry { + StorageEntryType::Plain(v) => { + let ty = convert(v)?; + StorageType::Plain(regex::parse(&ty).ok_or(Error::InvalidType(ty))?) + } + StorageEntryType::Map { hasher, key, value, unused } => { + let key = convert(key)?; + let value = convert(value)?; + StorageType::Map { + hasher: TempStorageHasher(hasher).into(), + key: regex::parse(&key).ok_or(Error::InvalidType(key))?, + value: regex::parse(&value).ok_or(Error::InvalidType(value))?, + unused, + } + } + StorageEntryType::DoubleMap { hasher, key1, key2, value, key2_hasher } => { + let key1 = convert(key1)?; + let key2 = convert(key2)?; + let value = convert(value)?; + StorageType::DoubleMap { + hasher: TempStorageHasher(hasher).into(), + key1: regex::parse(&key1).ok_or(Error::InvalidType(key1))?, + key2: regex::parse(&key2).ok_or(Error::InvalidType(key2))?, + value: regex::parse(&value).ok_or(Error::InvalidType(value))?, + key2_hasher: TempStorageHasher(key2_hasher).into(), + } + } + StorageEntryType::NMap { keys, hashers, value } => { + let keys = convert(keys)?; + let hashers = convert(hashers)?; + let value = convert(value)?; + let hashers = + hashers.into_iter().map(|h| TempStorageHasher(h).into()).collect::>(); + let keys = keys + .into_iter() + .map(|k| regex::parse(&k).ok_or(Error::InvalidType(k))) + .collect::>()?; + let value = regex::parse(&value).ok_or(Error::InvalidType(value))?; + StorageType::NMap { hashers, keys, value } + } + }; + Ok(entry) + } +} diff --git a/core/src/decoder/metadata/versions.rs b/core/src/decoder/metadata/versions.rs deleted file mode 100644 index 8e9347cf..00000000 --- a/core/src/decoder/metadata/versions.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2019 Parity Technologies (UK) Ltd. -// This file is part of substrate-desub. -// -// substrate-desub is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// substrate-desub is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with substrate-desub. If not, see . diff --git a/core/src/decoder/storage.rs b/core/src/decoder/storage.rs index a3b8d818..93c80494 100644 --- a/core/src/decoder/storage.rs +++ b/core/src/decoder/storage.rs @@ -14,9 +14,8 @@ // You should have received a copy of the GNU General Public License // along with substrate-desub. If not, see . -use super::metadata::{ModuleMetadata, StorageMetadata}; +use super::metadata::{ModuleMetadata, StorageHasher, StorageMetadata}; use crate::RustTypeMarker; -use runtime_metadata_latest::StorageHasher; use serde::Serialize; use std::collections::HashMap; use std::sync::Arc; diff --git a/core/src/error.rs b/core/src/error.rs index 02c05815..c84552c6 100644 --- a/core/src/error.rs +++ b/core/src/error.rs @@ -18,6 +18,8 @@ pub enum Error { Regex(#[from] onig::Error), #[error("Conversion from {0} to {1} not possible")] Conversion(String, String), + #[error("Spec version {0} not present in Decoder")] + MissingSpec(u32), } impl From<&str> for Error { diff --git a/core/src/lib.rs b/core/src/lib.rs index 2072e76e..1df6490c 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2019 Parity Technologies (UK) Ltd. +// Copyright 2019-2021 Parity Technologies (UK) Ltd. // This file is part of substrate-desub. // // substrate-desub is free software: you can redistribute it and/or modify @@ -15,6 +15,7 @@ // along with substrate-desub. If not, see . #[forbid(unsafe_code)] +#[deny(unused)] pub mod decoder; mod error; pub mod regex; @@ -33,6 +34,10 @@ pub trait TypeDetective: fmt::Debug + dyn_clone::DynClone + Send + Sync { /// Get a 'RustTypeMarker' fn get(&self, chain: &str, spec: u32, module: &str, ty: &str) -> Option<&RustTypeMarker>; + /// Some types have a fallback type that may be decoded into if the original + /// type fails. + fn try_fallback(&self, module: &str, ty: &str) -> Option<&RustTypeMarker>; + /// get a type specific to decoding extrinsics fn get_extrinsic_ty(&self, chain: &str, spec: u32, ty: &str) -> Option<&RustTypeMarker>; } @@ -76,49 +81,23 @@ impl SetField { } } -/// TODO: Allow mixed struct-unit types #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)] pub struct EnumField { /// name of the Variant /// if the variant is a Unit enum, it will not have a name - pub variant_name: Option, - pub ty: StructUnitOrTuple, + pub name: String, + pub value: Option, } impl EnumField { - pub fn new(variant_name: Option, ty: StructUnitOrTuple) -> Self { - EnumField { variant_name, ty } - } -} - -#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)] -pub enum StructUnitOrTuple { - Struct(Vec), - Unit(String), - Tuple(RustTypeMarker), -} - -impl From for EnumField { - fn from(s: String) -> EnumField { - EnumField { variant_name: None, ty: StructUnitOrTuple::Unit(s) } + pub fn new(name: String, value: Option) -> Self { + EnumField { name, value } } } impl Display for EnumField { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut _enum = String::from("enum"); - match &self.ty { - StructUnitOrTuple::Struct(s) => { - for s in s.iter() { - _enum.push_str(&format!("{}, ", s)); - } - } - StructUnitOrTuple::Unit(u) => { - _enum.push_str(&format!("{}, ", u)); - } - StructUnitOrTuple::Tuple(v) => _enum.push_str(&format!("{} ", v)), - }; - write!(f, "{}", _enum) + write!(f, "enum[{}:{}]", self.name, self.value.as_ref().unwrap_or(&RustTypeMarker::Null)) } } @@ -180,6 +159,9 @@ pub enum RustTypeMarker { /// name of a type that exists elsewhere in type declarations TypePointer(String), + /// A unit type. A struct or the variant of an enum. + Unit(String), + /// Some Struct /// Field Name -> Field Type Struct(Vec), @@ -190,9 +172,7 @@ pub enum RustTypeMarker { /// A tuple type (max size 32) Tuple(Vec), - /// Some Enum - /// A Rust Enum that contains mixed "Struct" and Unit fields - /// will have unit fields as struct but with the type as "Null" + /// A Rust enum Enum(Vec), /// A sized array @@ -210,6 +190,8 @@ pub enum RustTypeMarker { /// A Generic Type, EX: HeartBeat /// Tuple of (OuterType, InnerType) Generic(Box, Box), + /// A Number for which the bit size is unknown + Number, /// primitive unsigned 8 bit integer U8, /// primitive unsigned 16 bit integer @@ -220,9 +202,6 @@ pub enum RustTypeMarker { U64, /// primitive unsigned 128 bit integer U128, - /// primitive unsigned word-sized integer - USize, - /// primitive signed 8 bit integer I8, /// primitive signed 16 bit integer @@ -233,20 +212,10 @@ pub enum RustTypeMarker { I64, /// primitive signed 128 bit integer I128, - /// primitive signed word-sized integer - ISize, - - /// primitive IEEE-spec 32-bit floating-point number - F32, - /// primitive IEEE-spec 64-bit floating-point number - F64, /// Boolean true/false type Bool, - /// String type - String, - /// Used for fields that don't exist (ex Unit variant in an enum with both /// units/structs) Null, @@ -268,6 +237,7 @@ impl Display for RustTypeMarker { let mut type_marker = String::from(""); match self { RustTypeMarker::TypePointer(t) => type_marker.push_str(t), + RustTypeMarker::Unit(u) => type_marker.push_str(u), RustTypeMarker::Struct(t) => { for substring in t.iter() { type_marker.push_str(&format!("{}, ", substring)) @@ -289,27 +259,19 @@ impl Display for RustTypeMarker { RustTypeMarker::Array { size, ty } => type_marker.push_str(&format!("[{};{}], ", ty, size)), RustTypeMarker::Std(t) => type_marker.push_str(&t.to_string()), RustTypeMarker::Generic(outer, inner) => type_marker.push_str(&format!("{}<{}>", outer, inner)), + RustTypeMarker::Number => type_marker.push_str("number"), RustTypeMarker::U8 => type_marker.push_str("u8"), RustTypeMarker::U16 => type_marker.push_str("u16"), RustTypeMarker::U32 => type_marker.push_str("u32"), RustTypeMarker::U64 => type_marker.push_str("u64"), RustTypeMarker::U128 => type_marker.push_str("u128"), - RustTypeMarker::USize => type_marker.push_str("usize"), RustTypeMarker::I8 => type_marker.push_str("i8"), RustTypeMarker::I16 => type_marker.push_str("i16"), RustTypeMarker::I32 => type_marker.push_str("i32"), RustTypeMarker::I64 => type_marker.push_str("i64"), RustTypeMarker::I128 => type_marker.push_str("i128"), - RustTypeMarker::ISize => type_marker.push_str("isize"), - - RustTypeMarker::F32 => type_marker.push_str("f32"), - RustTypeMarker::F64 => type_marker.push_str("f64"), - RustTypeMarker::Bool => type_marker.push_str("bool"), - - RustTypeMarker::String => type_marker.push_str("string"), - RustTypeMarker::Null => type_marker.push_str("null"), } write!(f, "{}", type_marker) diff --git a/core/src/regex.rs b/core/src/regex.rs index fa7a89b6..895b17f8 100644 --- a/core/src/regex.rs +++ b/core/src/regex.rs @@ -14,13 +14,13 @@ // You should have received a copy of the GNU General Public License // along with substrate-desub. If not, see . -// TODO: write tests for all 'parse_xxx' functions use super::{CommonTypes, RustTypeMarker}; use onig::{Regex, Region, SearchOptions}; #[derive(Debug, Clone, PartialEq, Eq)] enum RegexSet { ArrayPrimitive, + ArrayPrimitiveExtra, BitSize, ArrayStruct, Vec, @@ -38,6 +38,8 @@ impl RegexSet { fn get_type(s: &str) -> Option { if rust_array_decl_prim().is_match(s) { Some(RegexSet::ArrayPrimitive) + } else if rust_array_with_extra_type().is_match(s) { + Some(RegexSet::ArrayPrimitiveExtra) } else if rust_bit_size().is_match(s) { Some(RegexSet::BitSize) } else if rust_array_decl_struct().is_match(s) { @@ -64,6 +66,7 @@ impl RegexSet { fn parse_type(&self, s: &str) -> Option { match self { RegexSet::ArrayPrimitive => parse_primitive_array(s), + RegexSet::ArrayPrimitiveExtra => parse_array_with_extra_type(s), RegexSet::BitSize => parse_bit_size(s), RegexSet::ArrayStruct => parse_struct_array(s), RegexSet::Vec => parse_vec(s), @@ -77,6 +80,13 @@ impl RegexSet { } } +/// Matches an array like: [u8; 20; H160] +fn rust_array_with_extra_type() -> Regex { + Regex::new( + r"^\[\s*?(?[uif]{1})(?8)?(?16)?(?32)?(?64)?(?128)?;\s*?(?[\d]+)+\s*?;?\s*?([\d\w]*)\s*?]", + ).expect("Regex Array with extra type info invalid") +} + // primitive array declaration with named capture groups, ie [u8; 99] // width of number and unsigned/signed are all in their own capture group // size of array is in the last capture group @@ -135,14 +145,56 @@ pub fn rust_generic_decl() -> Regex { /// Transforms a prefixed generic type (EX: T::Moment) /// into a non-prefixed type (T::Moment -> Moment) -pub fn remove_prefix<'a, S: Into<&'a str>>(s: S) -> Option { - let s: &str = s.into(); +pub fn remove_prefix>(s: S) -> Option { + let s: &str = s.as_ref(); let re = Regex::new(r"[\w><]::([\w><]+)").expect("Regex expressions should be infallible; qed"); let caps = re.captures(s)?; caps.iter().nth(1)?.map(|s| s.to_string()) } +/// Removes a path from a string that is a rust type. +/// Ex: removes 'schedule' from schedule::Period +pub fn remove_path>(s: S) -> Option { + let s: &str = s.as_ref(); + + let re = Regex::new(r"\b(?\w+)<(?[\w<>,: ]+)>") + .expect("Regex expression should be infallible; qed"); + let caps = re.captures(s)?; + caps.iter().nth(1)?.map(|s| s.to_string()) +} + +/// Removes the trait preceding the type. +/// I.E Removes `::` from ::Call +pub fn remove_trait>(s: S) -> Option { + let s: &str = s.as_ref(); + + let re = Regex::new(r"^(?:|)[><\w]+:*([\W\w]*)") + .expect("Regex expression should be infallible; qed"); + let caps = re.captures(s)?; + caps.iter().nth(1)?.map(|s| s.to_string()) +} + +pub fn remove_empty_generic>(s: S) -> Option { + let s: &str = s.as_ref(); + + let re = Regex::new(r"(\w*)<\(\)>").expect("Regex expression should be infallible; qed"); + let caps = re.captures(s)?; + caps.iter().nth(1)?.map(|s| s.to_string()) +} + +/// Sanitizes a type and returns parts that might correspond to PolkadotJS types +pub fn sanitize_ty(ty: &str) -> Option { + log::trace!("sanitizing ty {}", ty); + let ty = if let Some(no_empty_gen) = remove_empty_generic(&ty) { no_empty_gen } else { ty.to_string() }; + let ty = if let Some(no_trait) = remove_trait(&ty) { no_trait } else { ty }; + let ty = if let Some(no_path) = remove_path(&ty) { no_path } else { ty }; + let ty = if let Some(un_prefixed) = remove_prefix(&ty) { un_prefixed } else { ty }; + + log::trace!("Possibly sanitized type: {}", ty); + Some(ty) +} + /// Only captures text within the tuples, /// need to use 'Matches' (ie `find_iter`) iterator to get all matches /// max tuple size is 32 @@ -189,13 +241,25 @@ pub fn parse_struct_array(s: &str) -> Option { /// /// # Panics /// -/// TODO: Use errors instead of returning option pub fn parse_primitive_array(s: &str) -> Option { let re = rust_array_decl_prim(); if !re.is_match(s) { return None; } + parse_array(s, re) +} + +/// Parse an array that's in the form [u8; 20; H160] +/// the extra type information 'H160' is discarded. +fn parse_array_with_extra_type(s: &str) -> Option { + let re = rust_array_with_extra_type(); + if !re.is_match(s) { + return None; + } + parse_array(s, re) +} +fn parse_array(s: &str, re: Regex) -> Option { let mut region = Region::new(); let (mut t, mut size, mut ty) = (None, None, None); @@ -230,6 +294,7 @@ pub fn parse_primitive_array(s: &str) -> Option { true }); }; + let t = t?; let size = size?; let ty = ty?; @@ -238,31 +303,26 @@ pub fn parse_primitive_array(s: &str) -> Option { 8 => match t { "u" => RustTypeMarker::U8, "i" => RustTypeMarker::I8, - "f" => panic!("type does not exist 'f8'"), _ => panic!("impossible match encountered"), }, 16 => match t { "u" => RustTypeMarker::U16, "i" => RustTypeMarker::I16, - "f" => panic!("type does not exist 'f16'"), _ => panic!("impossible match encountered"), }, 32 => match t { "u" => RustTypeMarker::U32, "i" => RustTypeMarker::I32, - "f" => RustTypeMarker::F32, _ => panic!("impossible match encountered"), }, 64 => match t { "u" => RustTypeMarker::U64, "i" => RustTypeMarker::I64, - "f" => RustTypeMarker::F64, _ => panic!("impossible match encountered"), }, 128 => match t { "u" => RustTypeMarker::U128, "i" => RustTypeMarker::I128, - "f" => panic!("type does not exist: 'f128'"), _ => panic!("impossible match encountered"), }, _ => panic!("Couldn't determine bit-width of types in array"), @@ -408,17 +468,12 @@ pub fn parse(s: &str) -> Option { "u32" => Some(RustTypeMarker::U32), "u64" => Some(RustTypeMarker::U64), "u128" => Some(RustTypeMarker::U128), - "usize" => Some(RustTypeMarker::USize), "i8" => Some(RustTypeMarker::I8), "i16" => Some(RustTypeMarker::I16), "i32" => Some(RustTypeMarker::I32), "i64" => Some(RustTypeMarker::I64), "i128" => Some(RustTypeMarker::I128), - "isize" => Some(RustTypeMarker::ISize), - - "f32" => Some(RustTypeMarker::F32), - "f64" => Some(RustTypeMarker::F64), "bool" => Some(RustTypeMarker::Bool), "Null" => Some(RustTypeMarker::Null), @@ -595,14 +650,6 @@ mod tests { parse_primitive_array("[i128; 32]").unwrap(), RustTypeMarker::Array { size: 32, ty: Box::new(RustTypeMarker::I128) } ); - assert_eq!( - parse_primitive_array("[f32; 32]").unwrap(), - RustTypeMarker::Array { size: 32, ty: Box::new(RustTypeMarker::F32) } - ); - assert_eq!( - parse_primitive_array("[f64; 32]").unwrap(), - RustTypeMarker::Array { size: 32, ty: Box::new(RustTypeMarker::F64) } - ); assert_eq!( parse_primitive_array("[i128; 999999]").unwrap(), RustTypeMarker::Array { size: 999_999, ty: Box::new(RustTypeMarker::I128) } @@ -612,7 +659,7 @@ mod tests { #[test] fn should_match_struct_array() { let re = rust_array_decl_struct(); - assert_eq!(true, re.is_match("[Foo; 10]")) + assert!(re.is_match("[Foo; 10]")) } #[test] @@ -775,17 +822,12 @@ mod tests { assert_eq!(parse("u32").unwrap(), RustTypeMarker::U32); assert_eq!(parse("u64").unwrap(), RustTypeMarker::U64); assert_eq!(parse("u128").unwrap(), RustTypeMarker::U128); - assert_eq!(parse("usize").unwrap(), RustTypeMarker::USize); assert_eq!(parse("i8").unwrap(), RustTypeMarker::I8); assert_eq!(parse("i16").unwrap(), RustTypeMarker::I16); assert_eq!(parse("i32").unwrap(), RustTypeMarker::I32); assert_eq!(parse("i64").unwrap(), RustTypeMarker::I64); assert_eq!(parse("i128").unwrap(), RustTypeMarker::I128); - assert_eq!(parse("isize").unwrap(), RustTypeMarker::ISize); - - assert_eq!(parse("f32").unwrap(), RustTypeMarker::F32); - assert_eq!(parse("f64").unwrap(), RustTypeMarker::F64); assert_eq!(parse("bool").unwrap(), RustTypeMarker::Bool); assert_eq!(parse("Null").unwrap(), RustTypeMarker::Null); @@ -847,6 +889,8 @@ mod tests { fn should_remove_prefix() { assert_eq!(remove_prefix("T::Moment").unwrap(), "Moment"); assert_eq!(remove_prefix("T::Generic").unwrap(), "Generic"); + // assert_eq!(remove_prefix("schedule::Period").unwrap(), "Period"); + // assert_eq!(remove_prefix("Period").unwrap(), "BlockNumber"); } #[test] @@ -879,4 +923,20 @@ mod tests { let ty = "Int<64, Balance>"; assert_eq!(parse_bit_size(ty).unwrap(), RustTypeMarker::I64); } + + #[test] + fn should_match_array_with_extra_info() { + let _ = pretty_env_logger::try_init(); + let ty = "[u8; 20; H160]"; + let re = rust_array_with_extra_type(); + assert!(re.is_match(ty)); + } + + #[test] + fn should_parse_array_with_extra_info() { + let _ = pretty_env_logger::try_init(); + let ty = "[u8; 20; H160]"; + let ty = parse_array_with_extra_type(ty); + assert_eq!(ty, Some(RustTypeMarker::Array { size: 20, ty: Box::new(RustTypeMarker::U8) })); + } } diff --git a/core/src/substrate_types.rs b/core/src/substrate_types.rs index b2742857..56a6b315 100644 --- a/core/src/substrate_types.rs +++ b/core/src/substrate_types.rs @@ -19,20 +19,22 @@ //! Serialization and Deserialization Implementations (to serialize as if it were a native type) //! Display Implementation +mod data; mod remote; use self::remote::*; use crate::{Error, SetField}; +use bitvec::order::Lsb0 as BitOrderLsb0; use primitives::crypto::AccountId32; use primitives::crypto::{Ss58AddressFormat, Ss58Codec}; use serde::Serialize; use std::{convert::TryFrom, fmt}; +pub use self::data::Data; + pub type Address = runtime_primitives::MultiAddress; pub type Vote = pallet_democracy::Vote; pub type Conviction = pallet_democracy::Conviction; -pub type Data = pallet_identity::Data; - /// A 'stateful' version of [RustTypeMarker](enum.RustTypeMarker.html). /// 'Std' variant is not here like in RustTypeMarker. /// Instead common types are just apart of the enum @@ -44,6 +46,9 @@ pub enum SubstrateType { /// 256-bit hash type H256(primitives::H256), + /// BitVec type + BitVec(bitvec::vec::BitVec), + /// Recursive Call Type Call(Vec<(String, SubstrateType)>), /// Era @@ -54,17 +59,20 @@ pub enum SubstrateType { GenericVote(pallet_democracy::Vote), /// Substrate Indices Address Type - // TODO: this is not generic for any chain that doesn't use a - // u32 and [u8; 32] for its index/id #[serde(with = "RemoteAddress")] Address(Address), - - #[serde(with = "RemoteData")] + /// Data Identity Type Data(Data), + /// Identity fields but as just an enum. + IdentityField(u64), + /// SignedExtension Type SignedExtra(String), + /// Rust unit type (Struct or enum variant) + Unit(String), + /// vectors, arrays, and tuples #[serde(serialize_with = "crate::util::as_hex")] Composite(Vec), @@ -72,7 +80,7 @@ pub enum SubstrateType { /// C-Like Enum Type Set(SetField), /// Enum - Enum(StructUnitOrTuple), + Enum(EnumField), /// Struct Type Struct(Vec), /// Option Type @@ -122,6 +130,7 @@ impl fmt::Display for SubstrateType { match self { SubstrateType::H512(v) => write!(f, "{}", v), SubstrateType::H256(v) => write!(f, "{}", v), + SubstrateType::BitVec(v) => write!(f, "{}", v), SubstrateType::Call(c) => { write!(f, "CALL")?; for arg in c.iter() { @@ -145,6 +154,8 @@ impl fmt::Display for SubstrateType { }, SubstrateType::Data(d) => write!(f, "{:?}", d), SubstrateType::SignedExtra(v) => write!(f, "{}", v), + SubstrateType::Unit(u) => write!(f, "{}", u), + SubstrateType::IdentityField(field) => write!(f, "{:?}", field), SubstrateType::Composite(v) => { let mut s = String::from(""); for v in v.iter() { @@ -186,31 +197,22 @@ impl fmt::Display for SubstrateType { } #[derive(Debug, PartialEq, Clone, Serialize)] -#[serde(untagged)] -pub enum StructUnitOrTuple { - Struct(Vec), - Unit(String), - /// vector of variant name -> type - Tuple { - name: String, - ty: Box, - }, +pub struct EnumField { + /// name of the field. + pub name: String, + /// Optional field value. An enum field without a value are unit fields. + pub value: Option>, } -impl fmt::Display for StructUnitOrTuple { +impl EnumField { + pub fn new(name: String, value: Option>) -> Self { + Self { name, value } + } +} + +impl fmt::Display for EnumField { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut _enum = String::from(" tuple[ "); - match self { - Self::Struct(v) => { - for val in v.iter() { - _enum.push_str(&format!("{}, ", val)) - } - } - Self::Unit(v) => _enum.push_str(&format!("{}, ", v)), - Self::Tuple { name, ty } => _enum.push_str(&format!(" {}:{} ", name, ty.to_string())), - } - _enum.push_str(" ]"); - write!(f, "{}", _enum) + write!(f, "enum[{}:{}]", self.name, self.value.as_ref().unwrap_or(&Box::new(SubstrateType::Null))) } } diff --git a/core/src/substrate_types/data.rs b/core/src/substrate_types/data.rs new file mode 100644 index 00000000..28e9b402 --- /dev/null +++ b/core/src/substrate_types/data.rs @@ -0,0 +1,94 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// This file is part of substrate-desub. +// +// substrate-desub is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// substrate-desub is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with substrate-desub. If not, see . + +//! Copy of this: https://substrate.dev/rustdocs/latest/pallet_identity/enum.Data.html +//! For the purpose of Decoding the Data field. +//! Because of the specificity/complexity of decoding: +//! - `BoundedVec` includes private tuple fields with no getters so Serde `remote` does not work +//! - `Data` has a special way of encoding/decoding +//! Data impl is copied over and must be maintaned against substrate master. + +use codec::{Decode, Encode}; +use serde::{Deserialize, Serialize}; +use std::iter::once; + +/// Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater +/// than 32-bytes then it will be truncated when encoding. +/// +/// Can also be `None`. +#[derive(Clone, Eq, PartialEq, Debug, Serialize, Deserialize)] +pub enum Data { + /// No data here. + None, + /// The data is stored directly. + Raw(Vec), + /// Only the Blake2 hash of the data is stored. The preimage of the hash may be retrieved + /// through some hash-lookup service. + BlakeTwo256([u8; 32]), + /// Only the SHA2-256 hash of the data is stored. The preimage of the hash may be retrieved + /// through some hash-lookup service. + Sha256([u8; 32]), + /// Only the Keccak-256 hash of the data is stored. The preimage of the hash may be retrieved + /// through some hash-lookup service. + Keccak256([u8; 32]), + /// Only the SHA3-256 hash of the data is stored. The preimage of the hash may be retrieved + /// through some hash-lookup service. + ShaThree256([u8; 32]), +} + +impl Decode for Data { + fn decode(input: &mut I) -> Result { + let b = input.read_byte()?; + Ok(match b { + 0 => Data::None, + n @ 1..=33 => { + let mut r = vec![0u8; n as usize - 1]; + input.read(&mut r[..])?; + Data::Raw(r) + } + 34 => Data::BlakeTwo256(<[u8; 32]>::decode(input)?), + 35 => Data::Sha256(<[u8; 32]>::decode(input)?), + 36 => Data::Keccak256(<[u8; 32]>::decode(input)?), + 37 => Data::ShaThree256(<[u8; 32]>::decode(input)?), + _ => return Err(codec::Error::from("invalid leading byte")), + }) + } +} + +impl Encode for Data { + fn encode(&self) -> Vec { + match self { + Data::None => vec![0u8; 1], + Data::Raw(ref x) => { + let l = x.len().min(32); + let mut r = vec![l as u8 + 1; l + 1]; + r[1..].copy_from_slice(&x[..l as usize]); + r + } + Data::BlakeTwo256(ref h) => once(34u8).chain(h.iter().cloned()).collect(), + Data::Sha256(ref h) => once(35u8).chain(h.iter().cloned()).collect(), + Data::Keccak256(ref h) => once(36u8).chain(h.iter().cloned()).collect(), + Data::ShaThree256(ref h) => once(37u8).chain(h.iter().cloned()).collect(), + } + } +} +impl codec::EncodeLike for Data {} + +impl Default for Data { + fn default() -> Self { + Self::None + } +} diff --git a/core/src/substrate_types/remote.rs b/core/src/substrate_types/remote.rs index 40dd66e3..1de799bb 100644 --- a/core/src/substrate_types/remote.rs +++ b/core/src/substrate_types/remote.rs @@ -1,4 +1,4 @@ -// Copyright 2019 Parity Technologies (UK) Ltd. +// Copyright 2019-2021 Parity Technologies (UK) Ltd. // This file is part of substrate-desub. // // substrate-desub is free software: you can redistribute it and/or modify @@ -17,7 +17,7 @@ use primitives::crypto::AccountId32; use serde::{Deserialize, Serialize}; -use super::{Address, Conviction, Data, Vote}; +use super::{Address, Conviction, Vote}; #[derive(Serialize, Deserialize)] #[serde(remote = "Address")] @@ -42,31 +42,6 @@ pub struct RemoteVote { pub conviction: Conviction, } -/// Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater -/// than 32-bytes then it will be truncated when encoding. -/// -/// Can also be `None`. -#[derive(Serialize, Deserialize)] -#[serde(remote = "Data")] -pub enum RemoteData { - /// No data here. - None, - /// The data is stored directly. - Raw(Vec), - /// Only the Blake2 hash of the data is stored. The preimage of the hash may be retrieved - /// through some hash-lookup service. - BlakeTwo256([u8; 32]), - /// Only the SHA2-256 hash of the data is stored. The preimage of the hash may be retrieved - /// through some hash-lookup service. - Sha256([u8; 32]), - /// Only the Keccak-256 hash of the data is stored. The preimage of the hash may be retrieved - /// through some hash-lookup service. - Keccak256([u8; 32]), - /// Only the SHA3-256 hash of the data is stored. The preimage of the hash may be retrieved - /// through some hash-lookup service. - ShaThree256([u8; 32]), -} - #[derive(Serialize, Deserialize)] #[serde(remote = "Conviction")] pub enum RemoteConviction { diff --git a/extras/Cargo.toml b/extras/Cargo.toml index bc0c201e..63e4f094 100644 --- a/extras/Cargo.toml +++ b/extras/Cargo.toml @@ -9,11 +9,12 @@ repository = "https://github.com/paritytech/desub" [dependencies] thiserror = "1.0" core = { path = "../core", package = "desub-core" } -codec = { version = "1", features = ["derive"], package = "parity-scale-codec" } +codec = { version = "2", features = ["derive"], package = "parity-scale-codec" } log = { version = "0.4" } -env_logger = "0.7" serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["preserve_order"] } +syn = { version = "1", features = ["parsing", "derive"] } +phf = { version = "0.10.0", features = [ "macros" ] } [features] default = ["default_definitions"] diff --git a/extras/README.md b/extras/README.md new file mode 100644 index 00000000..318a96d4 --- /dev/null +++ b/extras/README.md @@ -0,0 +1 @@ +Add `StorageKey': 'Vec' in definitions if it is not already. diff --git a/extras/src/definitions/definitions.json b/extras/src/definitions/definitions.json index 69fc50de..fb6f8537 100644 --- a/extras/src/definitions/definitions.json +++ b/extras/src/definitions/definitions.json @@ -1,4 +1,49 @@ { + "assets": { + "types": { + "AssetApprovalKey": { + "owner": "AccountId", + "delegate": "AccountId" + }, + "AssetApproval": { + "amount": "TAssetBalance", + "deposit": "TAssetDepositBalance" + }, + "AssetBalance": { + "balance": "TAssetBalance", + "isFrozen": "bool", + "isSufficient": "bool" + }, + "AssetDestroyWitness": { + "accounts": "Compact", + "sufficients": "Compact", + "approvals": "Compact" + }, + "AssetDetails": { + "owner": "AccountId", + "issuer": "AccountId", + "admin": "AccountId", + "freezer": "AccountId", + "supply": "TAssetBalance", + "deposit": "TAssetDepositBalance", + "minBalance": "TAssetBalance", + "isSufficient": "bool", + "accounts": "u32", + "sufficients": "u32", + "approvals": "u32", + "isFrozen": "bool" + }, + "AssetMetadata": { + "deposit": "TAssetDepositBalance", + "name": "Vec", + "symbol": "Vec", + "decimals": "u8", + "isFrozen": "bool" + }, + "TAssetBalance": "u64", + "TAssetDepositBalance": "BalanceOf" + } + }, "attestations": { "types": { "BlockAttestations": { @@ -67,6 +112,10 @@ ] }, "BabeAuthorityWeight": "u64", + "BabeEpochConfiguration": { + "c": "(u64, u64)", + "allowedSlots": "AllowedSlots" + }, "BabeBlockWeight": "u32", "BabeEquivocationProof": { "offender": "AuthorityId", @@ -181,6 +230,11 @@ "All" ] }, + "ReserveData": { + "id": "ReserveIdentifier", + "amount": "Balance" + }, + "ReserveIdentifier": "[u8; 8]", "VestingSchedule": { "offset": "Balance", "perBlock": "Balance", @@ -197,6 +251,118 @@ } } }, + "beefy": { + "types": { + "BeefyCommitment": { + "payload": "BeefyPayload", + "blockNumber": "BlockNumber", + "validatorSetId": "ValidatorSetId" + }, + "BeefyId": "[u8; 33]", + "BeefySignedCommitment": { + "commitment": "BeefyCommitment", + "signatures": "Vec>" + }, + "BeefyNextAuthoritySet": { + "id": "u64", + "len": "u32", + "root": "H256" + }, + "BeefyPayload": "MmrRootHash", + "MmrRootHash": "H256", + "ValidatorSetId": "u64" + } + }, + "bridges": { + "types": { + "BridgedBlockHash": "H256", + "BridgedBlockNumber": "BlockNumber", + "BridgedHeader": "Header", + "CallOrigin": { + "_enum": { + "SourceRoot": "Null", + "TargetAccount": "(AccountId, MultiSigner, MultiSignature)", + "SourceAccount": "AccountId" + } + }, + "ChainId": "[u8; 4]", + "DeliveredMessages": { + "begin": "MessageNonce", + "end": "MessageNonce", + "dispatchResults": "BitVec" + }, + "DispatchFeePayment": { + "_enum": [ + "AtSourceChain", + "AtTargetChain" + ] + }, + "InboundLaneData": { + "relayers": "Vec", + "lastConfirmedNonce": "MessageNonce" + }, + "InboundRelayer": "AccountId", + "InitializationData": { + "header": "Header", + "authorityList": "AuthorityList", + "setId": "SetId", + "isHalted": "bool" + }, + "LaneId": "[u8; 4]", + "MessageData": { + "payload": "Bytes", + "fee": "Balance" + }, + "MessagesDeliveryProofOf": { + "bridgedHeaderHash": "BlockHash", + "storageProof": "Vec", + "lane": "LaneId" + }, + "MessageKey": { + "laneId": "LaneId", + "nonce": "MessageNonce" + }, + "MessageNonce": "u64", + "MessagesProofOf": { + "bridgedHeaderHash": "BridgedBlockHash", + "storageProof": "Vec", + "lane": "LaneId", + "noncesStart": "MessageNonce", + "noncesEnd": "MessageNonce" + }, + "OperatingMode": { + "_enum": [ + "Normal", + "RejectingOutboundMessages", + "Halted" + ] + }, + "OutboundLaneData": { + "latestGeneratedNonce": "MessageNonce", + "latestReceivedNonce": "MessageNonce", + "oldestUnprunedNonce": "MessageNonce" + }, + "OutboundMessageFee": "Balance", + "OutboundPayload": { + "specVersion": "u32", + "weight": "Weight", + "origin": "CallOrigin", + "dispatchFeePayment": "DispatchFeePayment", + "call": "Bytes" + }, + "Parameter": "Null", + "RelayerId": "AccountId", + "UnrewardedRelayer": { + "relayer": "RelayerId", + "messages": "DeliveredMessages" + }, + "UnrewardedRelayersState": { + "unrewardedRelayer_Entries": "MessageNonce", + "messagesInOldestEntry": "MessageNonce", + "totalMessages": "MessageNonce" + } + } + }, "chain": { "types": { "BlockHash": "Hash" @@ -254,12 +420,13 @@ "AliveContractInfo": { "trieId": "TrieId", "storageSize": "u32", - "emptyPairCount": "u32", - "totalPairCount": "u32", + "pairCount": "u32", "codeHash": "CodeHash", "rentAllowance": "Balance", + "rentPaid": "Balance", "deductBlock": "BlockNumber", - "lastWrite": "Option" + "lastWrite": "Option", + "_reserved": "Option" }, "CodeHash": "Hash", "ContractCallRequest": { @@ -313,8 +480,14 @@ "Err": "ContractExecResultErr" } }, + "ContractExecResultTo267": { + "gasConsumed": "u64", + "debugMessage": "Text", + "result": "ContractExecResultResult" + }, "ContractExecResult": { "gasConsumed": "u64", + "gasRequired": "u64", "debugMessage": "Text", "result": "ContractExecResultResult" }, @@ -325,8 +498,16 @@ } }, "ContractStorageKey": "[u8; 32]", + "DeletedContract": { + "pairCount": "u32", + "trieId": "TrieId" + }, + "ExecReturnValue": { + "flags": "u32", + "data": "Bytes" + }, "Gas": "u64", - "HostFnWeights": { + "HostFnWeightsTo264": { "caller": "Weight", "address": "Weight", "gasLeft": "Weight", @@ -373,6 +554,79 @@ "hashBlake2128": "Weight", "hashBlake2128PerByte": "Weight" }, + "HostFnWeights": { + "caller": "Weight", + "address": "Weight", + "gasLeft": "Weight", + "balance": "Weight", + "valueTransferred": "Weight", + "minimumBalance": "Weight", + "tombstoneDeposit": "Weight", + "rentAllowance": "Weight", + "blockNumber": "Weight", + "now": "Weight", + "weightToFee": "Weight", + "gas": "Weight", + "input": "Weight", + "inputPerByte": "Weight", + "return": "Weight", + "returnPerByte": "Weight", + "terminate": "Weight", + "terminatePerCodeByte": "Weight", + "restoreTo": "Weight", + "restoreToPerCallerCodeByte": "Weight", + "restoreToPerTombstoneCodeByte": "Weight", + "restoreToPerDelta": "Weight", + "random": "Weight", + "depositEvent": "Weight", + "depositEventPerTopic": "Weight", + "depositEventPerByte": "Weight", + "setRentAllowance": "Weight", + "setStorage": "Weight", + "setStoragePerByte": "Weight", + "clearStorage": "Weight", + "getStorage": "Weight", + "getStoragePerByte": "Weight", + "transfer": "Weight", + "call": "Weight", + "callPerCodeByte": "Weight", + "callTransferSurcharge": "Weight", + "callPerInputByte": "Weight", + "callPerOutputByte": "Weight", + "instantiate": "Weight", + "instantiatePerCodeByte": "Weight", + "instantiatePerInputByte": "Weight", + "instantiatePerOutputByte": "Weight", + "instantiatePerSaltByte": "Weight", + "hashSha2256": "Weight", + "hashSha2256PerByte": "Weight", + "hashKeccak256": "Weight", + "hashKeccak256PerByte": "Weight", + "hashBlake2256": "Weight", + "hashBlake2256PerByte": "Weight", + "hashBlake2128": "Weight", + "hashBlake2128PerByte": "Weight", + "rentParams": "Weight" + }, + "InstantiateRequest": { + "origin": "AccountId", + "endowment": "Balance", + "gasLimit": "Gas", + "code": "Bytes", + "data": "Bytes", + "salt": "Bytes" + }, + "ContractInstantiateResult": { + "_enum": { + "Ok": "InstantiateReturnValue", + "Err": "Null" + } + }, + "InstantiateReturnValue": { + "result": "ExecReturnValue", + "accountId": "AccountId", + "rentProjection": "Option" + }, "InstructionWeights": { "i64const": "u32", "i64load": "u32", @@ -426,7 +680,7 @@ "i64rotl": "u32", "i64rotr": "u32" }, - "Limits": { + "LimitsTo264": { "eventTopics": "u32", "stackHeight": "u32", "globals": "u32", @@ -437,14 +691,31 @@ "subjectLen": "u32", "codeSize": "u32" }, + "Limits": { + "eventTopics": "u32", + "stackHeight": "u32", + "globals": "u32", + "parameters": "u32", + "memoryPages": "u32", + "tableSize": "u32", + "brTableSize": "u32", + "subjectLen": "u32" + }, "PrefabWasmModule": { "scheduleVersion": "Compact", "initial": "Compact", "maximum": "Compact", - "_reserved": "PrefabWasmModuleReserved", - "code": "Bytes" + "refcount": "Compact", + "_reserved": "Option", + "code": "Bytes", + "originalCodeLen": "u32" + }, + "RentProjection": { + "_enum": { + "EvictionAt": "BlockNumber", + "NoEviction": "Null" + } }, - "PrefabWasmModuleReserved": "Option", "ScheduleTo212": { "version": "u32", "putCodePerByteCost": "Gas", @@ -480,6 +751,13 @@ "enablePrintln": "bool", "maxSubjectLen": "u32" }, + "ScheduleTo264": { + "version": "u32", + "enablePrintln": "bool", + "limits": "LimitsTo264", + "instructionWeights": "InstructionWeights", + "hostFnWeights": "HostFnWeightsTo264" + }, "Schedule": { "version": "u32", "enablePrintln": "bool", @@ -510,7 +788,7 @@ }, "ContractLayoutCell": { "key": "ContractLayoutKey", - "ty": "SiLookupTypeId" + "ty": "Si0LookupTypeId" }, "ContractLayoutEnum": { "dispatchKey": "ContractLayoutKey", @@ -555,7 +833,7 @@ "events": "Vec", "docs": "Vec" }, - "ContractDisplayName": "SiPath", + "ContractDisplayName": "Si0Path", "ContractEventParamSpec": { "name": "Text", "indexed": "bool", @@ -582,34 +860,80 @@ }, "ContractSelector": "[u8; 4]", "ContractTypeSpec": { - "type": "SiLookupTypeId", + "type": "Si0LookupTypeId", "displayName": "ContractDisplayName" }, "ContractProject": { "metadataVersion": "Text", "source": "ContractProjectSource", "contract": "ContractProjectContract", - "types": "Vec", + "types": "Vec", "spec": "ContractContractSpec" }, "ContractProjectContract": { + "_alias": { + "docs": "documentation" + }, "name": "Text", "version": "Text", "authors": "Vec", "description": "Option", - "documentation": "Option", + "docs": "Option", "repository": "Option", "homepage": "Option", "license": "Option" }, "ContractProjectSource": { - "hash": "[u8; 32]", + "_alias": { + "wasmHash": "hash" + }, + "wasmHash": "[u8; 32]", "language": "Text", "compiler": "Text", "wasm": "Raw" } } }, + "crowdloan": { + "types": { + "FundIndex": "u32", + "LastContribution": { + "_enum": { + "Never": "Null", + "PreEnding": "u32", + "Ending": "BlockNumber" + } + }, + "FundInfo": { + "depositor": "AccountId", + "verifier": "Option", + "deposit": "Balance", + "raised": "Balance", + "end": "BlockNumber", + "cap": "Balance", + "lastContribution": "LastContribution", + "firstPeriod": "LeasePeriod", + "lastPeriod": "LeasePeriod", + "trieIndex": "TrieIndex" + }, + "TrieIndex": "u32" + } + }, + "cumulus": { + "types": { + "ConfigData": { + "maxIndividual": "Weight" + }, + "MessageId": "[u8; 32]", + "OverweightIndex": "u64", + "PageCounter": "u32", + "PageIndexData": { + "beginUsed": "PageCounter", + "endUsed": "PageCounter", + "overweightCount": "OverweightIndex" + } + } + }, "democracy": { "types": { "AccountVote": { @@ -762,26 +1086,316 @@ } } }, - "ethereum": { + "eth": { "types": { "EthereumAccountId": "GenericEthereumAccountId", - "EthereumLookupSource": "GenericEthereumLookupSource" + "EthereumLookupSource": "GenericEthereumLookupSource", + "EthereumSignature": "[u8; 65]", + "EthAccount": { + "address": "H160", + "balance": "U256", + "nonce": "U256", + "codeHash": "H256", + "storageHash": "H256", + "accountProof": "Vec", + "storageProof": "Vec" + }, + "EthBlock": { + "header": "EthHeader", + "transactions": "Vec", + "ommers": "Vec" + }, + "EthHeader": { + "parentHash": "H256", + "ommersHash": "H256", + "beneficiary": "H160", + "stateRoot": "H256", + "transactionsRoot": "H256", + "receiptsRoot": "H256", + "logsBloom": "EthBloom", + "difficulty": "U256", + "number": "U256", + "gasLimit": "U256", + "gasUsed": "U256", + "timestamp": "u64", + "extraData": "Bytes", + "mixMash": "H256", + "nonce": "H64" + }, + "EthRichBlock": { + "_alias": { + "blockHash": "hash", + "blockSize": "size" + }, + "blockHash": "Option", + "parentHash": "H256", + "sha3Uncles": "H256", + "author": "H160", + "miner": "H160", + "stateRoot": "H256", + "transactionsRoot": "H256", + "receiptsRoot": "H256", + "number": "Option", + "gasUsed": "U256", + "gasLimit": "U256", + "extraData": "Bytes", + "logsBloom": "EthBloom", + "timestamp": "U256", + "difficulty": "U256", + "totalDifficulty": "Option", + "sealFields": "Vec", + "uncles": "Vec", + "transactions": "Vec", + "blockSize": "Option" + }, + "EthBloom": "H2048", + "EthCallRequest": { + "from": "Option", + "to": "Option", + "gasPrice": "Option", + "gas": "Option", + "value": "Option", + "data": "Option", + "nonce": "Option" + }, + "EthFilter": { + "fromBlock": "Option", + "toBlock": "Option", + "blockHash": "Option", + "address": "Option", + "topics": "Option" + }, + "EthFilterAddress": { + "_enum": { + "Single": "H160", + "Multiple": "Vec", + "Null": "Null" + } + }, + "EthFilterChanges": { + "_enum": { + "Logs": "Vec", + "Hashes": "Vec", + "Empty": "Null" + } + }, + "EthFilterTopic": { + "_enum": { + "Single": "EthFilterTopicInner", + "Multiple": "Vec", + "Null": "Null" + } + }, + "EthFilterTopicEntry": "Option", + "EthFilterTopicInner": { + "_enum": { + "Single": "EthFilterTopicEntry", + "Multiple": "Vec", + "Null": "Null" + } + }, + "EthRichHeader": { + "_alias": { + "blockHash": "hash", + "blockSize": "size" + }, + "blockHash": "Option", + "parentHash": "H256", + "sha3Uncles": "H256", + "author": "H160", + "miner": "H160", + "stateRoot": "H256", + "transactionsRoot": "H256", + "receiptsRoot": "H256", + "number": "Option", + "gasUsed": "U256", + "gasLimit": "U256", + "extraData": "Bytes", + "logsBloom": "EthBloom", + "timestamp": "U256", + "difficulty": "U256", + "sealFields": "Vec", + "blockSize": "Option" + }, + "EthLog": { + "address": "H160", + "topics": "Vec", + "data": "Bytes", + "blockHash": "Option", + "blockNumber": "Option", + "transactionHash": "Option", + "transactionIndex": "Option", + "logIndex": "Option", + "transactionLogIndex": "Option", + "removed": "bool" + }, + "EthReceipt": { + "transactionHash": "Option", + "transactionIndex": "Option", + "blockHash": "Option", + "from": "Option", + "to": "Option", + "blockNumber": "Option", + "cumulativeGasUsed": "U256", + "gasUsed": "Option", + "contractAddress": "Option", + "logs": "Vec", + "root": "Option", + "logsBloom": "EthBloom", + "statusCode": "Option" + }, + "EthStorageProof": { + "key": "U256", + "value": "U256", + "proof": "Vec" + }, + "EthSubKind": { + "_enum": [ + "newHeads", + "logs", + "newPendingTransactions", + "syncing" + ] + }, + "EthSubParams": { + "_enum": { + "None": "Null", + "Logs": "EthFilter" + } + }, + "EthSubResult": { + "_enum": { + "Header": "EthRichHeader", + "Log": "EthLog", + "TransactionHash": "H256", + "SyncState": "EthSyncStatus" + } + }, + "EthSyncInfo": { + "startingBlock": "U256", + "currentBlock": "U256", + "highestBlock": "U256", + "warpChunksAmount": "Option", + "warpChunksProcessed": "Option" + }, + "EthSyncStatus": { + "_enum": { + "Info": "EthSyncInfo", + "None": "Null" + } + }, + "EthTransaction": { + "nonce": "U256", + "gasPrice": "U256", + "gasLimit": "U256", + "action": "EthTransactionAction", + "value": "U256", + "input": "Bytes", + "signature": "EthTransactionSignature" + }, + "EthTransactionSignature": { + "v": "u64", + "r": "H256", + "s": "H256" + }, + "EthTransactionAction": { + "_enum": { + "Call": "H160", + "Create": "Null" + } + }, + "EthTransactionCondition": { + "_enum": { + "block": "u64", + "time": "u64" + } + }, + "EthTransactionRequest": { + "from": "Option", + "to": "Option", + "gasPrice": "Option", + "gas": "Option", + "value": "Option", + "data": "Option", + "nonce": "Option" + }, + "EthTransactionStatus": { + "transactionHash": "H256", + "transactionIndex": "u32", + "from": "H160", + "to": "Option", + "contractAddress": "Option", + "logs": "Vec", + "logsBloom": "EthBloom" + }, + "EthWork": { + "powHash": "H256", + "seedHash": "H256", + "target": "H256", + "number": "Option" + } } }, "evm": { "types": { - "Account": { + "EvmAccount": { "nonce": "u256", "balance": "u256" }, - "Log": { + "EvmLog": { "address": "H160", "topics": "Vec", "data": "Bytes" }, - "Vicinity": { + "EvmVicinity": { "gasPrice": "u256", "origin": "H160" + }, + "ExitError": { + "_enum": { + "StackUnderflow": "Null", + "StackOverflow": "Null", + "InvalidJump": "Null", + "InvalidRange": "Null", + "DesignatedInvalid": "Null", + "CallTooDeep": "Null", + "CreateCollision": "Null", + "CreateContractLimit": "Null", + "OutOfOffset": "Null", + "OutOfGas": "Null", + "OutOfFund": "Null", + "PCUnderflow": "Null", + "CreateEmpty": "Null", + "Other": "Text" + } + }, + "ExitFatal": { + "_enum": { + "NotSupported": "Null", + "UnhandledInterrupt": "Null", + "CallErrorAsFatal": "ExitError", + "Other": "Text" + } + }, + "ExitReason": { + "_enum": { + "Succeed": "ExitSucceed", + "Error": "ExitError", + "Revert": "ExitRevert", + "Fatal": "ExitFatal" + } + }, + "ExitRevert": { + "_enum": [ + "Reverted" + ] + }, + "ExitSucceed": { + "_enum": [ + "Stopped", + "Returned", + "Suicided" + ] } } }, @@ -796,6 +1410,7 @@ "ExtrinsicSignatureV4": "GenericExtrinsicSignatureV4", "ExtrinsicUnknown": "GenericExtrinsicUnknown", "ExtrinsicPayloadUnknown": "GenericExtrinsicPayloadUnknown", + "Era": "ExtrinsicEra", "ImmortalEra": "GenericImmortalEra", "MortalEra": "GenericMortalEra", "AnySignature": "H512", @@ -838,11 +1453,60 @@ "PermissionLatest": "PermissionsV1" } }, + "gilt": { + "types": { + "ActiveGilt": { + "proportion": "Perquintill", + "amount": "Balance", + "who": "AccountId", + "expiry": "BlockNumber" + }, + "ActiveGiltsTotal": { + "frozen": "Balance", + "proportion": "Perquintill", + "index": "ActiveIndex", + "target": "Perquintill" + }, + "ActiveIndex": "u32", + "GiltBid": { + "amount": "Balance", + "who": "AccountId" + } + } + }, "grandpa": { "types": { "AuthorityIndex": "u64", "AuthorityList": "Vec", + "AuthoritySet": { + "currentAuthorities": "AuthorityList", + "setId": "u64", + "pendingStandardChanges": "ForkTreePendingChange", + "pendingForcedChanges": "Vec", + "authoritySetChanges": "AuthoritySetChanges" + }, + "ForkTreePendingChange": { + "roots": "Vec", + "bestFinalizedNumber": "Option" + }, + "ForkTreePendingChangeNode": { + "hash": "BlockHash", + "number": "BlockNumber", + "data": "PendingChange", + "children": "Vec" + }, + "AuthoritySetChange": "(U64, BlockNumber)", + "AuthoritySetChanges": "Vec", "AuthorityWeight": "u64", + "DelayKind": { + "_enum": { + "Finalized": "Null", + "Best": "DelayKindBest" + } + }, + "DelayKindBest": { + "medianLastFinalized": "BlockNumber" + }, "EncodedFinalityProofs": "Bytes", "GrandpaEquivocation": { "_enum": { @@ -864,9 +1528,35 @@ "targetHash": "Hash", "targetNumber": "BlockNumber" }, + "GrandpaCommit": { + "targetHash": "BlockHash", + "targetNumber": "BlockNumber", + "precommits": "Vec" + }, + "GrandpaPrecommit": { + "targetHash": "BlockHash", + "targetNumber": "BlockNumber" + }, + "GrandpaSignedPrecommit": { + "precommit": "GrandpaPrecommit", + "signature": "AuthoritySignature", + "id": "AuthorityId" + }, + "GrandpaJustification": { + "round": "u64", + "commit": "GrandpaCommit", + "votesAncestries": "Vec
" + }, "JustificationNotification": "Bytes", "KeyOwnerProof": "MembershipProof", "NextAuthority": "(AuthorityId, AuthorityWeight)", + "PendingChange": { + "nextAuthorities": "AuthorityList", + "delay": "BlockNumber", + "canonHeight": "BlockNumber", + "canonHash": "BlockHash", + "delayKind": "DelayKind" + }, "PendingPause": { "scheduledAt": "BlockNumber", "delay": "BlockNumber" @@ -926,7 +1616,7 @@ "Twitter": 128 } }, - "IdentityInfoAdditional": "(Data, Data)", + "IdentityInfoAdditional": "(Data, Data)", "IdentityInfo": { "additional": "Vec", "display": "Data", @@ -988,23 +1678,28 @@ } } }, + "lottery": { + "types": { + "CallIndex": "(u8, u8)", + "LotteryConfig": { + "price": "Balance", + "start": "BlockNumber", + "length": "BlockNumber", + "delay": "BlockNumber", + "repeat": "bool" + } + } + }, "metadata": { "types": { - "DoubleMapTypeV9": { - "hasher": "StorageHasherV9", - "key1": "Type", - "key2": "Type", - "value": "Type", - "key2Hasher": "StorageHasherV9" - }, "ErrorMetadataV9": { "name": "Text", - "documentation": "Vec" + "docs": "Vec" }, "EventMetadataV9": { "name": "Text", "args": "Vec", - "documentation": "Vec" + "docs": "Vec" }, "FunctionArgumentMetadataV9": { "name": "Text", @@ -1013,13 +1708,7 @@ "FunctionMetadataV9": { "name": "Text", "args": "Vec", - "documentation": "Vec" - }, - "MapTypeV9": { - "hasher": "StorageHasherV9", - "key": "Type", - "value": "Type", - "linked": "bool" + "docs": "Vec" }, "MetadataV9": { "modules": "Vec" @@ -1028,7 +1717,7 @@ "name": "Text", "type": "Type", "value": "Bytes", - "documentation": "Vec" + "docs": "Vec" }, "ModuleMetadataV9": { "name": "Text", @@ -1043,7 +1732,7 @@ "modifier": "StorageEntryModifierV9", "type": "StorageEntryTypeV9", "fallback": "Bytes", - "documentation": "Vec" + "docs": "Vec" }, "StorageEntryModifierV9": { "_enum": [ @@ -1055,8 +1744,19 @@ "StorageEntryTypeV9": { "_enum": { "Plain": "Type", - "Map": "MapTypeV9", - "DoubleMap": "DoubleMapTypeV9" + "Map": { + "hasher": "StorageHasherV9", + "key": "Type", + "value": "Type", + "linked": "bool" + }, + "DoubleMap": { + "hasher": "StorageHasherV9", + "key1": "Type", + "key2": "Type", + "value": "Type", + "key2Hasher": "StorageHasherV9" + } } }, "StorageHasherV9": { @@ -1072,23 +1772,10 @@ "prefix": "Text", "items": "Vec" }, - "DoubleMapTypeV10": { - "hasher": "StorageHasherV10", - "key1": "Type", - "key2": "Type", - "value": "Type", - "key2Hasher": "StorageHasherV10" - }, "ErrorMetadataV10": "ErrorMetadataV9", "EventMetadataV10": "EventMetadataV9", "FunctionArgumentMetadataV10": "FunctionArgumentMetadataV9", "FunctionMetadataV10": "FunctionMetadataV9", - "MapTypeV10": { - "hasher": "StorageHasherV10", - "key": "Type", - "value": "Type", - "linked": "bool" - }, "MetadataV10": { "modules": "Vec" }, @@ -1107,13 +1794,24 @@ "modifier": "StorageEntryModifierV10", "type": "StorageEntryTypeV10", "fallback": "Bytes", - "documentation": "Vec" + "docs": "Vec" }, "StorageEntryTypeV10": { "_enum": { "Plain": "Type", - "Map": "MapTypeV10", - "DoubleMap": "DoubleMapTypeV10" + "Map": { + "hasher": "StorageHasherV10", + "key": "Type", + "value": "Type", + "linked": "bool" + }, + "DoubleMap": { + "hasher": "StorageHasherV10", + "key1": "Type", + "key2": "Type", + "value": "Type", + "key2Hasher": "StorageHasherV10" + } } }, "StorageMetadataV10": { @@ -1130,13 +1828,6 @@ "Twox64Concat": null } }, - "DoubleMapTypeV11": { - "hasher": "StorageHasherV11", - "key1": "Type", - "key2": "Type", - "value": "Type", - "key2Hasher": "StorageHasherV11" - }, "ErrorMetadataV11": "ErrorMetadataV10", "EventMetadataV11": "EventMetadataV10", "ExtrinsicMetadataV11": { @@ -1145,12 +1836,6 @@ }, "FunctionArgumentMetadataV11": "FunctionArgumentMetadataV10", "FunctionMetadataV11": "FunctionMetadataV10", - "MapTypeV11": { - "hasher": "StorageHasherV11", - "key": "Type", - "value": "Type", - "linked": "bool" - }, "MetadataV11": { "modules": "Vec", "extrinsic": "ExtrinsicMetadataV11" @@ -1170,13 +1855,24 @@ "modifier": "StorageEntryModifierV11", "type": "StorageEntryTypeV11", "fallback": "Bytes", - "documentation": "Vec" + "docs": "Vec" }, "StorageEntryTypeV11": { "_enum": { "Plain": "Type", - "Map": "MapTypeV11", - "DoubleMap": "DoubleMapTypeV11" + "Map": { + "hasher": "StorageHasherV11", + "key": "Type", + "value": "Type", + "linked": "bool" + }, + "DoubleMap": { + "hasher": "StorageHasherV11", + "key1": "Type", + "key2": "Type", + "value": "Type", + "key2Hasher": "StorageHasherV11" + } } }, "StorageMetadataV11": { @@ -1194,13 +1890,11 @@ "Identity": null } }, - "DoubleMapTypeV12": "DoubleMapTypeV11", "ErrorMetadataV12": "ErrorMetadataV11", "EventMetadataV12": "EventMetadataV11", "ExtrinsicMetadataV12": "ExtrinsicMetadataV11", "FunctionArgumentMetadataV12": "FunctionArgumentMetadataV11", "FunctionMetadataV12": "FunctionMetadataV11", - "MapTypeV12": "MapTypeV11", "MetadataV12": { "modules": "Vec", "extrinsic": "ExtrinsicMetadataV12" @@ -1220,47 +1914,207 @@ "StorageEntryTypeV12": "StorageEntryTypeV11", "StorageMetadataV12": "StorageMetadataV11", "StorageHasherV12": "StorageHasherV11", - "DoubleMapTypeLatest": "DoubleMapTypeV12", - "EventMetadataLatest": "EventMetadataV12", - "ExtrinsicMetadataLatest": "ExtrinsicMetadataV12", - "FunctionArgumentMetadataLatest": "FunctionArgumentMetadataV12", - "FunctionMetadataLatest": "FunctionMetadataV12", - "MapTypeLatest": "MapTypeV12", - "MetadataLatest": "MetadataV12", - "ModuleConstantMetadataLatest": "ModuleConstantMetadataV12", - "ModuleMetadataLatest": "ModuleMetadataV12", - "StorageEntryMetadataLatest": "StorageEntryMetadataV12", - "StorageEntryModifierLatest": "StorageEntryModifierV12", - "StorageEntryTypeLatest": "StorageEntryTypeV12", - "StorageMetadataLatest": "StorageMetadataV12", - "StorageHasher": "StorageHasherV12", - "MetadataAll": { + "ErrorMetadataV13": "ErrorMetadataV12", + "EventMetadataV13": "EventMetadataV12", + "ExtrinsicMetadataV13": "ExtrinsicMetadataV12", + "FunctionArgumentMetadataV13": "FunctionArgumentMetadataV12", + "FunctionMetadataV13": "FunctionMetadataV12", + "MetadataV13": { + "modules": "Vec", + "extrinsic": "ExtrinsicMetadataV13" + }, + "ModuleConstantMetadataV13": "ModuleConstantMetadataV12", + "ModuleMetadataV13": { + "name": "Text", + "storage": "Option", + "calls": "Option>", + "events": "Option>", + "constants": "Vec", + "errors": "Vec", + "index": "u8" + }, + "StorageEntryModifierV13": "StorageEntryModifierV12", + "StorageEntryMetadataV13": { + "name": "Text", + "modifier": "StorageEntryModifierV13", + "type": "StorageEntryTypeV13", + "fallback": "Bytes", + "docs": "Vec" + }, + "StorageEntryTypeV13": { "_enum": { - "V0": "DoNotConstruct", - "V1": "DoNotConstruct", - "V2": "DoNotConstruct", - "V3": "DoNotConstruct", - "V4": "DoNotConstruct", - "V5": "DoNotConstruct", - "V6": "DoNotConstruct", - "V7": "DoNotConstruct", - "V8": "DoNotConstruct", - "V9": "MetadataV9", - "V10": "MetadataV10", - "V11": "MetadataV11", - "V12": "MetadataV12" + "Plain": "Type", + "Map": { + "hasher": "StorageHasherV13", + "key": "Type", + "value": "Type", + "linked": "bool" + }, + "DoubleMap": { + "hasher": "StorageHasherV13", + "key1": "Type", + "key2": "Type", + "value": "Type", + "key2Hasher": "StorageHasherV13" + }, + "NMap": { + "keyVec": "Vec", + "hashers": "Vec", + "value": "Type" + } } + }, + "StorageMetadataV13": { + "prefix": "Text", + "items": "Vec" + }, + "StorageHasherV13": "StorageHasherV12", + "PortableRegistry": "GenericPortableRegistry", + "PortableType": { + "id": "SiLookupTypeId", + "type": "SiType" + }, + "ErrorMetadataV14": { + "name": "Text", + "fields": "Vec", + "index": "u8", + "docs": "Vec", + "args": "Vec" + }, + "EventMetadataV14": { + "name": "Text", + "fields": "Vec", + "index": "u8", + "docs": "Vec", + "args": "Vec" + }, + "FunctionArgumentMetadataV14": "FunctionArgumentMetadataV13", + "FunctionMetadataV14": { + "name": "Text", + "fields": "Vec", + "index": "u8", + "docs": "Vec", + "args": "Vec" + }, + "ExtrinsicMetadataV14": { + "type": "SiLookupTypeId", + "version": "u8", + "signedExtensions": "Vec" + }, + "MetadataV14": { + "lookup": "PortableRegistry", + "pallets": "Vec", + "extrinsic": "ExtrinsicMetadataV14" + }, + "PalletCallMetadataV14": { + "type": "SiLookupTypeId" + }, + "PalletConstantMetadataV14": { + "name": "Text", + "type": "SiLookupTypeId", + "value": "Bytes", + "docs": "Vec" + }, + "PalletErrorMetadataV14": { + "type": "SiLookupTypeId" + }, + "PalletEventMetadataV14": { + "type": "SiLookupTypeId" + }, + "PalletMetadataV14": { + "name": "Text", + "storage": "Option", + "calls": "Option", + "events": "Option", + "constants": "Vec", + "errors": "Option", + "index": "u8" + }, + "PalletStorageMetadataV14": { + "prefix": "Text", + "items": "Vec" + }, + "SignedExtensionMetadataV14": { + "identifier": "Text", + "type": "SiLookupTypeId", + "additionalSigned": "SiLookupTypeId" + }, + "StorageEntryMetadataV14": { + "name": "Text", + "modifier": "StorageEntryModifierV14", + "type": "StorageEntryTypeV14", + "fallback": "Bytes", + "docs": "Vec" + }, + "StorageEntryModifierV14": "StorageEntryModifierV13", + "StorageEntryTypeV14": { + "_enum": { + "Plain": "SiLookupTypeId", + "Map": { + "hashers": "Vec", + "key": "SiLookupTypeId", + "value": "SiLookupTypeId" + } + } + }, + "StorageHasherV14": "StorageHasherV13", + "PalletCallMetadataLatest": "PalletCallMetadataV14", + "PalletConstantMetadataLatest": "PalletConstantMetadataV14", + "PalletErrorMetadataLatest": "PalletErrorMetadataV14", + "PalletEventMetadataLatest": "PalletEventMetadataV14", + "PalletMetadataLatest": "PalletMetadataV14", + "PalletStorageMetadataLatest": "PalletStorageMetadataV14", + "SignedExtensionMetadataLatest": "SignedExtensionMetadataV14", + "ErrorMetadataLatest": "ErrorMetadataV13", + "EventMetadataLatest": "EventMetadataV13", + "ExtrinsicMetadataLatest": "ExtrinsicMetadataV13", + "FunctionArgumentMetadataLatest": "FunctionArgumentMetadataV13", + "FunctionMetadataLatest": "FunctionMetadataV13", + "MetadataLatest": "MetadataV13", + "ModuleConstantMetadataLatest": "ModuleConstantMetadataV13", + "ModuleMetadataLatest": "ModuleMetadataV13", + "StorageEntryMetadataLatest": "StorageEntryMetadataV13", + "StorageEntryModifierLatest": "StorageEntryModifierV13", + "StorageEntryTypeLatest": "StorageEntryTypeV13", + "StorageMetadataLatest": "StorageMetadataV13", + "StorageHasher": "StorageHasherV13", + "MetadataAll": { + "_enum": { + "V0": "DoNotConstruct", + "V1": "DoNotConstruct", + "V2": "DoNotConstruct", + "V3": "DoNotConstruct", + "V4": "DoNotConstruct", + "V5": "DoNotConstruct", + "V6": "DoNotConstruct", + "V7": "DoNotConstruct", + "V8": "DoNotConstruct", + "V9": "MetadataV9", + "V10": "MetadataV10", + "V11": "MetadataV11", + "V12": "MetadataV12", + "V13": "MetadataV13", + "V14": "MetadataV14" + } + } + } + }, + "mmr": { + "types": { + "MmrLeafProof": { + "blockHash": "BlockHash", + "leaf": "Bytes", + "proof": "Bytes" } } }, "offchain": { "types": { "StorageKind": { - "_enum": [ - "__UNUSED", - "PERSISTENT", - "LOCAL" - ] + "_enum": { + "PERSISTENT": 1, + "LOCAL": 2 + } } } }, @@ -1280,18 +2134,93 @@ }, "parachains": { "types": { + "ServiceQuality": { + "_enum": [ + "Ordered", + "Fast" + ] + }, + "HrmpChannel": { + "maxCapacity": "u32", + "maxTotalSize": "u32", + "maxMessageSize": "u32", + "msgCount": "u32", + "totalSize": "u32", + "mqcHead": "Option", + "senderDeposit": "Balance", + "recipientDeposit": "Balance" + }, + "HrmpChannelId": { + "sender": "u32", + "receiver": "u32" + }, + "HrmpOpenChannelRequest": { + "confirmed": "bool", + "age": "SessionIndex", + "senderDeposit": "Balance", + "maxMessageSize": "u32", + "maxCapacity": "u32", + "maxTotalSize": "u32" + }, "ParachainProposal": { "proposer": "AccountId", - "validationFunction": "ValidationCode", - "initialHeadState": "HeadData", + "genesisHead": "HeadData", "validators": "Vec", - "name": "Vec", + "name": "Bytes", "balance": "Balance" }, "RegisteredParachainInfo": { "validators": "Vec", "proposer": "AccountId" }, + "Bidder": { + "_enum": { + "New": "NewBidder", + "Existing": "ParaId" + } + }, + "IncomingParachain": { + "_enum": { + "Unset": "NewBidder", + "Fixed": "IncomingParachainFixed", + "Deploy": "IncomingParachainDeploy" + } + }, + "IncomingParachainDeploy": { + "code": "ValidationCode", + "initialHeadData": "HeadData" + }, + "IncomingParachainFixed": { + "codeHash": "Hash", + "codeSize": "u32", + "initialHeadData": "HeadData" + }, + "NewBidder": { + "who": "AccountId", + "sub": "SubId" + }, + "SubId": "u32", + "AuctionIndex": "u32", + "LeasePeriod": "BlockNumber", + "LeasePeriodOf": "BlockNumber", + "SlotRange": { + "_enum": [ + "ZeroZero", + "ZeroOne", + "ZeroTwo", + "ZeroThree", + "OneOne", + "OneTwo", + "OneThree", + "TwoTwo", + "TwoThree", + "ThreeThree" + ] + }, + "WinningData": "[WinningDataEntry; 10]", + "WinningDataEntry": "Option<(AccountId, ParaId, BalanceOf)>", + "WinnersData": "Vec", + "WinnersDataTuple": "(AccountId, ParaId, BalanceOf, SlotRange)", "AbridgedCandidateReceipt": { "parachainIndex": "ParaId", "relayParent": "Hash", @@ -1301,22 +2230,53 @@ "povBlockHash": "Hash", "commitments": "CandidateCommitments" }, + "AbridgedHostConfiguration": { + "maxCodeSize": "u32", + "maxHeadDataSize": "u32", + "maxUpwardQueueCount": "u32", + "maxUpwardQueueSize": "u32", + "maxUpwardMessageSize": "u32", + "maxUpwardMessageNumPerCandidate": "u32", + "hrmpMaxMessageNumPerCandidate": "u32", + "validationUpgradeFrequency": "BlockNumber", + "validationUpgradeDelay": "BlockNumber" + }, + "AbridgedHrmpChannel": { + "maxCapacity": "u32", + "maxTotalSize": "u32", + "maxMessageSize": "u32", + "msgCount": "u32", + "totalSize": "u32", + "mqcHead": "Option" + }, + "AssignmentId": "AccountId", + "AssignmentKind": { + "_enum": { + "Parachain": "Null", + "Parathread": "(CollatorId, u32)" + } + }, "AttestedCandidate": { "candidate": "AbridgedCandidateReceipt", "validityVotes": "Vec", "validatorIndices": "BitVec" }, - "AuctionIndex": "u32", + "AuthorityDiscoveryId": "AccountId", + "AvailabilityBitfield": "BitVec", + "AvailabilityBitfieldRecord": { + "bitfield": "AvailabilityBitfield", + "submittedTt": "BlockNumber" + }, "BackedCandidate": { "candidate": "CommittedCandidateReceipt", "validityVotes": "Vec", "validatorIndices": "BitVec" }, - "Bidder": { - "_enum": { - "New": "NewBidder", - "Existing": "ParaId" - } + "BufferedSessionChange": { + "applyAt": "BlockNumber", + "validators": "Vec", + "queued": "Vec", + "sessionIndex": "SessionIndex" }, "CandidateCommitments": { "upwardMessages": "Vec", @@ -1327,31 +2287,89 @@ "hrmpWatermark": "BlockNumber" }, "CandidateDescriptor": { - "paraId": "u32", - "relayParent": "Hash", - "collatorId": "Hash", + "paraId": "ParaId", + "relayParent": "RelayChainHash", + "collatorId": "CollatorId", "persistedValidationDataHash": "Hash", "povHash": "Hash", "erasureRoot": "Hash", - "signature": "Signature" + "signature": "CollatorSignature", + "paraHead": "Hash", + "validationCodeHash": "ValidationCodeHash" }, - "CandidatePendingAvailablility": { - "core": "u32", + "CandidateHash": "Hash", + "CandidateInfo": { + "who": "AccountId", + "deposit": "Balance" + }, + "CandidatePendingAvailability": { + "core": "CoreIndex", + "hash": "CandidateHash", "descriptor": "CandidateDescriptor", "availabilityVotes": "BitVec", + "backers": "BitVec", "relayParentNumber": "BlockNumber", - "backedInNumber": "BlockNumber" + "backedInNumber": "BlockNumber", + "backingGroup": "GroupIndex" }, "CandidateReceipt": { "descriptor": "CandidateDescriptor", "commitmentsHash": "Hash" }, - "CollatorId": "[u8; 32]", + "GlobalValidationData": { + "maxCodeSize": "u32", + "maxHeadDataSize": "u32", + "blockNumber": "BlockNumber" + }, + "CollatorId": "H256", "CollatorSignature": "Signature", "CommittedCandidateReceipt": { "descriptor": "CandidateDescriptor", "commitments": "CandidateCommitments" }, + "CoreAssignment": { + "core": "CoreIndex", + "paraId": "ParaId", + "kind": "AssignmentKind", + "groupIdx": "GroupIndex" + }, + "CoreIndex": "u32", + "CoreOccupied": { + "_enum": { + "Parathread": "ParathreadEntry", + "Parachain": "Null" + } + }, + "DisputeStatementSet": { + "candidateHash": "CandidateHash", + "session": "SessionIndex", + "statements": "Vec<(DisputeStatement, ParaValidatorIndex, ValidatorSignature)>" + }, + "MultiDisputeStatementSet": "Vec", + "DisputeStatement": { + "_enum": { + "Valid": "ValidDisputeStatementKind", + "Invalid": "InvalidDisputeStatementKind" + } + }, + "ValidDisputeStatementKind": { + "_enum": { + "Explicit": "Null", + "BackingSeconded": "Hash", + "BackingValid": "Hash", + "ApprovalChecking": "Null" + } + }, + "InvalidDisputeStatementKind": { + "_enum": [ + "Explicit" + ] + }, + "ExplicitDisputeStatement": { + "valid": "bool", + "candidateHash": "CandidateHash", + "session": "SessionIndex" + }, "DoubleVoteReport": { "identity": "ValidatorId", "first": "(Statement, ValidatorSignature)", @@ -1359,49 +2377,75 @@ "proof": "MembershipProof", "signingContext": "SigningContext" }, - "DownwardMessage": { - "_enum": { - "TransferInto": "(AccountId, Balance, Remark)", - "Opaque": "Vec" - } - }, + "DownwardMessage": "Bytes", + "GroupIndex": "u32", "GlobalValidationSchedule": { "maxCodeSize": "u32", "maxHeadDataSize": "u32", "blockNumber": "BlockNumber" }, "HeadData": "Bytes", - "HrmpChannelId": { - "sender": "u32", - "receiver": "u32" - }, - "IncomingParachain": { - "_enum": { - "Unset": "NewBidder", - "Fixed": "IncomingParachainFixed", - "Deploy": "IncomingParachainDeploy" - } - }, - "IncomingParachainFixed": { - "codeHash": "Hash", - "codeSize": "u32", - "initialHeadData": "HeadData" - }, - "IncomingParachainDeploy": { - "code": "ValidationCode", - "initialHeadData": "HeadData" + "HostConfiguration": { + "maxCodeSize": "u32", + "maxHeadDataSize": "u32", + "maxUpwardQueueCount": "u32", + "maxUpwardQueueSize": "u32", + "maxUpwardMessageSize": "u32", + "maxUpwardMessageNumPerCandidate": "u32", + "hrmpMaxMessageNumPerCandidate": "u32", + "validationUpgradeFrequency": "BlockNumber", + "validationUpgradeDelay": "BlockNumber", + "maxPovSize": "u32", + "maxDownwardMessageSize": "u32", + "preferredDispatchableUpwardMessagesStepWeight": "Weight", + "hrmpMaxParachainOutboundChannels": "u32", + "hrmpMaxParathreadOutboundChannels": "u32", + "hrmpOpenRequestTtl": "u32", + "hrmpSenderDeposit": "Balance", + "hrmpRecipientDeposit": "Balance", + "hrmpChannelMaxCapacity": "u32", + "hrmpChannelMaxTotalSize": "u32", + "hrmpMaxParachainInboundChannels": "u32", + "hrmpMaxParathreadInboundChannels": "u32", + "hrmpChannelMaxMessageSize": "u32", + "codeRetentionPeriod": "BlockNumber", + "parathreadCores": "u32", + "parathreadRetries": "u32", + "groupRotationFrequency": "BlockNumber", + "chainAvailabilityPeriod": "BlockNumber", + "threadAvailabilityPeriod": "BlockNumber", + "schedulingLookahead": "u32", + "maxValidatorsPerCore": "Option", + "maxValidators": "Option", + "disputePeriod": "SessionIndex", + "disputePostConclusionAcceptancePeriod": "BlockNumber", + "disputeMaxSpamSlots": "u32", + "disputeConclusionByTimeOutPeriod": "BlockNumber", + "noShowSlots": "u32", + "nDelayTranches": "u32", + "zerothDelayTrancheWidth": "u32", + "neededApprovals": "u32", + "relayVrfModuloSamples": "u32" + }, + "InboundDownwardMessage": { + "pubSentAt": "BlockNumber", + "pubMsg": "DownwardMessage" + }, + "InboundHrmpMessage": { + "sentAt": "BlockNumber", + "data": "Bytes" }, - "LeasePeriod": "BlockNumber", - "LeasePeriodOf": "LeasePeriod", + "InboundHrmpMessages": "Vec", "LocalValidationData": { "parentHead": "HeadData", "balance": "Balance", "codeUpgradeAllowed": "Option" }, - "NewBidder": { - "who": "AccountId", - "sub": "SubId" + "MessageIngestionType": { + "downwardMessages": "Vec", + "horizontalMessages": "BTreeMap" }, + "MessageQueueChain": "RelayChainHash", "OutboundHrmpMessage": { "recipient": "u32", "data": "Bytes" @@ -1413,12 +2457,42 @@ "Root" ] }, + "ParachainInherentData": { + "validationData": "PersistedValidationData", + "relayChainState": "StorageProof", + "downwardMessages": "Vec", + "horizontalMessages": "BTreeMap" + }, + "ParachainsInherentData": { + "bitfields": "SignedAvailabilityBitfields", + "backedCandidates": "Vec", + "disputes": "MultiDisputeStatementSet", + "parentHeader": "Header" + }, + "ParaGenesisArgs": { + "genesisHead": "Bytes", + "validationCode": "Bytes", + "parachain": "bool" + }, "ParaId": "u32", "ParaInfo": { - "scheduling": "Scheduling" + "manager": "AccountId", + "deposit": "Balance", + "locked": "bool" + }, + "ParaLifecycle": { + "_enum": [ + "Onboarding", + "Parathread", + "Parachain", + "UpgradingToParachain", + "DowngradingToParathread", + "OutgoingParathread", + "OutgoingParachain" + ] }, "ParaPastCodeMeta": { - "upgradeTimes": "Vec", + "upgradeTimes": "Vec", "lastPruned": "Option" }, "ParaScheduling": { @@ -1427,8 +2501,35 @@ "Dynamic" ] }, - "RelayChainBlockNumber": "BlockNumber", + "ParathreadClaim": "(ParaId, CollatorId)", + "ParathreadClaimQueue": { + "queue": "Vec", + "nextCoreOffset": "u32" + }, + "ParathreadEntry": { + "claim": "ParathreadClaim", + "retries": "u32" + }, + "ParaValidatorIndex": "u32", + "PersistedValidationData": { + "parentHead": "HeadData", + "relayParentNumber": "RelayChainBlockNumber", + "relayParentStorageRoot": "Hash", + "maxPovSize": "u32" + }, + "QueuedParathread": { + "claim": "ParathreadEntry", + "coreOffset": "u32" + }, + "RelayBlockNumber": "u32", + "RelayChainBlockNumber": "RelayBlockNumber", + "RelayHash": "Hash", + "RelayChainHash": "RelayHash", "Remark": "[u8; 32]", + "ReplacementTimes": { + "expectedAt": "BlockNumber", + "activatedAt": "BlockNumber" + }, "Retriable": { "_enum": { "Never": "Null", @@ -1441,30 +2542,29 @@ "Dynamic" ] }, + "SessionInfo": { + "validators": "Vec", + "discoveryKeys": "Vec", + "assignmentKeys": "Vec", + "validatorGroups": "Vec", + "nCores": "u32", + "zerothDelayTrancheWidth": "u32", + "relayVrfModuloSamples": "u32", + "nDelayTranches": "u32", + "noShowSlots": "u32", + "neededApprovals": "u32" + }, + "SessionInfoValidatorGroup": "Vec", "SignedAvailabilityBitfield": { "payload": "BitVec", - "validatorIndex": "u32", - "signature": "Signature" + "validatorIndex": "ParaValidatorIndex", + "signature": "ValidatorSignature" }, "SignedAvailabilityBitfields": "Vec", "SigningContext": { "sessionIndex": "SessionIndex", "parentHash": "Hash" }, - "SlotRange": { - "_enum": [ - "ZeroZero", - "ZeroOne", - "ZeroTwo", - "ZeroThree", - "OneOne", - "OneTwo", - "OneThree", - "TwoTwo", - "TwoThree", - "ThreeThree" - ] - }, "Statement": { "_enum": { "Never": "Null", @@ -1473,7 +2573,24 @@ "Invalid": "Hash" } }, - "SubId": "u32", + "TransientValidationData": { + "maxCodeSize": "u32", + "maxHeadDataSize": "u32", + "balance": "Balance", + "codeUpgradeAllowed": "Option", + "dmqLength": "u32" + }, + "UpgradeGoAhead": { + "_enum": [ + "Abort", + "GoAhead" + ] + }, + "UpgradeRestriction": { + "_enum": [ + "Present" + ] + }, "UpwardMessage": "Bytes", "ValidationFunctionParams": { "maxCodeSize": "u32", @@ -1481,6 +2598,15 @@ "codeUpgradeAllowed": "Option" }, "ValidationCode": "Bytes", + "ValidationCodeHash": "Hash", + "ValidationData": { + "persisted": "PersistedValidationData", + "transient": "TransientValidationData" + }, + "ValidationDataType": { + "validationData": "ValidationData", + "relayChainState": "Vec" + }, "ValidatorSignature": "Signature", "ValidityAttestation": { "_enum": { @@ -1489,12 +2615,25 @@ "Explicit": "ValidatorSignature" } }, - "WinningData": "[WinningDataEntry; 10]", - "WinningDataEntry": "Option" + "MessagingStateSnapshot": { + "relayDispatchQueueSize": "(u32, u32)", + "egressChannels": "Vec" + }, + "MessagingStateSnapshotEgressEntry": "(ParaId, AbridgedHrmpChannel)", + "SystemInherentData": "ParachainInherentData", + "VecInboundHrmpMessage": "Vec" } }, "payment": { "types": { + "FeeDetails": { + "inclusionFee": "Option" + }, + "InclusionFee": { + "baseFee": "Balance", + "lenFee": "Balance", + "adjustedWeightFee": "Balance" + }, "RuntimeDispatchInfo": { "weight": "Weight", "class": "DispatchClass", @@ -1588,15 +2727,19 @@ "Percent": "UInt<8, Percent>", "Permill": "UInt<32, Permill>", "Perquintill": "UInt<64, Perquintill>", - "AccountId": "GenericAccountId", + "AccountId": "AccountId32", + "AccountId20": "GenericEthereumAccountId", + "AccountId32": "GenericAccountId", "AccountIdOf": "AccountId", "AccountIndex": "GenericAccountIndex", - "Address": "LookupSource", + "Address": "MultiAddress", "AssetId": "u32", "Balance": "UInt<128, Balance>", "BalanceOf": "Balance", "Block": "GenericBlock", "BlockNumber": "u32", + "BlockNumberFor": "BlockNumber", + "BlockNumberOf": "BlockNumber", "Call": "GenericCall", "CallHash": "Hash", "CallHashOf": "CallHash", @@ -1604,7 +2747,13 @@ "digestInterval": "u32", "digestLevels": "u32" }, - "ConsensusEngineId": "GenericConsensusEngineId", + "ChangesTrieSignal": { + "_enum": { + "NewConfiguration": "Option" + } + }, + "ConsensusEngineId": "[u8; 4]", + "CodecHash": "Hash", "Digest": { "logs": "Vec" }, @@ -1616,16 +2765,22 @@ "SealV0": "SealV0", "Consensus": "Consensus", "Seal": "Seal", - "PreRuntime": "PreRuntime" + "PreRuntime": "PreRuntime", + "ChangesTrieSignal": "ChangesTrieSignal" } }, "ExtrinsicsWeight": { "normal": "Weight", "operational": "Weight" }, + "H32": "[u8; 4; H32]", + "H64": "[u8; 8; H64]", + "H128": "[u8; 16; H128]", "H160": "[u8; 20; H160]", "H256": "[u8; 32; H256]", "H512": "[u8; 64; H512]", + "H1024": "[u8; 128; H1024]", + "H2048": "[u8; 256; H2048]", "Hash": "H256", "Header": { "parentHash": "Hash", @@ -1634,17 +2789,30 @@ "extrinsicsRoot": "Hash", "digest": "Digest" }, + "HeaderPartial": { + "parentHash": "Hash", + "number": "BlockNumber" + }, "IndicesLookupSource": "GenericLookupSource", "Index": "u32", - "Justification": "Bytes", + "Justification": "(ConsensusEngineId, EncodedJustification)", + "EncodedJustification": "Bytes", + "Justifications": "Vec", "KeyValue": "(StorageKey, StorageData)", "KeyTypeId": "u32", "LockIdentifier": "[u8; 8]", - "LookupSource": "IndicesLookupSource", + "LookupSource": "MultiAddress", "LookupTarget": "AccountId", "ModuleId": "LockIdentifier", "MultiAddress": "GenericMultiAddress", - "Moment": "u64", + "MultiSigner": { + "_enum": { + "Ed25519": "[u8; 32]", + "Sr25519": "[u8; 32]", + "Ecdsa": "[u8; 33]" + } + }, + "Moment": "UInt<64, Moment>", "OpaqueCall": "Bytes", "Origin": "DoNotConstruct", "OriginCaller": { @@ -1652,6 +2820,7 @@ "System": "SystemOrigin" } }, + "PalletId": "LockIdentifier", "PalletsOrigin": "OriginCaller", "PalletVersion": { "major": "u16", @@ -1684,34 +2853,139 @@ "read": "Weight", "write": "Weight" }, - "SignedBlock": { + "SignedBlock": "SignedBlockWithJustifications", + "SignedBlockWithJustification": { + "block": "Block", + "justification": "Option" + }, + "SignedBlockWithJustifications": { "block": "Block", - "justification": "Justification" + "justifications": "Option" }, + "Slot": "u64", "StorageData": "Bytes", + "StorageProof": { + "trieNodes": "Vec" + }, "TransactionPriority": "u64", + "TransactionInfo": { + "_alias": { + "dataSize": "size" + }, + "chunkRoot": "H256", + "contentHash": "H256", + "dataSize": "u32", + "blockChunks": "u32" + }, + "TransactionStorageProof": { + "chunk": "Vec", + "proof": "Vec>" + }, "ValidatorId": "AccountId", + "ValidatorIdOf": "ValidatorId", "Weight": "u64", "WeightMultiplier": "Fixed64", "PreRuntime": "(ConsensusEngineId, Bytes)", "SealV0": "(u64, Signature)", "Seal": "(ConsensusEngineId, Bytes)", "Consensus": "(ConsensusEngineId, Bytes)", - "Bytes": "Vec" + "Bytes": "Vec", + "StorageKey": "Vec" } }, "scaleinfo": { "types": { + "Si0Field": { + "name": "Option", + "type": "Si0LookupTypeId", + "typeName": "Option", + "docs": "Vec" + }, + "Si0LookupTypeId": "u32", + "Si0Path": "Vec", + "Si0Type": { + "path": "Si0Path", + "params": "Vec", + "def": "Si0TypeDef" + }, + "Si0TypeDef": { + "_enum": { + "Composite": "Si0TypeDefComposite", + "Variant": "Si0TypeDefVariant", + "Sequence": "Si0TypeDefSequence", + "Array": "Si0TypeDefArray", + "Tuple": "Si0TypeDefTuple", + "Primitive": "Si0TypeDefPrimitive", + "Compact": "Si0TypeDefCompact", + "Phantom": "Si0TypeDefPhantom", + "BitSequence": "Si0TypeDefBitSequence" + } + }, + "Si0TypeDefArray": { + "len": "u32", + "type": "Si0LookupTypeId" + }, + "Si0TypeDefBitSequence": { + "bitStoreType": "Si0LookupTypeId", + "bitOrderType": "Si0LookupTypeId" + }, + "Si0TypeDefCompact": { + "type": "Si0LookupTypeId" + }, + "Si0TypeDefComposite": { + "fields": "Vec" + }, + "Si0TypeDefPhantom": "Null", + "Si0TypeDefVariant": { + "variants": "Vec" + }, + "Si0TypeDefPrimitive": { + "_enum": [ + "Bool", + "Char", + "Str", + "U8", + "U16", + "U32", + "U64", + "U128", + "U256", + "I8", + "I16", + "I32", + "I64", + "I128", + "I256" + ] + }, + "Si0TypeDefSequence": { + "type": "Si0LookupTypeId" + }, + "Si0TypeDefTuple": "Vec", + "Si0TypeParameter": { + "name": "Text", + "type": "Option" + }, + "Si0Variant": { + "name": "Text", + "fields": "Vec", + "index": "Option", + "discriminant": "Option", + "docs": "Vec" + }, "SiField": { "name": "Option", - "type": "SiLookupTypeId" + "type": "SiLookupTypeId", + "typeName": "Option", + "docs": "Vec" }, - "SiLookupTypeId": "u32", + "SiLookupTypeId": "Compact", "SiPath": "Vec", "SiType": { "path": "SiPath", - "params": "Vec", - "def": "SiTypeDef" + "params": "Vec", + "def": "SiTypeDef", + "docs": "Vec" }, "SiTypeDef": { "_enum": { @@ -1720,19 +2994,27 @@ "Sequence": "SiTypeDefSequence", "Array": "SiTypeDefArray", "Tuple": "SiTypeDefTuple", - "Primitive": "SiTypeDefPrimitive" + "Primitive": "SiTypeDefPrimitive", + "Compact": "SiTypeDefCompact", + "BitSequence": "SiTypeDefBitSequence", + "Range": "SiTypeDefRange", + "HistoricMetaCompat": "Type" } }, "SiTypeDefArray": { - "len": "u16", + "len": "u32", + "type": "SiLookupTypeId" + }, + "SiTypeDefBitSequence": { + "bitStoreType": "SiLookupTypeId", + "bitOrderType": "SiLookupTypeId" + }, + "SiTypeDefCompact": { "type": "SiLookupTypeId" }, "SiTypeDefComposite": { "fields": "Vec" }, - "SiTypeDefVariant": { - "variants": "Vec" - }, "SiTypeDefPrimitive": { "_enum": [ "Bool", @@ -1752,14 +3034,27 @@ "I256" ] }, + "SiTypeDefRange": { + "start": "SiLookupTypeId", + "end": "SiLookupTypeId", + "inclusive": "bool" + }, "SiTypeDefSequence": { "type": "SiLookupTypeId" }, "SiTypeDefTuple": "Vec", + "SiTypeParameter": { + "name": "Text", + "type": "Option" + }, + "SiTypeDefVariant": { + "variants": "Vec" + }, "SiVariant": { "name": "Text", "fields": "Vec", - "discriminant": "Option" + "index": "u8", + "docs": "Vec" } } }, @@ -1787,6 +3082,7 @@ }, "session": { "types": { + "BeefyKey": "[u8; 33]", "Keys": "SessionKeys4", "SessionKeys1": "(AccountId)", "SessionKeys2": "(AccountId, AccountId)", @@ -1794,6 +3090,15 @@ "SessionKeys4": "(AccountId, AccountId, AccountId, AccountId)", "SessionKeys5": "(AccountId, AccountId, AccountId, AccountId, AccountId)", "SessionKeys6": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + "SessionKeys6B": "(AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + "SessionKeys7": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + "SessionKeys7B": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + "SessionKeys8": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + "SessionKeys8B": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + "SessionKeys9": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + "SessionKeys9B": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", + "SessionKeys10": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)", + "SessionKeys10B": "(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)", "FullIdentification": "Exposure", "IdentificationTuple": "(ValidatorId, FullIdentification)", "MembershipProof": { @@ -1848,11 +3153,8 @@ "total": "Points", "individual": "Vec" }, - "ActiveEraInfo": { - "index": "EraIndex", - "start": "Option" - }, - "CompactAssignments": { + "CompactAssignments": "CompactAssignmentsWith16", + "CompactAssignmentsWith16": { "votes1": "Vec<(NominatorIndexCompact, ValidatorIndexCompact)>", "votes2": "Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>", "votes3": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>", @@ -1870,6 +3172,33 @@ "votes15": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>", "votes16": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>" }, + "CompactAssignmentsWith24": { + "votes1": "Vec<(NominatorIndexCompact, ValidatorIndexCompact)>", + "votes2": "Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>", + "votes3": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>", + "votes4": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>", + "votes5": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>", + "votes6": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>", + "votes7": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>", + "votes8": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>", + "votes9": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>", + "votes10": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>", + "votes11": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>", + "votes12": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>", + "votes13": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>", + "votes14": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>", + "votes15": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>", + "votes16": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>", + "votes17": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 16], ValidatorIndexCompact)>", + "votes18": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 17], ValidatorIndexCompact)>", + "votes19": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 18], ValidatorIndexCompact)>", + "votes20": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 19], ValidatorIndexCompact)>", + "votes21": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 20], ValidatorIndexCompact)>", + "votes22": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 21], ValidatorIndexCompact)>", + "votes23": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 22], ValidatorIndexCompact)>", + "votes24": "Vec<(NominatorIndexCompact, [CompactScoreCompact; 23], ValidatorIndexCompact)>" + }, + "CompactAssignmentsTo265": "CompactAssignmentsWith16", "CompactAssignmentsTo257": { "votes1": "Vec<(NominatorIndex, [CompactScore; 0], ValidatorIndex)>", "votes2": "Vec<(NominatorIndex, [CompactScore; 1], ValidatorIndex)>", @@ -1894,9 +3223,17 @@ "_enum": [ "OnChain", "Signed", - "Authority" + "Unsigned" ] }, + "ElectionPhase": { + "_enum": { + "Off": null, + "Signed": null, + "Unsigned": "(bool, BlockNumber)", + "Emergency": null + } + }, "ElectionResult": { "compute": "ElectionCompute", "slotStake": "Balance", @@ -1914,6 +3251,67 @@ "Open": "BlockNumber" } }, + "ExtendedBalance": "u128", + "RawSolution": "RawSolutionWith16", + "RawSolutionWith16": { + "compact": "CompactAssignmentsWith16", + "score": "ElectionScore", + "round": "u32" + }, + "RawSolutionWith24": { + "compact": "CompactAssignmentsWith24", + "score": "ElectionScore", + "round": "u32" + }, + "RawSolutionTo265": "RawSolutionWith16", + "ReadySolution": { + "supports": "SolutionSupports", + "score": "ElectionScore", + "compute": "ElectionCompute" + }, + "RoundSnapshot": { + "voters": "Vec<(AccountId, VoteWeight, Vec)>", + "targets": "Vec" + }, + "SeatHolder": { + "who": "AccountId", + "stake": "Balance", + "deposit": "Balance" + }, + "SignedSubmission": { + "_fallback": "SignedSubmissionTo276", + "who": "AccountId", + "deposit": "Balance", + "solution": "RawSolution", + "reward": "Balance" + }, + "SignedSubmissionTo276": { + "who": "AccountId", + "deposit": "Balance", + "solution": "RawSolution" + }, + "SignedSubmissionOf": "SignedSubmission", + "SolutionOrSnapshotSize": { + "voters": "Compact", + "targets": "Compact" + }, + "SolutionSupport": { + "total": "ExtendedBalance", + "voters": "Vec<(AccountId, ExtendedBalance)>" + }, + "SolutionSupports": "Vec<(AccountId, SolutionSupport)>", + "Supports": "SolutionSupports", + "SubmissionIndicesOf": "BTreeMap", + "Voter": { + "votes": "Vec", + "stake": "Balance", + "deposit": "Balance" + }, + "VoteWeight": "u64", + "ActiveEraInfo": { + "index": "EraIndex", + "start": "Option" + }, "EraIndex": "u32", "EraRewardPoints": { "total": "RewardPoint", @@ -1957,16 +3355,10 @@ "Staked": "Null", "Stash": "Null", "Controller": "Null", - "Account": "AccountId" + "Account": "AccountId", + "None": "Null" } }, - "RewardDestinationTo257": { - "_enum": [ - "Staked", - "Stash", - "Controller" - ] - }, "RewardPoint": "u32", "SlashJournalEntry": { "who": "AccountId", @@ -2023,9 +3415,14 @@ }, "ValidatorIndex": "u16", "ValidatorIndexCompact": "Compact", - "ValidatorPrefs": { + "ValidatorPrefs": "ValidatorPrefsWithBlocked", + "ValidatorPrefsWithCommission": { "commission": "Compact" }, + "ValidatorPrefsWithBlocked": { + "commission": "Compact", + "blocked": "bool" + }, "ValidatorPrefsTo196": { "validatorPayment": "Compact" }, @@ -2038,6 +3435,29 @@ "state": { "types": { "ApiId": "[u8; 8]", + "BlockTrace": { + "blockHash": "Text", + "parentHash": "Text", + "tracingTargets": "Text", + "storageKeys": "Text", + "spans": "Vec", + "events": "Vec" + }, + "BlockTraceEvent": { + "target": "Text", + "data": "BlockTraceEventData", + "parentId": "Option" + }, + "BlockTraceEventData": { + "stringValues": "HashMap" + }, + "BlockTraceSpan": { + "id": "u64", + "parentId": "Option", + "name": "Text", + "target": "Text", + "wasm": "bool" + }, "KeyValueOption": "(StorageKey, Option)", "ReadProof": { "at": "Hash", @@ -2053,9 +3473,22 @@ "apis": "Vec", "transactionVersion": "u32" }, + "RuntimeVersionPartial": { + "specName": "Text", + "specVersion": "u32" + }, "StorageChangeSet": { "block": "Hash", "changes": "Vec" + }, + "TraceBlockResponse": { + "_enum": { + "TraceError": "TraceError", + "BlockTrace": "BlockTrace" + } + }, + "TraceError": { + "error": "Text" } } }, @@ -2074,17 +3507,51 @@ }, "system": { "types": { - "AccountInfo": { + "AccountInfo": "AccountInfoWithTripleRefCount", + "AccountInfoWithRefCountU8": { + "nonce": "Index", + "refcount": "u8", + "data": "AccountData" + }, + "AccountInfoWithRefCount": { + "_fallback": "AccountInfoWithRefCountU8", "nonce": "Index", "refcount": "RefCount", "data": "AccountData" }, + "AccountInfoWithDualRefCount": { + "_fallback": "AccountInfoWithRefCount", + "nonce": "Index", + "consumers": "RefCount", + "providers": "RefCount", + "data": "AccountData" + }, + "AccountInfoWithProviders": "AccountInfoWithDualRefCount", + "AccountInfoWithTripleRefCount": { + "_fallback": "AccountInfoWithDualRefCount", + "nonce": "Index", + "consumers": "RefCount", + "providers": "RefCount", + "sufficients": "RefCount", + "data": "AccountData" + }, "ApplyExtrinsicResult": "Result", - "ChainProperties": { - "ss58Format": "Option", - "tokenDecimals": "Option", - "tokenSymbol": "Option" + "ArithmeticError": { + "_enum": [ + "Underflow", + "Overflow", + "DivisionByZero" + ] }, + "BlockLength": { + "max": "PerDispatchClassU32" + }, + "BlockWeights": { + "baseBlock": "Weight", + "maxBlock": "Weight", + "perClass": "PerDispatchClassWeightsPerClass" + }, + "ChainProperties": "GenericChainProperties", "ChainType": { "_enum": { "Development": "Null", @@ -2093,6 +3560,7 @@ "Custom": "Text" } }, + "ConsumedWeight": "PerDispatchClassWeight", "DigestOf": "Digest", "DispatchClass": { "_enum": [ @@ -2106,7 +3574,11 @@ "Other": "Null", "CannotLookup": "Null", "BadOrigin": "Null", - "Module": "DispatchErrorModule" + "Module": "DispatchErrorModule", + "ConsumerRemaining": "Null", + "NoProviders": "Null", + "Token": "TokenError", + "Arithmetic": "ArithmeticError" } }, "DispatchErrorModule": { @@ -2228,6 +3700,21 @@ "bestHash": "Hash", "bestNumber": "BlockNumber" }, + "PerDispatchClassU32": { + "normal": "u32", + "operational": "u32", + "mandatory": "u32" + }, + "PerDispatchClassWeight": { + "normal": "Weight", + "operational": "Weight", + "mandatory": "Weight" + }, + "PerDispatchClassWeightsPerClass": { + "normal": "WeightPerClass", + "operational": "WeightPerClass", + "mandatory": "WeightPerClass" + }, "Phase": { "_enum": { "ApplyExtrinsic": "u32", @@ -2250,6 +3737,18 @@ "highestBlock": "Option" }, "SystemOrigin": "RawOrigin", + "TokenError": { + "_enum": [ + "NoFunds", + "WouldDie", + "BelowMinimum", + "CannotCreate", + "UnknownAsset", + "Frozen", + "Underflow", + "Overflow" + ] + }, "TransactionValidityError": { "_enum": { "Invalid": "InvalidTransaction", @@ -2262,6 +3761,12 @@ "NoUnsignedValidator": "Null", "Custom": "u8" } + }, + "WeightPerClass": { + "baseExtrinsic": "Weight", + "maxExtrinsic": "Weight", + "maxTotal": "Option", + "reserved": "Option" } } }, @@ -2329,6 +3834,47 @@ "Multiplier": "Fixed128" } }, + "uniques": { + "types": { + "ClassId": "u32", + "InstanceId": "u32", + "DepositBalance": "Balance", + "DepositBalanceOf": "Balance", + "ClassDetails": { + "owner": "AccountId", + "issuer": "AccountId", + "admin": "AccountId", + "freezer": "AccountId", + "totalDeposit": "DepositBalance", + "freeHolding": "bool", + "instances": "u32", + "instanceMetadatas": "u32", + "attributes": "u32", + "isFrozen": "bool" + }, + "DestroyWitness": { + "instances": "Compact", + "instanceMetadatas": "Compact", + "attributes": "Compact" + }, + "InstanceDetails": { + "owner": "AccountId", + "approved": "Option", + "isFrozen": "bool", + "deposit": "DepositBalance" + }, + "ClassMetadata": { + "deposit": "DepositBalance", + "data": "Vec", + "isFrozen": "bool" + }, + "InstanceMetadata": { + "deposit": "DepositBalance", + "data": "Vec", + "isFrozen": "bool" + } + } + }, "utility": { "types": { "Multisig": { @@ -2351,5 +3897,479 @@ "startingBlock": "BlockNumber" } } + }, + "xcm": { + "types": { + "BodyId": { + "_enum": { + "Unit": "Null", + "Named": "Vec", + "Index": "Compact", + "Executive": "Null", + "Technical": "Null", + "Legislative": "Null", + "Judicial": "Null" + } + }, + "BodyPart": { + "_enum": { + "Voice": "Null", + "Members": "Compact", + "Fraction": { + "nom": "Compact", + "denom": "Compact" + }, + "AtLeastProportion": { + "nom": "Compact", + "denom": "Compact" + }, + "MoreThanProportion": { + "nom": "Compact", + "denom": "Compact" + } + } + }, + "Junction": { + "_enum": { + "Parent": "Null", + "Parachain": "Compact", + "AccountId32": { + "network": "NetworkId", + "id": "AccountId" + }, + "AccountIndex64": { + "network": "NetworkId", + "index": "Compact" + }, + "AccountKey20": { + "network": "NetworkId", + "key": "[u8; 20]" + }, + "PalletInstance": "u8", + "GeneralIndex": "Compact", + "GeneralKey": "Vec", + "OnlyChild": "Null", + "Plurality": { + "id": "BodyId", + "part": "BodyPart" + } + } + }, + "NetworkId": { + "_enum": { + "Any": "Null", + "Named": "Vec", + "Polkadot": "Null", + "Kusama": "Null" + } + }, + "XcmAssetId": { + "_enum": { + "Concrete": "MultiLocation", + "Abstract": "Bytes" + } + }, + "AssetInstance": "AssetInstanceV1", + "AssetInstanceV0": { + "_enum": { + "Undefined": "Null", + "Index8": "u8", + "Index16": "Compact", + "Index32": "Compact", + "Index64": "Compact", + "Index128": "Compact", + "Array4": "[u8; 4]", + "Array8": "[u8; 8]", + "Array16": "[u8; 16]", + "Array32": "[u8; 32]", + "Blob": "Vec" + } + }, + "AssetInstanceV1": { + "_enum": { + "Undefined": "Null", + "Index": "Compact", + "Array4": "[u8; 4]", + "Array8": "[u8; 8]", + "Array16": "[u8; 16]", + "Array32": "[u8; 32]", + "Blob": "Bytes" + } + }, + "Fungibility": { + "_enum": { + "Fungible": "u128", + "NonFungible": "AssetInstance" + } + }, + "InboundStatus": { + "_enum": [ + "Ok", + "Suspended" + ] + }, + "OutboundStatus": { + "_enum": [ + "Ok", + "Suspended" + ] + }, + "MultiAssetFilter": "MultiAssetFilterV1", + "MultiAssetFilterV1": { + "_enum": { + "Definite": "MultiAssetsV1", + "Wild": "WildMultiAssetV1" + } + }, + "MultiAsset": "MultiAssetV1", + "MultiAssetV0": { + "_enum": { + "None": "Null", + "All": "Null", + "AllFungible": "Null", + "AllNonFungible": "Null", + "AllAbstractFungible": "Vec", + "AllAbstractNonFungible": "Vec", + "AllConcreteFungible": "MultiLocation", + "AllConcreteNonFungible": "MultiLocation", + "AbstractFungible": { + "id": "Vec", + "instance": "Compact" + }, + "AbstractNonFungible": { + "class": "Vec", + "instance": "AssetInstance" + }, + "ConcreteFungible": { + "id": "MultiLocation", + "amount": "Compact" + }, + "ConcreteNonFungible": { + "class": "MultiLocation", + "instance": "AssetInstance" + } + } + }, + "MultiAssetV1": { + "id": "XcmAssetId", + "fungibility": "Fungibility" + }, + "MultiAssets": "Vec", + "MultiAssetsV1": "Vec", + "WildFungibility": { + "_enum": [ + "Fungible", + "NonFungible" + ] + }, + "WildMultiAsset": "WildMultiAssetV1", + "WildMultiAssetV1": { + "_enum": { + "All": "Null", + "AllOf": { + "id": "XcmAssetId", + "fungibility": "WildFungibility" + } + } + }, + "XcmOrigin": { + "_enum": { + "Xcm": "MultiLocation" + } + }, + "Xcm": "XcmV1", + "XcmV0": { + "_enum": { + "WithdrawAsset": { + "assets": "Vec", + "effects": "Vec" + }, + "ReserveAssetDeposit": { + "assets": "Vec", + "effects": "Vec" + }, + "ReceiveTeleportedAsset": { + "assets": "Vec", + "effects": "Vec" + }, + "QueryResponse": { + "queryId": "Compact", + "response": "XcmResponse" + }, + "TransferAsset": { + "assets": "Vec", + "dest": "MultiLocationV0" + }, + "TransferReserveAsset": { + "assets": "Vec", + "dest": "MultiLocationV0", + "effects": "Vec" + }, + "Transact": { + "originType": "XcmOriginKind", + "requireWeightAtMost": "u64", + "call": "DoubleEncodedCall" + }, + "HrmpNewChannelOpenRequest": { + "sender": "Compact", + "maxMessageSize": "Compact", + "maxCapacity": "Compact" + }, + "HrmpChannelAccepted": { + "recipient": "Compact" + }, + "HrmpChannelClosing": { + "initiator": "Compact", + "sender": "Compact", + "recipient": "Compact" + }, + "RelayedFrom": { + "who": "MultiLocationV0", + "message": "XcmV0" + } + } + }, + "XcmV1": { + "_enum": { + "WithdrawAsset": { + "Vassets": "MultiAssetsV1", + "effects": "Vec" + }, + "ReserveAssetDeposit": { + "Vassets": "MultiAssetsV1", + "effects": "Vec" + }, + "ReceiveTeleportedAsset": { + "Vassets": "MultiAssetsV1", + "effects": "Vec" + }, + "QueryResponse": { + "queryId": "Compact", + "response": "XcmResponse" + }, + "TransferAsset": { + "Vassets": "MultiAssetsV1", + "dest": "MultiLocationV1" + }, + "TransferReserveAsset": { + "Vassets": "MultiAssetsV1", + "dest": "MultiLocationV1", + "effects": "Vec" + }, + "Transact": { + "originType": "XcmOriginKind", + "requireWeightAtMost": "u64", + "call": "DoubleEncodedCall" + }, + "HrmpNewChannelOpenRequest": { + "sender": "Compact", + "maxMessageSize": "Compact", + "maxCapacity": "Compact" + }, + "HrmpChannelAccepted": { + "recipient": "Compact" + }, + "HrmpChannelClosing": { + "initiator": "Compact", + "sender": "Compact", + "recipient": "Compact" + }, + "RelayedFrom": { + "who": "MultiLocationV1", + "message": "XcmV1" + } + } + }, + "XcmpMessageFormat": { + "_enum": [ + "ConcatenatedVersionedXcm", + "ConcatenatedEncodedBlob", + "Signals" + ] + }, + "XcmOrder": "XcmOrderV1", + "XcmOrderV0": { + "_enum": { + "Null": "Null", + "DepositAsset": { + "assets": "Vec", + "dest": "MultiLocationV0" + }, + "DepositReserveAsset": { + "assets": "Vec", + "dest": "MultiLocationV0", + "effects": "Vec" + }, + "ExchangeAsset": { + "give": "Vec", + "receive": "Vec" + }, + "InitiateReserveWithdraw": { + "assets": "Vec", + "reserve": "MultiLocationV0", + "effects": "Vec" + }, + "InitiateTeleport": { + "assets": "Vec", + "dest": "MultiLocationV0", + "effects": "Vec" + }, + "QueryHolding": { + "queryId": "Compact", + "dest": "MultiLocationV0", + "assets": "Vec" + }, + "BuyExecution": { + "fees": "MultiAsset", + "weight": "u64", + "debt": "u64", + "haltOnError": "bool", + "xcm": "Vec" + } + } + }, + "XcmOrderV1": { + "_enum": { + "Noop": "Null", + "DepositAsset": { + "assets": "MultiAssetFilterV1", + "maxAssets": "u32", + "beneficiary": "MultiLocationV1" + }, + "DepositReserveAsset": { + "assets": "MultiAssetFilterV1", + "maxAssets": "u32", + "dest": "MultiLocationV1", + "effects": "Vec" + }, + "ExchangeAsset": { + "give": "MultiAssetFilterV1", + "receive": "MultiAssetsV1" + }, + "InitiateReserveWithdraw": { + "assets": "MultiAssetFilterV1", + "reserve": "MultiLocationV1", + "effects": "Vec" + }, + "InitiateTeleport": { + "assets": "MultiAssetFilterV1", + "dest": "MultiLocationV1", + "effects": "Vec" + }, + "QueryHolding": { + "queryId": "Compact", + "dest": "MultiLocationV1", + "assets": "MultiAssetFilterV1" + }, + "BuyExecution": { + "fees": "MultiAsset", + "weight": "u64", + "debt": "u64", + "haltOnError": "bool", + "orders": "Vec", + "instructions": "Vec" + } + } + }, + "DoubleEncodedCall": { + "encoded": "Vec" + }, + "XcmOriginKind": { + "_enum": [ + "Native", + "SovereignAccount", + "Superuser", + "Xcm" + ] + }, + "XcmResponse": { + "_enum": { + "Assets": "Vec" + } + }, + "XcmError": { + "_enum": { + "Undefined": "Null", + "Overflow": "Null", + "Unimplemented": "Null", + "UnhandledXcmVersion": "Null", + "UnhandledXcmMessage": "Null", + "UnhandledEffect": "Null", + "EscalationOfPrivilege": "Null", + "UntrustedReserveLocation": "Null", + "UntrustedTeleportLocation": "Null", + "DestinationBufferOverflow": "Null", + "SendFailed": "Null", + "CannotReachDestination": "(MultiLocation, Xcm)", + "MultiLocationFull": "Null", + "FailedToDecode": "Null", + "BadOrigin": "Null", + "ExceedsMaxMessageSize": "Null", + "FailedToTransactAsset": "Null", + "WeightLimitReached": "Weight", + "Wildcard": "Null", + "TooMuchWeightRequired": "Null", + "NotHoldingFees": "Null", + "WeightNotComputable": "Null", + "Barrier": "Null", + "NotWithdrawable": "Null", + "LocationCannotHold": "Null", + "TooExpensive": "Null" + } + }, + "MultiLocationV0": "MultiLocation", + "MultiLocationV1": "MultiLocation", + "MultiLocation": { + "_enum": { + "Here": "Null", + "X1": "Junction", + "X2": "(Junction, Junction)", + "X3": "(Junction, Junction, Junction)", + "X4": "(Junction, Junction, Junction, Junction)", + "X5": "(Junction, Junction, Junction, Junction, Junction)", + "X6": "(Junction, Junction, Junction, Junction, Junction, Junction)", + "X7": "(Junction, Junction, Junction, Junction, Junction, Junction, Junction)", + "X8": "(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction)" + } + }, + "Outcome": { + "_enum": { + "Complete": "Weight", + "Incomplete": "(Weight, XcmError)", + "Error": "XcmError" + } + }, + "QueueConfigData": { + "suspendThreshold": "u32", + "dropThreshold": "u32", + "resumeThreshold": "u32", + "thresholdWeight": "Weight", + "weightRestrictDecay": "Weight" + }, + "VersionedMultiAsset": { + "_enum": { + "V0": "MultiAssetV0", + "V1": "MultiAssetV1" + } + }, + "VersionedMultiAssets": { + "_enum": { + "V0": "Vec", + "V1": "MultiAssetsV1" + } + }, + "VersionedMultiLocation": { + "_enum": { + "V0": "MultiLocationV0", + "V1": "MultiLocationV1" + } + }, + "VersionedXcm": { + "_enum": { + "V0": "XcmV0", + "V1": "XcmV1" + } + } + } } } diff --git a/extras/src/definitions/extrinsics.json b/extras/src/definitions/extrinsics.json index f1710713..ea278989 100644 --- a/extras/src/definitions/extrinsics.json +++ b/extras/src/definitions/extrinsics.json @@ -1,62 +1,94 @@ { - "default": { - "signature": "(Address, MultiSignature, SignedExtra)", - "empty_extra": "[u8; 0]", - "OnlyStakingAndClaims": "empty_extra", - "CheckSpecVersion": "empty_extra", - "CheckVersion": "empty_extra", - "CheckTxVersion": "empty_extra", - "CheckGenesis": "empty_extra", - "CheckWeight": "empty_extra", - "LimitParathreadCommits": "empty_extra", - "TransactionCallFilter": "empty_extra", - "ValidateDoubleVoteReports": "empty_extra", - "ValidateEquivocationReport": "empty_extra", - "RestrictFunctionality": "empty_extra", - "PrevalidateAttests": "empty_extra", - "ChargeTransactionPayment": "Compact", - "AccountIndex": "u32", - "AccountId": "[u8; 32]", - "Lookup": "LookupSource", + "default":{ + "signature":"(Address, MultiSignature, SignedExtra)", + "empty_extra":null, + "OnlyStakingAndClaims":null, + "CheckSpecVersion":null, + "CheckVersion":null, + "CheckTxVersion":null, + "CheckGenesis":null, + "CheckWeight":null, + "LimitParathreadCommits":null, + "TransactionCallFilter":null, + "ValidateDoubleVoteReports":null, + "ValidateEquivocationReport":null, + "RestrictFunctionality":null, + "PrevalidateAttests":null, + "ChargeTransactionPayment":"Compact", + "AccountIndex":"u32", + "AccountId":"[u8; 32]", + "Lookup":"LookupSource", "CheckEra": "Era", - "CheckNonce": "Compact", - "Address": "LookupSource", - "GenericAddress": "LookupSource" - }, - "kusama": [ + "CheckMortality": "Era", + "CheckNonce":"Compact", + "Address":"LookupSource", + "GenericAddress":"LookupSource" + }, + "kusama":[ { - "minmax": [ - 0, - 1006 - ], - "types": { - "signature": "(Address, AnySignature, SignedExtra)", - "Address": "AccountId", - "AnySignature": "H512", - "TakeFees": "empty_extra", - "SignedExtra": "(OnlyStakingAndClaims, CheckSpecVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, TakeFees)" - } + "minmax":[ + 0, + 1006 + ], + "types":{ + "signature":"(Address, AnySignature, SignedExtra)", + "Address":"AccountId", + "AnySignature":"H512", + "TakeFees":null, + "SignedExtra":"(OnlyStakingAndClaims, CheckSpecVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, TakeFees)" + } }, { - "minmax": [ - 1007, - 1045 - ], - "types": { - "AccountIndex": "u32", - "AccountId": "[u8; 32]", - "SignedExtra": "(OnlyStakingAndClaims, CheckSpecVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, ChargeTransactionPayment, LimitParathreadCommits)" - } + "minmax":[ + 1007, + 1045 + ], + "types":{ + "AccountIndex":"u32", + "AccountId":"[u8; 32]", + "SignedExtra":"(OnlyStakingAndClaims, CheckSpecVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, ChargeTransactionPayment, LimitParathreadCommits)" + } }, { - "minmax": [ - 1046, - null - ], - "types": { - "Address": "AccountId", - "SignedExtra": "(OnlyStakingAndClaims, CheckSpecVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, ChargeTransactionPayment, LimitParathreadCommits)" - } - } - ] + "minmax":[ + 1046, + 1049 + ], + "types":{ + "Address":"AccountId", + "SignedExtra":"(OnlyStakingAndClaims, CheckSpecVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, ChargeTransactionPayment, LimitParathreadCommits)" + } + }, + { + "minmax": [ + 1050, + 2014 + ], + "types": { + "Address": "AccountId", + "SignedExtra": "(CheckVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, ChargeTransactionPayment, LimitParathreadCommits)" + } + }, + { + "minmax": [ + 2015, + 2027 + ], + "types": { + "Address": "AccountId", + "SignedExtra": "(CheckVersion, CheckGenesis, CheckMortality, CheckNonce, CheckWeight, ChargeTransactionPayment, LimitParathreadCommits)" + } + }, + { + "minmax": [ + 2028, + null + ], + "types": { + "signature": "(MultiAddress, MultiSignature, SignedExtra)", + "Address": "MultiAddress", + "SignedExtra": "(CheckVersion, CheckGenesis, CheckMortality, CheckNonce, CheckWeight, ChargeTransactionPayment, LimitParathreadCommits)" + } + } + ] } diff --git a/extras/src/definitions/overrides.json b/extras/src/definitions/overrides.json index 11d7f2be..f7ea1321 100644 --- a/extras/src/definitions/overrides.json +++ b/extras/src/definitions/overrides.json @@ -1,14 +1,38 @@ { "TYPES_MODULES": { + "assets": { + "Approval": "AssetApproval", + "ApprovalKey": "AssetApprovalKey", + "Balance": "TAssetBalance", + "DestroyWitness": "AssetDestroyWitness" + }, "babe": { "EquivocationProof": "BabeEquivocationProof" }, "balances": { "Status": "BalanceStatus" }, + "beefy": { + "AuthorityId": "BeefyId" + }, "contracts": { "StorageKey": "ContractStorageKey" }, + "electionProviderMultiPhase": { + "Phase": "ElectionPhase" + }, + "ethereum": { + "Block": "EthBlock", + "Header": "EthHeader", + "Receipt": "EthReceipt", + "Transaction": "EthTransaction", + "TransactionStatus": "EthTransactionStatus" + }, + "evm": { + "Account": "EvmAccount", + "Log": "EvmLog", + "Vicinity": "EvmVicinity" + }, "grandpa": { "Equivocation": "GrandpaEquivocation", "EquivocationProof": "GrandpaEquivocationProof" @@ -16,15 +40,42 @@ "identity": { "Judgement": "IdentityJudgement" }, + "inclusion": { + "ValidatorIndex": "ParaValidatorIndex" + }, + "paraInclusion": { + "ValidatorIndex": "ParaValidatorIndex" + }, + "paraScheduler": { + "ValidatorIndex": "ParaValidatorIndex" + }, + "paraShared": { + "ValidatorIndex": "ParaValidatorIndex" + }, "parachains": { "Id": "ParaId" }, + "parasInclusion": { + "ValidatorIndex": "ParaValidatorIndex" + }, + "parasScheduler": { + "ValidatorIndex": "ParaValidatorIndex" + }, + "parasShared": { + "ValidatorIndex": "ParaValidatorIndex" + }, "proposeParachain": { "Proposal": "ParachainProposal" }, "proxy": { "Announcement": "ProxyAnnouncement" }, + "scheduler": { + "ValidatorIndex": "ParaValidatorIndex" + }, + "shared": { + "ValidatorIndex": "ParaValidatorIndex" + }, "society": { "Judgement": "SocietyJudgement", "Vote": "SocietyVote" @@ -34,25 +85,32 @@ }, "treasury": { "Proposal": "TreasuryProposal" + }, + "xcm": { + "AssetId": "XcmAssetId" + }, + "xcmPallet": { + "AssetId": "XcmAssetId" } }, "TYPES_SPEC": { "centrifuge-chain": [ { "minmax": [ - 229, - 234 + 240, + 999 ], "types": { - "Address": "LookupSource", - "LookupSource": "IndicesLookupSource", "AnchorData": { "anchoredBlock": "u64", "docRoot": "H256", "id": "H256" }, - "ChainId": "u8", - "DepositNonce": "u64", + "PreCommitData": { + "expirationBlock": "u64", + "identity": "H256", + "signingRoot": "H256" + }, "Fee": { "key": "Hash", "price": "Balance" @@ -63,39 +121,61 @@ "signatories": "Vec", "threshold": "u16" }, - "Multiplier": "Fixed64", - "PreCommitData": { - "expirationBlock": "u64", - "identity": "H256", - "signingRoot": "H256" + "ChainId": "u8", + "DepositNonce": "u64", + "ResourceId": "[u8; 32]", + "chainbridge::ChainId": "u8", + "RegistryId": "H160", + "TokenId": "U256", + "AssetId": { + "registryId": "RegistryId", + "tokenId": "TokenId" + }, + "AssetInfo": { + "metadata": "Bytes" + }, + "MintInfo": { + "anchorId": "Hash", + "proofs": "Vec", + "staticHashes": "[Hash; 3]" }, "Proof": { "leafHash": "H256", "sortedHashes": "H256" }, - "ResourceId": "[u8; 32]", - "chainbridge::ChainId": "u8", - "RefCount": "RefCountTo259", - "ReferendumInfo": "ReferendumInfoTo239", - "StakingLedger": "StakingLedgerTo240", - "Weight": "u32" + "ProofMint": { + "hashes": "Vec", + "property": "Bytes", + "salt": "[u8; 32]", + "value": "Bytes" + }, + "RegistryInfo": { + "fields": "Vec", + "ownerCanBurn": "bool" + }, + "AccountInfo": "AccountInfoWithRefCount", + "Address": "LookupSource", + "LookupSource": "IndicesLookupSource", + "Multiplier": "Fixed64", + "RefCount": "RefCountTo259" } }, { "minmax": [ - 235, + 1000, null ], "types": { - "Address": "LookupSource", - "LookupSource": "IndicesLookupSource", "AnchorData": { "anchoredBlock": "u64", "docRoot": "H256", "id": "H256" }, - "ChainId": "u8", - "DepositNonce": "u64", + "PreCommitData": { + "expirationBlock": "u64", + "identity": "H256", + "signingRoot": "H256" + }, "Fee": { "key": "Hash", "price": "Balance" @@ -106,19 +186,38 @@ "signatories": "Vec", "threshold": "u16" }, - "Multiplier": "Fixed64", - "PreCommitData": { - "expirationBlock": "u64", - "identity": "H256", - "signingRoot": "H256" + "ChainId": "u8", + "DepositNonce": "u64", + "ResourceId": "[u8; 32]", + "chainbridge::ChainId": "u8", + "RegistryId": "H160", + "TokenId": "U256", + "AssetId": { + "registryId": "RegistryId", + "tokenId": "TokenId" + }, + "AssetInfo": { + "metadata": "Bytes" + }, + "MintInfo": { + "anchorId": "Hash", + "proofs": "Vec", + "staticHashes": "[Hash; 3]" }, "Proof": { "leafHash": "H256", "sortedHashes": "H256" }, - "ResourceId": "[u8; 32]", - "chainbridge::ChainId": "u8", - "RefCount": "RefCountTo259" + "ProofMint": { + "hashes": "Vec", + "property": "Bytes", + "salt": "[u8; 32]", + "value": "Bytes" + }, + "RegistryInfo": { + "fields": "Vec", + "ownerCanBurn": "bool" + } } } ], @@ -129,18 +228,21 @@ 1031 ], "types": { + "AccountInfo": "AccountInfoWithRefCount", "Address": "LookupSource", - "BalanceLock": "BalanceLockTo212", "CompactAssignments": "CompactAssignmentsTo257", - "DispatchError": "DispatchErrorTo198", - "DispatchInfo": "DispatchInfoTo244", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", "LookupSource": "IndicesLookupSource", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "BalanceLock": "BalanceLockTo212", + "DispatchError": "DispatchErrorTo198", + "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "Multiplier": "Fixed64", "OpenTip": "OpenTipTo225", "RefCount": "RefCountTo259", "ReferendumInfo": "ReferendumInfoTo239", - "RewardDestination": "RewardDestinationTo257", "SlashingSpans": "SlashingSpansTo204", "StakingLedger": "StakingLedgerTo223", "Votes": "VotesTo230", @@ -153,17 +255,20 @@ 1042 ], "types": { + "AccountInfo": "AccountInfoWithRefCount", "Address": "LookupSource", - "BalanceLock": "BalanceLockTo212", "CompactAssignments": "CompactAssignmentsTo257", - "DispatchInfo": "DispatchInfoTo244", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", "LookupSource": "IndicesLookupSource", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "BalanceLock": "BalanceLockTo212", + "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "Multiplier": "Fixed64", "OpenTip": "OpenTipTo225", "RefCount": "RefCountTo259", "ReferendumInfo": "ReferendumInfoTo239", - "RewardDestination": "RewardDestinationTo257", "SlashingSpans": "SlashingSpansTo204", "StakingLedger": "StakingLedgerTo223", "Votes": "VotesTo230", @@ -176,17 +281,20 @@ 1045 ], "types": { + "AccountInfo": "AccountInfoWithRefCount", "Address": "LookupSource", - "BalanceLock": "BalanceLockTo212", "CompactAssignments": "CompactAssignmentsTo257", - "DispatchInfo": "DispatchInfoTo244", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", "LookupSource": "IndicesLookupSource", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "BalanceLock": "BalanceLockTo212", + "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "Multiplier": "Fixed64", "OpenTip": "OpenTipTo225", "RefCount": "RefCountTo259", "ReferendumInfo": "ReferendumInfoTo239", - "RewardDestination": "RewardDestinationTo257", "StakingLedger": "StakingLedgerTo223", "Votes": "VotesTo230", "Weight": "u32" @@ -198,25 +306,29 @@ 1054 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Governance", "Staking", - "IdentityJudgement" + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "Multiplier": "Fixed64", "OpenTip": "OpenTipTo225", "RefCount": "RefCountTo259", "ReferendumInfo": "ReferendumInfoTo239", - "RewardDestination": "RewardDestinationTo257", "StakingLedger": "StakingLedgerTo240", "Weight": "u32" } @@ -227,24 +339,28 @@ 1056 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Governance", "Staking", - "IdentityJudgement" + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "Multiplier": "Fixed64", "OpenTip": "OpenTipTo225", "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257", "StakingLedger": "StakingLedgerTo240", "Weight": "u32" } @@ -255,23 +371,27 @@ 1061 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Governance", "Staking", - "IdentityJudgement" + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "OpenTip": "OpenTipTo225", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "RefCount": "RefCountTo259" } }, { @@ -280,22 +400,25 @@ 2012 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Governance", "Staking", - "IdentityJudgement" + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", "OpenTip": "OpenTipTo225", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "RefCount": "RefCountTo259" } }, { @@ -304,21 +427,24 @@ 2022 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Governance", "Staking", - "IdentityJudgement" + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "RefCount": "RefCountTo259" } }, { @@ -327,74 +453,136 @@ 2024 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Governance", "Staking", - "IdentityJudgement" + "IdentityJudgement", + "CancelProxy" ] }, + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", "RefCount": "RefCountTo259" } }, { "minmax": [ 2025, - null + 2027 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "Governance", + "Staking", + "IdentityJudgement", + "CancelProxy" + ] + }, + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission" + } + }, + { + "minmax": [ + 2028, + 2029 + ], + "types": { + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", + "Keys": "SessionKeys6", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Governance", "Staking", - "IdentityJudgement" + "IdentityJudgement", + "CancelProxy" ] - } + }, + "AccountInfo": "AccountInfoWithDualRefCount" } - } - ], - "node": [ + }, { "minmax": [ - 0, - 259 + 2030, + 9000 ], "types": { - "Address": "LookupSource", - "LookupSource": "IndicesLookupSource" + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", + "Keys": "SessionKeys6", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "Governance", + "Staking", + "IdentityJudgement", + "CancelProxy" + ] + } } }, { "minmax": [ - 260, + 9010, null ], "types": { - "Address": "MultiAddress", - "LookupSource": "MultiAddress" + "CompactAssignments": "CompactAssignmentsWith24", + "RawSolution": "RawSolutionWith24", + "Keys": "SessionKeys6", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "Governance", + "Staking", + "IdentityJudgement", + "CancelProxy" + ] + }, + "AssetInstance": "AssetInstanceV0", + "MultiAsset": "MultiAssetV0", + "Xcm": "XcmV0", + "XcmOrder": "XcmOrderV0" } } ], + "node": [ + { + "minmax": [ + 0, + null + ], + "types": {} + } + ], "node-template": [ { "minmax": [ 0, null ], - "types": { - "Address": "AccountId", - "LookupSource": "AccountId" - } + "types": {} } ], "polkadot": [ @@ -404,23 +592,26 @@ 12 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { - "_enum": [ - "Any", - "NonTransfer", - "Governance", - "Staking", - "Unused", - "IdentityJudgement" - ] + "_enum": { + "Any": 0, + "NonTransfer": 1, + "Governance": 2, + "Staking": 3, + "UnusedSudoBalances": 4, + "IdentityJudgement": 5, + "CancelProxy": 6 + } }, - "CompactAssignments": "CompactAssignmentsTo257", + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", "OpenTip": "OpenTipTo225", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "RefCount": "RefCountTo259" } }, { @@ -429,22 +620,25 @@ 22 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { - "_enum": [ - "Any", - "NonTransfer", - "Governance", - "Staking", - "Unused", - "IdentityJudgement" - ] + "_enum": { + "Any": 0, + "NonTransfer": 1, + "Governance": 2, + "Staking": 3, + "UnusedSudoBalances": 4, + "IdentityJudgement": 5, + "CancelProxy": 6 + } }, - "CompactAssignments": "CompactAssignmentsTo257", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "RefCount": "RefCountTo259" } }, { @@ -453,40 +647,95 @@ 24 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { - "_enum": [ - "Any", - "NonTransfer", - "Governance", - "Staking", - "Unused", - "IdentityJudgement" - ] + "_enum": { + "Any": 0, + "NonTransfer": 1, + "Governance": 2, + "Staking": 3, + "UnusedSudoBalances": 4, + "IdentityJudgement": 5, + "CancelProxy": 6 + } }, + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", "RefCount": "RefCountTo259" } }, { "minmax": [ 25, - null + 27 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", + "ProxyType": { + "_enum": { + "Any": 0, + "NonTransfer": 1, + "Governance": 2, + "Staking": 3, + "UnusedSudoBalances": 4, + "IdentityJudgement": 5, + "CancelProxy": 6 + } + }, + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission" + } + }, + { + "minmax": [ + 28, + 29 + ], + "types": { + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", + "Keys": "SessionKeys6", "ProxyType": { - "_enum": [ - "Any", - "NonTransfer", - "Governance", - "Staking", - "Unused", - "IdentityJudgement" - ] + "_enum": { + "Any": 0, + "NonTransfer": 1, + "Governance": 2, + "Staking": 3, + "UnusedSudoBalances": 4, + "IdentityJudgement": 5, + "CancelProxy": 6 + } + }, + "AccountInfo": "AccountInfoWithDualRefCount" + } + }, + { + "minmax": [ + 30, + null + ], + "types": { + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", + "Keys": "SessionKeys6", + "ProxyType": { + "_enum": { + "Any": 0, + "NonTransfer": 1, + "Governance": 2, + "Staking": 3, + "UnusedSudoBalances": 4, + "IdentityJudgement": 5, + "CancelProxy": 6 + } } } } @@ -495,31 +744,110 @@ { "minmax": [ 0, - 9 + 200 ], "types": { + "FullIdentification": "()", + "Keys": "SessionKeys7B", + "AccountInfo": "AccountInfoWithDualRefCount", "Address": "AccountId", - "Keys": "SessionKeys5", - "LookupSource": "AccountId", - "CompactAssignments": "CompactAssignmentsTo257", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "LookupSource": "AccountId" + } + }, + { + "minmax": [ + 201, + 214 + ], + "types": { + "FullIdentification": "()", + "Keys": "SessionKeys7B", + "AccountInfo": "AccountInfoWithDualRefCount" + } + }, + { + "minmax": [ + 215, + 228 + ], + "types": { + "FullIdentification": "()", + "Keys": "SessionKeys6" } }, { "minmax": [ - 10, + 229, null ], "types": { - "Address": "AccountId", - "Keys": "SessionKeys5", - "LookupSource": "AccountId", - "ParaGenesisArgs": { - "genesisHead": "Bytes", - "validationCode": "Bytes", - "parachain": "bool" - } + "FullIdentification": "()", + "Keys": "SessionKeys7B", + "AssetInstance": "AssetInstanceV0", + "MultiAsset": "MultiAssetV0", + "Xcm": "XcmV0", + "XcmOrder": "XcmOrderV0" + } + } + ], + "shell": [ + { + "minmax": [ + 0, + null + ], + "types": {} + } + ], + "statemine": [ + { + "minmax": [ + 0, + null + ], + "types": { + "TAssetBalance": "u128", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "CancelProxy", + "Assets", + "AssetOwner", + "AssetManager", + "Staking" + ] + }, + "AssetInstance": "AssetInstanceV0", + "MultiAsset": "MultiAssetV0", + "Xcm": "XcmV0", + "XcmOrder": "XcmOrderV0" + } + } + ], + "statemint": [ + { + "minmax": [ + 0, + null + ], + "types": { + "TAssetBalance": "u128", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "CancelProxy", + "Assets", + "AssetOwner", + "AssetManager", + "Staking" + ] + }, + "AssetInstance": "AssetInstanceV0", + "MultiAsset": "MultiAssetV0", + "Xcm": "XcmV0", + "XcmOrder": "XcmOrderV0" } } ], @@ -530,23 +858,28 @@ 2 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Staking", - "Unused", - "IdentityJudgement" + "SudoBalances", + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "Multiplier": "Fixed64", "OpenTip": "OpenTipTo225", "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257", "Weight": "u32" } }, @@ -556,22 +889,27 @@ 22 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Staking", - "Unused", - "IdentityJudgement" + "SudoBalances", + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "OpenTip": "OpenTipTo225", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "RefCount": "RefCountTo259" } }, { @@ -580,21 +918,26 @@ 42 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsTo257", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Staking", - "Unused", - "IdentityJudgement" + "SudoBalances", + "IdentityJudgement", + "CancelProxy" ] }, - "CompactAssignments": "CompactAssignmentsTo257", - "RefCount": "RefCountTo259", - "RewardDestination": "RewardDestinationTo257" + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", + "RefCount": "RefCountTo259" } }, { @@ -603,39 +946,124 @@ 44 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", - "LookupSource": "AccountId", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Staking", - "Unused", - "IdentityJudgement" + "SudoBalances", + "IdentityJudgement", + "CancelProxy" ] }, + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", + "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission", + "DispatchInfo": "DispatchInfoTo244", + "Heartbeat": "HeartbeatTo244", "RefCount": "RefCountTo259" } }, { "minmax": [ 45, - null + 47 ], "types": { - "Address": "AccountId", + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", "Keys": "SessionKeys5", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "Staking", + "SudoBalances", + "IdentityJudgement", + "CancelProxy" + ] + }, + "AccountInfo": "AccountInfoWithRefCount", + "Address": "AccountId", "LookupSource": "AccountId", + "ValidatorPrefs": "ValidatorPrefsWithCommission" + } + }, + { + "minmax": [ + 48, + 49 + ], + "types": { + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", + "Keys": "SessionKeys6", "ProxyType": { "_enum": [ "Any", "NonTransfer", "Staking", - "Unused", - "IdentityJudgement" + "SudoBalances", + "IdentityJudgement", + "CancelProxy" ] - } + }, + "AccountInfo": "AccountInfoWithDualRefCount" + } + }, + { + "minmax": [ + 50, + null + ], + "types": { + "CompactAssignments": "CompactAssignmentsWith16", + "RawSolution": "RawSolutionWith16", + "Keys": "SessionKeys6", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "Staking", + "SudoBalances", + "IdentityJudgement", + "CancelProxy" + ] + }, + "AssetInstance": "AssetInstanceV0", + "MultiAsset": "MultiAssetV0", + "Xcm": "XcmV0", + "XcmOrder": "XcmOrderV0" + } + } + ], + "westmint": [ + { + "minmax": [ + 0, + null + ], + "types": { + "TAssetBalance": "u128", + "ProxyType": { + "_enum": [ + "Any", + "NonTransfer", + "CancelProxy", + "Assets", + "AssetOwner", + "AssetManager", + "Staking" + ] + }, + "AssetInstance": "AssetInstanceV0", + "MultiAsset": "MultiAssetV0", + "Xcm": "XcmV0", + "XcmOrder": "XcmOrderV0" } } ] diff --git a/extras/src/error.rs b/extras/src/error.rs index eec71c15..a0fa249a 100644 --- a/extras/src/error.rs +++ b/extras/src/error.rs @@ -22,6 +22,14 @@ pub type Result = std::result::Result; pub enum Error { #[error("Decode {0}")] Decode(#[from] serde_json::Error), - #[error("{0} Not Found")] - NotFound(String), + #[error("Could not parse {0} into type")] + TypeError(String), + #[error("type is not possible in the context of rust")] + UnexpectedType, +} + +impl From for Error { + fn from(err: String) -> Error { + Error::TypeError(err) + } } diff --git a/extras/src/lib.rs b/extras/src/lib.rs index 74c07fbf..d2927e7a 100644 --- a/extras/src/lib.rs +++ b/extras/src/lib.rs @@ -6,6 +6,7 @@ mod extrinsics; mod modules; mod overrides; mod resolver; +pub mod runtimes; pub use self::error::*; pub use self::extrinsics::*; @@ -29,8 +30,8 @@ pub struct TypeRange { fn is_in_range(spec: u32, over_ride: &TypeRange) -> bool { match over_ride.min_max { [Some(min), Some(max)] => (min..=max).contains(&(spec as usize)), - [Some(min), None] => (spec as usize) > min, - [None, Some(max)] => (spec as usize) < max, + [Some(min), None] => (spec as usize) >= min, + [None, Some(max)] => (spec as usize) <= max, // presumably, this would be for null -> null, // so for every spec [None, None] => true, diff --git a/extras/src/modules.rs b/extras/src/modules.rs index 0567f692..a80049ea 100644 --- a/extras/src/modules.rs +++ b/extras/src/modules.rs @@ -13,11 +13,12 @@ // along with substrate-desub. If not, see . use crate::error::Error; -use core::{regex, EnumField, RustTypeMarker, SetField, StructField, StructUnitOrTuple}; +use core::{regex, EnumField, RustTypeMarker, SetField, StructField}; use serde::{ - de::{Deserializer, MapAccess, Visitor}, + de::{self, Deserializer, MapAccess, Visitor}, Deserialize, Serialize, }; +use serde_json::{map::Map, Value}; use std::{collections::HashMap, fmt}; /// Types for each substrate Module @@ -39,7 +40,11 @@ impl Modules { } pub fn get_type(&self, module: &str, ty: &str) -> Option<&RustTypeMarker> { - self.modules.get(module)?.types.get(ty) + self.modules.get(module)?.get(ty) + } + + pub fn try_fallback(&self, module: &str, ty: &str) -> Option<&RustTypeMarker> { + self.modules.get(module)?.try_fallback(ty) } /// Iterate over all the types in each module @@ -53,6 +58,7 @@ impl Modules { pub struct ModuleTypes { /// Type Name -> Type types: HashMap, + fallbacks: HashMap, } impl ModuleTypes { @@ -60,14 +66,19 @@ impl ModuleTypes { self.types.get(ty) } + pub fn try_fallback(&self, ty: &str) -> Option<&RustTypeMarker> { + self.fallbacks.get(ty) + } + /// Merges a ModuleTypes struct with another, to create a new HashMap /// The `other` struct takes priority if there are type conflicts pub fn merge(&self, other: &ModuleTypes) -> ModuleTypes { - let mut types = self.types.clone(); + let (mut types, mut fallbacks) = (self.types.clone(), self.fallbacks.clone()); let other = other.clone(); types.extend(other.types.into_iter()); + fallbacks.extend(other.fallbacks.into_iter()); - ModuleTypes { types } + ModuleTypes { types, fallbacks } } } @@ -123,108 +134,199 @@ impl<'de> Visitor<'de> for ModuleTypeVisitor { where V: MapAccess<'de>, { - let mut module_types: HashMap = HashMap::new(); + let mut types: HashMap = HashMap::new(); + let mut fallbacks: HashMap = HashMap::new(); while let Some(key) = map.next_key::<&str>()? { match key { // skip over "types" key, this encapsulates the types we actually care // about "types" => { - let val: serde_json::Value = map.next_value()?; - let val = val.as_object().expect("Types must refer to an object"); - for (key, val) in val.iter() { - parse_mod_types(&mut module_types, key, val); + let mut obj: Value = map.next_value()?; + let obj = obj.as_object_mut().ok_or_else(|| de::Error::custom("Types must refer to an object"))?; + for (key, ref mut val) in obj.iter_mut() { + parse_mod_types(&mut types, &mut fallbacks, key, val).map_err(de::Error::custom)?; } } m => { - let val: serde_json::Value = map.next_value()?; - //let val = val.as_object().expect("Types must refer to an object"); - parse_mod_types(&mut module_types, m, &val); + let mut val: Value = map.next_value()?; + parse_mod_types(&mut types, &mut fallbacks, m, &mut val).map_err(de::Error::custom)?; } } } - Ok(ModuleTypes { types: module_types }) + Ok(ModuleTypes { types, fallbacks }) } } -fn parse_mod_types(module_types: &mut HashMap, key: &str, val: &serde_json::Value) { - if val.is_string() { - module_types.insert(key.to_string(), regex::parse(val.as_str().expect("Checked; qed")).expect("not a type")); - } else if val.is_object() { - let obj = val.as_object().expect("checked for object before unwrap; qed"); - if obj.contains_key("_enum") { - module_types.insert(key.to_string(), parse_enum(&obj["_enum"])); - } else if obj.contains_key("_set") { - let obj = obj["_set"].as_object().expect("_set is a map"); - module_types.insert(key.to_string(), parse_set(obj)); - } else if obj.contains_key("_alias") { - let mut fields = Vec::new(); - for (key, val) in obj.iter() { - if key == "_alias" { - continue; - } else { - let field = StructField::new(key, regex::parse(&val_to_str(val)).expect("Not a type")); - fields.push(field); +type TypeMap = HashMap; + +/// In Polkadot-JS Definitions, an _object_ can be: +/// - Struct (no identifier), +/// - Enum (`_enum` identifier) +/// - Set (`_set`) +/// +/// This function decides which is what and dispatches a call +/// to the appropriate parse fn. +fn parse_mod_types( + module_types: &mut TypeMap, + fallbacks: &mut TypeMap, + key: &str, + val: &mut Value, +) -> Result<(), Error> { + match val { + Value::String(s) => { + module_types.insert(key.to_string(), regex::parse(s).ok_or_else(|| Error::from(s.to_string()))?); + } + Value::Object(ref mut obj) => { + if obj.len() == 1 && obj.keys().any(|k| k == "_enum" || k == "_set") { + let ty = match obj.iter().next().map(|(s, v)| (s.as_str(), v)) { + Some(("_enum", v)) => parse_enum(v)?, + Some(("_set", v)) => parse_set(v.as_object().expect("set is always an object"))?, + Some((_, _)) => return Err(Error::UnexpectedType), + None => panic!("This should never occur, checked for object length."), + }; + module_types.insert(key.to_string(), ty); + } else { + if let Some(fallback) = clean_struct(obj)? { + fallbacks.insert(key.to_string(), fallback); } + let ty = parse_struct(obj)?; + module_types.insert(key.to_string(), ty); } - module_types.insert(key.to_string(), RustTypeMarker::Struct(fields)); - } else { - let mut fields = Vec::new(); - for (key, val) in obj.iter() { - let field = StructField::new(key, regex::parse(&val_to_str(val)).expect("Not a type")); - fields.push(field); - } - module_types.insert(key.to_string(), RustTypeMarker::Struct(fields)); } + Value::Null => { + module_types.insert(key.to_string(), RustTypeMarker::Null); + } + _ => return Err(Error::UnexpectedType), } + Ok(()) } -/// internal api to convert a serde value to str -/// -/// # Panics -/// panics if the value is not a string -fn val_to_str(v: &serde_json::Value) -> String { - v.as_str().expect("will be string").to_string() +// Removes unsupported/unnecessary keys from struct, +// and returns fallback value if it exists. +fn clean_struct(map: &mut Map) -> Result, Error> { + map.remove("_alias"); // aliases are javascript-specific + + if let Some(fallback) = map.remove("_fallback") { + let ty = match fallback { + Value::String(s) => regex::parse(&s).ok_or_else(|| Error::from(s.to_string()))?, + Value::Object(o) => parse_struct(&o)?, + Value::Array(a) => parse_tuple(&a)?, + Value::Null => RustTypeMarker::Null, + _ => return Err(Error::UnexpectedType), + }; + Ok(Some(ty)) + } else { + Ok(None) + } } -fn parse_set(obj: &serde_json::map::Map) -> RustTypeMarker { +fn parse_set(obj: &Map) -> Result { let mut set_vec = Vec::new(); for (key, value) in obj.iter() { - let num: u8 = serde_json::from_value(value.clone()).expect("Must be u8"); + let num: u8 = serde_json::from_value(value.clone())?; let set_field = SetField::new(key, num); set_vec.push(set_field) } - RustTypeMarker::Set(set_vec) + Ok(RustTypeMarker::Set(set_vec)) } -/// internal api to convert a serde value to str +/// Process the enum and return the representation as a Rust Type /// /// # Panics -fn parse_enum(obj: &serde_json::Value) -> RustTypeMarker { - if obj.is_array() { - let arr = obj.as_array().expect("checked before cast; qed"); - let mut rust_enum = Vec::new(); - for unit in arr.iter() { - // if an enum is an array, it's a unit enum (stateless) - rust_enum.push(unit.as_str().expect("Will be string according to polkadot-js defs").to_string()) +fn parse_enum(value: &Value) -> Result { + if value.is_array() { + let arr = value.as_array().expect("checked before cast; qed"); + let rust_enum = arr + .iter() + .map(|u| { + let name = u.as_str().expect("Will be string according to polkadot-js defs").to_string(); + EnumField::new(name, None) + }) + .collect::>(); + Ok(RustTypeMarker::Enum(rust_enum)) + } else if value.is_object() { + let value = value.as_object().expect("Checked before casting; qed"); + // If all the values are numbers then we need to order the enum according to those numbers. + // Some types like `ProxyType` in the runtime may vary from chain-to-chain. + // So afaict Polkadot-Js types solve this by attaching a number to each variant according to index. + let rust_enum = if value.values().fold(true, |_, v| v.is_number()) { + let mut tuples = value + .values() + .map(|v| v.as_u64().expect("Must be u64")) + .zip(value.keys().map(|k| EnumField::new(k.into(), None))) + .collect::>(); + tuples.sort_by_key(|(num, _)| *num); + tuples.into_iter().map(|t| t.1).collect::>() + } else { + let mut rust_enum = Vec::new(); + for (key, value) in value.iter() { + match value { + Value::Null => rust_enum.push(EnumField::new(key.into(), Some(RustTypeMarker::Null))), + Value::String(s) => { + let field = regex::parse(s).ok_or_else(|| Error::from(s.to_string()))?; + rust_enum.push(EnumField::new(key.into(), Some(field))); + } + Value::Object(o) => { + let rust_struct = parse_struct(o)?; + rust_enum.push(EnumField::new(key.into(), Some(rust_struct))); + } + _ => return Err(Error::UnexpectedType), + }; + } + rust_enum + }; + Ok(RustTypeMarker::Enum(rust_enum)) + } else { + panic!("Unkown type") + } +} + +/// Parses a rust struct representation from a JSON Map. +fn parse_struct(rust_struct: &Map) -> Result { + let mut fields = Vec::new(); + for (key, value) in rust_struct.iter() { + match value { + Value::Null => { + let field = StructField::new(key, RustTypeMarker::Null); + fields.push(field); + } + Value::String(s) => { + // points to some other type + let ty = regex::parse(s).ok_or_else(|| s.to_string())?; + let field = StructField::new(key, ty); + fields.push(field); + } + Value::Object(o) => { + // struct-within-a-struct + let inner_struct = parse_struct(o)?; + let field = StructField::new(key, inner_struct); + fields.push(field); + } + Value::Array(a) => { + let tuples = parse_tuple(a)?; + let field = StructField::new(key, tuples); + fields.push(field); + } + _ => return Err(Error::UnexpectedType), } - let rust_enum = rust_enum.into_iter().map(|f| f.into()).collect::>(); - RustTypeMarker::Enum(rust_enum) - // all enum 'objects' in polkadot.js definitions are tuple-enums - } else if obj.is_object() { - let obj = obj.as_object().expect("Checked before casting; qed"); - let mut rust_enum = Vec::new(); - for (key, value) in obj.iter() { - let value = if value.is_null() { "null" } else { value.as_str().expect("will be str; qed") }; - let field = - EnumField::new(Some(key.into()), StructUnitOrTuple::Tuple(regex::parse(value).expect("Not a type"))); - rust_enum.push(field); + } + Ok(RustTypeMarker::Struct(fields)) +} + +fn parse_tuple(json_tuple: &[Value]) -> Result { + let mut tuple = Vec::new(); + for value in json_tuple.iter() { + match value { + Value::Null => tuple.push(RustTypeMarker::Null), + Value::String(s) => { + let ty = regex::parse(s).ok_or_else(|| s.to_string())?; + tuple.push(ty); + } + _ => return Err(Error::UnexpectedType), } - RustTypeMarker::Enum(rust_enum) - // so far, polkadot.js does not define any struct-like enums - } else { - panic!("Unnaccounted type") } + Ok(RustTypeMarker::Tuple(tuple)) } #[cfg(test)] @@ -233,9 +335,9 @@ mod tests { use crate::error::Error; use crate::ModuleTypes; - use core::{EnumField, RustTypeMarker, SetField, StructField, StructUnitOrTuple}; + use core::{EnumField, RustTypeMarker, SetField, StructField}; use std::collections::HashMap; - const RAW_JSON: &'static str = r#" + const RAW_JSON: &str = r#" { "runtime": { "types": { @@ -280,7 +382,7 @@ mod tests { "#; #[test] - fn should_deserialize_correctly() -> Result<(), Error> { + fn should_deserialize_modules() -> Result<(), Error> { let deser_dot_types = Modules::new(RAW_JSON)?; let mut modules = HashMap::new(); let mut types = HashMap::new(); @@ -306,25 +408,25 @@ mod tests { "MultiSignature".to_string(), RustTypeMarker::Enum(vec![ EnumField { - variant_name: Some("Ed25519".to_string()), - ty: StructUnitOrTuple::Tuple(RustTypeMarker::TypePointer("Ed25519Signature".to_string())), + name: "Ed25519".to_string(), + value: Some(RustTypeMarker::TypePointer("Ed25519Signature".to_string())), }, EnumField { - variant_name: Some("Sr25519".to_string()), - ty: StructUnitOrTuple::Tuple(RustTypeMarker::TypePointer("Sr25519Signature".to_string())), + name: "Sr25519".to_string(), + value: Some(RustTypeMarker::TypePointer("Sr25519Signature".to_string())), }, EnumField { - variant_name: Some("Ecdsa".to_string()), - ty: StructUnitOrTuple::Tuple(RustTypeMarker::TypePointer("EcdsaSignature".to_string())), + name: "Ecdsa".to_string(), + value: Some(RustTypeMarker::TypePointer("EcdsaSignature".to_string())), }, ]), ); types.insert( "Reasons".to_string(), RustTypeMarker::Enum(vec![ - EnumField { variant_name: None, ty: StructUnitOrTuple::Unit("Fee".to_string()) }, - EnumField { variant_name: None, ty: StructUnitOrTuple::Unit("Misc".to_string()) }, - EnumField { variant_name: None, ty: StructUnitOrTuple::Unit("All".to_string()) }, + EnumField { name: "Fee".into(), value: None }, + EnumField { name: "Misc".into(), value: None }, + EnumField { name: "All".into(), value: None }, ]), ); types.insert( @@ -342,7 +444,7 @@ mod tests { assert_eq!(val, &deser_dot_types.modules["runtime"].types[key]); } - let mod_types = ModuleTypes { types }; + let mod_types = ModuleTypes { types, fallbacks: HashMap::new() }; modules.insert("runtime".to_string(), mod_types); let dot_types = Modules { modules }; assert_eq!(dot_types, deser_dot_types); diff --git a/extras/src/overrides.rs b/extras/src/overrides.rs index b3ae0588..8ff0ea62 100644 --- a/extras/src/overrides.rs +++ b/extras/src/overrides.rs @@ -1,4 +1,4 @@ -// Copyright 2019 Parity Technologies (UK) Ltd. +// Copyright 2019-2021 Parity Technologies (UK) Ltd. // substrate-desub is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or diff --git a/extras/src/resolver.rs b/extras/src/resolver.rs index e44f9ae6..bde37519 100644 --- a/extras/src/resolver.rs +++ b/extras/src/resolver.rs @@ -119,21 +119,25 @@ impl TypeResolver { /// # Return /// returns None if the type cannot be resolved pub fn get(&self, chain: &str, spec: u32, module: &str, ty: &str) -> Option<&RustTypeMarker> { - let (module, ty, chain) = sanitize_types(module, ty, chain); log::trace!("Getting Type: {}, module: {}, spec: {}", ty, module, spec); - if let Some(t) = self.check_overrides(&module, ty.as_str(), spec, &chain) { + if let Some(t) = self.check_overrides(module, ty, spec, chain) { log::trace!("Resolving to Override"); Some(t) - } else if let Some(t) = self.extrinsics.get(ty.as_str(), spec, &chain) { + } else if let Some(t) = self.extrinsics.get(ty, spec, chain) { log::trace!("Resolving to Extrinsic Type"); Some(t) } else { log::trace!("Resolving to Type Pointer"); - self.resolve_helper(&module, &ty) + self.resolve_helper(module, ty) } } + pub fn try_fallback(&self, module: &str, ty: &str) -> Option<&RustTypeMarker> { + self.mods.try_fallback(module, ty) + } + + /// Get type for decoding an Extrinsic pub fn get_ext_ty(&self, chain: &str, spec: u32, ty: &str) -> Option<&RustTypeMarker> { if let Some(t) = self.extrinsics.get(ty, spec, chain) { match t { @@ -150,7 +154,7 @@ impl TypeResolver { log::trace!("Helper resolving {}, {}", module, ty_pointer); if let Some(t) = self.mods.get_type(module, ty_pointer) { - log::trace!("Type {} found in module {}", ty_pointer, module); + log::trace!("Type {} found in module {}", &ty_pointer, module); Some(t) } else if let Some(t) = self.mods.get_type("runtime", ty_pointer) { log::trace!("Type not found in {}, trying `runtime` for type {}", module, ty_pointer); @@ -184,22 +188,27 @@ impl TypeResolver { } } -fn sanitize_types(module: &str, ty: &str, chain: &str) -> (String, String, String) { - let module = module.to_ascii_lowercase(); - let chain = chain.to_ascii_lowercase(); - let ty = if let Some(un_prefixed) = regex::remove_prefix(ty) { un_prefixed } else { ty.to_string() }; - - log::trace!("Possibly de-prefixed type: {}", ty); - (module, ty, chain) -} - impl TypeDetective for TypeResolver { fn get(&self, chain: &str, spec: u32, module: &str, ty: &str) -> Option<&RustTypeMarker> { - TypeResolver::get(self, chain, spec, module, ty) + log::trace!("Getting type {}", ty); + let ty = regex::sanitize_ty(ty)?; + let module = module.to_ascii_lowercase(); + let chain = chain.to_ascii_lowercase(); + TypeResolver::get(self, &chain, spec, &module, &ty) + } + + fn try_fallback(&self, module: &str, ty: &str) -> Option<&RustTypeMarker> { + let ty = regex::sanitize_ty(ty)?; + let module = module.to_ascii_lowercase(); + + TypeResolver::try_fallback(self, &module, &ty) } fn get_extrinsic_ty(&self, chain: &str, spec: u32, ty: &str) -> Option<&RustTypeMarker> { - TypeResolver::get_ext_ty(self, chain, spec, ty) + let ty = regex::sanitize_ty(ty)?; + let chain = chain.to_ascii_lowercase(); + + TypeResolver::get_ext_ty(self, &chain, spec, &ty) } } @@ -207,19 +216,21 @@ impl TypeDetective for TypeResolver { mod tests { use super::default::*; use super::*; - use core::{EnumField, StructField, StructUnitOrTuple}; + use core::{EnumField, StructField}; #[test] fn should_get_type_from_module() -> Result<()> { let post_1031_dispatch_error = RustTypeMarker::Enum(vec![ - EnumField::new(Some("Other".into()), StructUnitOrTuple::Tuple(RustTypeMarker::Null)), - EnumField::new(Some("CannotLookup".into()), StructUnitOrTuple::Tuple(RustTypeMarker::Null)), - EnumField::new(Some("BadOrigin".into()), StructUnitOrTuple::Tuple(RustTypeMarker::Null)), - EnumField::new( - Some("Module".into()), - StructUnitOrTuple::Tuple(RustTypeMarker::TypePointer("DispatchErrorModule".to_string())), - ), + EnumField::new("Other".into(), Some(RustTypeMarker::Null)), + EnumField::new("CannotLookup".into(), Some(RustTypeMarker::Null)), + EnumField::new("BadOrigin".into(), Some(RustTypeMarker::Null)), + EnumField::new("Module".into(), Some(RustTypeMarker::TypePointer("DispatchErrorModule".to_string()))), + EnumField::new("ConsumerRemaining".into(), Some(RustTypeMarker::Null)), + EnumField::new("NoProviders".into(), Some(RustTypeMarker::Null)), + EnumField::new("Token".into(), Some(RustTypeMarker::TypePointer("TokenError".to_string()))), + EnumField::new("Arithmetic".into(), Some(RustTypeMarker::TypePointer("ArithmeticError".to_string()))), ]); + let types = TypeResolver::default(); let t = types.get("kusama", 1040, "system", "DispatchError").unwrap(); assert_eq!(t, &post_1031_dispatch_error); diff --git a/extras/src/runtimes.rs b/extras/src/runtimes.rs new file mode 100644 index 00000000..964196e1 --- /dev/null +++ b/extras/src/runtimes.rs @@ -0,0 +1,150 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// substrate-desub is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// substrate-desub is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with substrate-desub. If not, see . + +use phf::phf_ordered_map; + +pub fn kusama_upgrade_block(version: &u32) -> Option { + KUSAMA_RUNTIMES.get(version).copied() +} + +static KUSAMA_RUNTIMES: phf::OrderedMap = phf_ordered_map! { + 1020u32 => 0, + 1021u32 => 26669, + 1022u32 => 38245, + 1023u32 => 54248, + 1024u32 => 59659, + 1025u32 => 67651, + 1027u32 => 82191, + 1028u32 => 83238, + 1029u32 => 101503, + 1030u32 => 203466, + 1031u32 => 295787, + 1032u32 => 461692, + 1033u32 => 504329, + 1038u32 => 569327, + 1039u32 => 587687, + 1040u32 => 653183, + 1042u32 => 693488, + 1045u32 => 901442, + 1050u32 => 1375086, + 1051u32 => 1445458, + 1052u32 => 1472960, + 1053u32 => 1475648, + 1054u32 => 1491596, + 1055u32 => 1574408, + 1058u32 => 2064961, + 1062u32 => 2201991, + 2005u32 => 2671528, + 2007u32 => 2704202, + 2008u32 => 2728002, + 2011u32 => 2832534, + 2012u32 => 2962294, + 2013u32 => 3240000, + 2015u32 => 3274408, + 2019u32 => 3323565, + 2022u32 => 3534175, + 2023u32 => 3860281, + 2024u32 => 4143129, + 2025u32 => 4401242, + 2026u32 => 4841367, + 2027u32 => 5961600, + 2028u32 => 6137912, + 2029u32 => 6561855, + 2030u32 => 7100891, + 9010u32 => 7468792, + 9030u32 => 7668600, + 9040u32 => 7812476, + 9050u32 => 8010981, + 9070u32 => 8073833, + 9080u32 => 8555825, + 9090u32 => 8945245 +}; + +pub fn polkadot_upgrade_block(version: &u32) -> Option { + POLKADOT_RUNTIMES.get(version).copied() +} + +static POLKADOT_RUNTIMES: phf::OrderedMap = phf_ordered_map! { + 0u32 => 0, + 1u32 => 29231, + 5u32 => 188836, + 6u32 => 199405, + 7u32 => 214264, + 8u32 => 244358, + 9u32 => 303079, + 10u32 => 314201, + 11u32 => 342400, + 12u32 => 443963, + 13u32 => 528470, + 14u32 => 687751, + 15u32 => 746085, + 16u32 => 787923, + 17u32 => 799302, + 18u32 => 1205128, + 23u32 => 1603423, + 24u32 => 1733218, + 25u32 => 2005673, + 26u32 => 2436698, + 27u32 => 3613564, + 28u32 => 3899547, + 29u32 => 4345767, + 30u32 => 4876134, + 9050u32 => 5661442, + 9080u32 => 6321619, + 9090u32 => 6713249 +}; + +pub fn westend_upgrade_block(version: &u32) -> Option { + WESTEND_RUNTIMES.get(version).copied() +} + +static WESTEND_RUNTIMES: phf::OrderedMap = phf_ordered_map! { + 4u32 => 214356, + 7u32 => 392764, + 8u32 => 409740, + 20u32 => 809976, + 24u32 => 877581, + 25u32 => 879238, + 26u32 => 889472, + 27u32 => 902937, + 28u32 => 932751, + 29u32 => 991142, + 31u32 => 1030162, + 32u32 => 1119657, + 33u32 => 1199282, + 34u32 => 1342534, + 35u32 => 1392263, + 36u32 => 1431703, + 37u32 => 1433369, + 41u32 => 1490972, + 43u32 => 2087397, + 44u32 => 2316688, + 45u32 => 2549864, + 46u32 => 3925782, + 47u32 => 3925843, + 48u32 => 4207800, + 49u32 => 4627944, + 50u32 => 5124076, + 900u32 => 5478664, + 9000u32 => 5482450, + 9010u32 => 5584305, + 9030u32 => 5784566, + 9031u32 => 5879822, + 9032u32 => 5896856, + 9033u32 => 5897316, + 9050u32 => 6117927, + 9070u32 => 6210274, + 9080u32 => 6379314, + 9090u32 => 6979141, +}; diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index d25c5fed..e1477082 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -12,14 +12,15 @@ desub-core = { path = "../core", package = "desub-core" } extras = { path = "../extras", package = "desub-extras" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["preserve_order"] } -codec = { version = "1", package = "parity-scale-codec" } -primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } -frame-system = { git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } -pallet-balances = { git = "https://github.com/paritytech/substrate", rev = "a364e27d6e3971d756d28435efc468d95add52d3" } +codec = { version = "2", package = "parity-scale-codec" } +primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" } pretty_env_logger = "0.4" log = "0.4" hex = "0.4" paste = "1.0.3" +anyhow = "1" [[test]] name = "integration_tests" diff --git a/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_0.bin deleted file mode 100644 index 089477f0..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_1.bin deleted file mode 100644 index 7c908071..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1020_block10994/EXTRINSIC_spec_1020_block_10994_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_0.bin deleted file mode 100644 index c024bb4f..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_1.bin deleted file mode 100644 index db39ca2c..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1020_block6144/EXTRINSIC_spec_1020_block_6144_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1020_block6144/spec_1020_block_6144_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1020_block6144/spec_1020_block_6144_METADATA.bin deleted file mode 100644 index c2522c5e..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1020_block6144/spec_1020_block_6144_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_0.bin deleted file mode 100644 index 4186ad71..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_1.bin deleted file mode 100644 index 4ba355eb..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_3.bin deleted file mode 100644 index ce54d4d0..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1030_block233816/EXTRINSIC_spec_1030_block_233816_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1030_block233816/spec_1030_block_233816_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1030_block233816/spec_1030_block_233816_METADATA.bin deleted file mode 100644 index 30923796..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1030_block233816/spec_1030_block_233816_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block342962/EXTRINSIC_spec_1031_block_342962_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1031_block342962/EXTRINSIC_spec_1031_block_342962_index_0.bin deleted file mode 100644 index a202bd8d..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block342962/EXTRINSIC_spec_1031_block_342962_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block342962/EXTRINSIC_spec_1031_block_342962_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1031_block342962/EXTRINSIC_spec_1031_block_342962_index_1.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block342962/EXTRINSIC_spec_1031_block_342962_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block342962/spec_1031_block_342962_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1031_block342962/spec_1031_block_342962_METADATA.bin deleted file mode 100644 index f34a5e83..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block342962/spec_1031_block_342962_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_0.bin deleted file mode 100644 index cd97207f..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_1.bin deleted file mode 100644 index 7f0026b8..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block422871/EXTRINSIC_spec_1031_block_422871_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block422871/spec_1031_block_422871_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1031_block422871/spec_1031_block_422871_METADATA.bin deleted file mode 100644 index f34a5e83..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block422871/spec_1031_block_422871_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_0.bin deleted file mode 100644 index d58b2307..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_1.bin deleted file mode 100644 index 351872fb..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_3.bin deleted file mode 100644 index a636aee4..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block50970/EXTRINSIC_spec_1031_block_50970_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1031_block50970/spec_1031_block_50970_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1031_block50970/spec_1031_block_50970_METADATA.bin deleted file mode 100644 index a06ac40b..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1031_block50970/spec_1031_block_50970_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_0.bin deleted file mode 100644 index 821084cc..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_1.bin deleted file mode 100644 index 6f55d66a..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_3.bin deleted file mode 100644 index 900ed151..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1039_block607421/EXTRINSIC_spec_1039_block_607421_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1039_block607421/spec_1039_block_607421_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1039_block607421/spec_1039_block_607421_METADATA.bin deleted file mode 100644 index 30fe13de..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1039_block607421/spec_1039_block_607421_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_0.bin deleted file mode 100644 index 3f3365af..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_1.bin deleted file mode 100644 index 144b09de..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_3.bin deleted file mode 100644 index eaaf65d5..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block106284/EXTRINSIC_spec_1042_block_106284_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block106284/spec_1042_block_106284_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1042_block106284/spec_1042_block_106284_METADATA.bin deleted file mode 100644 index c2591ed6..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block106284/spec_1042_block_106284_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_0.bin deleted file mode 100644 index d268183e..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_1.bin deleted file mode 100644 index ca15e5e8..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_3.bin deleted file mode 100644 index 5a3849ae..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block779410/EXTRINSIC_spec_1042_block_779410_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block779410/spec_1042_block_779410_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1042_block779410/spec_1042_block_779410_METADATA.bin deleted file mode 100644 index d729ed32..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block779410/spec_1042_block_779410_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_0.bin deleted file mode 100644 index 26b66228..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_1.bin deleted file mode 100644 index 45bbdf17..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_3.bin deleted file mode 100644 index 08816222..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block899638/EXTRINSIC_spec_1042_block_899638_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1042_block899638/spec_1042_block_899638_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1042_block899638/spec_1042_block_899638_METADATA.bin deleted file mode 100644 index d729ed32..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1042_block899638/spec_1042_block_899638_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_0.bin deleted file mode 100644 index 87c9f80e..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_1.bin deleted file mode 100644 index b23ab08c..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/EXTRINSIC_spec_1055_block_1674683_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/spec_1055_block_1674683_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1674683/spec_1055_block_1674683_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1674683/spec_1055_block_1674683_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_0.bin deleted file mode 100644 index ede5d3c4..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_1.bin deleted file mode 100644 index fb285ea3..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_3.bin deleted file mode 100644 index f138e7dc..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/EXTRINSIC_spec_1055_block_1677621_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/spec_1055_block_1677621_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1677621/spec_1055_block_1677621_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1677621/spec_1055_block_1677621_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_0.bin deleted file mode 100644 index fe8767a6..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_1.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_10.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_10.bin deleted file mode 100644 index df61c4b2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_10.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_11.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_11.bin deleted file mode 100644 index 54f0066a..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_11.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_12.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_12.bin deleted file mode 100644 index 076e7a7b..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_12.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_13.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_13.bin deleted file mode 100644 index 93177336..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_13.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_14.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_14.bin deleted file mode 100644 index f95c3bda..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_14.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_15.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_15.bin deleted file mode 100644 index ec5e1218..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_15.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_16.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_16.bin deleted file mode 100644 index e674b495..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_16.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_2.bin deleted file mode 100644 index ed9329db..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_3.bin deleted file mode 100644 index c9cf37b6..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_4.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_4.bin deleted file mode 100644 index c1fba641..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_4.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_5.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_5.bin deleted file mode 100644 index 46c49c5b..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_5.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_6.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_6.bin deleted file mode 100644 index d8bfcf31..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_6.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_7.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_7.bin deleted file mode 100644 index 1703c3ba..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_7.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_8.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_8.bin deleted file mode 100644 index 5cb40270..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_8.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_9.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_9.bin deleted file mode 100644 index bae5aee3..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/EXTRINSIC_spec_1055_block_1702023_index_9.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/spec_1055_block_1702023_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1702023/spec_1055_block_1702023_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1702023/spec_1055_block_1702023_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_0.bin deleted file mode 100644 index 3e663d95..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_1.bin deleted file mode 100644 index 95c63126..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_3.bin deleted file mode 100644 index b4f4686a..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/EXTRINSIC_spec_1055_block_1714495_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/spec_1055_block_1714495_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1714495/spec_1055_block_1714495_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1714495/spec_1055_block_1714495_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_0.bin deleted file mode 100644 index 629b8b40..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_1.bin deleted file mode 100644 index 2c62d84a..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_3.bin deleted file mode 100644 index 01c3e202..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/EXTRINSIC_spec_1055_block_1717926_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/spec_1055_block_1717926_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1717926/spec_1055_block_1717926_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1717926/spec_1055_block_1717926_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_0.bin deleted file mode 100644 index 82cc68d8..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_1.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_2.bin deleted file mode 100644 index aafdc6d9..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_3.bin deleted file mode 100644 index 69329fd7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/EXTRINSIC_spec_1055_block_1718223_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/spec_1055_block_1718223_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1718223/spec_1055_block_1718223_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1718223/spec_1055_block_1718223_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_0.bin deleted file mode 100644 index ef2ce977..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_1.bin deleted file mode 100644 index 95c63126..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_3.bin deleted file mode 100644 index f38ef688..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/EXTRINSIC_spec_1055_block_1731904_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/spec_1055_block_1731904_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1731904/spec_1055_block_1731904_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1731904/spec_1055_block_1731904_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_0.bin deleted file mode 100644 index aa5f40e6..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_1.bin deleted file mode 100644 index 1d256c7b..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_3.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_3.bin deleted file mode 100644 index b4c37784..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/EXTRINSIC_spec_1055_block_1732321_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/spec_1055_block_1732321_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1732321/spec_1055_block_1732321_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1732321/spec_1055_block_1732321_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_0.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_0.bin deleted file mode 100644 index 5f81a941..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_1.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_1.bin deleted file mode 100644 index e5233416..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_2.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/EXTRINSIC_spec_1055_block_1768321_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/spec_1055_block_1768321_METADATA.bin b/integration_tests/data/extrinsics/kusama/spec1055_block1768321/spec_1055_block_1768321_METADATA.bin deleted file mode 100644 index d9266eb2..00000000 Binary files a/integration_tests/data/extrinsics/kusama/spec1055_block1768321/spec_1055_block_1768321_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_0.bin b/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_0.bin deleted file mode 100644 index 6f8b948c..00000000 Binary files a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_1.bin b/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_1.bin deleted file mode 100644 index 41354e09..00000000 Binary files a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_2.bin b/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_2.bin deleted file mode 100644 index bf51eab7..00000000 Binary files a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_3.bin b/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_3.bin deleted file mode 100644 index 379754e4..00000000 Binary files a/integration_tests/data/extrinsics/polkadot/spec0_block892/EXTRINSIC_spec_0_block_892_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/polkadot/spec0_block892/spec_0_block_892_METADATA.bin b/integration_tests/data/extrinsics/polkadot/spec0_block892/spec_0_block_892_METADATA.bin deleted file mode 100644 index 93561ad8..00000000 Binary files a/integration_tests/data/extrinsics/polkadot/spec0_block892/spec_0_block_892_METADATA.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_0.bin b/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_0.bin deleted file mode 100644 index bb9aff28..00000000 Binary files a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_0.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_1.bin b/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_1.bin deleted file mode 100644 index 32d23f87..00000000 Binary files a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_1.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_2.bin b/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_2.bin deleted file mode 100644 index aee93c5b..00000000 Binary files a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_2.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_3.bin b/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_3.bin deleted file mode 100644 index fe1b702e..00000000 Binary files a/integration_tests/data/extrinsics/westend/spec1_block1191/EXTRINSIC_spec_1_block_1191_index_3.bin and /dev/null differ diff --git a/integration_tests/data/extrinsics/westend/spec1_block1191/spec_1_block_1191_METADATA.bin b/integration_tests/data/extrinsics/westend/spec1_block1191/spec_1_block_1191_METADATA.bin deleted file mode 100644 index 7414ee24..00000000 Binary files a/integration_tests/data/extrinsics/westend/spec1_block1191/spec_1_block_1191_METADATA.bin and /dev/null differ diff --git a/integration_tests/tests/extrinsics.rs b/integration_tests/tests/extrinsics.rs deleted file mode 100644 index 14460079..00000000 --- a/integration_tests/tests/extrinsics.rs +++ /dev/null @@ -1,417 +0,0 @@ -extern crate extras; - -// TODO: Make test structure into a macro - -use crate::test_suite; -use desub_core::decoder::{Chain, Decoder, Metadata}; - -pub fn init() { - let _ = pretty_env_logger::try_init(); -} - -#[test] -pub fn should_decode_ext342962() { - init(); - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_342962(); - let meta = Metadata::new(meta.as_slice()); - - // block 6 of KSM CC3 is spec 1020 - decoder.register_version(1031, &meta); - for e in ext.iter() { - println!("{:?}", e); - let decoded = decoder.decode_extrinsic(1031, e.as_slice()).expect("should decode"); - println!("{:?}", decoded); - println!("{}", decoded); - } - - // assert_eq!(vec![("now".to_string(), SubstrateType::U64(1577070096000))], decoded); - // 1577070096000 is the UNIX timestamp in milliseconds of - // Monday, December 23, 2019 3:01:36 AM - // when block 342,962 was processed -} - -#[test] -pub fn should_decode_ext422871() { - init(); - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_422871(); - let meta = Metadata::new(meta.as_slice()); - decoder.register_version(1031, &meta); - - println!("{}", ext.len()); - for e in ext.iter() { - println!("{:?}", e); - let decoded = decoder.decode_extrinsic(1031, e.as_slice()).expect("should decode"); - println!("{}", decoded); - } -} - -#[test] -pub fn should_decode_ext50970() { - init(); - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_50970(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1031, &meta); - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1031, e.as_slice()).expect("should decode"); - println!("{}", decoded); - } -} - -#[test] -pub fn should_decode_ext_106284() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_106284(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1042, &meta); - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1042, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -pub fn should_decode_ext_1674683() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1674683(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -pub fn should_decode_ext_1677621() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1677621(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_1702023() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1702023(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_1714495() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1714495(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_1717926() { - init(); - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1717926(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_1718223() { - init(); - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1718223(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_1732321() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1732321(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_1731904() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1731904(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_1768321() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_1768321(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1055, &meta); - - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1055, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_6144() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_6144(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1020, &meta); - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1020, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_779410_ksm() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_779410(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1042, &meta); - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1042, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_899638_ksm() { - init(); - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_899638(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1042, &meta); - for e in ext.iter() { - println!("{:?}", e); - println!("{:X?}", e); - let decoded = decoder.decode_extrinsic(1042, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_233816_ksm() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_233816(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1030, &meta); - for e in ext.iter() { - println!("DECODING --------------------- \n {:X?} \n ------", e); - let decoded = decoder.decode_extrinsic(1030, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_607421_ksm() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Kusama); - - let (meta, ext) = test_suite::extrinsics_block_607421(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(1039, &meta); - for e in ext.iter() { - println!("DECODING: \n ------ \n {:X?} \n ------", e); - let decoded = decoder.decode_extrinsic(1039, e.as_slice()).expect("should decode"); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - } -} - -#[test] -fn should_decode_ext_892_dot() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Polkadot); - - let (meta, ext) = test_suite::extrinsics_block_892(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(0, &meta); - for e in ext.iter() { - println!("-----------------------------------------------------------------"); - println!("DECODING: \n ------ \n {:X?} \n ------", e); - let decoded = decoder.decode_extrinsic(0, e.as_slice()).expect("should decode"); - println!("{:?}", decoded); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - println!("-----------------------------------------------------------------"); - } -} - -#[test] -fn should_decode_ext_1191_wnd() { - init(); - - let types = extras::TypeResolver::default(); - let mut decoder = Decoder::new(types, Chain::Polkadot); - - let (meta, ext) = test_suite::extrinsics_block_1191(); - let meta = Metadata::new(meta.as_slice()); - - decoder.register_version(0, &meta); - for e in ext.iter() { - println!("-----------------------------------------------------------------"); - println!("DECODING: \n ------ \n {:X?} \n ------", e); - let decoded = decoder.decode_extrinsic(0, e.as_slice()).expect("should decode"); - println!("{:?}", decoded); - println!("{}", decoded); - println!("{}", serde_json::to_string(&decoded).unwrap()); - println!("-----------------------------------------------------------------"); - } -} diff --git a/integration_tests/tests/lib.rs b/integration_tests/tests/lib.rs index babee618..f318baf9 100644 --- a/integration_tests/tests/lib.rs +++ b/integration_tests/tests/lib.rs @@ -1,4 +1,3 @@ -mod extrinsics; mod metadata; +mod runtime_metadata; mod storage; -mod test_suite; diff --git a/integration_tests/tests/metadata.rs b/integration_tests/tests/metadata.rs index 04722ba3..42bb6abb 100644 --- a/integration_tests/tests/metadata.rs +++ b/integration_tests/tests/metadata.rs @@ -1,19 +1,19 @@ -use crate::test_suite; +use crate::runtime_metadata::*; use desub_core::decoder::Metadata; use primitives::twox_128; #[test] fn should_create_metadata_v9() { - let meta = test_suite::runtime_v9(); + let meta = runtime_v9(); let meta: Metadata = Metadata::new(meta.as_slice()); println!("{}", meta.pretty()); - let meta = test_suite::runtime_v9_block6(); + let meta = runtime_v9_block6(); let _meta: Metadata = Metadata::new(meta.as_slice()); } #[test] fn should_create_metadata_v10() { - let meta = test_suite::runtime_v10(); + let meta = runtime_v10(); let meta: Metadata = Metadata::new(meta.as_slice()); println!("{}", meta.pretty()); } @@ -21,7 +21,7 @@ fn should_create_metadata_v10() { #[test] fn should_create_metadata_v9_block500000() { let _ = pretty_env_logger::try_init(); - let meta = test_suite::runtime_v9_block500k(); + let meta = runtime_v9_block500k(); let meta: Metadata = Metadata::new(meta.as_slice()); println!("{}", meta.pretty()); } @@ -29,14 +29,14 @@ fn should_create_metadata_v9_block500000() { #[test] fn should_create_metadata_v12_block_4643974() { let _ = pretty_env_logger::try_init(); - let meta = test_suite::runtime_v12_block_4643974(); + let meta = runtime_v12_block_4643974(); let meta: Metadata = Metadata::new(meta.as_slice()); println!("{}", meta.pretty()); } #[test] fn should_get_correct_lookup_table() { - let meta = test_suite::runtime_v11(); + let meta = runtime_v11(); let meta: Metadata = Metadata::new(meta.as_slice()); let lookup_table = meta.storage_lookup_table(); let mut key = twox_128("System".as_bytes()).to_vec(); diff --git a/integration_tests/tests/test_suite.rs b/integration_tests/tests/runtime_metadata.rs similarity index 50% rename from integration_tests/tests/test_suite.rs rename to integration_tests/tests/runtime_metadata.rs index c1f2b320..60f6f3a8 100644 --- a/integration_tests/tests/test_suite.rs +++ b/integration_tests/tests/runtime_metadata.rs @@ -1,86 +1,5 @@ -const EXT_PATH: &'static str = "./data/extrinsics/"; -use desub_core::decoder::Chain; use std::{fs::File, io::prelude::*}; -use paste::paste; - -// NOTE: it is only usable in the current file. -macro_rules! decl_extrinsic_test { - ( - $( - [$spec:expr, $chain: expr, $block:expr] - )* - ) => { - $( - paste! { - pub fn []() -> (Vec, Vec>) { - let mut exts: Vec> = Vec::new(); - if std::path::Path::new("./integration_tests").exists() { - std::env::set_current_dir("./integration_tests").unwrap(); - } - let path = format!("{}{}/", EXT_PATH, $chain); - let path = &format!("{}spec{}_block{}/", path, $spec, $block); - println!( - "{}/{}", - path, - std::env::current_dir().unwrap().to_str().unwrap() - ); - - // get the number of files with prefix ${path}_EXTRINSIC in the directory. - let num_ext = std::fs::read_dir(&path) - .unwrap() - .map(|d| d.unwrap().file_name().into_string().unwrap()) - .filter(|ext| ext.starts_with("EXTRINSIC")) - .count(); - for i in 0..num_ext { - let ext_path = &format!( - "{}EXTRINSIC_spec_{}_block_{}_index_{}.bin", - &path, $spec, $block, i - ); - let mut f = File::open(ext_path).expect("Opening extrinsic failed"); - let mut ext = Vec::new(); - f.read_to_end(&mut ext).expect("Reading file failed"); - exts.push(ext) - } - - let mut f = File::open(&format!( - "{}spec_{}_block_{}_METADATA.bin", - &path, $spec, $block - )).expect("Opening Metadata file failed"); - - let mut meta = Vec::new(); - f.read_to_end(&mut meta).expect("Reading file failed"); - - (meta, exts) - } - } - )* - }; -} - -decl_extrinsic_test! { - ["1031", Chain::Kusama, "342962"] - ["1031", Chain::Kusama, "422871"] - ["1031", Chain::Kusama, "50970"] - ["1042", Chain::Kusama, "106284"] - ["1055", Chain::Kusama, "1674683"] - ["1055", Chain::Kusama, "1677621"] - ["1055", Chain::Kusama, "1702023"] - ["1055", Chain::Kusama, "1714495"] - ["1055", Chain::Kusama, "1717926"] - ["1055", Chain::Kusama, "1718223"] - ["1055", Chain::Kusama, "1732321"] - ["1055", Chain::Kusama, "1731904"] - ["1055", Chain::Kusama, "1768321"] - ["1020", Chain::Kusama, "6144"] - ["1042", Chain::Kusama, "779410"] - ["1042", Chain::Kusama, "899638"] - ["1030", Chain::Kusama, "233816"] - ["1039", Chain::Kusama, "607421"] - ["0", Chain::Polkadot, "892"] - ["1", Chain::Westend, "1191"] -} - /// Get the runtime metadata from KusamaCC3 from block 3,901,874 /// Block hash 0x1d65a4c67817c4f32f99f7247f070a2f3fd58baf81d4e533c9be9d1aa8c4e65a /// @@ -120,6 +39,19 @@ pub fn runtime_v9_block500k() -> Vec { buffer } +/// Get some runtime metadata from KusamaCC3 at block 6 +/// Block hash +/// 0xb5ee550d20a55b76adeba7149516d367ac7cbdd95cd0864a8753d6b5dd02d3bb +/// +/// # Panics +/// Panics on std::io::Error +pub fn runtime_v9_block6() -> Vec { + let mut f = File::open("./data/metadata_v9_block6.bin").expect("Opening file failed"); + let mut buffer = Vec::new(); + f.read_to_end(&mut buffer).expect("Reading file failed"); + buffer +} + /// Get the runtime metadata from KusamaCC3 for metadata version 10 /// Block hash /// 0x627a6a8e7698dd360bd44e7816e7f8c5321fa31e0a3f39324d93ec5716a57fb5 @@ -139,16 +71,3 @@ pub fn runtime_v12_block_4643974() -> Vec { f.read_to_end(&mut buffer).expect("Reading file failed"); buffer } - -/// Get some runtime metadata from KusamaCC3 at block 6 -/// Block hash -/// 0xb5ee550d20a55b76adeba7149516d367ac7cbdd95cd0864a8753d6b5dd02d3bb -/// -/// # Panics -/// Panics on std::io::Error -pub fn runtime_v9_block6() -> Vec { - let mut f = File::open("./data/metadata_v9_block6.bin").expect("Opening file failed"); - let mut buffer = Vec::new(); - f.read_to_end(&mut buffer).expect("Reading file failed"); - buffer -} diff --git a/integration_tests/tests/storage.rs b/integration_tests/tests/storage.rs index e1932b46..3cb60852 100644 --- a/integration_tests/tests/storage.rs +++ b/integration_tests/tests/storage.rs @@ -1,22 +1,12 @@ -use crate::test_suite; +use crate::runtime_metadata::*; +use anyhow::Result; use codec::Encode; use desub_core::{ decoder::{Chain, Decoder, Metadata}, SubstrateType, }; -use frame_system::AccountInfo; -use pallet_balances::AccountData; use primitives::twox_128; -// hex(encoded): 010000000864000000000000000000000000000000c80000000000000000000000000000002c01000000000000000000000000000090010000000000000000000000000000 -fn mock_account_info() -> AccountInfo> { - let mock_account_data: AccountData = - AccountData { free: 100, reserved: 200, misc_frozen: 300, fee_frozen: 400 }; - let mock_account_info: AccountInfo> = - AccountInfo { nonce: 1, refcount: 8, data: mock_account_data }; - mock_account_info -} - /// T::BlockNumber in meta V11 Block 1768321 fn get_plain_value() -> (Vec, Option>) { let mut key = twox_128("System".as_bytes()).to_vec(); @@ -32,7 +22,7 @@ fn should_decode_plain() { let types = extras::TypeResolver::default(); let mut decoder = Decoder::new(types, Chain::Kusama); - let meta = test_suite::runtime_v11(); + let meta = runtime_v11(); let meta = Metadata::new(meta.as_slice()); decoder.register_version(2023, &meta); @@ -41,22 +31,43 @@ fn should_decode_plain() { } #[test] -fn should_decode_map() { +fn should_decode_map() -> Result<()> { let _ = pretty_env_logger::try_init(); let types = extras::TypeResolver::default(); let mut decoder = Decoder::new(types, Chain::Kusama); - let meta = test_suite::runtime_v11(); + let meta = runtime_v11(); let meta = Metadata::new(meta.as_slice()); decoder.register_version(2023, &meta); - - let account = mock_account_info(); - let encoded_account = account.encode(); + // AccountInfo from block 3944196 + let encoded_account = hex::decode("01000000037c127ed1d8c6010000000000000000000000000000000000000000000000000000406352bfc60100000000000000000000406352bfc601000000000000000000").unwrap(); let storage_key = hex::decode("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da932a5935f6edc617ae178fef9eb1e211fbe5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f").unwrap(); - let res = decoder.decode_storage(2023, (storage_key, Some(encoded_account))).unwrap(); + let res = decoder.decode_storage(2023, (storage_key, Some(encoded_account)))?; + println!("{:?}", res); + Ok(()) +} + +#[test] +fn should_decode_map_ksm_3944195() -> Result<()> { + let _ = pretty_env_logger::try_init(); + + let types = extras::TypeResolver::default(); + let mut decoder = Decoder::new(types, Chain::Kusama); + + let meta = runtime_v11(); + let meta = Metadata::new(meta.as_slice()); + decoder.register_version(2023, &meta); + // BlockHash from block 3944196 + let storage_key = + hex::decode("26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c1187465eb805861b659fd1022f3c00") + .unwrap(); + let encoded_hash = hex::decode("38f14d3d028e2f5b9ce889a444b49e774b88bcb3fe205fa4f5a10c2e66290c59").unwrap(); + + let res = decoder.decode_storage(2023, (storage_key, Some(encoded_hash)))?; println!("{:?}", res); + Ok(()) } #[test] @@ -65,7 +76,7 @@ fn should_decode_double_map() { let types = extras::TypeResolver::default(); let mut decoder = Decoder::new(types, Chain::Kusama); - let meta = test_suite::runtime_v11(); + let meta = runtime_v11(); let meta = Metadata::new(meta.as_slice()); decoder.register_version(2023, &meta); // THIS STORAGE KEY IS WRONG for "ImOnline AuthoredBlocks" type diff --git a/integration_tests/tests/storage_extended_tests.rs b/integration_tests/tests/storage_extended_tests.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/integration_tests/tests/storage_extended_tests.rs @@ -0,0 +1 @@ + diff --git a/substrate-metadata-versions/metadatav10/Cargo.lock b/substrate-metadata-versions/metadatav10/Cargo.lock new file mode 100644 index 00000000..897e2794 --- /dev/null +++ b/substrate-metadata-versions/metadatav10/Cargo.lock @@ -0,0 +1,1803 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base58" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitvec" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +dependencies = [ + "either", + "radium", +] + +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "byte-slice-cast" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cc" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "winapi", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dyn-clone" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" + +[[package]] +name = "ed25519" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.5", + "zeroize", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "environmental" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fixed-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" +dependencies = [ + "byteorder", + "rand 0.7.3", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "frame-metadatav10" +version = "10.0.0" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-std", +] + +[[package]] +name = "futures" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" + +[[package]] +name = "futures-executor" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" + +[[package]] +name = "futures-macro" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" +dependencies = [ + "autocfg", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" + +[[package]] +name = "futures-task" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" + +[[package]] +name = "futures-util" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" +dependencies = [ + "autocfg", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac", + "digest 0.8.1", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.4", + "hmac", +] + +[[package]] +name = "impl-codec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "instant" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765" + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.4.1", + "typenum", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lock_api" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "memory_units" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" + +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2766204889d09937d00bfbb7fec56bb2a199e2ade963cab19185d8a6104c7c" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +dependencies = [ + "parking_lot 0.11.1", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "parity-scale-codec" +version = "1.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b26b16c7687c3075982af47719e481815df30bc544f7a6690763a25ca16e9d" +dependencies = [ + "arrayvec 0.5.2", + "bitvec", + "byte-slice-cast", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41512944b1faff334a5f1b9447611bf4ef40638ccb6328173dacefb338e878c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parity-util-mem" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c" +dependencies = [ + "cfg-if 0.1.10", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "primitive-types", + "winapi", +] + +[[package]] +name = "parity-util-mem-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" +dependencies = [ + "proc-macro2", + "syn", + "synstructure", +] + +[[package]] +name = "parity-wasm" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api 0.4.4", + "parking_lot_core 0.8.3", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.10", + "smallvec", + "winapi", +] + +[[package]] +name = "pbkdf2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +dependencies = [ + "byteorder", + "crypto-mac", +] + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "primitive-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" + +[[package]] +name = "proc-macro2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ref-cast" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "rustc-demangle" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secrecy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sharded-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signature" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" + +[[package]] +name = "slab" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "sp-core" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "base58", + "blake2-rfc", + "byteorder", + "derive_more", + "dyn-clonable", + "ed25519-dalek", + "futures", + "hash-db", + "hash256-std-hasher", + "hex", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "num-traits", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.2", + "primitive-types", + "rand 0.7.3", + "regex", + "schnorrkel", + "secrecy", + "serde", + "sha2 0.8.2", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "substrate-bip39", + "tiny-bip39", + "tiny-keccak", + "twox-hash", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-debug-derive" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-externalities" +version = "0.8.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-runtime-interface" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-std" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" + +[[package]] +name = "sp-storage" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-tracing" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "log", + "parity-scale-codec", + "sp-std", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-wasm-interface" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-std", + "wasmi", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "substrate-bip39" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236" +dependencies = [ + "hmac", + "pbkdf2", + "schnorrkel", + "sha2 0.8.2", + "zeroize", +] + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "thread_local" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tiny-bip39" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +dependencies = [ + "failure", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.8.2", + "unicode-normalization", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "tracing-log" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cbe87a2fa7e35900ce5de20220a582a9483a7063811defce79d7cbd59d4cfe" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "twox-hash" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" +dependencies = [ + "cfg-if 1.0.0", + "rand 0.8.4", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "uint" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177" +dependencies = [ + "byteorder", + "crunchy", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasmi" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +dependencies = [ + "libc", + "memory_units", + "num-rational", + "num-traits", + "parity-wasm", + "wasmi-validation", +] + +[[package]] +name = "wasmi-validation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "zeroize" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] diff --git a/substrate-metadata-versions/metadatav10/Cargo.toml b/substrate-metadata-versions/metadatav10/Cargo.toml new file mode 100644 index 00000000..349d2409 --- /dev/null +++ b/substrate-metadata-versions/metadatav10/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "frame-metadatav10" +version = "10.0.0" +authors = ["Parity Technologies "] +edition = "2018" +license = "GPL-3.0" + +[dependencies] +codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive"] } +serde = { version = "1.0.101", optional = true, features = ["derive"] } +sp-std = { version = "2.0.0-rc6", default-features = false, git = "https://github.com/paritytech/substrate" , rev = "7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" } +frame-metadata = { version = "14.0.0", features = ["v13"] } + +[features] +default = ["std"] +std = [ + "codec/std", + "sp-std/std", + "serde", +] diff --git a/substrate-metadata-versions/metadatav10/src/lib.rs b/substrate-metadata-versions/metadatav10/src/lib.rs new file mode 100644 index 00000000..9b6d4bfa --- /dev/null +++ b/substrate-metadata-versions/metadatav10/src/lib.rs @@ -0,0 +1,328 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Decodable variant of the RuntimeMetadata. +//! +//! This really doesn't belong here, but is necessary for the moment. In the future +//! it should be removed entirely to an external module for shimming on to the +//! codec-encoded metadata. +#![allow(clippy::all)] +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(feature = "std")] +use serde::Serialize; +#[cfg(feature = "std")] +use codec::{Decode, Input, Error}; +use codec::{Encode, Output}; +use sp_std::vec::Vec; +use frame_metadata::decode_different::*; + +/// Curent prefix of metadata +pub const META_RESERVED: u32 = 0x6174656d; // 'meta' warn endianness + +/// On `no_std` we do not support `Decode` and thus `StringBuf` is just `&'static str`. +/// So, if someone tries to decode this stuff on `no_std`, they will get a compilation error. +#[cfg(not(feature = "std"))] +type StringBuf = &'static str; +/// All the metadata about a function. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct FunctionMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a function argument. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct FunctionArgumentMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, +} + +/// Newtype wrapper for support encoding functions (actual the result of the function). +#[derive(Clone, Eq)] +pub struct FnEncode(pub fn() -> E) where E: Encode + 'static; + +impl Encode for FnEncode { + fn encode_to(&self, dest: &mut W) { + self.0().encode_to(dest); + } +} + +impl codec::EncodeLike for FnEncode {} + +impl PartialEq for FnEncode { + fn eq(&self, other: &Self) -> bool { + self.0().eq(&other.0()) + } +} + +impl sp_std::fmt::Debug for FnEncode { + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + self.0().fmt(f) + } +} + +#[cfg(feature = "std")] +impl serde::Serialize for FnEncode { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0().serialize(serializer) + } +} + +/// All the metadata about an outer event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct OuterEventMetadata { + pub name: DecodeDifferentStr, + pub events: DecodeDifferentArray< + (&'static str, FnEncode<&'static [EventMetadata]>), + (StringBuf, Vec) + >, +} + +/// All the metadata about an event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct EventMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray<&'static str, StringBuf>, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one storage entry. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct StorageEntryMetadata { + pub name: DecodeDifferentStr, + pub modifier: StorageEntryModifier, + pub ty: StorageEntryType, + pub default: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one module constant. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ModuleConstantMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, + pub value: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a module error. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ErrorMetadata { + pub name: DecodeDifferentStr, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about errors in a module. +pub trait ModuleErrorMetadata { + fn metadata() -> &'static [ErrorMetadata]; +} + +impl ModuleErrorMetadata for &'static str { + fn metadata() -> &'static [ErrorMetadata] { + &[] + } +} + +/// A technical trait to store lazy initiated vec value as static dyn pointer. +pub trait DefaultByte: Send + Sync { + fn default_byte(&self) -> Vec; +} + +/// Wrapper over dyn pointer for accessing a cached once byte value. +#[derive(Clone)] +pub struct DefaultByteGetter(pub &'static dyn DefaultByte); + +/// Decode different for static lazy initiated byte value. +pub type ByteGetter = DecodeDifferent>; + +impl Encode for DefaultByteGetter { + fn encode_to(&self, dest: &mut W) { + self.0.default_byte().encode_to(dest) + } +} + +impl codec::EncodeLike for DefaultByteGetter {} + +impl PartialEq for DefaultByteGetter { + fn eq(&self, other: &DefaultByteGetter) -> bool { + let left = self.0.default_byte(); + let right = other.0.default_byte(); + left.eq(&right) + } +} + +impl Eq for DefaultByteGetter { } + +#[cfg(feature = "std")] +impl serde::Serialize for DefaultByteGetter { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0.default_byte().serialize(serializer) + } +} + +impl sp_std::fmt::Debug for DefaultByteGetter { + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + self.0.default_byte().fmt(f) + } +} + +/// Hasher used by storage maps +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageHasher { + Blake2_128, + Blake2_256, + Blake2_128Concat, + Twox128, + Twox256, + Twox64Concat, +} + +/// A storage entry type. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageEntryType { + Plain(DecodeDifferentStr), + Map { + hasher: StorageHasher, + key: DecodeDifferentStr, + value: DecodeDifferentStr, + is_linked: bool, + }, + DoubleMap { + hasher: StorageHasher, + key1: DecodeDifferentStr, + key2: DecodeDifferentStr, + value: DecodeDifferentStr, + key2_hasher: StorageHasher, + }, +} + +/// A storage entry modifier. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageEntryModifier { + Optional, + Default, +} + +/// All metadata of the storage. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct StorageMetadata { + /// The common prefix used by all storage entries. + pub prefix: DecodeDifferent<&'static str, StringBuf>, + pub entries: DecodeDifferent<&'static [StorageEntryMetadata], Vec>, +} + +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +/// Metadata prefixed by a u32 for reserved usage +pub struct RuntimeMetadataPrefixed(pub u32, pub RuntimeMetadata); + +/// The metadata of a runtime. +/// The version ID encoded/decoded through +/// the enum nature of `RuntimeMetadata`. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum RuntimeMetadata { + /// Unused; enum filler. + V0(RuntimeMetadataDeprecated), + /// Version 1 for runtime metadata. No longer used. + V1(RuntimeMetadataDeprecated), + /// Version 2 for runtime metadata. No longer used. + V2(RuntimeMetadataDeprecated), + /// Version 3 for runtime metadata. No longer used. + V3(RuntimeMetadataDeprecated), + /// Version 4 for runtime metadata. No longer used. + V4(RuntimeMetadataDeprecated), + /// Version 5 for runtime metadata. No longer used. + V5(RuntimeMetadataDeprecated), + /// Version 6 for runtime metadata. No longer used. + V6(RuntimeMetadataDeprecated), + /// Version 7 for runtime metadata. No longer used. + V7(RuntimeMetadataDeprecated), + /// Version 8 for runtime metadata. No longer used. + V8(RuntimeMetadataDeprecated), + /// Version 9 for runtime metadata. No longer used. + V9(RuntimeMetadataDeprecated), + /// Version 10 for runtime metadata. + V10(RuntimeMetadataV10), +} + +/// Enum that should fail. +#[derive(Eq, PartialEq)] +#[cfg_attr(feature = "std", derive(Serialize))] +pub enum RuntimeMetadataDeprecated { } + +impl Encode for RuntimeMetadataDeprecated { + fn encode_to(&self, _dest: &mut W) {} +} + +impl codec::EncodeLike for RuntimeMetadataDeprecated {} + +#[cfg(feature = "std")] +impl Decode for RuntimeMetadataDeprecated { + fn decode(_input: &mut I) -> Result { + Err("Decoding is not supported".into()) + } +} + +/// The metadata of a runtime. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct RuntimeMetadataV10 { + pub modules: DecodeDifferentArray, +} + +/// The latest version of the metadata. +pub type RuntimeMetadataLastVersion = RuntimeMetadataV10; + +/// All metadata about an runtime module. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ModuleMetadata { + pub name: DecodeDifferentStr, + pub storage: Option, StorageMetadata>>, + pub calls: ODFnA, + pub event: ODFnA, + pub constants: DFnA, + pub errors: DFnA, +} + +type ODFnA = Option>; +type DFnA = DecodeDifferent, Vec>; + +impl Into for RuntimeMetadataPrefixed { + fn into(self) -> frame_metadata::OpaqueMetadata { + frame_metadata::OpaqueMetadata(self.encode()) + } +} + +impl Into for RuntimeMetadataLastVersion { + fn into(self) -> RuntimeMetadataPrefixed { + RuntimeMetadataPrefixed(META_RESERVED, RuntimeMetadata::V10(self)) + } +} diff --git a/substrate-metadata-versions/metadatav11/Cargo.toml b/substrate-metadata-versions/metadatav11/Cargo.toml new file mode 100644 index 00000000..00212b52 --- /dev/null +++ b/substrate-metadata-versions/metadatav11/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "frame-metadatav11" +version = "11.0.0-rc6" +authors = ["Parity Technologies "] +edition = "2018" +license = "Apache-2.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" +description = "Decodable variant of the RuntimeMetadata." +readme = "README.md" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive"] } +serde = { version = "1.0.101", optional = true, features = ["derive"] } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate" , rev = "7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" } +frame-metadata = { version = "14.0.0", features = ["v13"] } + +[features] +default = ["std"] +std = [ + "codec/std", + "sp-std/std", + "serde", +] diff --git a/substrate-metadata-versions/metadatav11/src/lib.rs b/substrate-metadata-versions/metadatav11/src/lib.rs new file mode 100644 index 00000000..cedac3dd --- /dev/null +++ b/substrate-metadata-versions/metadatav11/src/lib.rs @@ -0,0 +1,343 @@ +// This file is part of Substrate. + +// Copyright (C) 2018-2020 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Decodable variant of the RuntimeMetadata. +//! +//! This really doesn't belong here, but is necessary for the moment. In the future +//! it should be removed entirely to an external module for shimming on to the +//! codec-encoded metadata. + +#![allow(clippy::all)] +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(feature = "std")] +use serde::Serialize; +#[cfg(feature = "std")] +use codec::{Decode, Input, Error}; +use codec::{Encode, Output}; +use sp_std::vec::Vec; +use frame_metadata::decode_different::*; + +#[cfg(feature = "std")] +type StringBuf = String; + +/// Current prefix of metadata +pub const META_RESERVED: u32 = 0x6174656d; // 'meta' warn endianness + +/// All the metadata about a function. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct FunctionMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a function argument. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct FunctionArgumentMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, +} + +/// Newtype wrapper for support encoding functions (actual the result of the function). +#[derive(Clone, Eq)] +pub struct FnEncode(pub fn() -> E) where E: Encode + 'static; + +impl Encode for FnEncode { + fn encode_to(&self, dest: &mut W) { + self.0().encode_to(dest); + } +} + +impl codec::EncodeLike for FnEncode {} + +impl PartialEq for FnEncode { + fn eq(&self, other: &Self) -> bool { + self.0().eq(&other.0()) + } +} + +impl sp_std::fmt::Debug for FnEncode { + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + self.0().fmt(f) + } +} + +#[cfg(feature = "std")] +impl serde::Serialize for FnEncode { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0().serialize(serializer) + } +} + +/// All the metadata about an outer event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct OuterEventMetadata { + pub name: DecodeDifferentStr, + pub events: DecodeDifferentArray< + (&'static str, FnEncode<&'static [EventMetadata]>), + (StringBuf, Vec) + >, +} + +/// All the metadata about an event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct EventMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray<&'static str, StringBuf>, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one storage entry. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct StorageEntryMetadata { + pub name: DecodeDifferentStr, + pub modifier: StorageEntryModifier, + pub ty: StorageEntryType, + pub default: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one module constant. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ModuleConstantMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, + pub value: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a module error. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ErrorMetadata { + pub name: DecodeDifferentStr, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about errors in a module. +pub trait ModuleErrorMetadata { + fn metadata() -> &'static [ErrorMetadata]; +} + +impl ModuleErrorMetadata for &'static str { + fn metadata() -> &'static [ErrorMetadata] { + &[] + } +} + +/// A technical trait to store lazy initiated vec value as static dyn pointer. +pub trait DefaultByte: Send + Sync { + fn default_byte(&self) -> Vec; +} + +/// Wrapper over dyn pointer for accessing a cached once byte value. +#[derive(Clone)] +pub struct DefaultByteGetter(pub &'static dyn DefaultByte); + +/// Decode different for static lazy initiated byte value. +pub type ByteGetter = DecodeDifferent>; + +impl Encode for DefaultByteGetter { + fn encode_to(&self, dest: &mut W) { + self.0.default_byte().encode_to(dest) + } +} + +impl codec::EncodeLike for DefaultByteGetter {} + +impl PartialEq for DefaultByteGetter { + fn eq(&self, other: &DefaultByteGetter) -> bool { + let left = self.0.default_byte(); + let right = other.0.default_byte(); + left.eq(&right) + } +} + +impl Eq for DefaultByteGetter { } + +#[cfg(feature = "std")] +impl serde::Serialize for DefaultByteGetter { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0.default_byte().serialize(serializer) + } +} + +impl sp_std::fmt::Debug for DefaultByteGetter { + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + self.0.default_byte().fmt(f) + } +} + +/// Hasher used by storage maps +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageHasher { + Blake2_128, + Blake2_256, + Blake2_128Concat, + Twox128, + Twox256, + Twox64Concat, + Identity, +} + +/// A storage entry type. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageEntryType { + Plain(DecodeDifferentStr), + Map { + hasher: StorageHasher, + key: DecodeDifferentStr, + value: DecodeDifferentStr, + // is_linked flag previously, unused now to keep backwards compat + unused: bool, + }, + DoubleMap { + hasher: StorageHasher, + key1: DecodeDifferentStr, + key2: DecodeDifferentStr, + value: DecodeDifferentStr, + key2_hasher: StorageHasher, + }, +} + +/// A storage entry modifier. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageEntryModifier { + Optional, + Default, +} + +/// All metadata of the storage. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct StorageMetadata { + /// The common prefix used by all storage entries. + pub prefix: DecodeDifferent<&'static str, StringBuf>, + pub entries: DecodeDifferent<&'static [StorageEntryMetadata], Vec>, +} + +/// Metadata prefixed by a u32 for reserved usage +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct RuntimeMetadataPrefixed(pub u32, pub RuntimeMetadata); + +/// Metadata of the extrinsic used by the runtime. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ExtrinsicMetadata { + /// Extrinsic version. + pub version: u8, + /// The signed extensions in the order they appear in the extrinsic. + pub signed_extensions: Vec, +} + +/// The metadata of a runtime. +/// The version ID encoded/decoded through +/// the enum nature of `RuntimeMetadata`. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum RuntimeMetadata { + /// Unused; enum filler. + V0(RuntimeMetadataDeprecated), + /// Version 1 for runtime metadata. No longer used. + V1(RuntimeMetadataDeprecated), + /// Version 2 for runtime metadata. No longer used. + V2(RuntimeMetadataDeprecated), + /// Version 3 for runtime metadata. No longer used. + V3(RuntimeMetadataDeprecated), + /// Version 4 for runtime metadata. No longer used. + V4(RuntimeMetadataDeprecated), + /// Version 5 for runtime metadata. No longer used. + V5(RuntimeMetadataDeprecated), + /// Version 6 for runtime metadata. No longer used. + V6(RuntimeMetadataDeprecated), + /// Version 7 for runtime metadata. No longer used. + V7(RuntimeMetadataDeprecated), + /// Version 8 for runtime metadata. No longer used. + V8(RuntimeMetadataDeprecated), + /// Version 9 for runtime metadata. No longer used. + V9(RuntimeMetadataDeprecated), + /// Version 10 for runtime metadata. No longer used. + V10(RuntimeMetadataDeprecated), + /// Version 11 for runtime metadata. + V11(RuntimeMetadataV11), +} + +/// Enum that should fail. +#[derive(Eq, PartialEq)] +#[cfg_attr(feature = "std", derive(Serialize))] +pub enum RuntimeMetadataDeprecated { } + +impl Encode for RuntimeMetadataDeprecated { + fn encode_to(&self, _dest: &mut W) {} +} + +impl codec::EncodeLike for RuntimeMetadataDeprecated {} + +#[cfg(feature = "std")] +impl Decode for RuntimeMetadataDeprecated { + fn decode(_input: &mut I) -> Result { + Err("Decoding is not supported".into()) + } +} + +/// The metadata of a runtime. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct RuntimeMetadataV11 { + /// Metadata of all the modules. + pub modules: DecodeDifferentArray, + /// Metadata of the extrinsic. + pub extrinsic: ExtrinsicMetadata, +} + +/// All metadata about an runtime module. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ModuleMetadata { + pub name: DecodeDifferentStr, + pub storage: Option, StorageMetadata>>, + pub calls: ODFnA, + pub event: ODFnA, + pub constants: DFnA, + pub errors: DFnA, +} + +type ODFnA = Option>; +type DFnA = DecodeDifferent, Vec>; + +impl Into for RuntimeMetadataPrefixed { + fn into(self) -> frame_metadata::OpaqueMetadata { + frame_metadata::OpaqueMetadata(self.encode()) + } +} + +impl Into for RuntimeMetadataV11 { + fn into(self) -> RuntimeMetadataPrefixed { + RuntimeMetadataPrefixed(META_RESERVED, RuntimeMetadata::V11(self)) + } +} diff --git a/substrate-metadata-versions/metadatav8/Cargo.lock b/substrate-metadata-versions/metadatav8/Cargo.lock new file mode 100644 index 00000000..0a4e8aae --- /dev/null +++ b/substrate-metadata-versions/metadatav8/Cargo.lock @@ -0,0 +1,1803 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base58" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitvec" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +dependencies = [ + "either", + "radium", +] + +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "byte-slice-cast" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cc" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "winapi", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dyn-clone" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" + +[[package]] +name = "ed25519" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.5", + "zeroize", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "environmental" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fixed-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" +dependencies = [ + "byteorder", + "rand 0.7.3", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "frame-metadatav8" +version = "2.0.0" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-std", +] + +[[package]] +name = "futures" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" + +[[package]] +name = "futures-executor" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" + +[[package]] +name = "futures-macro" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" +dependencies = [ + "autocfg", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" + +[[package]] +name = "futures-task" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" + +[[package]] +name = "futures-util" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" +dependencies = [ + "autocfg", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac", + "digest 0.8.1", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.4", + "hmac", +] + +[[package]] +name = "impl-codec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "instant" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765" + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.4.1", + "typenum", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lock_api" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "memory_units" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" + +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2766204889d09937d00bfbb7fec56bb2a199e2ade963cab19185d8a6104c7c" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +dependencies = [ + "parking_lot 0.11.1", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "parity-scale-codec" +version = "1.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b26b16c7687c3075982af47719e481815df30bc544f7a6690763a25ca16e9d" +dependencies = [ + "arrayvec 0.5.2", + "bitvec", + "byte-slice-cast", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41512944b1faff334a5f1b9447611bf4ef40638ccb6328173dacefb338e878c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parity-util-mem" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c" +dependencies = [ + "cfg-if 0.1.10", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "primitive-types", + "winapi", +] + +[[package]] +name = "parity-util-mem-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" +dependencies = [ + "proc-macro2", + "syn", + "synstructure", +] + +[[package]] +name = "parity-wasm" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api 0.4.4", + "parking_lot_core 0.8.3", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.10", + "smallvec", + "winapi", +] + +[[package]] +name = "pbkdf2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +dependencies = [ + "byteorder", + "crypto-mac", +] + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "primitive-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" + +[[package]] +name = "proc-macro2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ref-cast" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "rustc-demangle" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secrecy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sharded-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signature" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" + +[[package]] +name = "slab" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "sp-core" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "base58", + "blake2-rfc", + "byteorder", + "derive_more", + "dyn-clonable", + "ed25519-dalek", + "futures", + "hash-db", + "hash256-std-hasher", + "hex", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "num-traits", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.2", + "primitive-types", + "rand 0.7.3", + "regex", + "schnorrkel", + "secrecy", + "serde", + "sha2 0.8.2", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "substrate-bip39", + "tiny-bip39", + "tiny-keccak", + "twox-hash", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-debug-derive" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-externalities" +version = "0.8.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-runtime-interface" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-std" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" + +[[package]] +name = "sp-storage" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-tracing" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "log", + "parity-scale-codec", + "sp-std", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-wasm-interface" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-std", + "wasmi", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "substrate-bip39" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236" +dependencies = [ + "hmac", + "pbkdf2", + "schnorrkel", + "sha2 0.8.2", + "zeroize", +] + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "thread_local" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tiny-bip39" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +dependencies = [ + "failure", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.8.2", + "unicode-normalization", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "tracing-log" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cbe87a2fa7e35900ce5de20220a582a9483a7063811defce79d7cbd59d4cfe" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "twox-hash" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" +dependencies = [ + "cfg-if 1.0.0", + "rand 0.8.4", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "uint" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177" +dependencies = [ + "byteorder", + "crunchy", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasmi" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +dependencies = [ + "libc", + "memory_units", + "num-rational", + "num-traits", + "parity-wasm", + "wasmi-validation", +] + +[[package]] +name = "wasmi-validation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "zeroize" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] diff --git a/substrate-metadata-versions/metadatav8/Cargo.toml b/substrate-metadata-versions/metadatav8/Cargo.toml new file mode 100644 index 00000000..04c98499 --- /dev/null +++ b/substrate-metadata-versions/metadatav8/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "frame-metadatav8" +version = "2.0.0" +authors = ["Parity Technologies "] +edition = "2018" + +[dependencies] +codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive"] } +serde = { version = "1.0.101", optional = true, features = ["derive"] } +rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , rev = "7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" } +frame-metadata = { version = "14.0.0", features = ["v13"] } + + +[features] +default = ["std"] +std = [ + "codec/std", + "rstd/std", + "serde", +] + diff --git a/substrate-metadata-versions/metadatav8/src/lib.rs b/substrate-metadata-versions/metadatav8/src/lib.rs new file mode 100644 index 00000000..28453faa --- /dev/null +++ b/substrate-metadata-versions/metadatav8/src/lib.rs @@ -0,0 +1,322 @@ +// Copyright 2018-2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Decodable variant of the RuntimeMetadata. +//! +//! This really doesn't belong here, but is necessary for the moment. In the future +//! it should be removed entirely to an external module for shimming on to the +//! codec-encoded metadata. +#![allow(clippy::all)] +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(feature = "std")] +use serde::Serialize; +#[cfg(feature = "std")] +use codec::{Decode, Input, Error}; +use codec::{Encode, Output}; +use rstd::vec::Vec; +use frame_metadata::decode_different::*; + +/// Curent prefix of metadata +pub const META_RESERVED: u32 = 0x6174656d; // 'meta' warn endianness + + +/// All the metadata about a function. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct FunctionMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a function argument. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct FunctionArgumentMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, +} + +/// Newtype wrapper for support encoding functions (actual the result of the function). +#[derive(Clone, Eq)] +pub struct FnEncode(pub fn() -> E) where E: Encode + 'static; + +impl Encode for FnEncode { + fn encode_to(&self, dest: &mut W) { + self.0().encode_to(dest); + } +} + +impl codec::EncodeLike for FnEncode {} + +impl PartialEq for FnEncode { + fn eq(&self, other: &Self) -> bool { + self.0().eq(&other.0()) + } +} + +#[cfg(feature = "std")] +impl std::fmt::Debug for FnEncode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.0().fmt(f) + } +} + +#[cfg(feature = "std")] +impl serde::Serialize for FnEncode { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0().serialize(serializer) + } +} + +/// All the metadata about an outer event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct OuterEventMetadata { + pub name: DecodeDifferentStr, + pub events: DecodeDifferentArray< + (&'static str, FnEncode<&'static [EventMetadata]>), + (StringBuf, Vec) + >, +} + +/// All the metadata about an event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct EventMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray<&'static str, StringBuf>, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one storage entry. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct StorageEntryMetadata { + pub name: DecodeDifferentStr, + pub modifier: StorageEntryModifier, + pub ty: StorageEntryType, + pub default: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one module constant. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct ModuleConstantMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, + pub value: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a module error. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct ErrorMetadata { + pub name: DecodeDifferentStr, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about errors in a module. +pub trait ModuleErrorMetadata { + fn metadata() -> &'static [ErrorMetadata]; +} + +impl ModuleErrorMetadata for &'static str { + fn metadata() -> &'static [ErrorMetadata] { + &[] + } +} + +/// A technical trait to store lazy initiated vec value as static dyn pointer. +pub trait DefaultByte: Send + Sync { + fn default_byte(&self) -> Vec; +} + +/// Wrapper over dyn pointer for accessing a cached once byte value. +#[derive(Clone)] +pub struct DefaultByteGetter(pub &'static dyn DefaultByte); + +/// Decode different for static lazy initiated byte value. +pub type ByteGetter = DecodeDifferent>; + +impl Encode for DefaultByteGetter { + fn encode_to(&self, dest: &mut W) { + self.0.default_byte().encode_to(dest) + } +} + +impl codec::EncodeLike for DefaultByteGetter {} + +impl PartialEq for DefaultByteGetter { + fn eq(&self, other: &DefaultByteGetter) -> bool { + let left = self.0.default_byte(); + let right = other.0.default_byte(); + left.eq(&right) + } +} + +impl Eq for DefaultByteGetter { } + +#[cfg(feature = "std")] +impl serde::Serialize for DefaultByteGetter { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0.default_byte().serialize(serializer) + } +} + +#[cfg(feature = "std")] +impl std::fmt::Debug for DefaultByteGetter { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.0.default_byte().fmt(f) + } +} + +/// Hasher used by storage maps +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum StorageHasher { + Blake2_128, + Blake2_256, + Twox128, + Twox256, + Twox64Concat, +} + +/// A storage entry type. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum StorageEntryType { + Plain(DecodeDifferentStr), + Map { + hasher: StorageHasher, + key: DecodeDifferentStr, + value: DecodeDifferentStr, + is_linked: bool, + }, + DoubleMap { + hasher: StorageHasher, + key1: DecodeDifferentStr, + key2: DecodeDifferentStr, + value: DecodeDifferentStr, + key2_hasher: StorageHasher, + }, +} + +/// A storage entry modifier. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum StorageEntryModifier { + Optional, + Default, +} + +/// All metadata of the storage. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct StorageMetadata { + /// The common prefix used by all storage entries. + pub prefix: DecodeDifferent<&'static str, StringBuf>, + pub entries: DecodeDifferent<&'static [StorageEntryMetadata], Vec>, +} + +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +/// Metadata prefixed by a u32 for reserved usage +pub struct RuntimeMetadataPrefixed(pub u32, pub RuntimeMetadata); + +/// The metadata of a runtime. +/// The version ID encoded/decoded through +/// the enum nature of `RuntimeMetadata`. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum RuntimeMetadata { + /// Unused; enum filler. + V0(RuntimeMetadataDeprecated), + /// Version 1 for runtime metadata. No longer used. + V1(RuntimeMetadataDeprecated), + /// Version 2 for runtime metadata. No longer used. + V2(RuntimeMetadataDeprecated), + /// Version 3 for runtime metadata. No longer used. + V3(RuntimeMetadataDeprecated), + /// Version 4 for runtime metadata. No longer used. + V4(RuntimeMetadataDeprecated), + /// Version 5 for runtime metadata. No longer used. + V5(RuntimeMetadataDeprecated), + /// Version 6 for runtime metadata. No longer used. + V6(RuntimeMetadataDeprecated), + /// Version 7 for runtime metadata. No longer used. + V7(RuntimeMetadataDeprecated), + /// Version 8 for runtime metadata. + V8(RuntimeMetadataV8), +} + +/// Enum that should fail. +#[derive(Eq, PartialEq)] +#[cfg_attr(feature = "std", derive(Debug, Serialize))] +pub enum RuntimeMetadataDeprecated { } + +impl Encode for RuntimeMetadataDeprecated { + fn encode_to(&self, _dest: &mut W) {} +} + +impl codec::EncodeLike for RuntimeMetadataDeprecated {} + +#[cfg(feature = "std")] +impl Decode for RuntimeMetadataDeprecated { + fn decode(_input: &mut I) -> Result { + Err("Decoding is not supported".into()) + } +} + +/// The metadata of a runtime. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct RuntimeMetadataV8 { + pub modules: DecodeDifferentArray, +} + +/// The latest version of the metadata. +pub type RuntimeMetadataLastVersion = RuntimeMetadataV8; + +/// All metadata about an runtime module. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct ModuleMetadata { + pub name: DecodeDifferentStr, + pub storage: Option, StorageMetadata>>, + pub calls: ODFnA, + pub event: ODFnA, + pub constants: DFnA, + pub errors: DFnA, +} + +type ODFnA = Option>; +type DFnA = DecodeDifferent, Vec>; + +impl Into for RuntimeMetadataPrefixed { + fn into(self) -> frame_metadata::OpaqueMetadata { + frame_metadata::OpaqueMetadata(self.encode()) + } +} + +impl Into for RuntimeMetadataLastVersion { + fn into(self) -> RuntimeMetadataPrefixed { + RuntimeMetadataPrefixed(META_RESERVED, RuntimeMetadata::V8(self)) + } +} diff --git a/substrate-metadata-versions/metadatav9/Cargo.lock b/substrate-metadata-versions/metadatav9/Cargo.lock new file mode 100644 index 00000000..9ad33a87 --- /dev/null +++ b/substrate-metadata-versions/metadatav9/Cargo.lock @@ -0,0 +1,1803 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base58" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitvec" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +dependencies = [ + "either", + "radium", +] + +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "byte-slice-cast" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cc" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "winapi", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cpufeatures" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "derive_more" +version = "0.99.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dyn-clone" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" + +[[package]] +name = "ed25519" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.5", + "zeroize", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "environmental" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fixed-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" +dependencies = [ + "byteorder", + "rand 0.7.3", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "frame-metadatav9" +version = "2.0.0" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-std", +] + +[[package]] +name = "futures" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" + +[[package]] +name = "futures-executor" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" + +[[package]] +name = "futures-macro" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" +dependencies = [ + "autocfg", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" + +[[package]] +name = "futures-task" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" + +[[package]] +name = "futures-util" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" +dependencies = [ + "autocfg", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac", + "digest 0.8.1", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.4", + "hmac", +] + +[[package]] +name = "impl-codec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "instant" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765" + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.4.1", + "typenum", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lock_api" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "memory_units" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" + +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2766204889d09937d00bfbb7fec56bb2a199e2ade963cab19185d8a6104c7c" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +dependencies = [ + "parking_lot 0.11.1", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "parity-scale-codec" +version = "1.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b26b16c7687c3075982af47719e481815df30bc544f7a6690763a25ca16e9d" +dependencies = [ + "arrayvec 0.5.2", + "bitvec", + "byte-slice-cast", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41512944b1faff334a5f1b9447611bf4ef40638ccb6328173dacefb338e878c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parity-util-mem" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c" +dependencies = [ + "cfg-if 0.1.10", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "primitive-types", + "winapi", +] + +[[package]] +name = "parity-util-mem-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" +dependencies = [ + "proc-macro2", + "syn", + "synstructure", +] + +[[package]] +name = "parity-wasm" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api 0.4.4", + "parking_lot_core 0.8.3", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.10", + "smallvec", + "winapi", +] + +[[package]] +name = "pbkdf2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +dependencies = [ + "byteorder", + "crypto-mac", +] + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "primitive-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" + +[[package]] +name = "proc-macro2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ref-cast" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "rustc-demangle" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "secrecy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sharded-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signature" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" + +[[package]] +name = "slab" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "sp-core" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "base58", + "blake2-rfc", + "byteorder", + "derive_more", + "dyn-clonable", + "ed25519-dalek", + "futures", + "hash-db", + "hash256-std-hasher", + "hex", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "num-traits", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.2", + "primitive-types", + "rand 0.7.3", + "regex", + "schnorrkel", + "secrecy", + "serde", + "sha2 0.8.2", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "substrate-bip39", + "tiny-bip39", + "tiny-keccak", + "twox-hash", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-debug-derive" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-externalities" +version = "0.8.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-runtime-interface" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-std" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" + +[[package]] +name = "sp-storage" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-tracing" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "log", + "parity-scale-codec", + "sp-std", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-wasm-interface" +version = "2.0.0" +source = "git+https://github.com/paritytech/substrate?rev=7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2#7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-std", + "wasmi", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "substrate-bip39" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236" +dependencies = [ + "hmac", + "pbkdf2", + "schnorrkel", + "sha2 0.8.2", + "zeroize", +] + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "thread_local" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tiny-bip39" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +dependencies = [ + "failure", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.8.2", + "unicode-normalization", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "tracing-log" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cbe87a2fa7e35900ce5de20220a582a9483a7063811defce79d7cbd59d4cfe" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "twox-hash" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" +dependencies = [ + "cfg-if 1.0.0", + "rand 0.8.4", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "uint" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177" +dependencies = [ + "byteorder", + "crunchy", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasmi" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +dependencies = [ + "libc", + "memory_units", + "num-rational", + "num-traits", + "parity-wasm", + "wasmi-validation", +] + +[[package]] +name = "wasmi-validation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "zeroize" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] diff --git a/substrate-metadata-versions/metadatav9/Cargo.toml b/substrate-metadata-versions/metadatav9/Cargo.toml new file mode 100644 index 00000000..12727f77 --- /dev/null +++ b/substrate-metadata-versions/metadatav9/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "frame-metadatav9" +version = "2.0.0" +authors = ["Parity Technologies "] +edition = "2018" + +[dependencies] +codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive"] } +serde = { version = "1.0.101", optional = true, features = ["derive"] } +rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , rev = "7314a78d49d0dc3862c6ef7c8115cb1b3d0c0fd2" } +frame-metadata = { version = "14.0.0", features = ["v13"] } + +[features] +default = ["std"] +std = [ + "codec/std", + "rstd/std", + "serde", +] diff --git a/substrate-metadata-versions/metadatav9/src/lib.rs b/substrate-metadata-versions/metadatav9/src/lib.rs new file mode 100644 index 00000000..813c8aac --- /dev/null +++ b/substrate-metadata-versions/metadatav9/src/lib.rs @@ -0,0 +1,322 @@ +// Copyright 2018-2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Decodable variant of the RuntimeMetadata. +//! +//! This really doesn't belong here, but is necessary for the moment. In the future +//! it should be removed entirely to an external module for shimming on to the +//! codec-encoded metadata. +#![allow(clippy::all)] +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(feature = "std")] +use serde::Serialize; +#[cfg(feature = "std")] +use codec::{Decode, Input, Error}; +use codec::{Encode, Output}; +use rstd::vec::Vec; +use frame_metadata::decode_different::*; + +/// Curent prefix of metadata +pub const META_RESERVED: u32 = 0x6174656d; // 'meta' warn endianness + +/// All the metadata about a function. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct FunctionMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a function argument. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct FunctionArgumentMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, +} + +/// Newtype wrapper for support encoding functions (actual the result of the function). +#[derive(Clone, Eq)] +pub struct FnEncode(pub fn() -> E) where E: Encode + 'static; + +impl Encode for FnEncode { + fn encode_to(&self, dest: &mut W) { + self.0().encode_to(dest); + } +} + +impl codec::EncodeLike for FnEncode {} + +impl PartialEq for FnEncode { + fn eq(&self, other: &Self) -> bool { + self.0().eq(&other.0()) + } +} + +impl rstd::fmt::Debug for FnEncode { + fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result { + self.0().fmt(f) + } +} + +#[cfg(feature = "std")] +impl serde::Serialize for FnEncode { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0().serialize(serializer) + } +} + +/// All the metadata about an outer event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct OuterEventMetadata { + pub name: DecodeDifferentStr, + pub events: DecodeDifferentArray< + (&'static str, FnEncode<&'static [EventMetadata]>), + (StringBuf, Vec) + >, +} + +/// All the metadata about an event. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct EventMetadata { + pub name: DecodeDifferentStr, + pub arguments: DecodeDifferentArray<&'static str, StringBuf>, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one storage entry. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct StorageEntryMetadata { + pub name: DecodeDifferentStr, + pub modifier: StorageEntryModifier, + pub ty: StorageEntryType, + pub default: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about one module constant. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ModuleConstantMetadata { + pub name: DecodeDifferentStr, + pub ty: DecodeDifferentStr, + pub value: ByteGetter, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about a module error. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ErrorMetadata { + pub name: DecodeDifferentStr, + pub documentation: DecodeDifferentArray<&'static str, StringBuf>, +} + +/// All the metadata about errors in a module. +pub trait ModuleErrorMetadata { + fn metadata() -> &'static [ErrorMetadata]; +} + +impl ModuleErrorMetadata for &'static str { + fn metadata() -> &'static [ErrorMetadata] { + &[] + } +} + +/// A technical trait to store lazy initiated vec value as static dyn pointer. +pub trait DefaultByte: Send + Sync { + fn default_byte(&self) -> Vec; +} + +/// Wrapper over dyn pointer for accessing a cached once byte value. +#[derive(Clone)] +pub struct DefaultByteGetter(pub &'static dyn DefaultByte); + +/// Decode different for static lazy initiated byte value. +pub type ByteGetter = DecodeDifferent>; + +impl Encode for DefaultByteGetter { + fn encode_to(&self, dest: &mut W) { + self.0.default_byte().encode_to(dest) + } +} + +impl codec::EncodeLike for DefaultByteGetter {} + +impl PartialEq for DefaultByteGetter { + fn eq(&self, other: &DefaultByteGetter) -> bool { + let left = self.0.default_byte(); + let right = other.0.default_byte(); + left.eq(&right) + } +} + +impl Eq for DefaultByteGetter { } + +#[cfg(feature = "std")] +impl serde::Serialize for DefaultByteGetter { + fn serialize(&self, serializer: S) -> Result where S: serde::Serializer { + self.0.default_byte().serialize(serializer) + } +} + +impl rstd::fmt::Debug for DefaultByteGetter { + fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result { + self.0.default_byte().fmt(f) + } +} + +/// Hasher used by storage maps +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageHasher { + Blake2_128, + Blake2_256, + Blake2_128Concat, + Twox128, + Twox256, + Twox64Concat, +} + +/// A storage entry type. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageEntryType { + Plain(DecodeDifferentStr), + Map { + hasher: StorageHasher, + key: DecodeDifferentStr, + value: DecodeDifferentStr, + is_linked: bool, + }, + DoubleMap { + hasher: StorageHasher, + key1: DecodeDifferentStr, + key2: DecodeDifferentStr, + value: DecodeDifferentStr, + key2_hasher: StorageHasher, + }, +} + +/// A storage entry modifier. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum StorageEntryModifier { + Optional, + Default, +} + +/// All metadata of the storage. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct StorageMetadata { + /// The common prefix used by all storage entries. + pub prefix: DecodeDifferent<&'static str, StringBuf>, + pub entries: DecodeDifferent<&'static [StorageEntryMetadata], Vec>, +} + +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +/// Metadata prefixed by a u32 for reserved usage +pub struct RuntimeMetadataPrefixed(pub u32, pub RuntimeMetadata); + +/// The metadata of a runtime. +/// The version ID encoded/decoded through +/// the enum nature of `RuntimeMetadata`. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub enum RuntimeMetadata { + /// Unused; enum filler. + V0(RuntimeMetadataDeprecated), + /// Version 1 for runtime metadata. No longer used. + V1(RuntimeMetadataDeprecated), + /// Version 2 for runtime metadata. No longer used. + V2(RuntimeMetadataDeprecated), + /// Version 3 for runtime metadata. No longer used. + V3(RuntimeMetadataDeprecated), + /// Version 4 for runtime metadata. No longer used. + V4(RuntimeMetadataDeprecated), + /// Version 5 for runtime metadata. No longer used. + V5(RuntimeMetadataDeprecated), + /// Version 6 for runtime metadata. No longer used. + V6(RuntimeMetadataDeprecated), + /// Version 7 for runtime metadata. No longer used. + V7(RuntimeMetadataDeprecated), + /// Version 8 for runtime metadata. No longer used. + V8(RuntimeMetadataDeprecated), + /// Version 9 for runtime metadata. + V9(RuntimeMetadataV9), +} + +/// Enum that should fail. +#[derive(Eq, PartialEq)] +#[cfg_attr(feature = "std", derive(Serialize))] +pub enum RuntimeMetadataDeprecated { } + +impl Encode for RuntimeMetadataDeprecated { + fn encode_to(&self, _dest: &mut W) {} +} + +impl codec::EncodeLike for RuntimeMetadataDeprecated {} + +#[cfg(feature = "std")] +impl Decode for RuntimeMetadataDeprecated { + fn decode(_input: &mut I) -> Result { + Err("Decoding is not supported".into()) + } +} + +/// The metadata of a runtime. +#[derive(Eq, Encode, PartialEq)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct RuntimeMetadataV9 { + pub modules: DecodeDifferentArray, +} + +/// The latest version of the metadata. +pub type RuntimeMetadataLastVersion = RuntimeMetadataV9; + +/// All metadata about an runtime module. +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Serialize))] +pub struct ModuleMetadata { + pub name: DecodeDifferentStr, + pub storage: Option, StorageMetadata>>, + pub calls: ODFnA, + pub event: ODFnA, + pub constants: DFnA, + pub errors: DFnA, +} + +type ODFnA = Option>; +type DFnA = DecodeDifferent, Vec>; + +impl Into for RuntimeMetadataPrefixed { + fn into(self) -> frame_metadata::OpaqueMetadata { + frame_metadata::OpaqueMetadata(self.encode()) + } +} + +impl Into for RuntimeMetadataLastVersion { + fn into(self) -> RuntimeMetadataPrefixed { + RuntimeMetadataPrefixed(META_RESERVED, RuntimeMetadata::V9(self)) + } +}