feat(xcm): support json schema (for CosmWasm VM support) (#1454)

# Description

- What does this PR do? Allows to generate JSON schema for subset of XCM
in std builds
- Why are these changes needed? To support XCM messages in CosmWasm
contracts which require Schemars to generate contract clients
- How were these changes implemented and what do they affect? We will
use schema feature flag to build XCM pallet with JSON schema enabled

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [x] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [x] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works (if applicable)
- [x] If this PR alters any external APIs or interfaces used by
Polkadot, the corresponding Polkadot PR is ready as well
  as the corresponding Cumulus PR (optional)
This commit is contained in:
dzmitry-lahoda
2023-12-07 16:40:16 +00:00
committed by GitHub
parent 1a4ab64bcb
commit 95c3ee10bc
13 changed files with 86 additions and 3 deletions
Generated
+40 -2
View File
@@ -1521,13 +1521,14 @@ dependencies = [
[[package]]
name = "bounded-collections"
version = "0.1.8"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6"
checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd"
dependencies = [
"log",
"parity-scale-codec",
"scale-info",
"schemars",
"serde",
]
@@ -16344,6 +16345,30 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "schemars"
version = "0.8.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161"
dependencies = [
"dyn-clone",
"schemars_derive",
"serde",
"serde_json",
]
[[package]]
name = "schemars_derive"
version = "0.8.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737"
dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
"syn 1.0.109",
]
[[package]]
name = "schnellru"
version = "0.2.1"
@@ -16614,6 +16639,17 @@ dependencies = [
"syn 2.0.39",
]
[[package]]
name = "serde_derive_internals"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "serde_fmt"
version = "1.0.3"
@@ -18117,6 +18153,7 @@ dependencies = [
"bounded-collections",
"parity-scale-codec",
"scale-info",
"schemars",
"serde",
"smallvec",
"sp-arithmetic",
@@ -18353,6 +18390,7 @@ dependencies = [
"log",
"parity-scale-codec",
"scale-info",
"schemars",
"serde",
"sp-io",
"sp-weights",