difftreelog
Merge pull request #287 from UniqueNetwork/release/quartz-v916001
in: master
Release/quartz v916001
67 files changed
.envdiffbeforeafterboth--- a/.env
+++ b/.env
@@ -1,6 +1,6 @@
RUST_TOOLCHAIN=nightly-2021-11-11
RUST_C=1.58.0-nightly
-POLKA_VERSION=release-v0.9.14
+POLKA_VERSION=release-v0.9.16
UNIQUE_BRANCH=develop
USER=***
PASS=***
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14,20 +14,11 @@
[[package]]
name = "addr2line"
-version = "0.16.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd"
-dependencies = [
- "gimli 0.25.0",
-]
-
-[[package]]
-name = "addr2line"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
dependencies = [
- "gimli 0.26.1",
+ "gimli",
]
[[package]]
@@ -42,7 +33,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -77,7 +68,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [
- "getrandom 0.2.3",
+ "getrandom 0.2.4",
"once_cell",
"version_check",
]
@@ -108,15 +99,15 @@
[[package]]
name = "anyhow"
-version = "1.0.51"
+version = "1.0.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203"
+checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0"
[[package]]
name = "approx"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e"
+checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
dependencies = [
"num-traits",
]
@@ -225,7 +216,7 @@
"parking",
"polling",
"slab",
- "socket2 0.4.2",
+ "socket2 0.4.4",
"waker-fn",
"winapi 0.3.9",
]
@@ -288,7 +279,7 @@
"memchr",
"num_cpus",
"once_cell",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"pin-utils",
"slab",
"wasm-bindgen-futures",
@@ -296,9 +287,9 @@
[[package]]
name = "async-std-resolver"
-version = "0.20.3"
+version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed4e2c3da14d8ad45acb1e3191db7a918e9505b6f155b218e70a7c9a1a48c638"
+checksum = "dbf3e776afdf3a2477ef4854b85ba0dff3bd85792f685fb3c68948b4d304e4f0"
dependencies = [
"async-std",
"async-trait",
@@ -310,9 +301,9 @@
[[package]]
name = "async-task"
-version = "4.0.3"
+version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0"
+checksum = "677d306121baf53310a3fd342d88dc0824f6bbeace68347593658525565abee8"
[[package]]
name = "async-trait"
@@ -335,7 +326,7 @@
"futures-sink",
"futures-util",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -348,7 +339,7 @@
"futures-sink",
"futures-util",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -378,18 +369,30 @@
]
[[package]]
+name = "auto_impl"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4"
+dependencies = [
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "autocfg"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
-version = "0.3.63"
+version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6"
+checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f"
dependencies = [
- "addr2line 0.17.0",
+ "addr2line",
"cc",
"cfg-if 1.0.0",
"libc",
@@ -428,14 +431,15 @@
[[package]]
name = "beefy-gadget"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"beefy-primitives",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
"parity-scale-codec",
"parking_lot 0.11.2",
+ "sc-chain-spec",
"sc-client-api",
"sc-keystore",
"sc-network",
@@ -456,32 +460,36 @@
[[package]]
name = "beefy-gadget-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"beefy-gadget",
"beefy-primitives",
- "futures 0.3.18",
+ "derive_more",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
"jsonrpc-pubsub",
"log",
"parity-scale-codec",
+ "parking_lot 0.11.2",
"sc-rpc",
+ "sc-utils",
"serde",
"sp-core",
"sp-runtime",
+ "thiserror",
]
[[package]]
name = "beefy-merkle-tree"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
[[package]]
name = "beefy-primitives"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -494,9 +502,9 @@
[[package]]
name = "bimap"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50ae17cabbc8a38a1e3e4c1a6a664e9a09672dc14d0896fa8d865d3a5a446b07"
+checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b"
[[package]]
name = "bincode"
@@ -621,10 +629,19 @@
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
"block-padding 0.2.1",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
+name = "block-buffer"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
+dependencies = [
+ "generic-array 0.14.5",
+]
+
+[[package]]
name = "block-padding"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -655,9 +672,9 @@
[[package]]
name = "bounded-vec"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afdd1dffefe5fc66262a524b91087c43b16e478b2e3dc49eb11b0e2fd6b6ec90"
+checksum = "b47cca82fca99417fe405f09d93bb8fff90bdd03d13c631f18096ee123b4281c"
dependencies = [
"thiserror",
]
@@ -665,7 +682,7 @@
[[package]]
name = "bp-header-chain"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"finality-grandpa",
"frame-support",
@@ -681,7 +698,7 @@
[[package]]
name = "bp-message-dispatch"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-runtime",
"frame-support",
@@ -693,7 +710,7 @@
[[package]]
name = "bp-messages"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitvec",
"bp-runtime",
@@ -709,7 +726,7 @@
[[package]]
name = "bp-polkadot-core"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-messages",
"bp-runtime",
@@ -722,27 +739,12 @@
"sp-runtime",
"sp-std",
"sp-version",
-]
-
-[[package]]
-name = "bp-rialto"
-version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
-dependencies = [
- "bp-messages",
- "bp-runtime",
- "frame-support",
- "frame-system",
- "sp-api",
- "sp-core",
- "sp-runtime",
- "sp-std",
]
[[package]]
name = "bp-rococo"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-messages",
"bp-polkadot-core",
@@ -759,7 +761,7 @@
[[package]]
name = "bp-runtime"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"frame-support",
"hash-db",
@@ -777,7 +779,7 @@
[[package]]
name = "bp-test-utils"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-header-chain",
"ed25519-dalek",
@@ -792,7 +794,7 @@
[[package]]
name = "bp-wococo"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-messages",
"bp-polkadot-core",
@@ -807,7 +809,7 @@
[[package]]
name = "bridge-runtime-common"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-message-dispatch",
"bp-messages",
@@ -853,9 +855,9 @@
[[package]]
name = "bumpalo"
-version = "3.8.0"
+version = "3.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c"
+checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
[[package]]
name = "byte-slice-cast"
@@ -899,15 +901,15 @@
[[package]]
name = "cache-padded"
-version = "1.1.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
+checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
[[package]]
name = "camino"
-version = "1.0.5"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52d74260d9bf6944e2208aa46841b4b8f0d7ffc0849a06837b2f510337f86b2b"
+checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23"
dependencies = [
"serde",
]
@@ -929,7 +931,7 @@
dependencies = [
"camino",
"cargo-platform",
- "semver 1.0.4",
+ "semver 1.0.5",
"serde",
"serde_json",
]
@@ -1025,7 +1027,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -1039,13 +1041,13 @@
[[package]]
name = "clang-sys"
-version = "1.3.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90"
+checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21"
dependencies = [
"glob",
"libc",
- "libloading 0.7.2",
+ "libloading 0.7.3",
]
[[package]]
@@ -1095,9 +1097,9 @@
[[package]]
name = "core-foundation"
-version = "0.9.2"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
dependencies = [
"core-foundation-sys",
"libc",
@@ -1138,24 +1140,24 @@
[[package]]
name = "cranelift-bforest"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc0cb7df82c8cf8f2e6a8dd394a0932a71369c160cc9b027dca414fced242513"
+checksum = "9516ba6b2ba47b4cbf63b713f75b432fafa0a0e0464ec8381ec76e6efe931ab3"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe4463c15fa42eee909e61e5eac4866b7c6d22d0d8c621e57a0c5380753bfa8c"
+checksum = "489e5d0081f7edff6be12d71282a8bf387b5df64d5592454b75d662397f2d642"
dependencies = [
"cranelift-bforest",
"cranelift-codegen-meta",
"cranelift-codegen-shared",
"cranelift-entity",
- "gimli 0.25.0",
+ "gimli",
"log",
"regalloc",
"smallvec",
@@ -1164,34 +1166,33 @@
[[package]]
name = "cranelift-codegen-meta"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793f6a94a053a55404ea16e1700202a88101672b8cd6b4df63e13cde950852bf"
+checksum = "d36ee1140371bb0f69100e734b30400157a4adf7b86148dee8b0a438763ead48"
dependencies = [
"cranelift-codegen-shared",
- "cranelift-entity",
]
[[package]]
name = "cranelift-codegen-shared"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44aa1846df275bce5eb30379d65964c7afc63c05a117076e62a119c25fe174be"
+checksum = "981da52d8f746af1feb96290c83977ff8d41071a7499e991d8abae0d4869f564"
[[package]]
name = "cranelift-entity"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3a45d8d6318bf8fc518154d9298eab2a8154ec068a8885ff113f6db8d69bb3a"
+checksum = "a2906740053dd3bcf95ce53df0fd9b5649c68ae4bd9adada92b406f059eae461"
dependencies = [
"serde",
]
[[package]]
name = "cranelift-frontend"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e07339bd461766deb7605169de039e01954768ff730fa1254e149001884a8525"
+checksum = "b7cb156de1097f567d46bf57a0cd720a72c3e15e1a2bd8b1041ba2fc894471b7"
dependencies = [
"cranelift-codegen",
"log",
@@ -1201,9 +1202,9 @@
[[package]]
name = "cranelift-native"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03e2fca76ff57e0532936a71e3fc267eae6a19a86656716479c66e7f912e3d7b"
+checksum = "166028ca0343a6ee7bddac0e70084e142b23f99c701bd6f6ea9123afac1a7a46"
dependencies = [
"cranelift-codegen",
"libc",
@@ -1212,9 +1213,9 @@
[[package]]
name = "cranelift-wasm"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f46fec547a1f8a32c54ea61c28be4f4ad234ad95342b718a9a9adcaadb0c778"
+checksum = "5012a1cde0c8b3898770b711490d803018ae9bec2d60674ba0e5b2058a874f80"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
@@ -1228,18 +1229,18 @@
[[package]]
name = "crc32fast"
-version = "1.3.0"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "crossbeam-channel"
-version = "0.5.1"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
+checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
@@ -1258,9 +1259,9 @@
[[package]]
name = "crossbeam-epoch"
-version = "0.9.5"
+version = "0.9.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd"
+checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
@@ -1271,9 +1272,9 @@
[[package]]
name = "crossbeam-utils"
-version = "0.8.5"
+version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
+checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
dependencies = [
"cfg-if 1.0.0",
"lazy_static",
@@ -1286,6 +1287,15 @@
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
+name = "crypto-common"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4600d695eb3f6ce1cd44e6e291adceb2cc3ab12f20a33777ecd0bf6eba34e06"
+dependencies = [
+ "generic-array 0.14.5",
+]
+
+[[package]]
name = "crypto-mac"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1301,7 +1311,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"subtle 2.4.1",
]
@@ -1311,7 +1321,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"subtle 2.4.1",
]
@@ -1357,7 +1367,7 @@
[[package]]
name = "cumulus-client-cli"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"sc-cli",
"sc-service",
@@ -1367,12 +1377,13 @@
[[package]]
name = "cumulus-client-collator"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-client-consensus-common",
"cumulus-client-network",
"cumulus-primitives-core",
- "futures 0.3.18",
+ "cumulus-relay-chain-interface",
+ "futures 0.3.21",
"parity-scale-codec",
"parking_lot 0.10.2",
"polkadot-node-primitives",
@@ -1390,14 +1401,13 @@
[[package]]
name = "cumulus-client-consensus-aura"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"async-trait",
"cumulus-client-consensus-common",
"cumulus-primitives-core",
- "futures 0.3.18",
+ "futures 0.3.21",
"parity-scale-codec",
- "polkadot-client",
"sc-client-api",
"sc-consensus",
"sc-consensus-aura",
@@ -1420,11 +1430,12 @@
[[package]]
name = "cumulus-client-consensus-common"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"async-trait",
+ "cumulus-relay-chain-interface",
"dyn-clone",
- "futures 0.3.18",
+ "futures 0.3.21",
"parity-scale-codec",
"polkadot-primitives",
"sc-client-api",
@@ -1440,14 +1451,15 @@
[[package]]
name = "cumulus-client-network"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
+ "async-trait",
+ "cumulus-relay-chain-interface",
"derive_more",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"parity-scale-codec",
- "parking_lot 0.10.2",
- "polkadot-client",
+ "parking_lot 0.11.2",
"polkadot-node-primitives",
"polkadot-parachain",
"polkadot-primitives",
@@ -1457,17 +1469,19 @@
"sp-consensus",
"sp-core",
"sp-runtime",
+ "sp-state-machine",
"tracing",
]
[[package]]
name = "cumulus-client-pov-recovery"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "cumulus-relay-chain-interface",
+ "futures 0.3.21",
+ "futures-timer",
"parity-scale-codec",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -1486,17 +1500,17 @@
[[package]]
name = "cumulus-client-service"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-client-collator",
"cumulus-client-consensus-common",
"cumulus-client-pov-recovery",
"cumulus-primitives-core",
+ "cumulus-relay-chain-interface",
"parity-scale-codec",
"parking_lot 0.10.2",
"polkadot-overseer",
"polkadot-primitives",
- "polkadot-service",
"sc-chain-spec",
"sc-client-api",
"sc-consensus",
@@ -1515,7 +1529,7 @@
[[package]]
name = "cumulus-pallet-aura-ext"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"frame-executive",
"frame-support",
@@ -1533,7 +1547,7 @@
[[package]]
name = "cumulus-pallet-dmp-queue"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1551,7 +1565,7 @@
[[package]]
name = "cumulus-pallet-parachain-system"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-pallet-parachain-system-proc-macro",
"cumulus-primitives-core",
@@ -1559,6 +1573,7 @@
"environmental",
"frame-support",
"frame-system",
+ "impl-trait-for-tuples",
"log",
"pallet-balances",
"parity-scale-codec",
@@ -1580,7 +1595,7 @@
[[package]]
name = "cumulus-pallet-parachain-system-proc-macro"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2",
@@ -1591,7 +1606,7 @@
[[package]]
name = "cumulus-pallet-xcm"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1608,7 +1623,7 @@
[[package]]
name = "cumulus-pallet-xcmp-queue"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1626,10 +1641,9 @@
[[package]]
name = "cumulus-primitives-core"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"frame-support",
- "impl-trait-for-tuples",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
@@ -1643,13 +1657,13 @@
[[package]]
name = "cumulus-primitives-parachain-inherent"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"async-trait",
"cumulus-primitives-core",
+ "cumulus-relay-chain-interface",
"cumulus-test-relay-sproof-builder",
"parity-scale-codec",
- "polkadot-client",
"sc-client-api",
"scale-info",
"sp-api",
@@ -1658,6 +1672,7 @@
"sp-runtime",
"sp-state-machine",
"sp-std",
+ "sp-storage",
"sp-trie",
"tracing",
]
@@ -1665,7 +1680,7 @@
[[package]]
name = "cumulus-primitives-timestamp"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
"sp-inherents",
@@ -1676,7 +1691,7 @@
[[package]]
name = "cumulus-primitives-utility"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1691,9 +1706,58 @@
]
[[package]]
+name = "cumulus-relay-chain-interface"
+version = "0.1.0"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
+dependencies = [
+ "async-trait",
+ "cumulus-primitives-core",
+ "derive_more",
+ "futures 0.3.21",
+ "parking_lot 0.11.2",
+ "polkadot-overseer",
+ "sc-client-api",
+ "sc-service",
+ "sp-api",
+ "sp-blockchain",
+ "sp-core",
+ "sp-runtime",
+ "sp-state-machine",
+ "thiserror",
+]
+
+[[package]]
+name = "cumulus-relay-chain-local"
+version = "0.1.0"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
+dependencies = [
+ "async-trait",
+ "cumulus-primitives-core",
+ "cumulus-relay-chain-interface",
+ "futures 0.3.21",
+ "futures-timer",
+ "parking_lot 0.11.2",
+ "polkadot-client",
+ "polkadot-service",
+ "sc-client-api",
+ "sc-consensus-babe",
+ "sc-network",
+ "sc-service",
+ "sc-telemetry",
+ "sc-tracing",
+ "sp-api",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-core",
+ "sp-runtime",
+ "sp-state-machine",
+ "tracing",
+]
+
+[[package]]
name = "cumulus-test-relay-sproof-builder"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
"parity-scale-codec",
@@ -1829,10 +1893,20 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
+name = "digest"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8cb780dce4f9a8f5c087362b3a4595936b2019e7c8b30f2c3e9a7e94e6ae9837"
+dependencies = [
+ "block-buffer 0.10.2",
+ "crypto-common",
+]
+
+[[package]]
name = "directories"
version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1941,7 +2015,7 @@
"ed25519",
"rand 0.7.3",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"zeroize",
]
@@ -1996,25 +2070,12 @@
[[package]]
name = "env_logger"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
-dependencies = [
- "atty",
- "humantime 1.3.0",
- "log",
- "regex",
- "termcolor",
-]
-
-[[package]]
-name = "env_logger"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
dependencies = [
"atty",
- "humantime 2.1.0",
+ "humantime",
"log",
"regex",
"termcolor",
@@ -2064,27 +2125,9 @@
[[package]]
name = "ethereum"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a67be3eaf296ef668733f54c637e84d0ca34eaf194f0077455135981ad464c3"
-dependencies = [
- "bytes 1.1.0",
- "ethereum-types",
- "hash-db",
- "hash256-std-hasher",
- "parity-scale-codec",
- "rlp",
- "rlp-derive",
- "serde",
- "sha3 0.9.1",
- "triehash",
-]
-
-[[package]]
-name = "ethereum"
-version = "0.10.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81fb916554a4dba293ea69c69ad5653e21d770a9d0c2496b5fa0a1f5a3946d87"
+checksum = "34c90e0a755da706ce0970ec0fa8cc48aabcc8e8efa1245336acf718dab06ffe"
dependencies = [
"bytes 1.1.0",
"ethereum-types",
@@ -2117,17 +2160,18 @@
[[package]]
name = "event-listener"
-version = "2.5.1"
+version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
+checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71"
[[package]]
name = "evm"
-version = "0.33.0"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-weights#3113ac1ced53bf27e9845107fd30901708824cc4"
+version = "0.33.1"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
dependencies = [
+ "auto_impl",
"environmental",
- "ethereum 0.10.0",
+ "ethereum",
"evm-core",
"evm-gasometer",
"evm-runtime",
@@ -2144,7 +2188,7 @@
name = "evm-coder"
version = "0.1.0"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"evm-coder-macros",
"evm-core",
"hex",
@@ -2169,7 +2213,7 @@
[[package]]
name = "evm-core"
version = "0.33.0"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-weights#3113ac1ced53bf27e9845107fd30901708824cc4"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
dependencies = [
"funty",
"parity-scale-codec",
@@ -2181,7 +2225,7 @@
[[package]]
name = "evm-gasometer"
version = "0.33.0"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-weights#3113ac1ced53bf27e9845107fd30901708824cc4"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
dependencies = [
"environmental",
"evm-core",
@@ -2192,8 +2236,9 @@
[[package]]
name = "evm-runtime"
version = "0.33.0"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-weights#3113ac1ced53bf27e9845107fd30901708824cc4"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
dependencies = [
+ "auto_impl",
"environmental",
"evm-core",
"primitive-types 0.10.1",
@@ -2206,7 +2251,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
]
[[package]]
@@ -2223,9 +2268,9 @@
[[package]]
name = "fastrand"
-version = "1.5.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b394ed3d285a429378d3b384b9eb1285267e7df4b166df24b7a6939a04dc392e"
+checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
dependencies = [
"instant",
]
@@ -2233,14 +2278,14 @@
[[package]]
name = "fc-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
"async-trait",
"derive_more",
"fc-db",
"fp-consensus",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
"parity-scale-codec",
"sc-client-api",
@@ -2260,7 +2305,7 @@
[[package]]
name = "fc-db"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
"fp-storage",
"kvdb",
@@ -2276,14 +2321,14 @@
[[package]]
name = "fc-mapping-sync"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
"fc-consensus",
"fc-db",
"fp-consensus",
"fp-rpc",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"log",
"sc-client-api",
"sp-api",
@@ -2294,9 +2339,9 @@
[[package]]
name = "fc-rpc"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"ethereum-types",
"evm",
"fc-consensus",
@@ -2306,7 +2351,7 @@
"fp-evm",
"fp-rpc",
"fp-storage",
- "futures 0.3.18",
+ "futures 0.3.21",
"futures-util",
"jsonrpc-core",
"jsonrpc-pubsub",
@@ -2328,26 +2373,31 @@
"sc-transaction-pool-api",
"sha3 0.8.2",
"sp-api",
+ "sp-block-builder",
"sp-blockchain",
"sp-io",
"sp-runtime",
"sp-storage",
"sp-transaction-pool",
+ "tokio 1.16.1",
]
[[package]]
name = "fc-rpc-core"
version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
+ "ethereum",
"ethereum-types",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
"jsonrpc-pubsub",
+ "rlp",
"rustc-hex",
"serde",
"serde_json",
+ "sha3 0.8.2",
]
[[package]]
@@ -2361,11 +2411,11 @@
[[package]]
name = "file-per-thread-logger"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fdbe0d94371f9ce939b555dd342d0686cc4c0cadbcd4b61d70af5ff97eb4126"
+checksum = "21e16290574b39ee41c71aeb90ae960c504ebaf1e2a1c87bd52aa56ed6e1a02f"
dependencies = [
- "env_logger 0.7.1",
+ "env_logger",
"log",
]
@@ -2376,8 +2426,8 @@
checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a"
dependencies = [
"either",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"log",
"num-traits",
"parity-scale-codec",
@@ -2399,9 +2449,9 @@
[[package]]
name = "fixedbitset"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "398ea4fabe40b9b0d885340a2a991a44c8a645624075ad966d21f88688e2b69e"
+checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e"
[[package]]
name = "flate2"
@@ -2441,7 +2491,7 @@
[[package]]
name = "fork-tree"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
]
@@ -2459,9 +2509,9 @@
[[package]]
name = "fp-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"parity-scale-codec",
"rlp",
"sha3 0.8.2",
@@ -2473,7 +2523,7 @@
[[package]]
name = "fp-evm"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
"evm",
"impl-trait-for-tuples",
@@ -2487,9 +2537,9 @@
[[package]]
name = "fp-rpc"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"ethereum-types",
"fp-evm",
"parity-scale-codec",
@@ -2504,9 +2554,9 @@
[[package]]
name = "fp-self-contained"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
- "ethereum 0.9.0",
+ "ethereum",
"frame-support",
"parity-scale-codec",
"parity-util-mem",
@@ -2521,12 +2571,12 @@
[[package]]
name = "fp-storage"
version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
[[package]]
name = "frame-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -2536,6 +2586,7 @@
"paste",
"scale-info",
"sp-api",
+ "sp-application-crypto",
"sp-io",
"sp-runtime",
"sp-runtime-interface",
@@ -2546,7 +2597,7 @@
[[package]]
name = "frame-benchmarking-cli"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"Inflector",
"chrono",
@@ -2572,7 +2623,7 @@
[[package]]
name = "frame-election-provider-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -2586,7 +2637,7 @@
[[package]]
name = "frame-executive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -2614,7 +2665,7 @@
[[package]]
name = "frame-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"bitflags",
"frame-metadata",
@@ -2643,7 +2694,7 @@
[[package]]
name = "frame-support-procedural"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"Inflector",
"frame-support-procedural-tools",
@@ -2655,7 +2706,7 @@
[[package]]
name = "frame-support-procedural-tools"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate 1.1.0",
@@ -2667,7 +2718,7 @@
[[package]]
name = "frame-support-procedural-tools-derive"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro2",
"quote",
@@ -2677,7 +2728,7 @@
[[package]]
name = "frame-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"log",
@@ -2694,7 +2745,7 @@
[[package]]
name = "frame-system-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -2709,7 +2760,7 @@
[[package]]
name = "frame-system-rpc-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -2718,7 +2769,7 @@
[[package]]
name = "frame-try-runtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"sp-api",
@@ -2784,9 +2835,9 @@
[[package]]
name = "futures"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cd0210d8c325c245ff06fd95a3b13689a1a276ac8cfa8e8720cb840bfb84b9e"
+checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e"
dependencies = [
"futures-channel",
"futures-core",
@@ -2799,9 +2850,9 @@
[[package]]
name = "futures-channel"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27"
+checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
dependencies = [
"futures-core",
"futures-sink",
@@ -2809,15 +2860,15 @@
[[package]]
name = "futures-core"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445"
+checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
[[package]]
name = "futures-executor"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b808bf53348a36cab739d7e04755909b9fcaaa69b7d7e588b37b6ec62704c97"
+checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6"
dependencies = [
"futures-core",
"futures-task",
@@ -2827,9 +2878,9 @@
[[package]]
name = "futures-io"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11"
+checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
[[package]]
name = "futures-lite"
@@ -2842,15 +2893,15 @@
"futures-io",
"memchr",
"parking",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"waker-fn",
]
[[package]]
name = "futures-macro"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a89f17b21645bc4ed773c69af9c9a0effd4a3f1a3876eadd453469f8854e7fdd"
+checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512"
dependencies = [
"proc-macro2",
"quote",
@@ -2870,21 +2921,15 @@
[[package]]
name = "futures-sink"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af"
+checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"
[[package]]
name = "futures-task"
-version = "0.3.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12"
-
-[[package]]
-name = "futures-timer"
-version = "2.0.2"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6"
+checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
[[package]]
name = "futures-timer"
@@ -2894,9 +2939,9 @@
[[package]]
name = "futures-util"
-version = "0.3.18"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e"
+checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
dependencies = [
"futures 0.1.31",
"futures-channel",
@@ -2906,7 +2951,7 @@
"futures-sink",
"futures-task",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"pin-utils",
"slab",
]
@@ -2922,9 +2967,9 @@
[[package]]
name = "generic-array"
-version = "0.14.4"
+version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
+checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803"
dependencies = [
"typenum",
"version_check",
@@ -2945,9 +2990,9 @@
[[package]]
name = "getrandom"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
+checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
dependencies = [
"cfg-if 1.0.0",
"libc",
@@ -2966,20 +3011,14 @@
[[package]]
name = "gimli"
-version = "0.25.0"
+version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7"
+checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
dependencies = [
"fallible-iterator",
"indexmap",
"stable_deref_trait",
]
-
-[[package]]
-name = "gimli"
-version = "0.26.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
[[package]]
name = "glob"
@@ -3002,22 +3041,21 @@
[[package]]
name = "gloo-timers"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e"
+checksum = "4d12a7f4e95cfe710f1d624fb1210b7d961a5fb05c4fd942f4feab06e61f590e"
dependencies = [
"futures-channel",
"futures-core",
"js-sys",
"wasm-bindgen",
- "web-sys",
]
[[package]]
name = "h2"
-version = "0.3.9"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd"
+checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e"
dependencies = [
"bytes 1.1.0",
"fnv",
@@ -3027,16 +3065,16 @@
"http",
"indexmap",
"slab",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-util",
"tracing",
]
[[package]]
name = "handlebars"
-version = "4.1.6"
+version = "4.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "167fa173496c9eadd8749cca6f8339ac88e248f3ad2442791d0b743318a94fc0"
+checksum = "25546a65e5cf1f471f3438796fc634650b31d7fcde01d444c309aeb28b92e3a8"
dependencies = [
"log",
"pest",
@@ -3071,6 +3109,15 @@
]
[[package]]
+name = "hashbrown"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
name = "heck"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3154,7 +3201,7 @@
checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1"
dependencies = [
"digest 0.9.0",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"hmac 0.8.1",
]
@@ -3171,13 +3218,13 @@
[[package]]
name = "http"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b"
+checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03"
dependencies = [
"bytes 1.1.0",
"fnv",
- "itoa",
+ "itoa 1.0.1",
]
[[package]]
@@ -3188,14 +3235,14 @@
dependencies = [
"bytes 1.1.0",
"http",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
name = "httparse"
-version = "1.5.1"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503"
+checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4"
[[package]]
name = "httpdate"
@@ -3205,15 +3252,6 @@
[[package]]
name = "humantime"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
-dependencies = [
- "quick-error 1.2.3",
-]
-
-[[package]]
-name = "humantime"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
@@ -3233,10 +3271,10 @@
"http-body",
"httparse",
"httpdate",
- "itoa",
- "pin-project-lite 0.2.7",
- "socket2 0.4.2",
- "tokio 1.14.0",
+ "itoa 0.4.8",
+ "pin-project-lite 0.2.8",
+ "socket2 0.4.4",
+ "tokio 1.16.1",
"tower-service",
"tracing",
"want",
@@ -3254,7 +3292,7 @@
"log",
"rustls",
"rustls-native-certs",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-rustls",
"webpki",
]
@@ -3315,7 +3353,7 @@
checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179"
dependencies = [
"async-io",
- "futures 0.3.18",
+ "futures 0.3.21",
"futures-lite",
"if-addrs",
"ipnet",
@@ -3353,9 +3391,9 @@
[[package]]
name = "impl-trait-for-tuples"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee"
+checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb"
dependencies = [
"proc-macro2",
"quote",
@@ -3364,12 +3402,12 @@
[[package]]
name = "indexmap"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
+checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
dependencies = [
"autocfg",
- "hashbrown",
+ "hashbrown 0.11.2",
"serde",
]
@@ -3384,9 +3422,9 @@
[[package]]
name = "integer-encoding"
-version = "1.1.7"
+version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48dc51180a9b377fd75814d0cc02199c20f8e99433d6762f650d39cdbbd3b56f"
+checksum = "90c11140ffea82edce8dcd74137ce9324ec24b3cf0175fc9d7e29164da9915b8"
[[package]]
name = "integer-sqrt"
@@ -3398,22 +3436,11 @@
]
[[package]]
-name = "intervalier"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
-dependencies = [
- "futures 0.3.18",
- "futures-timer 2.0.2",
-]
-
-[[package]]
name = "io-lifetimes"
-version = "0.3.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "278e90d6f8a6c76a8334b336e306efa3c5f2b604048cbfd486d6f49878e3af14"
+checksum = "f6ef6787e7f0faedc040f95716bdd0e62bcfcf4ba93da053b62dea2691c13864"
dependencies = [
- "rustc_version 0.4.0",
"winapi 0.3.9",
]
@@ -3466,6 +3493,12 @@
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
[[package]]
+name = "itoa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+
+[[package]]
name = "jobserver"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3476,9 +3509,9 @@
[[package]]
name = "js-sys"
-version = "0.3.55"
+version = "0.3.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84"
+checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04"
dependencies = [
"wasm-bindgen",
]
@@ -3490,7 +3523,7 @@
checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-pubsub",
"log",
@@ -3505,7 +3538,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"futures-executor",
"futures-util",
"log",
@@ -3520,7 +3553,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-client-transports",
]
@@ -3542,7 +3575,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"hyper",
"jsonrpc-core",
"jsonrpc-server-utils",
@@ -3558,7 +3591,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
@@ -3573,7 +3606,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"lazy_static",
"log",
@@ -3589,12 +3622,12 @@
checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4"
dependencies = [
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.21",
"globset",
"jsonrpc-core",
"lazy_static",
"log",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-stream",
"tokio-util",
"unicase",
@@ -3606,7 +3639,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
@@ -3679,17 +3712,17 @@
"arrayvec 0.7.2",
"async-trait",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.21",
"http",
"jsonrpsee-types",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rustls-native-certs",
"serde",
"serde_json",
"soketto",
"thiserror",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-rustls",
"tokio-util",
]
@@ -3712,8 +3745,8 @@
[[package]]
name = "kusama-runtime"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -3726,6 +3759,7 @@
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal",
+ "kusama-runtime-constants",
"log",
"pallet-authority-discovery",
"pallet-authorship",
@@ -3748,6 +3782,7 @@
"pallet-nicks",
"pallet-offences",
"pallet-offences-benchmarking",
+ "pallet-preimage",
"pallet-proxy",
"pallet-recovery",
"pallet-scheduler",
@@ -3797,6 +3832,18 @@
]
[[package]]
+name = "kusama-runtime-constants"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
+dependencies = [
+ "frame-support",
+ "polkadot-primitives",
+ "polkadot-runtime-common",
+ "smallvec",
+ "sp-runtime",
+]
+
+[[package]]
name = "kv-log-macro"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3858,9 +3905,9 @@
[[package]]
name = "libc"
-version = "0.2.111"
+version = "0.2.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e167738f1866a7ec625567bae89ca0d44477232a4f7c52b1c7f2adc2c98804f"
+checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c"
[[package]]
name = "libloading"
@@ -3874,9 +3921,9 @@
[[package]]
name = "libloading"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52"
+checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
dependencies = [
"cfg-if 1.0.0",
"winapi 0.3.9",
@@ -3884,9 +3931,9 @@
[[package]]
name = "libm"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
+checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db"
[[package]]
name = "libp2p"
@@ -3896,7 +3943,7 @@
dependencies = [
"atomic",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.21",
"lazy_static",
"libp2p-core",
"libp2p-deflate",
@@ -3924,24 +3971,25 @@
"libp2p-yamux",
"multiaddr",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"smallvec",
"wasm-timer",
]
[[package]]
name = "libp2p-core"
-version = "0.30.0"
+version = "0.30.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bef22d9bba1e8bcb7ec300073e6802943fe8abb8190431842262b5f1c30abba1"
+checksum = "86aad7d54df283db817becded03e611137698a6509d4237a96881976a162340c"
dependencies = [
"asn1_der",
"bs58",
"ed25519-dalek",
"either",
"fnv",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
+ "instant",
"lazy_static",
"libsecp256k1 0.7.0",
"log",
@@ -3949,13 +3997,13 @@
"multihash 0.14.0",
"multistream-select",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"prost",
"prost-build",
"rand 0.8.4",
"ring",
"rw-stream-sink",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"smallvec",
"thiserror",
"unsigned-varint 0.7.1",
@@ -3970,7 +4018,7 @@
checksum = "51a800adb195f33de63f4b17b63fe64cfc23bf2c6a0d3d0d5321328664e65197"
dependencies = [
"flate2",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
]
@@ -3981,7 +4029,7 @@
checksum = "bb8f89d15cb6e3c5bc22afff7513b11bab7856f2872d3cfba86f7f63a06bc498"
dependencies = [
"async-std-resolver",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"log",
"smallvec",
@@ -3996,7 +4044,7 @@
dependencies = [
"cuckoofilter",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4017,7 +4065,7 @@
"byteorder",
"bytes 1.1.0",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.21",
"hex_fmt",
"libp2p-core",
"libp2p-swarm",
@@ -4026,7 +4074,7 @@
"prost-build",
"rand 0.7.3",
"regex",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"smallvec",
"unsigned-varint 0.7.1",
"wasm-timer",
@@ -4038,7 +4086,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cca1275574183f288ff8b72d535d5ffa5ea9292ef7829af8b47dcb197c7b0dcd"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4060,14 +4108,14 @@
"bytes 1.1.0",
"either",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"libp2p-swarm",
"log",
"prost",
"prost-build",
"rand 0.7.3",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"smallvec",
"uint",
"unsigned-varint 0.7.1",
@@ -4084,7 +4132,7 @@
"async-io",
"data-encoding",
"dns-parser",
- "futures 0.3.18",
+ "futures 0.3.21",
"if-watch",
"lazy_static",
"libp2p-core",
@@ -4092,7 +4140,7 @@
"log",
"rand 0.8.4",
"smallvec",
- "socket2 0.4.2",
+ "socket2 0.4.4",
"void",
]
@@ -4118,7 +4166,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"log",
"nohash-hasher",
@@ -4136,14 +4184,14 @@
dependencies = [
"bytes 1.1.0",
"curve25519-dalek 3.2.0",
- "futures 0.3.18",
+ "futures 0.3.21",
"lazy_static",
"libp2p-core",
"log",
"prost",
"prost-build",
"rand 0.8.4",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"snow",
"static_assertions",
"x25519-dalek",
@@ -4156,7 +4204,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80ef7b0ec5cf06530d9eb6cf59ae49d46a2c45663bde31c25a12f682664adbcf"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4173,7 +4221,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"log",
"prost",
@@ -4188,9 +4236,9 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"salsa20",
"sha3 0.9.1",
@@ -4204,12 +4252,12 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"libp2p-core",
"libp2p-swarm",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"prost",
"prost-build",
"rand 0.7.3",
@@ -4227,14 +4275,14 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bimap",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"libp2p-swarm",
"log",
"prost",
"prost-build",
"rand 0.8.4",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"thiserror",
"unsigned-varint 0.7.1",
"void",
@@ -4249,11 +4297,11 @@
dependencies = [
"async-trait",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"libp2p-swarm",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"rand 0.7.3",
"smallvec",
"unsigned-varint 0.7.1",
@@ -4267,7 +4315,7 @@
checksum = "3f5184a508f223bc100a12665517773fb8730e9f36fc09eefb670bf01b107ae9"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"log",
"rand 0.7.3",
@@ -4293,14 +4341,14 @@
checksum = "7399c5b6361ef525d41c11fcf51635724f832baf5819b30d3d873eabb4fbae4b"
dependencies = [
"async-io",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"if-watch",
"ipnet",
"libc",
"libp2p-core",
"log",
- "socket2 0.4.2",
+ "socket2 0.4.4",
]
[[package]]
@@ -4310,7 +4358,7 @@
checksum = "b8b7563e46218165dfd60f64b96f7ce84590d75f53ecbdc74a7dd01450dc5973"
dependencies = [
"async-std",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"log",
]
@@ -4321,7 +4369,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1008a302b73c5020251f9708c653f5ed08368e530e247cc9cd2f109ff30042cf"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"js-sys",
"libp2p-core",
"parity-send-wrapper",
@@ -4336,7 +4384,7 @@
checksum = "22e12df82d1ed64969371a9e65ea92b91064658604cc2576c2757f18ead9a1cf"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.21",
"futures-rustls",
"libp2p-core",
"log",
@@ -4353,7 +4401,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7362abb8867d7187e7e93df17f460d554c997fc5c8ac57dc1259057f6889af"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p-core",
"parking_lot 0.11.2",
"thiserror",
@@ -4403,7 +4451,7 @@
"libsecp256k1-gen-genmult",
"rand 0.8.4",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"typenum",
]
@@ -4474,9 +4522,9 @@
[[package]]
name = "linux-raw-sys"
-version = "0.0.28"
+version = "0.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "687387ff42ec7ea4f2149035a5675fedb675d26f98db90a1846ac63d3addb5f5"
+checksum = "a261afc61b7a5e323933b402ca6a1765183687c614789b1e4db7762ed4230bca"
[[package]]
name = "lock_api"
@@ -4489,9 +4537,9 @@
[[package]]
name = "lock_api"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109"
+checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
dependencies = [
"scopeguard",
]
@@ -4512,16 +4560,16 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91"
dependencies = [
- "hashbrown",
+ "hashbrown 0.11.2",
]
[[package]]
name = "lru"
-version = "0.7.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c748cfe47cb8da225c37595b3108bea1c198c84aaae8ea0ba76d01dda9fc803"
+checksum = "274353858935c992b13c0ca408752e2121da852d07dec7ce5f108c77dfa14d1f"
dependencies = [
- "hashbrown",
+ "hashbrown 0.11.2",
]
[[package]]
@@ -4615,9 +4663,9 @@
[[package]]
name = "memmap2"
-version = "0.5.0"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e"
+checksum = "057a3db23999c867821a7a59feb06a578fcb03685e983dff90daf9e7d24ac08f"
dependencies = [
"libc",
]
@@ -4633,12 +4681,12 @@
[[package]]
name = "memory-db"
-version = "0.27.0"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5"
+checksum = "d505169b746dacf02f7d14d8c80b34edfd8212159c63d23c977739a0d960c626"
dependencies = [
"hash-db",
- "hashbrown",
+ "hashbrown 0.11.2",
"parity-util-mem",
]
@@ -4671,24 +4719,24 @@
[[package]]
name = "metered-channel"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"derive_more",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"thiserror",
"tracing",
]
[[package]]
name = "mick-jaeger"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaa77fad8461bb1e0d01be11299e24c6e544007715ed442bfec29f165dc487ae"
+checksum = "fd2c2cc134e57461f0898b0e921f0a7819b5e3f3a4335b9aa390ce81a5f36fb9"
dependencies = [
- "futures 0.3.18",
- "rand 0.7.3",
+ "futures 0.3.21",
+ "rand 0.8.4",
"thrift",
]
@@ -4818,9 +4866,9 @@
"blake2s_simd",
"blake3",
"digest 0.9.0",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"multihash-derive",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"sha3 0.9.1",
"unsigned-varint 0.5.1",
]
@@ -4832,9 +4880,9 @@
checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8"
dependencies = [
"digest 0.9.0",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"multihash-derive",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"unsigned-varint 0.7.1",
]
@@ -4865,9 +4913,9 @@
checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab"
dependencies = [
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"smallvec",
"unsigned-varint 0.7.1",
]
@@ -5018,9 +5066,9 @@
[[package]]
name = "num_cpus"
-version = "1.13.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
+checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
dependencies = [
"hermit-abi",
"libc",
@@ -5039,9 +5087,9 @@
[[package]]
name = "once_cell"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
+checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
[[package]]
name = "opaque-debug"
@@ -5062,7 +5110,7 @@
checksum = "7337d80c23c2d8b1349563981bc4fb531220733743ba8115454a67b181173f0d"
dependencies = [
"dtoa",
- "itoa",
+ "itoa 0.4.8",
"open-metrics-client-derive-text-encode",
"owning_ref",
]
@@ -5080,9 +5128,9 @@
[[package]]
name = "openssl-probe"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "ordered-float"
@@ -5096,7 +5144,7 @@
[[package]]
name = "orml-vesting"
version = "0.4.1-dev"
-source = "git+https://github.com/UniqueNetwork/open-runtime-module-library?branch=polkadot-v0.9.14#324372ec6e0d26df652eab3d4fb818646c630bf6"
+source = "git+https://github.com/UniqueNetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.16#d9c538ae3b9dc0f7faacff2deed70becd10cd46e"
dependencies = [
"frame-support",
"frame-system",
@@ -5120,7 +5168,7 @@
[[package]]
name = "pallet-aura"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5136,7 +5184,7 @@
[[package]]
name = "pallet-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5152,7 +5200,7 @@
[[package]]
name = "pallet-authorship"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5167,7 +5215,7 @@
[[package]]
name = "pallet-babe"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5191,7 +5239,7 @@
[[package]]
name = "pallet-bags-list"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -5211,7 +5259,7 @@
[[package]]
name = "pallet-balances"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5224,9 +5272,24 @@
]
[[package]]
+name = "pallet-base-fee"
+version = "1.0.0"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "pallet-evm",
+ "parity-scale-codec",
+ "scale-info",
+ "serde",
+ "sp-core",
+ "sp-runtime",
+]
+
+[[package]]
name = "pallet-beefy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"beefy-primitives",
"frame-support",
@@ -5242,7 +5305,7 @@
[[package]]
name = "pallet-beefy-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"beefy-merkle-tree",
"beefy-primitives",
@@ -5267,7 +5330,7 @@
[[package]]
name = "pallet-bounties"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5285,7 +5348,7 @@
[[package]]
name = "pallet-bridge-dispatch"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-message-dispatch",
"bp-runtime",
@@ -5302,7 +5365,7 @@
[[package]]
name = "pallet-bridge-grandpa"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bp-header-chain",
"bp-runtime",
@@ -5324,12 +5387,11 @@
[[package]]
name = "pallet-bridge-messages"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitvec",
"bp-message-dispatch",
"bp-messages",
- "bp-rialto",
"bp-runtime",
"frame-support",
"frame-system",
@@ -5346,7 +5408,7 @@
[[package]]
name = "pallet-collective"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5377,77 +5439,12 @@
"sp-std",
"up-data-structs",
"up-evm-mapping",
-]
-
-[[package]]
-name = "pallet-contract-helpers"
-version = "0.1.0"
-dependencies = [
- "frame-support",
- "frame-system",
- "pallet-contracts",
- "parity-scale-codec",
- "scale-info",
- "sp-runtime",
- "sp-std",
- "up-sponsorship",
]
[[package]]
-name = "pallet-contracts"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
-dependencies = [
- "bitflags",
- "frame-benchmarking",
- "frame-support",
- "frame-system",
- "libsecp256k1 0.7.0",
- "log",
- "pallet-contracts-primitives",
- "pallet-contracts-proc-macro",
- "parity-scale-codec",
- "pwasm-utils",
- "rand 0.8.4",
- "scale-info",
- "serde",
- "smallvec",
- "sp-core",
- "sp-io",
- "sp-runtime",
- "sp-sandbox",
- "sp-std",
- "wasmi-validation",
-]
-
-[[package]]
-name = "pallet-contracts-primitives"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
-dependencies = [
- "bitflags",
- "parity-scale-codec",
- "scale-info",
- "serde",
- "sp-core",
- "sp-runtime",
- "sp-std",
-]
-
-[[package]]
-name = "pallet-contracts-proc-macro"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "pallet-democracy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5463,7 +5460,7 @@
[[package]]
name = "pallet-election-provider-multi-phase"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -5480,14 +5477,14 @@
"sp-runtime",
"sp-std",
"static_assertions",
- "strum",
- "strum_macros",
+ "strum 0.22.0",
+ "strum_macros 0.23.1",
]
[[package]]
name = "pallet-elections-phragmen"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5505,9 +5502,9 @@
[[package]]
name = "pallet-ethereum"
version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"ethereum-types",
"evm",
"fp-consensus",
@@ -5517,6 +5514,7 @@
"fp-storage",
"frame-support",
"frame-system",
+ "log",
"pallet-balances",
"pallet-evm",
"pallet-timestamp",
@@ -5534,7 +5532,7 @@
[[package]]
name = "pallet-evm"
version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.16#86ba914ab040c95c41db2e39a2edcb90cd51c971"
dependencies = [
"evm",
"evm-gasometer",
@@ -5564,7 +5562,7 @@
name = "pallet-evm-coder-substrate"
version = "0.1.0"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"evm-coder",
"frame-benchmarking",
"frame-support",
@@ -5635,7 +5633,7 @@
name = "pallet-fungible"
version = "0.1.0"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"evm-coder",
"frame-benchmarking",
"frame-support",
@@ -5653,7 +5651,7 @@
[[package]]
name = "pallet-gilt"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5668,7 +5666,7 @@
[[package]]
name = "pallet-grandpa"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5691,7 +5689,7 @@
[[package]]
name = "pallet-identity"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -5707,7 +5705,7 @@
[[package]]
name = "pallet-im-online"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5727,7 +5725,7 @@
[[package]]
name = "pallet-indices"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5763,7 +5761,7 @@
[[package]]
name = "pallet-membership"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5780,7 +5778,7 @@
[[package]]
name = "pallet-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"ckb-merkle-mountain-range",
"frame-benchmarking",
@@ -5798,7 +5796,7 @@
[[package]]
name = "pallet-mmr-primitives"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5814,7 +5812,7 @@
[[package]]
name = "pallet-mmr-rpc"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -5831,7 +5829,7 @@
[[package]]
name = "pallet-multisig"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5846,7 +5844,7 @@
[[package]]
name = "pallet-nicks"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5861,7 +5859,7 @@
name = "pallet-nonfungible"
version = "0.1.0"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"evm-coder",
"frame-benchmarking",
"frame-support",
@@ -5879,7 +5877,7 @@
[[package]]
name = "pallet-offences"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5896,7 +5894,7 @@
[[package]]
name = "pallet-offences-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -5917,9 +5915,25 @@
]
[[package]]
+name = "pallet-preimage"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
name = "pallet-proxy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5934,7 +5948,7 @@
[[package]]
name = "pallet-randomness-collective-flip"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5948,7 +5962,7 @@
[[package]]
name = "pallet-recovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -5978,7 +5992,7 @@
[[package]]
name = "pallet-scheduler"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5994,7 +6008,7 @@
[[package]]
name = "pallet-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -6015,7 +6029,7 @@
[[package]]
name = "pallet-session-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6031,7 +6045,7 @@
[[package]]
name = "pallet-society"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -6045,7 +6059,7 @@
[[package]]
name = "pallet-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6068,7 +6082,7 @@
[[package]]
name = "pallet-staking-reward-curve"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2",
@@ -6079,7 +6093,7 @@
[[package]]
name = "pallet-staking-reward-fn"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"log",
"sp-arithmetic",
@@ -6088,7 +6102,7 @@
[[package]]
name = "pallet-sudo"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -6102,7 +6116,7 @@
[[package]]
name = "pallet-template-transaction-payment"
version = "3.0.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.14#858001a6fd841614eb3bc47562e1a08685e6c8df"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.16#a08e9828d44c54ec9905e9c7f642f0e734f92780"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6122,7 +6136,7 @@
[[package]]
name = "pallet-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6140,7 +6154,7 @@
[[package]]
name = "pallet-tips"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6159,7 +6173,7 @@
[[package]]
name = "pallet-transaction-payment"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-support",
"frame-system",
@@ -6176,7 +6190,7 @@
[[package]]
name = "pallet-transaction-payment-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -6193,7 +6207,7 @@
[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
@@ -6204,7 +6218,7 @@
[[package]]
name = "pallet-treasury"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6222,7 +6236,7 @@
name = "pallet-unique"
version = "0.1.0"
dependencies = [
- "ethereum 0.10.0",
+ "ethereum",
"evm-coder",
"fp-evm",
"frame-benchmarking",
@@ -6277,7 +6291,7 @@
[[package]]
name = "pallet-utility"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6293,7 +6307,7 @@
[[package]]
name = "pallet-vesting"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6307,8 +6321,8 @@
[[package]]
name = "pallet-xcm"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"frame-support",
"frame-system",
@@ -6325,8 +6339,8 @@
[[package]]
name = "pallet-xcm-benchmarks"
-version = "0.9.8"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6343,7 +6357,7 @@
[[package]]
name = "parachain-info"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -6355,9 +6369,9 @@
[[package]]
name = "parity-db"
-version = "0.3.5"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78a95abf24f1097c6e3181abbbbfc3630b3b5e681470940f719b69acb4911c7f"
+checksum = "68de01cff53da5574397233383dd7f5c15ee958c348245765ea8cb09f2571e6b"
dependencies = [
"blake2-rfc",
"crc32fast",
@@ -6410,11 +6424,11 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"libc",
"log",
"rand 0.7.3",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"winapi 0.3.9",
]
@@ -6426,7 +6440,7 @@
dependencies = [
"cfg-if 1.0.0",
"ethereum-types",
- "hashbrown",
+ "hashbrown 0.11.2",
"impl-trait-for-tuples",
"lru 0.6.6",
"parity-util-mem-derive",
@@ -6503,7 +6517,7 @@
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [
"instant",
- "lock_api 0.4.5",
+ "lock_api 0.4.6",
"parking_lot_core 0.8.5",
]
@@ -6632,27 +6646,27 @@
[[package]]
name = "pin-project"
-version = "0.4.28"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f"
+checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909"
dependencies = [
- "pin-project-internal 0.4.28",
+ "pin-project-internal 0.4.29",
]
[[package]]
name = "pin-project"
-version = "1.0.8"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08"
+checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e"
dependencies = [
- "pin-project-internal 1.0.8",
+ "pin-project-internal 1.0.10",
]
[[package]]
name = "pin-project-internal"
-version = "0.4.28"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e"
+checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a"
dependencies = [
"proc-macro2",
"quote",
@@ -6661,9 +6675,9 @@
[[package]]
name = "pin-project-internal"
-version = "1.0.8"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389"
+checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb"
dependencies = [
"proc-macro2",
"quote",
@@ -6678,9 +6692,9 @@
[[package]]
name = "pin-project-lite"
-version = "0.2.7"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
+checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
[[package]]
name = "pin-utils"
@@ -6702,10 +6716,10 @@
[[package]]
name = "polkadot-approval-distribution"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -6716,10 +6730,10 @@
[[package]]
name = "polkadot-availability-bitfield-distribution"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -6729,12 +6743,12 @@
[[package]]
name = "polkadot-availability-distribution"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"derive_more",
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.21",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6751,11 +6765,11 @@
[[package]]
name = "polkadot-availability-recovery"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.21",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6771,16 +6785,19 @@
[[package]]
name = "polkadot-cli"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"frame-benchmarking-cli",
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
"polkadot-node-core-pvf",
+ "polkadot-node-metrics",
+ "polkadot-performance-test",
"polkadot-service",
"sc-cli",
"sc-service",
+ "sc-tracing",
"sp-core",
"sp-trie",
"structopt",
@@ -6791,8 +6808,8 @@
[[package]]
name = "polkadot-client"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-primitives",
"frame-benchmarking",
@@ -6821,13 +6838,13 @@
[[package]]
name = "polkadot-collator-protocol"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"always-assert",
"derive_more",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -6842,8 +6859,8 @@
[[package]]
name = "polkadot-core-primitives"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"parity-scale-codec",
"parity-util-mem",
@@ -6855,12 +6872,12 @@
[[package]]
name = "polkadot-dispute-distribution"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"derive_more",
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.21",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6877,8 +6894,8 @@
[[package]]
name = "polkadot-erasure-coding"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"parity-scale-codec",
"polkadot-node-primitives",
@@ -6891,11 +6908,11 @@
[[package]]
name = "polkadot-gossip-support"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -6911,11 +6928,11 @@
[[package]]
name = "polkadot-network-bridge"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.21",
"parity-scale-codec",
"parking_lot 0.11.2",
"polkadot-node-network-protocol",
@@ -6930,10 +6947,10 @@
[[package]]
name = "polkadot-node-collation-generation"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-primitives",
@@ -6948,15 +6965,15 @@
[[package]]
name = "polkadot-node-core-approval-voting"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitvec",
"derive_more",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"kvdb",
- "lru 0.7.0",
+ "lru 0.7.2",
"merlin",
"parity-scale-codec",
"polkadot-node-jaeger",
@@ -6976,12 +6993,12 @@
[[package]]
name = "polkadot-node-core-av-store"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitvec",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"kvdb",
"parity-scale-codec",
"polkadot-erasure-coding",
@@ -6996,11 +7013,11 @@
[[package]]
name = "polkadot-node-core-backing"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitvec",
- "futures 0.3.18",
+ "futures 0.3.21",
"polkadot-erasure-coding",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7014,10 +7031,10 @@
[[package]]
name = "polkadot-node-core-bitfield-signing"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7029,11 +7046,11 @@
[[package]]
name = "polkadot-node-core-candidate-validation"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.21",
"parity-scale-codec",
"polkadot-node-core-pvf",
"polkadot-node-primitives",
@@ -7047,10 +7064,10 @@
[[package]]
name = "polkadot-node-core-chain-api"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7062,11 +7079,11 @@
[[package]]
name = "polkadot-node-core-chain-selection"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"kvdb",
"parity-scale-codec",
"polkadot-node-primitives",
@@ -7079,13 +7096,12 @@
[[package]]
name = "polkadot-node-core-dispute-coordinator"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "bitvec",
- "derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"kvdb",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7097,26 +7113,13 @@
]
[[package]]
-name = "polkadot-node-core-dispute-participation"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
-dependencies = [
- "futures 0.3.18",
- "polkadot-node-primitives",
- "polkadot-node-subsystem",
- "polkadot-primitives",
- "thiserror",
- "tracing",
-]
-
-[[package]]
name = "polkadot-node-core-parachains-inherent"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-trait",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"polkadot-node-subsystem",
"polkadot-primitives",
"sp-blockchain",
@@ -7128,33 +7131,34 @@
[[package]]
name = "polkadot-node-core-provisioner"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitvec",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
+ "polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
+ "rand 0.8.4",
"thiserror",
"tracing",
]
[[package]]
name = "polkadot-node-core-pvf"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"always-assert",
"assert_matches",
"async-process",
"async-std",
- "futures 0.3.18",
- "futures-timer 3.0.2",
- "libc",
+ "futures 0.3.21",
+ "futures-timer",
"parity-scale-codec",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-core-primitives",
"polkadot-node-subsystem-util",
"polkadot-parachain",
@@ -7173,11 +7177,27 @@
]
[[package]]
+name = "polkadot-node-core-pvf-checker"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
+dependencies = [
+ "futures 0.3.21",
+ "polkadot-node-primitives",
+ "polkadot-node-subsystem",
+ "polkadot-node-subsystem-util",
+ "polkadot-overseer",
+ "polkadot-primitives",
+ "sp-keystore",
+ "thiserror",
+ "tracing",
+]
+
+[[package]]
name = "polkadot-node-core-runtime-api"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"memory-lru",
"parity-util-mem",
"polkadot-node-subsystem",
@@ -7192,8 +7212,8 @@
[[package]]
name = "polkadot-node-jaeger"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-std",
"lazy_static",
@@ -7210,40 +7230,48 @@
[[package]]
name = "polkadot-node-metrics"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "bs58",
+ "futures 0.3.21",
+ "futures-timer",
+ "log",
"metered-channel",
+ "parity-scale-codec",
+ "polkadot-primitives",
+ "sc-cli",
+ "sc-service",
+ "sc-tracing",
"substrate-prometheus-endpoint",
+ "tracing",
]
[[package]]
name = "polkadot-node-network-protocol"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"parity-scale-codec",
"polkadot-node-jaeger",
"polkadot-node-primitives",
"polkadot-primitives",
"sc-authority-discovery",
"sc-network",
- "strum",
+ "strum 0.23.0",
"thiserror",
]
[[package]]
name = "polkadot-node-primitives"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bounded-vec",
- "futures 0.3.18",
+ "futures 0.3.21",
"parity-scale-codec",
"polkadot-parachain",
"polkadot-primitives",
@@ -7261,8 +7289,8 @@
[[package]]
name = "polkadot-node-subsystem"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"polkadot-node-jaeger",
"polkadot-node-subsystem-types",
@@ -7271,11 +7299,11 @@
[[package]]
name = "polkadot-node-subsystem-types"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"polkadot-node-jaeger",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -7290,20 +7318,21 @@
[[package]]
name = "polkadot-node-subsystem-util"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"itertools",
- "lru 0.7.0",
+ "lru 0.7.2",
"metered-channel",
"parity-scale-codec",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-node-jaeger",
"polkadot-node-metrics",
"polkadot-node-network-protocol",
+ "polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-overseer",
"polkadot-primitives",
@@ -7317,12 +7346,12 @@
[[package]]
name = "polkadot-overseer"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "futures 0.3.18",
- "futures-timer 3.0.2",
- "lru 0.7.0",
+ "futures 0.3.21",
+ "futures-timer",
+ "lru 0.7.2",
"parity-util-mem",
"parking_lot 0.11.2",
"polkadot-node-metrics",
@@ -7338,14 +7367,14 @@
[[package]]
name = "polkadot-overseer-gen"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-trait",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"metered-channel",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-overseer-gen-proc-macro",
@@ -7355,8 +7384,8 @@
[[package]]
name = "polkadot-overseer-gen-proc-macro"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2",
@@ -7366,8 +7395,8 @@
[[package]]
name = "polkadot-parachain"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"derive_more",
"frame-support",
@@ -7382,9 +7411,24 @@
]
[[package]]
+name = "polkadot-performance-test"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
+dependencies = [
+ "env_logger",
+ "kusama-runtime",
+ "log",
+ "polkadot-erasure-coding",
+ "polkadot-node-core-pvf",
+ "polkadot-node-primitives",
+ "quote",
+ "thiserror",
+]
+
+[[package]]
name = "polkadot-primitives"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitvec",
"frame-system",
@@ -7413,8 +7457,8 @@
[[package]]
name = "polkadot-rpc"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-gadget",
"beefy-gadget-rpc",
@@ -7444,8 +7488,8 @@
[[package]]
name = "polkadot-runtime"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -7479,6 +7523,7 @@
"pallet-nicks",
"pallet-offences",
"pallet-offences-benchmarking",
+ "pallet-preimage",
"pallet-proxy",
"pallet-scheduler",
"pallet-session",
@@ -7496,6 +7541,7 @@
"parity-scale-codec",
"polkadot-primitives",
"polkadot-runtime-common",
+ "polkadot-runtime-constants",
"polkadot-runtime-parachains",
"rustc-hex",
"scale-info",
@@ -7526,8 +7572,8 @@
[[package]]
name = "polkadot-runtime-common"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -7572,9 +7618,33 @@
]
[[package]]
+name = "polkadot-runtime-constants"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
+dependencies = [
+ "frame-support",
+ "polkadot-primitives",
+ "polkadot-runtime-common",
+ "smallvec",
+ "sp-runtime",
+]
+
+[[package]]
+name = "polkadot-runtime-metrics"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
+dependencies = [
+ "bs58",
+ "parity-scale-codec",
+ "polkadot-primitives",
+ "sp-std",
+ "sp-tracing",
+]
+
+[[package]]
name = "polkadot-runtime-parachains"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"bitflags",
"bitvec",
@@ -7593,6 +7663,7 @@
"pallet-vesting",
"parity-scale-codec",
"polkadot-primitives",
+ "polkadot-runtime-metrics",
"rand 0.8.4",
"rand_chacha 0.3.1",
"rustc-hex",
@@ -7613,19 +7684,19 @@
[[package]]
name = "polkadot-service"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"async-trait",
"beefy-gadget",
"beefy-primitives",
"frame-system-rpc-runtime-api",
- "futures 0.3.18",
+ "futures 0.3.21",
"hex-literal",
"kusama-runtime",
"kvdb",
"kvdb-rocksdb",
- "lru 0.7.0",
+ "lru 0.7.2",
"pallet-babe",
"pallet-im-online",
"pallet-mmr-primitives",
@@ -7649,9 +7720,9 @@
"polkadot-node-core-chain-api",
"polkadot-node-core-chain-selection",
"polkadot-node-core-dispute-coordinator",
- "polkadot-node-core-dispute-participation",
"polkadot-node-core-parachains-inherent",
"polkadot-node-core-provisioner",
+ "polkadot-node-core-pvf-checker",
"polkadot-node-core-runtime-api",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -7662,6 +7733,7 @@
"polkadot-primitives",
"polkadot-rpc",
"polkadot-runtime",
+ "polkadot-runtime-constants",
"polkadot-runtime-parachains",
"polkadot-statement-distribution",
"rococo-runtime",
@@ -7712,12 +7784,12 @@
[[package]]
name = "polkadot-statement-distribution"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"arrayvec 0.5.2",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"indexmap",
"parity-scale-codec",
"polkadot-node-network-protocol",
@@ -7733,8 +7805,8 @@
[[package]]
name = "polkadot-statement-table"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"parity-scale-codec",
"polkadot-primitives",
@@ -7743,8 +7815,8 @@
[[package]]
name = "polkadot-test-runtime"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -7797,6 +7869,7 @@
"sp-transaction-pool",
"sp-version",
"substrate-wasm-builder",
+ "test-runtime-constants",
"xcm",
"xcm-builder",
"xcm-executor",
@@ -7804,13 +7877,13 @@
[[package]]
name = "polkadot-test-service"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"frame-benchmarking",
"frame-system",
"futures 0.1.31",
- "futures 0.3.18",
+ "futures 0.3.21",
"hex",
"pallet-balances",
"pallet-staking",
@@ -7851,7 +7924,8 @@
"sp-state-machine",
"substrate-test-client",
"tempfile",
- "tokio 1.14.0",
+ "test-runtime-constants",
+ "tokio 1.16.1",
"tracing",
]
@@ -7893,9 +7967,9 @@
[[package]]
name = "ppv-lite86"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba"
+checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
[[package]]
name = "primitive-types"
@@ -7968,9 +8042,9 @@
[[package]]
name = "proc-macro2"
-version = "1.0.33"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a"
+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]
@@ -8052,17 +8126,6 @@
]
[[package]]
-name = "pwasm-utils"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c"
-dependencies = [
- "byteorder",
- "log",
- "parity-wasm 0.42.2",
-]
-
-[[package]]
name = "quick-error"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -8087,9 +8150,9 @@
[[package]]
name = "quote"
-version = "1.0.10"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
+checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
dependencies = [
"proc-macro2",
]
@@ -8161,14 +8224,14 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
- "getrandom 0.2.3",
+ "getrandom 0.2.4",
]
[[package]]
name = "rand_distr"
-version = "0.4.2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "964d548f8e7d12e102ef183a0de7e98180c9f8729f555897a857b96e48122d2f"
+checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
dependencies = [
"num-traits",
"rand 0.8.4",
@@ -8253,7 +8316,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
- "getrandom 0.2.3",
+ "getrandom 0.2.4",
"redox_syscall 0.2.10",
]
@@ -8292,9 +8355,9 @@
[[package]]
name = "regalloc"
-version = "0.0.32"
+version = "0.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6304468554ed921da3d32c355ea107b8d13d7b8996c3adfb7aab48d3bc321f4"
+checksum = "7d808cff91dfca7b239d40b972ba628add94892b1d9e19a842aedc5cfae8ab1a"
dependencies = [
"log",
"rustc-hash",
@@ -8342,9 +8405,9 @@
[[package]]
name = "remote-externalities"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "env_logger 0.9.0",
+ "env_logger",
"jsonrpsee",
"log",
"parity-scale-codec",
@@ -8377,9 +8440,9 @@
[[package]]
name = "retain_mut"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11000e6ba5020e53e7cc26f73b91ae7d5496b4977851479edb66b694c0675c21"
+checksum = "51dd4445360338dab5116712bee1388dc727991d51969558a8882ab552e6db30"
[[package]]
name = "ring"
@@ -8429,8 +8492,8 @@
[[package]]
name = "rococo-runtime"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-primitives",
"bp-messages",
@@ -8477,6 +8540,7 @@
"polkadot-primitives",
"polkadot-runtime-common",
"polkadot-runtime-parachains",
+ "rococo-runtime-constants",
"scale-info",
"serde",
"serde_derive",
@@ -8502,30 +8566,25 @@
]
[[package]]
-name = "rpassword"
-version = "5.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb"
+name = "rococo-runtime-constants"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
- "libc",
- "winapi 0.3.9",
+ "frame-support",
+ "polkadot-primitives",
+ "polkadot-runtime-common",
+ "smallvec",
+ "sp-runtime",
]
[[package]]
-name = "rsix"
-version = "0.23.9"
+name = "rpassword"
+version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f64c5788d5aab8b75441499d99576a24eb09f76fb267b36fec7e3d970c66431"
+checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb"
dependencies = [
- "bitflags",
- "cc",
- "errno",
- "io-lifetimes",
- "itoa",
"libc",
- "linux-raw-sys",
- "once_cell",
- "rustc_version 0.4.0",
+ "winapi 0.3.9",
]
[[package]]
@@ -8570,7 +8629,21 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
- "semver 1.0.4",
+ "semver 1.0.5",
+]
+
+[[package]]
+name = "rustix"
+version = "0.31.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2dcfc2778a90e38f56a708bfc90572422e11d6c7ee233d053d1f782cf9df6d2"
+dependencies = [
+ "bitflags",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "winapi 0.3.9",
]
[[package]]
@@ -8599,13 +8672,19 @@
]
[[package]]
+name = "rustversion"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
+
+[[package]]
name = "rw-stream-sink"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"
dependencies = [
- "futures 0.3.18",
- "pin-project 0.4.28",
+ "futures 0.3.21",
+ "pin-project 0.4.29",
"static_assertions",
]
@@ -8645,7 +8724,7 @@
[[package]]
name = "sc-allocator"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"log",
"sp-core",
@@ -8656,12 +8735,12 @@
[[package]]
name = "sc-authority-discovery"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"ip_network",
"libp2p",
"log",
@@ -8683,10 +8762,10 @@
[[package]]
name = "sc-basic-authorship"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"log",
"parity-scale-codec",
"sc-block-builder",
@@ -8706,7 +8785,7 @@
[[package]]
name = "sc-block-builder"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -8722,10 +8801,10 @@
[[package]]
name = "sc-chain-spec"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"impl-trait-for-tuples",
- "memmap2 0.5.0",
+ "memmap2 0.5.3",
"parity-scale-codec",
"sc-chain-spec-derive",
"sc-network",
@@ -8739,7 +8818,7 @@
[[package]]
name = "sc-chain-spec-derive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2",
@@ -8750,11 +8829,11 @@
[[package]]
name = "sc-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"chrono",
"fdlimit",
- "futures 0.3.18",
+ "futures 0.3.21",
"hex",
"libp2p",
"log",
@@ -8782,16 +8861,16 @@
"structopt",
"thiserror",
"tiny-bip39",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
name = "sc-client-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"fnv",
- "futures 0.3.18",
+ "futures 0.3.21",
"hash-db",
"log",
"parity-scale-codec",
@@ -8816,7 +8895,7 @@
[[package]]
name = "sc-client-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"hash-db",
"kvdb",
@@ -8841,11 +8920,11 @@
[[package]]
name = "sc-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"libp2p",
"log",
"parking_lot 0.11.2",
@@ -8865,11 +8944,11 @@
[[package]]
name = "sc-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
"parity-scale-codec",
"sc-block-builder",
@@ -8894,12 +8973,12 @@
[[package]]
name = "sc-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"derive_more",
"fork-tree",
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
"merlin",
"num-bigint",
@@ -8937,10 +9016,10 @@
[[package]]
name = "sc-consensus-babe-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -8961,7 +9040,7 @@
[[package]]
name = "sc-consensus-epochs"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"fork-tree",
"parity-scale-codec",
@@ -8974,17 +9053,16 @@
[[package]]
name = "sc-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"log",
"parity-scale-codec",
"sc-client-api",
"sc-consensus",
"sc-telemetry",
- "sp-api",
"sp-arithmetic",
"sp-blockchain",
"sp-consensus",
@@ -9000,7 +9078,7 @@
[[package]]
name = "sc-consensus-uncles"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"sc-client-api",
"sp-authorship",
@@ -9011,11 +9089,12 @@
[[package]]
name = "sc-executor"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"lazy_static",
"libsecp256k1 0.7.0",
"log",
+ "lru 0.6.6",
"parity-scale-codec",
"parking_lot 0.11.2",
"sc-executor-common",
@@ -9038,25 +9117,25 @@
[[package]]
name = "sc-executor-common"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"derive_more",
"environmental",
"parity-scale-codec",
- "pwasm-utils",
"sc-allocator",
"sp-core",
"sp-maybe-compressed-blob",
"sp-serializer",
"sp-wasm-interface",
"thiserror",
+ "wasm-instrument",
"wasmi",
]
[[package]]
name = "sc-executor-wasmi"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"log",
"parity-scale-codec",
@@ -9072,7 +9151,7 @@
[[package]]
name = "sc-executor-wasmtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"cfg-if 1.0.0",
"libc",
@@ -9090,20 +9169,21 @@
[[package]]
name = "sc-finality-grandpa"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"derive_more",
"dyn-clone",
"finality-grandpa",
"fork-tree",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"log",
"parity-scale-codec",
"parking_lot 0.11.2",
"rand 0.8.4",
"sc-block-builder",
+ "sc-chain-spec",
"sc-client-api",
"sc-consensus",
"sc-keystore",
@@ -9127,11 +9207,11 @@
[[package]]
name = "sc-finality-grandpa-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"derive_more",
"finality-grandpa",
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -9151,11 +9231,11 @@
[[package]]
name = "sc-informant"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"ansi_term",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"log",
"parity-util-mem",
"sc-client-api",
@@ -9168,7 +9248,7 @@
[[package]]
name = "sc-keystore"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"derive_more",
@@ -9183,7 +9263,7 @@
[[package]]
name = "sc-network"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-std",
"async-trait",
@@ -9195,18 +9275,18 @@
"either",
"fnv",
"fork-tree",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"hex",
"ip_network",
"libp2p",
"linked-hash-map",
"linked_hash_set",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"parity-scale-codec",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"prost",
"prost-build",
"rand 0.7.3",
@@ -9234,13 +9314,13 @@
[[package]]
name = "sc-network-gossip"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"libp2p",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"sc-network",
"sp-runtime",
"substrate-prometheus-endpoint",
@@ -9250,12 +9330,12 @@
[[package]]
name = "sc-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"bytes 1.1.0",
"fnv",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"hex",
"hyper",
"hyper-rustls",
@@ -9278,9 +9358,9 @@
[[package]]
name = "sc-peerset"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p",
"log",
"sc-utils",
@@ -9291,7 +9371,7 @@
[[package]]
name = "sc-proposer-metrics"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"log",
"substrate-prometheus-endpoint",
@@ -9300,9 +9380,9 @@
[[package]]
name = "sc-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"hash-db",
"jsonrpc-core",
"jsonrpc-pubsub",
@@ -9331,9 +9411,9 @@
[[package]]
name = "sc-rpc-api"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -9356,9 +9436,9 @@
[[package]]
name = "sc-rpc-server"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-http-server",
"jsonrpc-ipc-server",
@@ -9367,19 +9447,19 @@
"log",
"serde_json",
"substrate-prometheus-endpoint",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
name = "sc-service"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"directories",
"exit-future",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"hash-db",
"jsonrpc-core",
"jsonrpc-pubsub",
@@ -9387,7 +9467,7 @@
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"sc-block-builder",
"sc-chain-spec",
@@ -9429,7 +9509,7 @@
"substrate-prometheus-endpoint",
"tempfile",
"thiserror",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tracing",
"tracing-futures",
]
@@ -9437,7 +9517,7 @@
[[package]]
name = "sc-state-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"log",
"parity-scale-codec",
@@ -9451,7 +9531,7 @@
[[package]]
name = "sc-sync-state-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -9473,14 +9553,14 @@
[[package]]
name = "sc-telemetry"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"chrono",
- "futures 0.3.18",
+ "futures 0.3.21",
"libp2p",
"log",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"serde",
"serde_json",
@@ -9491,7 +9571,7 @@
[[package]]
name = "sc-tracing"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"ansi_term",
"atty",
@@ -9522,7 +9602,7 @@
[[package]]
name = "sc-tracing-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2",
@@ -9533,10 +9613,10 @@
[[package]]
name = "sc-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
- "intervalier",
+ "futures 0.3.21",
+ "futures-timer",
"linked-hash-map",
"log",
"parity-scale-codec",
@@ -9560,10 +9640,10 @@
[[package]]
name = "sc-transaction-pool-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
"serde",
"sp-blockchain",
@@ -9574,11 +9654,12 @@
[[package]]
name = "sc-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"lazy_static",
+ "parking_lot 0.11.2",
"prometheus",
]
@@ -9669,9 +9750,9 @@
[[package]]
name = "security-framework"
-version = "2.4.2"
+version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87"
+checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc"
dependencies = [
"bitflags",
"core-foundation",
@@ -9682,9 +9763,9 @@
[[package]]
name = "security-framework-sys"
-version = "2.4.2"
+version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e"
+checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
dependencies = [
"core-foundation-sys",
"libc",
@@ -9719,9 +9800,9 @@
[[package]]
name = "semver"
-version = "1.0.4"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012"
+checksum = "0486718e92ec9a68fbed73bb5ef687d71103b142595b406835649bebd33f72c7"
dependencies = [
"serde",
]
@@ -9743,18 +9824,18 @@
[[package]]
name = "serde"
-version = "1.0.131"
+version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1"
+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.131"
+version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2"
+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
dependencies = [
"proc-macro2",
"quote",
@@ -9763,11 +9844,11 @@
[[package]]
name = "serde_json"
-version = "1.0.72"
+version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527"
+checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085"
dependencies = [
- "itoa",
+ "itoa 1.0.1",
"ryu",
"serde",
]
@@ -9811,9 +9892,9 @@
[[package]]
name = "sha2"
-version = "0.9.8"
+version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa"
+checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
@@ -9823,6 +9904,17 @@
]
[[package]]
+name = "sha2"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec"
+dependencies = [
+ "cfg-if 1.0.0",
+ "cpufeatures 0.2.1",
+ "digest 0.10.2",
+]
+
+[[package]]
name = "sha3"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9864,9 +9956,9 @@
[[package]]
name = "signal-hook"
-version = "0.3.12"
+version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c35dfd12afb7828318348b8c408383cf5071a086c1d4ab1c0f9840ec92dbb922"
+checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d"
dependencies = [
"libc",
"signal-hook-registry",
@@ -9883,9 +9975,9 @@
[[package]]
name = "signature"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788"
+checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4"
[[package]]
name = "simba"
@@ -9907,8 +9999,8 @@
[[package]]
name = "slot-range-helper"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"enumn",
"parity-scale-codec",
@@ -9928,9 +10020,9 @@
[[package]]
name = "smallvec"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
+checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
[[package]]
name = "snap"
@@ -9951,7 +10043,7 @@
"rand_core 0.6.3",
"ring",
"rustc_version 0.3.3",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"subtle 2.4.1",
"x25519-dalek",
]
@@ -9969,9 +10061,9 @@
[[package]]
name = "socket2"
-version = "0.4.2"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516"
+checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
dependencies = [
"libc",
"winapi 0.3.9",
@@ -9986,7 +10078,7 @@
"base64",
"bytes 1.1.0",
"flate2",
- "futures 0.3.18",
+ "futures 0.3.21",
"httparse",
"log",
"rand 0.8.4",
@@ -9996,7 +10088,7 @@
[[package]]
name = "sp-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"hash-db",
"log",
@@ -10013,7 +10105,7 @@
[[package]]
name = "sp-api-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"blake2-rfc",
"proc-macro-crate 1.1.0",
@@ -10024,8 +10116,8 @@
[[package]]
name = "sp-application-crypto"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10037,8 +10129,8 @@
[[package]]
name = "sp-arithmetic"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"integer-sqrt",
"num-traits",
@@ -10053,7 +10145,7 @@
[[package]]
name = "sp-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10066,7 +10158,7 @@
[[package]]
name = "sp-authorship"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"parity-scale-codec",
@@ -10078,7 +10170,7 @@
[[package]]
name = "sp-block-builder"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -10090,11 +10182,11 @@
[[package]]
name = "sp-blockchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"parity-scale-codec",
"parking_lot 0.11.2",
"sp-api",
@@ -10108,11 +10200,11 @@
[[package]]
name = "sp-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
- "futures 0.3.18",
- "futures-timer 3.0.2",
+ "futures 0.3.21",
+ "futures-timer",
"log",
"parity-scale-codec",
"sp-core",
@@ -10127,7 +10219,7 @@
[[package]]
name = "sp-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"parity-scale-codec",
@@ -10145,7 +10237,7 @@
[[package]]
name = "sp-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"merlin",
@@ -10168,7 +10260,7 @@
[[package]]
name = "sp-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10180,7 +10272,7 @@
[[package]]
name = "sp-consensus-vrf"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"schnorrkel",
@@ -10191,8 +10283,8 @@
[[package]]
name = "sp-core"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.1.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"base58",
"bitflags",
@@ -10200,7 +10292,7 @@
"byteorder",
"dyn-clonable",
"ed25519-dalek",
- "futures 0.3.18",
+ "futures 0.3.21",
"hash-db",
"hash256-std-hasher",
"hex",
@@ -10220,7 +10312,7 @@
"schnorrkel",
"secrecy",
"serde",
- "sha2 0.9.8",
+ "sha2 0.10.1",
"sp-core-hashing",
"sp-debug-derive",
"sp-externalities",
@@ -10239,12 +10331,12 @@
[[package]]
name = "sp-core-hashing"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"blake2-rfc",
"byteorder",
- "sha2 0.9.8",
+ "sha2 0.10.1",
"sp-std",
"tiny-keccak",
"twox-hash",
@@ -10253,7 +10345,7 @@
[[package]]
name = "sp-core-hashing-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro2",
"quote",
@@ -10264,7 +10356,7 @@
[[package]]
name = "sp-database"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"kvdb",
"parking_lot 0.11.2",
@@ -10272,8 +10364,8 @@
[[package]]
name = "sp-debug-derive"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro2",
"quote",
@@ -10282,8 +10374,8 @@
[[package]]
name = "sp-externalities"
-version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "0.10.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"environmental",
"parity-scale-codec",
@@ -10294,7 +10386,7 @@
[[package]]
name = "sp-finality-grandpa"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"finality-grandpa",
"log",
@@ -10312,7 +10404,7 @@
[[package]]
name = "sp-inherents"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"impl-trait-for-tuples",
@@ -10325,10 +10417,10 @@
[[package]]
name = "sp-io"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"hash-db",
"libsecp256k1 0.7.0",
"log",
@@ -10349,23 +10441,23 @@
[[package]]
name = "sp-keyring"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.1.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"lazy_static",
"sp-core",
"sp-runtime",
- "strum",
+ "strum 0.22.0",
]
[[package]]
name = "sp-keystore"
-version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "0.10.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.21",
"merlin",
"parity-scale-codec",
"parking_lot 0.11.2",
@@ -10378,7 +10470,7 @@
[[package]]
name = "sp-maybe-compressed-blob"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"zstd",
]
@@ -10386,7 +10478,7 @@
[[package]]
name = "sp-npos-elections"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10401,7 +10493,7 @@
[[package]]
name = "sp-npos-elections-solution-type"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2",
@@ -10412,7 +10504,7 @@
[[package]]
name = "sp-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"sp-api",
"sp-core",
@@ -10421,8 +10513,8 @@
[[package]]
name = "sp-panic-handler"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"backtrace",
"lazy_static",
@@ -10432,7 +10524,7 @@
[[package]]
name = "sp-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"rustc-hash",
"serde",
@@ -10441,8 +10533,8 @@
[[package]]
name = "sp-runtime"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.1.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"either",
"hash256-std-hasher",
@@ -10463,8 +10555,8 @@
[[package]]
name = "sp-runtime-interface"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.1.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
@@ -10480,8 +10572,8 @@
[[package]]
name = "sp-runtime-interface-proc-macro"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"Inflector",
"proc-macro-crate 1.1.0",
@@ -10491,23 +10583,9 @@
]
[[package]]
-name = "sp-sandbox"
-version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
-dependencies = [
- "log",
- "parity-scale-codec",
- "sp-core",
- "sp-io",
- "sp-std",
- "sp-wasm-interface",
- "wasmi",
-]
-
-[[package]]
name = "sp-serializer"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"serde",
"serde_json",
@@ -10516,7 +10594,7 @@
[[package]]
name = "sp-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10530,7 +10608,7 @@
[[package]]
name = "sp-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10540,8 +10618,8 @@
[[package]]
name = "sp-state-machine"
-version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "0.10.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"hash-db",
"log",
@@ -10563,13 +10641,13 @@
[[package]]
name = "sp-std"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
[[package]]
name = "sp-storage"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -10582,7 +10660,7 @@
[[package]]
name = "sp-tasks"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"log",
"sp-core",
@@ -10595,10 +10673,10 @@
[[package]]
name = "sp-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
- "futures-timer 3.0.2",
+ "futures-timer",
"log",
"parity-scale-codec",
"sp-api",
@@ -10610,8 +10688,8 @@
[[package]]
name = "sp-tracing"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"sp-std",
@@ -10623,7 +10701,7 @@
[[package]]
name = "sp-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"sp-api",
"sp-runtime",
@@ -10632,7 +10710,7 @@
[[package]]
name = "sp-transaction-storage-proof"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
"log",
@@ -10647,8 +10725,8 @@
[[package]]
name = "sp-trie"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"hash-db",
"memory-db",
@@ -10663,13 +10741,14 @@
[[package]]
name = "sp-version"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"impl-serde",
"parity-scale-codec",
"parity-wasm 0.42.2",
"scale-info",
"serde",
+ "sp-core-hashing-proc-macro",
"sp-runtime",
"sp-std",
"sp-version-proc-macro",
@@ -10679,7 +10758,7 @@
[[package]]
name = "sp-version-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"parity-scale-codec",
"proc-macro2",
@@ -10689,13 +10768,15 @@
[[package]]
name = "sp-wasm-interface"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+version = "4.1.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"impl-trait-for-tuples",
+ "log",
"parity-scale-codec",
"sp-std",
"wasmi",
+ "wasmtime",
]
[[package]]
@@ -10706,9 +10787,9 @@
[[package]]
name = "ss58-registry"
-version = "1.9.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "827441708a5dd8ca54e6b79690dc06d1bede78e61961e667f683c23c16ef964c"
+checksum = "8319f44e20b42e5c11b88b1ad4130c35fe2974665a007b08b02322070177136a"
dependencies = [
"Inflector",
"proc-macro2",
@@ -10782,9 +10863,9 @@
[[package]]
name = "structopt"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c"
+checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
dependencies = [
"clap",
"lazy_static",
@@ -10810,7 +10891,16 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e"
dependencies = [
- "strum_macros",
+ "strum_macros 0.22.0",
+]
+
+[[package]]
+name = "strum"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb"
+dependencies = [
+ "strum_macros 0.23.1",
]
[[package]]
@@ -10826,6 +10916,19 @@
]
[[package]]
+name = "strum_macros"
+version = "0.23.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
name = "substrate-bip39"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -10834,14 +10937,14 @@
"hmac 0.11.0",
"pbkdf2 0.8.0",
"schnorrkel",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"zeroize",
]
[[package]]
name = "substrate-build-script-utils"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"platforms",
]
@@ -10849,10 +10952,10 @@
[[package]]
name = "substrate-frame-rpc-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"frame-system-rpc-runtime-api",
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -10871,7 +10974,7 @@
[[package]]
name = "substrate-prometheus-endpoint"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-std",
"derive_more",
@@ -10879,16 +10982,16 @@
"hyper",
"log",
"prometheus",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
name = "substrate-test-client"
version = "2.0.1"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.21",
"hex",
"parity-scale-codec",
"sc-client-api",
@@ -10911,17 +11014,17 @@
[[package]]
name = "substrate-test-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"substrate-test-utils-derive",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
name = "substrate-test-utils-derive"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"proc-macro-crate 1.1.0",
"proc-macro2",
@@ -10932,7 +11035,7 @@
[[package]]
name = "substrate-wasm-builder"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"ansi_term",
"build-helper",
@@ -10958,9 +11061,9 @@
[[package]]
name = "syn"
-version = "1.0.82"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
+checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
dependencies = [
"proc-macro2",
"quote",
@@ -10987,19 +11090,19 @@
[[package]]
name = "target-lexicon"
-version = "0.12.2"
+version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff"
+checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1"
[[package]]
name = "tempfile"
-version = "3.2.0"
+version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
dependencies = [
"cfg-if 1.0.0",
+ "fastrand",
"libc",
- "rand 0.8.4",
"redox_syscall 0.2.10",
"remove_dir_all",
"winapi 0.3.9",
@@ -11015,6 +11118,18 @@
]
[[package]]
+name = "test-runtime-constants"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
+dependencies = [
+ "frame-support",
+ "polkadot-primitives",
+ "polkadot-runtime-common",
+ "smallvec",
+ "sp-runtime",
+]
+
+[[package]]
name = "textwrap"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11045,9 +11160,9 @@
[[package]]
name = "thread_local"
-version = "1.1.3"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
+checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
dependencies = [
"once_cell",
]
@@ -11063,9 +11178,9 @@
[[package]]
name = "thrift"
-version = "0.13.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c6d965454947cc7266d22716ebfd07b18d84ebaf35eec558586bbb2a8cb6b5b"
+checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e"
dependencies = [
"byteorder",
"integer-encoding",
@@ -11097,7 +11212,7 @@
"pbkdf2 0.4.0",
"rand 0.7.3",
"rustc-hash",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"thiserror",
"unicode-normalization",
"wasm-bindgen",
@@ -11142,20 +11257,19 @@
[[package]]
name = "tokio"
-version = "1.14.0"
+version = "1.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144"
+checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a"
dependencies = [
- "autocfg",
"bytes 1.1.0",
"libc",
"memchr",
"mio 0.7.14",
"num_cpus",
"once_cell",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"signal-hook-registry",
- "tokio-macros 1.6.0",
+ "tokio-macros 1.7.0",
"winapi 0.3.9",
]
@@ -11172,9 +11286,9 @@
[[package]]
name = "tokio-macros"
-version = "1.6.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9efc1aba077437943f7515666aa2b882dfabfbfdf89c819ea75a8d6e9eaba5e"
+checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
dependencies = [
"proc-macro2",
"quote",
@@ -11188,7 +11302,7 @@
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"webpki",
]
@@ -11199,8 +11313,8 @@
checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3"
dependencies = [
"futures-core",
- "pin-project-lite 0.2.7",
- "tokio 1.14.0",
+ "pin-project-lite 0.2.8",
+ "tokio 1.16.1",
]
[[package]]
@@ -11214,8 +11328,8 @@
"futures-io",
"futures-sink",
"log",
- "pin-project-lite 0.2.7",
- "tokio 1.14.0",
+ "pin-project-lite 0.2.8",
+ "tokio 1.16.1",
]
[[package]]
@@ -11235,21 +11349,21 @@
[[package]]
name = "tracing"
-version = "0.1.29"
+version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105"
+checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9"
dependencies = [
"cfg-if 1.0.0",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"tracing-attributes",
"tracing-core",
]
[[package]]
name = "tracing-attributes"
-version = "0.1.18"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e"
+checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716"
dependencies = [
"proc-macro2",
"quote",
@@ -11258,11 +11372,12 @@
[[package]]
name = "tracing-core"
-version = "0.1.21"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4"
+checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23"
dependencies = [
"lazy_static",
+ "valuable",
]
[[package]]
@@ -11271,7 +11386,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
dependencies = [
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"tracing",
]
@@ -11288,9 +11403,9 @@
[[package]]
name = "tracing-serde"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b"
+checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"
dependencies = [
"serde",
"tracing-core",
@@ -11321,12 +11436,12 @@
[[package]]
name = "trie-db"
-version = "0.22.6"
+version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa"
+checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83"
dependencies = [
"hash-db",
- "hashbrown",
+ "hashbrown 0.12.0",
"log",
"rustc-hex",
"smallvec",
@@ -11334,9 +11449,9 @@
[[package]]
name = "trie-root"
-version = "0.16.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd"
+checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891"
dependencies = [
"hash-db",
]
@@ -11353,9 +11468,9 @@
[[package]]
name = "trust-dns-proto"
-version = "0.20.3"
+version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad0d7f5db438199a6e2609debe3f69f808d074e0a2888ee0bccb45fe234d03f4"
+checksum = "ca94d4e9feb6a181c690c4040d7a24ef34018d8313ac5044a61d21222ae24e31"
dependencies = [
"async-trait",
"cfg-if 1.0.0",
@@ -11377,9 +11492,9 @@
[[package]]
name = "trust-dns-resolver"
-version = "0.20.3"
+version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770"
+checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a"
dependencies = [
"cfg-if 1.0.0",
"futures-util",
@@ -11403,7 +11518,7 @@
[[package]]
name = "try-runtime-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#4aeb95f7f38fcd519e2628f32f79044a8fef99d5"
dependencies = [
"jsonrpsee",
"log",
@@ -11422,6 +11537,7 @@
"sp-state-machine",
"sp-version",
"structopt",
+ "zstd",
]
[[package]]
@@ -11432,9 +11548,9 @@
[[package]]
name = "twox-hash"
-version = "1.6.1"
+version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e"
+checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0"
dependencies = [
"cfg-if 1.0.0",
"rand 0.8.4",
@@ -11443,9 +11559,9 @@
[[package]]
name = "typenum"
-version = "1.14.0"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec"
+checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]]
name = "uc-rpc"
@@ -11473,9 +11589,9 @@
[[package]]
name = "uint"
-version = "0.9.1"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f"
+checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0"
dependencies = [
"byteorder",
"crunchy",
@@ -11509,9 +11625,9 @@
[[package]]
name = "unicode-segmentation"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
+checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
[[package]]
name = "unicode-width"
@@ -11527,7 +11643,7 @@
[[package]]
name = "unique-node"
-version = "0.9.14"
+version = "0.9.16"
dependencies = [
"cumulus-client-cli",
"cumulus-client-collator",
@@ -11537,6 +11653,8 @@
"cumulus-client-service",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
+ "cumulus-relay-chain-interface",
+ "cumulus-relay-chain-local",
"fc-consensus",
"fc-db",
"fc-mapping-sync",
@@ -11546,7 +11664,7 @@
"fp-rpc",
"frame-benchmarking",
"frame-benchmarking-cli",
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-pubsub",
"log",
@@ -11610,7 +11728,7 @@
"fc-rpc",
"fc-rpc-core",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.21",
"jsonrpc-core",
"jsonrpc-pubsub",
"pallet-ethereum",
@@ -11648,7 +11766,7 @@
[[package]]
name = "unique-runtime"
-version = "0.9.14"
+version = "0.9.16"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
@@ -11671,6 +11789,7 @@
"orml-vesting",
"pallet-aura",
"pallet-balances",
+ "pallet-base-fee",
"pallet-common",
"pallet-ethereum",
"pallet-evm",
@@ -11726,7 +11845,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"subtle 2.4.1",
]
@@ -11805,7 +11924,7 @@
[[package]]
name = "up-sponsorship"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.14#858001a6fd841614eb3bc47562e1a08685e6c8df"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.16#a08e9828d44c54ec9905e9c7f642f0e734f92780"
dependencies = [
"impl-trait-for-tuples",
]
@@ -11834,6 +11953,12 @@
]
[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
name = "value-bag"
version = "1.0.0-alpha.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11857,9 +11982,9 @@
[[package]]
name = "version_check"
-version = "0.9.3"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "void"
@@ -11908,9 +12033,9 @@
[[package]]
name = "wasm-bindgen"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce"
+checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06"
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen-macro",
@@ -11918,9 +12043,9 @@
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b"
+checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca"
dependencies = [
"bumpalo",
"lazy_static",
@@ -11933,9 +12058,9 @@
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.28"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39"
+checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395"
dependencies = [
"cfg-if 1.0.0",
"js-sys",
@@ -11945,9 +12070,9 @@
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9"
+checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -11955,9 +12080,9 @@
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab"
+checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc"
dependencies = [
"proc-macro2",
"quote",
@@ -11968,9 +12093,9 @@
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc"
+checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2"
[[package]]
name = "wasm-gc-api"
@@ -11984,12 +12109,21 @@
]
[[package]]
+name = "wasm-instrument"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f"
+dependencies = [
+ "parity-wasm 0.42.2",
+]
+
+[[package]]
name = "wasm-timer"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"js-sys",
"parking_lot 0.11.2",
"pin-utils",
@@ -12006,7 +12140,6 @@
dependencies = [
"downcast-rs",
"libc",
- "libm",
"memory_units",
"num-rational 0.2.4",
"num-traits",
@@ -12031,9 +12164,9 @@
[[package]]
name = "wasmtime"
-version = "0.31.0"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "311d06b0c49346d1fbf48a17052e844036b95a7753c1afb34e8c0af3f6b5bb13"
+checksum = "414be1bc5ca12e755ffd3ff7acc3a6d1979922f8237fc34068b2156cebcc3270"
dependencies = [
"anyhow",
"backtrace",
@@ -12063,9 +12196,9 @@
[[package]]
name = "wasmtime-cache"
-version = "0.31.0"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36147930a4995137dc096e5b17a573b446799be2bbaea433e821ce6a80abe2c5"
+checksum = "8b9b4cd1949206fda9241faf8c460a7d797aa1692594d3dd6bc1cbfa57ee20d0"
dependencies = [
"anyhow",
"base64",
@@ -12073,9 +12206,9 @@
"directories-next",
"file-per-thread-logger",
"log",
- "rsix",
+ "rustix",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"toml",
"winapi 0.3.9",
"zstd",
@@ -12083,9 +12216,9 @@
[[package]]
name = "wasmtime-cranelift"
-version = "0.31.0"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab3083a47e1ede38aac06a1d9831640d673f9aeda0b82a64e4ce002f3432e2e7"
+checksum = "a4693d33725773615a4c9957e4aa731af57b27dca579702d1d8ed5750760f1a9"
dependencies = [
"anyhow",
"cranelift-codegen",
@@ -12093,7 +12226,7 @@
"cranelift-frontend",
"cranelift-native",
"cranelift-wasm",
- "gimli 0.25.0",
+ "gimli",
"log",
"more-asserts",
"object",
@@ -12105,14 +12238,13 @@
[[package]]
name = "wasmtime-environ"
-version = "0.31.0"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c2d194b655321053bc4111a1aa4ead552655c8a17d17264bc97766e70073510"
+checksum = "5b17e47116a078b9770e6fb86cff8b9a660826623cebcfff251b047c8d8993ef"
dependencies = [
"anyhow",
- "cfg-if 1.0.0",
"cranelift-entity",
- "gimli 0.25.0",
+ "gimli",
"indexmap",
"log",
"more-asserts",
@@ -12126,24 +12258,21 @@
[[package]]
name = "wasmtime-jit"
-version = "0.31.0"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "864ac8dfe4ce310ac59f16fdbd560c257389cb009ee5d030ac6e30523b023d11"
+checksum = "60ea5b380bdf92e32911400375aeefb900ac9d3f8e350bb6ba555a39315f2ee7"
dependencies = [
- "addr2line 0.16.0",
+ "addr2line",
"anyhow",
"bincode",
"cfg-if 1.0.0",
- "gimli 0.25.0",
- "log",
- "more-asserts",
+ "gimli",
"object",
"region",
- "rsix",
+ "rustix",
"serde",
"target-lexicon",
"thiserror",
- "wasmparser",
"wasmtime-environ",
"wasmtime-runtime",
"winapi 0.3.9",
@@ -12151,9 +12280,9 @@
[[package]]
name = "wasmtime-runtime"
-version = "0.31.0"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab97da813a26b98c9abfd3b0c2d99e42f6b78b749c0646344e2e262d212d8c8b"
+checksum = "abc7cd79937edd6e238b337608ebbcaf9c086a8457f01dfd598324f7fa56d81a"
dependencies = [
"anyhow",
"backtrace",
@@ -12168,7 +12297,7 @@
"more-asserts",
"rand 0.8.4",
"region",
- "rsix",
+ "rustix",
"thiserror",
"wasmtime-environ",
"winapi 0.3.9",
@@ -12176,9 +12305,9 @@
[[package]]
name = "wasmtime-types"
-version = "0.31.0"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff94409cc3557bfbbcce6b14520ccd6bd3727e965c0fe68d63ef2c185bf379c6"
+checksum = "d9e5e51a461a2cf2b69e1fc48f325b17d78a8582816e18479e8ead58844b23f8"
dependencies = [
"cranelift-entity",
"serde",
@@ -12188,9 +12317,9 @@
[[package]]
name = "web-sys"
-version = "0.3.55"
+version = "0.3.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb"
+checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -12226,8 +12355,8 @@
[[package]]
name = "westend-runtime"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -12260,6 +12389,7 @@
"pallet-nicks",
"pallet-offences",
"pallet-offences-benchmarking",
+ "pallet-preimage",
"pallet-proxy",
"pallet-recovery",
"pallet-scheduler",
@@ -12303,16 +12433,29 @@
"sp-transaction-pool",
"sp-version",
"substrate-wasm-builder",
+ "westend-runtime-constants",
"xcm",
"xcm-builder",
"xcm-executor",
]
[[package]]
+name = "westend-runtime-constants"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
+dependencies = [
+ "frame-support",
+ "polkadot-primitives",
+ "polkadot-runtime-common",
+ "smallvec",
+ "sp-runtime",
+]
+
+[[package]]
name = "which"
-version = "4.2.2"
+version = "4.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9"
+checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
dependencies = [
"either",
"lazy_static",
@@ -12406,8 +12549,8 @@
[[package]]
name = "xcm"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"derivative",
"impl-trait-for-tuples",
@@ -12419,8 +12562,8 @@
[[package]]
name = "xcm-builder"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"frame-support",
"frame-system",
@@ -12439,8 +12582,8 @@
[[package]]
name = "xcm-executor"
-version = "0.9.14"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+version = "0.9.16"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -12458,8 +12601,9 @@
[[package]]
name = "xcm-procedural"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350"
dependencies = [
+ "Inflector",
"proc-macro2",
"quote",
"syn",
@@ -12471,7 +12615,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.21",
"log",
"nohash-hasher",
"parking_lot 0.11.2",
@@ -12487,18 +12631,18 @@
[[package]]
name = "zeroize"
-version = "1.4.3"
+version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619"
+checksum = "7c88870063c39ee00ec285a2f8d6a966e5b6fb2becc4e8dac77ed0d370ed6006"
dependencies = [
"zeroize_derive",
]
[[package]]
name = "zeroize_derive"
-version = "1.2.2"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73"
+checksum = "81e8f13fef10b63c06356d65d416b070798ddabcadc10d3ece0c5be9b3c7eddb"
dependencies = [
"proc-macro2",
"quote",
@@ -12508,18 +12652,18 @@
[[package]]
name = "zstd"
-version = "0.9.0+zstd.1.5.0"
+version = "0.9.2+zstd.1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07749a5dc2cb6b36661290245e350f15ec3bbb304e493db54a1d354480522ccd"
+checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
-version = "4.1.1+zstd.1.5.0"
+version = "4.1.3+zstd.1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c91c90f2c593b003603e5e0493c837088df4469da25aafff8bce42ba48caf079"
+checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79"
dependencies = [
"libc",
"zstd-sys",
@@ -12527,9 +12671,9 @@
[[package]]
name = "zstd-sys"
-version = "1.6.1+zstd.1.5.0"
+version = "1.6.2+zstd.1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "615120c7a2431d16cf1cf979e7fc31ba7a5b5e5707b29c8a99e5dbf8a8392a33"
+checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f"
dependencies = [
"cc",
"libc",
Dockerfile-parachaindiffbeforeafterboth--- a/Dockerfile-parachain
+++ b/Dockerfile-parachain
@@ -4,7 +4,7 @@
ARG RUST_TOOLCHAIN=nightly-2021-11-11
#ARG RUST_C=1.58.0-nightly
-ARG POLKA_VERSION=release-v0.9.14
+ARG POLKA_VERSION=release-v0.9.16
ARG UNIQUE_BRANCH=develop
#ARG USER=***
@@ -90,7 +90,7 @@
nvm install v15.5.0 && \
nvm use v15.5.0
-RUN git clone https://github.com/PureStake/polkadot-launch -b jlm-use-para-id-in-specs
+RUN git clone https://github.com/paritytech/polkadot-launch
RUN export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -29,26 +29,11 @@
Please see our [walk-thorugh instructions](doc/hackusama_walk_through.md) to try everything out!
-## Hackusama Update
-
-During the Kusama Hackaphon the following changes were made:
-
-- Enabled Smart Contracts Pallet
-- Enabled integration between Smart Contracts and Unique Pallet (required special edition of RC4 Substrate version)
-- Fixed misc. bugs in Unique Pallet
-- Deployed Unique TestNet. Public node available at wss://unique.usetech.com, custom UI types - see below in this README.
-- New Features:
- - Re-Fungible Token Mode
- - Off-Chain Schema to store token image URLs
- - Alternative economic model
- - Allow Lists and Public Mint Permission
-- Use example: [SubstraPunks Game](https://github.com/usetech-llc/substrapunks), fully hosted on IPFS and Unique Testnet
- Blockchain.
-
## Application Development
If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).
+
## Building
Building Unique chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything
@@ -57,8 +42,8 @@
1. Install Rust:
```bash
+sudo apt-get install git curl libssl-dev llvm pkg-config libclang-dev clang
curl https://sh.rustup.rs -sSf | sh
-sudo apt-get install libssl-dev pkg-config libclang-dev clang
```
2. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.
@@ -86,111 +71,52 @@
cargo build --release
```
-## Run
-
-You can start a development chain with:
-
-```bash
-cargo run -- --dev
-```
-
-Detailed logs may be shown by running the node with the following environment variables set:
-`RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.
+## Building as Parachain locally
-If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two
-validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with
-testnet units. Give each node a name and expose them so they are listed on the Polkadot
-[telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminal windows open.
+Note: checkout this project and all related projects (see below) in the sibling folders (both under the same folder)
-We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at
-`/tmp/alice`. The bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from
-the `--node-key` value that we specify below:
+### Polkadot launch utility
-```bash
-cargo run -- \
- --base-path /tmp/alice \
- --chain=local \
- --alice \
- --node-key 0000000000000000000000000000000000000000000000000000000000000001 \
- --telemetry-url ws://telemetry.polkadot.io:1024 \
- --validator
```
-
-In the second terminal, we'll start Bob's substrate node on a different TCP port of 30334, and with his chain database
-stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's
-bootnode ID on TCP port 30333:
-
-```bash
-cargo run -- \
- --base-path /tmp/bob \
- --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \
- --chain=local \
- --bob \
- --port 30334 \
- --telemetry-url ws://telemetry.polkadot.io:1024 \
- --validator
+git clone https://github.com/paritytech/polkadot-launch
```
-
-Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
-
-## Building and Running as Parachain locally
-
-Rust toolchain: nightly-2021-11-11
-Note: checkout this project and polkadot project (see below) in the sibling folders (both under the same folder)
### Build relay
```
git clone https://github.com/paritytech/polkadot.git
cd polkadot
-git checkout release-v0.9.13
+git checkout release-v0.9.16
cargo build --release
```
-### Build parachain
+### Build Unique parachain
Run in the root of this project:
```
-cargo --build
+cargo build --release
```
-### Run 4-node Relay
-
-1. Download `rococo-custom-4.json` chain spec here: https://substrate.dev/cumulus-workshop/shared/chainspecs/rococo-custom-4.json
-2. Use these instructions to launch 4 nodes: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/1-launch
+### Build Acala parachain (optional, full config only)
-Example (Run in polkadot folder. Replace `12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on` with output from Alice node):
```
-./target/release/polkadot --alice --validator --base-path ./cumulus_relay0 --chain rococo-custom-4.json --port 50555 --ws-port 9944
-./target/release/polkadot --bob --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50556 --ws-port 9945
-./target/release/polkadot --charlie --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50557 --ws-port 9946
-./target/release/polkadot --dave --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50558 --ws-port 9947
-
+git clone https://github.com/AcalaNetwork/Acala
+cd Acala
+git checkout 54db3acd409a0b787f116f20e163a3b24101ce38
+make build-release
```
-3. Export genesis state and runtime wasm from Unique parachain:
+## Running as Parachain locally
-Run from this project root:
```
-./target/release/unique-collator export-genesis-state --parachain-id 2000 > ./resources/para-2000-genesis
-./target/release/unique-collator export-genesis-wasm > ./resources/para-2000-wasm
+./launch-testnet.sh
```
-4. Run two parachain nodes:
-
-Replace `12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg` with Alice or Bob relay ID
-
-Run from this project root:
+Optional, full setup with Acala and Statemint
```
-./target/release/unique-collator --alice --collator --force-authoring --base-path ./tmp/parachain-alice --parachain-id 2000 --port 40333 --ws-port 9844 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30343 --ws-port 9977
-./target/release/unique-collator --bob --collator --force-authoring --parachain-id 2000 --base-path ./tmp/parachain/bob --port 40334 --ws-port 9845 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30344 --ws-port 9978 --bootnodes /ip4/127.0.0.1/tcp/50556/p2p/12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg
+./launch-testnet-full.sh
```
-
-4. Reserve parachain ID as described here: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/2-reserve
-5. Register parachain in relay as described here: https://substrate.dev/cumulus-workshop/#/en/3-parachains/2-register
-
-
## Run Integration Tests
1. Install all needed dependecies
@@ -202,40 +128,11 @@
2. Run tests
```
yarn test
-```
-
-## Benchmarks
-
-First of all, add rust toolchain and make it default.
-```bash
-rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-11
-```
-
-Then in "/node/src" run build command below
-```bash
-cargo +nightly-2021-11-11 build --release --features runtime-benchmarks
-```
-
-Run benchmark
-```bash
-target/release/unique-collator benchmark --chain dev --pallet "pallet_unique" --extrinsic "*" --repeat 1
```
-
-## UI custom types
-
-Moved to [runtime_types.json](./runtime_types.json).
-
-## Running Integration Tests
-See [tests/README.md](./tests/README.md).
## Code Formatting
-### Get formatter and linter settings into your branch (if you forked before they were introduced)
-```bash
-git cherry-pick -n 8ff77c21b0d30b2a4648fa35dbf61dfa9d3948a7
-```
-
### Apply formatting and clippy fixes
```bash
cargo clippy
@@ -252,84 +149,57 @@
cd tests && yarn eslint --ext .ts,.js src/
```
-## Re-Enabling Ink! Contracts
-Uncomment following lies:
-1. In node/rpc/Cargo.toml
-```
-# pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
-```
+## Karura token transfer
-2. In node/rpc/src/lib.rs
-```
-// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
-...
-// use pallet_contracts_rpc::{Contracts, ContractsApi};
-...
-// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));
+To get started, you need to open inbound and outbound hrmp channels.
+### Next, we need to register our asset at Karura.
```
+assetRegistry -> registerForeignAsset(location, metadata)
+location:
+ V0(X2(Parent, Parachain(PARA_ID)))
+metadata:
+ name QTZ
+ symbol QTZ
+ decimals 18
+minimalBalance 1
+```
-3. In runtime/Cargo.toml
+### Next, we can send tokens from Quartz to Karura:
```
- # 'pallet-contracts/std',
- # 'pallet-contracts-primitives/std',
- # 'pallet-contracts-rpc-runtime-api/std',
- # 'pallet-contract-helpers/std',
-...
- # [dependencies.pallet-contracts]
- # git = 'https://github.com/paritytech/substrate.git'
- # default-features = false
- # branch = 'polkadot-v0.9.9'
- # version = '3.0.0'
+polkadotXcm -> reserveTransferAssets
+dest:
+ V0(X2(Parent, Parachain(<KARURA_PARA_ID>)))
+beneficiary:
+ X1(AccountId(Any, <ACCOUNT>))
+assets:
+ V1(Concrete(0,Here), Fungible(<AMOUNT>))
+feeAssetItem:
+ 0
+weightLimit:
+ <LIMIT>
+```
- # [dependencies.pallet-contracts-primitives]
- # git = 'https://github.com/paritytech/substrate.git'
- # default-features = false
- # branch = 'polkadot-v0.9.9'
- # version = '3.0.0'
+The result will be displayed in ChainState
+tokens -> accounts
- # [dependencies.pallet-contracts-rpc-runtime-api]
- # git = 'https://github.com/paritytech/substrate.git'
- # default-features = false
- # branch = 'polkadot-v0.9.9'
- # version = '3.0.0'
-...
- # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
+### To send tokens from Karura to Quartz:
```
+xtokens -> transfer
-4. runtime/src/lib.rs
-```
-// use pallet_contracts::weights::WeightInfo;
-...
-// pub use pallet_timestamp::Call as TimestampCall;
-...
-// mod chain_extension;
-// use crate::chain_extension::{NFTExtension, Imbalance};
-...
-/*
-parameter_types! {
- pub TombstoneDeposit: Balance = deposit(
- ...
-}
-*/
-...
-//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,
-...
-// impl pallet_contract_helpers::Config for Runtime {}
-...
-// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},
-...
-// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},
-...
-//pallet_contract_helpers::ContractHelpersExtension<Runtime>,
-...
-/*
- impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>
- for Runtime
- {
- ...
- }
-*/
+currencyId:
+ ForeingAsset
+ <TOKEN_ID>
-```
+amount:
+ <AMOUNT>
+dest:
+ V1
+ (
+ Parents:1,
+ X2(Parachain(<KARURA_PARA_ID>), AccountId(Any, <ACCOUNT>)
+ )
+destWeight:
+ <WEIGHT>
+```
\ No newline at end of file
client/rpc/Cargo.tomldiffbeforeafterboth--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -12,8 +12,8 @@
jsonrpc-core-client = "18.0.0"
jsonrpc-derive = "18.0.0"
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -4,7 +4,7 @@
use jsonrpc_core::{Error as RpcError, ErrorCode, Result};
use jsonrpc_derive::rpc;
use up_data_structs::{Collection, CollectionId, CollectionStats, TokenId};
-use sp_api::{BlockId, BlockT, ProvideRuntimeApi};
+use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};
use sp_blockchain::HeaderBackend;
use up_rpc::UniqueApi as UniqueRuntimeApi;
@@ -31,7 +31,7 @@
collection: CollectionId,
token: TokenId,
at: Option<BlockHash>,
- ) -> Result<CrossAccountId>;
+ ) -> Result<Option<CrossAccountId>>;
#[rpc(name = "unique_constMetadata")]
fn const_metadata(
&self,
@@ -132,7 +132,10 @@
}
macro_rules! pass_method {
- ($method_name:ident($($name:ident: $ty:ty),* $(,)?) -> $result:ty $(=> $mapper:expr)?) => {
+ (
+ $method_name:ident($($name:ident: $ty:ty),* $(,)?) -> $result:ty $(=> $mapper:expr)?
+ $(; changed_in $ver:expr, $changed_method_name:ident ($($changed_name:expr), * $(,)?) => $fixer:expr)*
+ ) => {
fn $method_name(
&self,
$(
@@ -142,8 +145,25 @@
) -> Result<$result> {
let api = self.client.runtime_api();
let at = BlockId::hash(at.unwrap_or_else(|| self.client.info().best_hash));
+ let _api_version = if let Ok(Some(api_version)) =
+ api.api_version::<dyn UniqueRuntimeApi<Block, CrossAccountId, AccountId>>(&at)
+ {
+ api_version
+ } else {
+ // unreachable for our runtime
+ return Err(RpcError {
+ code: ErrorCode::InvalidParams,
+ message: "Api is not available".into(),
+ data: None,
+ })
+ };
+
+ let result = $(if _api_version < $ver {
+ api.$changed_method_name(&at, $($changed_name),*).map(|r| r.map($fixer))
+ } else)*
+ { api.$method_name(&at, $($name),*) };
- let result = api.$method_name(&at, $($name),*).map_err(|e| RpcError {
+ let result = result.map_err(|e| RpcError {
code: ErrorCode::ServerError(Error::RuntimeError.into()),
message: "Unable to query".into(),
data: Some(format!("{:?}", e).into()),
@@ -168,7 +188,10 @@
{
pass_method!(account_tokens(collection: CollectionId, account: CrossAccountId) -> Vec<TokenId>);
pass_method!(token_exists(collection: CollectionId, token: TokenId) -> bool);
- pass_method!(token_owner(collection: CollectionId, token: TokenId) -> CrossAccountId);
+ pass_method!(
+ token_owner(collection: CollectionId, token: TokenId) -> Option<CrossAccountId>;
+ changed_in 2, token_owner_before_version_2(collection, token) => |u| Some(u)
+ );
pass_method!(const_metadata(collection: CollectionId, token: TokenId) -> Vec<u8>);
pass_method!(variable_metadata(collection: CollectionId, token: TokenId) -> Vec<u8>);
pass_method!(collection_tokens(collection: CollectionId) -> u32);
crates/evm-coder/Cargo.tomldiffbeforeafterboth--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -7,8 +7,8 @@
evm-coder-macros = { path = "../evm-coder-macros" }
primitive-types = { version = "0.10.1", default-features = false }
hex-literal = "0.3.3"
-ethereum = { version = "0.10.0", default-features = false }
-evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm.git", branch = "unique-weights" }
+ethereum = { version = "0.11.1", default-features = false }
+evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm.git", branch = "unique-polkadot-v0.9.16" }
impl-trait-for-tuples = "0.2.1"
[dev-dependencies]
doc/hackusama_update.mddiffbeforeafterboth--- /dev/null
+++ b/doc/hackusama_update.md
@@ -0,0 +1,15 @@
+## Hackusama Update
+
+During the Kusama Hackaphon the following changes were made:
+
+- Enabled Smart Contracts Pallet
+- Enabled integration between Smart Contracts and Unique Pallet (required special edition of RC4 Substrate version)
+- Fixed misc. bugs in Unique Pallet
+- Deployed Unique TestNet. Public node available at wss://unique.usetech.com, custom UI types - see below in this README.
+- New Features:
+ - Re-Fungible Token Mode
+ - Off-Chain Schema to store token image URLs
+ - Alternative economic model
+ - Allow Lists and Public Mint Permission
+- Use example: [SubstraPunks Game](https://github.com/usetech-llc/substrapunks), fully hosted on IPFS and Unique Testnet
+ Blockchain.
\ No newline at end of file
doc/re-enable_ink_contracts.mddiffbeforeafterboth--- /dev/null
+++ b/doc/re-enable_ink_contracts.md
@@ -0,0 +1,81 @@
+## Re-Enabling Ink! Contracts
+
+Uncomment following lies:
+1. In node/rpc/Cargo.toml
+```
+# pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }
+```
+
+2. In node/rpc/src/lib.rs
+```
+// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
+...
+// use pallet_contracts_rpc::{Contracts, ContractsApi};
+...
+// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));
+
+```
+
+3. In runtime/Cargo.toml
+```
+ # 'pallet-contracts/std',
+ # 'pallet-contracts-primitives/std',
+ # 'pallet-contracts-rpc-runtime-api/std',
+ # 'pallet-contract-helpers/std',
+...
+ # [dependencies.pallet-contracts]
+ # git = 'https://github.com/paritytech/substrate.git'
+ # default-features = false
+ # branch = 'polkadot-v0.9.9'
+ # version = '3.0.0'
+
+ # [dependencies.pallet-contracts-primitives]
+ # git = 'https://github.com/paritytech/substrate.git'
+ # default-features = false
+ # branch = 'polkadot-v0.9.9'
+ # version = '3.0.0'
+
+ # [dependencies.pallet-contracts-rpc-runtime-api]
+ # git = 'https://github.com/paritytech/substrate.git'
+ # default-features = false
+ # branch = 'polkadot-v0.9.9'
+ # version = '3.0.0'
+...
+ # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
+```
+
+4. runtime/src/lib.rs
+```
+// use pallet_contracts::weights::WeightInfo;
+...
+// pub use pallet_timestamp::Call as TimestampCall;
+...
+// mod chain_extension;
+// use crate::chain_extension::{NFTExtension, Imbalance};
+...
+/*
+parameter_types! {
+ pub TombstoneDeposit: Balance = deposit(
+ ...
+}
+*/
+...
+//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,
+...
+// impl pallet_contract_helpers::Config for Runtime {}
+...
+// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},
+...
+// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},
+...
+//pallet_contract_helpers::ContractHelpersExtension<Runtime>,
+...
+/*
+ impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>
+ for Runtime
+ {
+ ...
+ }
+*/
+
+```
\ No newline at end of file
launch-config-full.jsondiffbeforeafterboth--- /dev/null
+++ b/launch-config-full.json
@@ -0,0 +1,135 @@
+{
+ "relaychain": {
+ "bin": "../polkadot/target/release/polkadot",
+ "chain": "rococo-local",
+ "nodes": [
+ {
+ "name": "alice",
+ "wsPort": 9844,
+ "rpcPort": 9843,
+ "port": 30444,
+ "flags": [
+ "-lparachain::candidate_validation=debug",
+ "-lxcm=trace"
+ ]
+ },
+ {
+ "name": "bob",
+ "wsPort": 9855,
+ "rpcPort": 9854,
+ "port": 30555,
+ "flags": [
+ "-lparachain::candidate_validation=debug",
+ "-lxcm=trace"
+ ]
+ },
+ {
+ "name": "charlie",
+ "wsPort": 9866,
+ "rpcPort": 9865,
+ "port": 30666,
+ "flags": [
+ "-lparachain::candidate_validation=debug"
+ ]
+ },
+ {
+ "name": "dave",
+ "wsPort": 9877,
+ "rpcPort": 9876,
+ "port": 30777,
+ "flags": [
+ "-lparachain::candidate_validation=debug"
+ ]
+ },
+ {
+ "name": "eve",
+ "wsPort": 9888,
+ "rpcPort": 9887,
+ "port": 30888,
+ "flags": [
+ "-lparachain::candidate_validation=debug"
+ ]
+ }
+ ],
+ "genesis": {
+ "runtime": {
+ "runtime_genesis_config": {
+ "parachainsConfiguration": {
+ "config": {
+ "validation_upgrade_frequency": 1,
+ "validation_upgrade_delay": 1
+ }
+ }
+ }
+ }
+ }
+ },
+ "parachains": [
+ {
+ "bin": "../unique-chain/target/release/unique-collator",
+ "id": "1000",
+ "balance": "1000000000000000000000000",
+ "nodes": [
+ {
+ "port": 31200,
+ "wsPort": 9944,
+ "rpcPort": 9933,
+ "name": "alice",
+ "flags": [
+ "--rpc-cors=all",
+ "--unsafe-rpc-external",
+ "--unsafe-ws-external",
+ "-lxcm=trace"
+ ]
+ },
+ {
+ "port": 31201,
+ "wsPort": 9945,
+ "rpcPort": 9934,
+ "name": "bob",
+ "flags": [
+ "--rpc-cors=all",
+ "--unsafe-rpc-external",
+ "--unsafe-ws-external",
+ "-lxcm=trace"
+ ]
+ }
+ ]
+ },
+ {
+ "bin": "../Acala/target/release/acala",
+ "id": "2000",
+ "chain": "karura-dev",
+ "balance": "1000000000000000000000",
+ "nodes": [
+ {
+ "wsPort": 9946,
+ "port": 31202,
+ "name": "alice",
+ "flags": [
+ "--rpc-cors=all",
+ "--unsafe-rpc-external",
+ "--unsafe-ws-external",
+ "-lxcm=trace"
+ ]
+ }
+ ]
+ }
+ ],
+ "simpleParachains": [],
+ "hrmpChannels": [
+ {
+ "sender": 2000,
+ "recipient": 1000,
+ "maxCapacity": 8,
+ "maxMessageSize": 512
+ },
+ {
+ "sender": 1000,
+ "recipient": 2000,
+ "maxCapacity": 8,
+ "maxMessageSize": 512
+ }
+ ],
+ "finalization": false
+}
launch-config-westend.jsondiffbeforeafterboth--- a/launch-config-westend.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "relaychain": {
- "bin": "../polkadot/target/release/polkadot",
- "chain": "westend-local",
- "nodes": [
- {
- "name": "alice",
- "wsPort": 9844,
- "rpcPort": 9843,
- "port": 30444,
- "flags": [
- "-lparachain::candidate_validation=debug"
- ]
- },
- {
- "name": "bob",
- "wsPort": 9855,
- "rpcPort": 9854,
- "port": 30555,
- "flags": [
- "-lparachain::candidate_validation=debug"
- ]
- },
- {
- "name": "charlie",
- "wsPort": 9866,
- "rpcPort": 9865,
- "port": 30666,
- "flags": [
- "-lparachain::candidate_validation=debug"
- ]
- },
- {
- "name": "dave",
- "wsPort": 9877,
- "rpcPort": 9876,
- "port": 30777,
- "flags": [
- "-lparachain::candidate_validation=debug"
- ]
- },
- {
- "name": "eve",
- "wsPort": 9888,
- "rpcPort": 9886,
- "port": 30888,
- "flags": [
- "-lparachain::candidate_validation=debug"
- ]
- },
- {
- "name": "ferdie",
- "wsPort": 9897,
- "rpcPort": 9896,
- "port": 30999,
- "flags": [
- "-lparachain::candidate_validation=debug"
- ]
- }
- ],
- "genesis": {
- "runtime": {
- "runtime_genesis_config": {
- "parachainsConfiguration": {
- "config": {
- "validation_upgrade_frequency": 1,
- "validation_upgrade_delay": 1
- }
- }
- }
- }
- }
- },
- "parachains": [
- {
- "bin": "../unique-chain/target/release/unique-collator",
- "chain": "westend-local",
- "balance": "1000000000000000000000000",
- "nodes": [
- {
- "port": 31200,
- "wsPort": 9944,
- "rpcPort": 9933,
- "name": "alice",
- "flags": [
- "--rpc-cors=all",
- "--unsafe-rpc-external",
- "--unsafe-ws-external"
- ]
- },
- {
- "port": 31201,
- "wsPort": 9945,
- "rpcPort": 9934,
- "name": "bob",
- "flags": [
- "--rpc-cors=all",
- "--unsafe-rpc-external",
- "--unsafe-ws-external"
- ]
- },
- {
- "port": 31202,
- "wsPort": 9946,
- "rpcPort": 9935,
- "name": "charlie",
- "flags": [
- "--rpc-cors=all",
- "--unsafe-rpc-external",
- "--unsafe-ws-external"
- ]
- },
- {
- "port": 31203,
- "wsPort": 9947,
- "rpcPort": 9936,
- "name": "dave",
- "flags": [
- "--rpc-cors=all",
- "--unsafe-rpc-external",
- "--unsafe-ws-external"
- ]
- },
- {
- "port": 31204,
- "wsPort": 9948,
- "rpcPort": 9937,
- "name": "eve",
- "flags": [
- "--rpc-cors=all",
- "--unsafe-rpc-external",
- "--unsafe-ws-external"
- ]
- }
- ]
- }
- ],
- "simpleParachains": [],
- "hrmpChannels": [],
- "finalization": false
-}
launch-config.jsondiffbeforeafterboth--- a/launch-config.json
+++ b/launch-config.json
@@ -9,7 +9,8 @@
"rpcPort": 9843,
"port": 30444,
"flags": [
- "-lparachain::candidate_validation=debug"
+ "-lparachain::candidate_validation=debug",
+ "-lxcm=trace"
]
},
{
@@ -18,7 +19,8 @@
"rpcPort": 9854,
"port": 30555,
"flags": [
- "-lparachain::candidate_validation=debug"
+ "-lparachain::candidate_validation=debug",
+ "-lxcm=trace"
]
},
{
@@ -38,6 +40,15 @@
"flags": [
"-lparachain::candidate_validation=debug"
]
+ },
+ {
+ "name": "eve",
+ "wsPort": 9888,
+ "rpcPort": 9887,
+ "port": 30888,
+ "flags": [
+ "-lparachain::candidate_validation=debug"
+ ]
}
],
"genesis": {
@@ -67,7 +78,8 @@
"flags": [
"--rpc-cors=all",
"--unsafe-rpc-external",
- "--unsafe-ws-external"
+ "--unsafe-ws-external",
+ "-lxcm=trace"
]
},
{
@@ -78,7 +90,8 @@
"flags": [
"--rpc-cors=all",
"--unsafe-rpc-external",
- "--unsafe-ws-external"
+ "--unsafe-ws-external",
+ "-lxcm=trace"
]
}
]
launch-test-env.shdiffbeforeafterboth--- a/launch-test-env.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-cp launch-config.json ../polkadot-launch/launch-config.json
-
-cd ../polkadot-launch
-yarn install
-yarn build
-yarn start launch-config.json
launch-testnet-full.shdiffbeforeafterboth--- /dev/null
+++ b/launch-testnet-full.sh
@@ -0,0 +1,6 @@
+cp launch-config-full.json ../polkadot-launch/launch-config-full.json
+
+cd ../polkadot-launch
+yarn install
+yarn build
+yarn start launch-config-full.json
launch-testnet.shdiffbeforeafterboth--- /dev/null
+++ b/launch-testnet.sh
@@ -0,0 +1,6 @@
+cp launch-config.json ../polkadot-launch/launch-config.json
+
+cd ../polkadot-launch
+yarn install
+yarn build
+yarn start launch-config.json
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -3,7 +3,7 @@
[build-dependencies.substrate-build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
################################################################################
# Substrate Dependecies
@@ -16,150 +16,150 @@
[dependencies.frame-benchmarking]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-benchmarking-cli]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-transaction-payment-rpc]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.substrate-prometheus-endpoint]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-basic-authorship]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-chain-spec]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-cli]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-client-api]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-consensus]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-executor]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-keystore]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-rpc]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-rpc-api]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-service]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-telemetry]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-tracing]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-block-builder]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-api]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-blockchain]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-consensus]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-core]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-inherents]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-keystore]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-offchain]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-runtime]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-session]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-timestamp]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-trie]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.substrate-frame-rpc-system]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sc-network]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.serde]
features = ['derive']
@@ -173,59 +173,66 @@
# Cumulus dependencies
[dependencies.cumulus-client-consensus-aura]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-client-consensus-common]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-client-collator]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-client-cli]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-client-network]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-primitives-core]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-primitives-parachain-inherent]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-client-service]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
+[dependencies.cumulus-relay-chain-interface]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
+[dependencies.cumulus-relay-chain-local]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
+
################################################################################
# Polkadot dependencies
[dependencies.polkadot-primitives]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
[dependencies.polkadot-service]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
[dependencies.polkadot-cli]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
[dependencies.polkadot-test-service]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
[dependencies.polkadot-parachain]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
################################################################################
@@ -250,7 +257,7 @@
license = 'All Rights Reserved'
name = 'unique-node'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.14'
+version = '0.9.16'
[[bin]]
name = 'unique-collator'
@@ -268,13 +275,13 @@
jsonrpc-core = '18.0.0'
jsonrpc-pubsub = "18.0.0"
-fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
unique-rpc = { path = "../rpc" }
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -85,6 +85,7 @@
None,
// Protocol ID
None,
+ None,
// Properties
Some(properties),
// Extensions
@@ -134,6 +135,7 @@
None,
// Protocol ID
None,
+ None,
// Properties
None,
// Extensions
@@ -186,6 +188,7 @@
None,
// Protocol ID
None,
+ None,
// Properties
None,
// Extensions
@@ -217,7 +220,9 @@
.collect(),
},
treasury: Default::default(),
- sudo: SudoConfig { key: root_key },
+ sudo: SudoConfig {
+ key: Some(root_key),
+ },
vesting: VestingConfig { vesting: vec![] },
parachain_info: unique_runtime::ParachainInfoConfig { parachain_id: id },
parachain_system: Default::default(),
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -40,6 +40,7 @@
fn load_spec(id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
Ok(match id {
"westend-local" => Box::new(chain_spec::local_testnet_westend_config()),
+ "rococo-local" => Box::new(chain_spec::local_testnet_rococo_config()),
"dev" => Box::new(chain_spec::development_config()),
"" | "local" => Box::new(chain_spec::local_testnet_rococo_config()),
path => Box::new(chain_spec::ChainSpec::from_json_file(
@@ -213,8 +214,9 @@
builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
let _ = builder.init();
- let block: Block =
- generate_genesis_block(&load_spec(¶ms.chain.clone().unwrap_or_default())?)?;
+ let spec = load_spec(¶ms.chain.clone().unwrap_or_default())?;
+ let state_version = Cli::native_runtime_version(&spec).state_version();
+ let block: Block = generate_genesis_block(&spec, state_version)?;
let raw_header = block.header().encode();
let output_buf = if params.raw {
raw_header
@@ -282,9 +284,12 @@
let parachain_account =
AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&id);
- let block: Block =
- generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
+ let state_version =
+ RelayChainCli::native_runtime_version(&config.chain_spec).state_version();
+ let block: Block = generate_genesis_block(&config.chain_spec, state_version)
+ .map_err(|e| format!("{:?}", e))?;
let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));
+ let genesis_hash = format!("0x{:?}", HexDisplay::from(&block.header().hash().0));
let polkadot_config = SubstrateCli::create_configuration(
&polkadot_cli,
@@ -296,6 +301,7 @@
info!("Parachain id: {:?}", id);
info!("Parachain Account: {}", parachain_account);
info!("Parachain genesis state: {}", genesis_state);
+ info!("Parachain genesis hash: {}", genesis_hash);
info!(
"Is collating: {}",
if config.role.is_authority() {
@@ -368,11 +374,23 @@
self.base.base.rpc_ws(default_listen_port)
}
- fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {
- self.base.base.prometheus_config(default_listen_port)
+ fn prometheus_config(
+ &self,
+ default_listen_port: u16,
+ chain_spec: &Box<dyn ChainSpec>,
+ ) -> Result<Option<PrometheusConfig>> {
+ self.base
+ .base
+ .prometheus_config(default_listen_port, chain_spec)
}
- fn init<C: SubstrateCli>(&self) -> Result<()> {
+ fn init<F>(
+ &self,
+ _support_url: &String,
+ _impl_version: &String,
+ _logger_hook: F,
+ _config: &sc_service::Configuration,
+ ) -> Result<()> {
unreachable!("PolkadotCli is never initialized; qed");
}
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -10,19 +10,23 @@
use std::sync::Mutex;
use std::collections::BTreeMap;
use std::time::Duration;
+use fc_rpc_core::types::FeeHistoryCache;
use futures::StreamExt;
+use unique_rpc::overrides_handle;
// Local Runtime Types
use unique_runtime::RuntimeApi;
// Cumulus Imports
-use cumulus_client_consensus_aura::{build_aura_consensus, BuildAuraConsensusParams, SlotProportion};
+use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion};
use cumulus_client_consensus_common::ParachainConsensus;
-use cumulus_client_network::build_block_announce_validator;
use cumulus_client_service::{
prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
};
+use cumulus_client_network::BlockAnnounceValidator;
use cumulus_primitives_core::ParaId;
+use cumulus_relay_chain_interface::RelayChainInterface;
+use cumulus_relay_chain_local::build_relay_chain_interface;
// Substrate Imports
use sc_client_api::ExecutorProvider;
@@ -109,6 +113,7 @@
Option<FilterPool>,
Arc<fc_db::Backend<Block>>,
Option<TelemetryWorkerHandle>,
+ FeeHistoryCache,
),
>,
sc_service::Error,
@@ -149,6 +154,7 @@
config.wasm_method,
config.default_heap_pages,
config.max_runtime_instances,
+ config.runtime_cache_size,
);
let (client, backend, keystore_container, task_manager) =
@@ -188,6 +194,7 @@
telemetry.as_ref().map(|telemetry| telemetry.handle()),
&task_manager,
)?;
+ let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));
let params = PartialComponents {
backend,
@@ -202,6 +209,7 @@
filter_pool,
frontier_backend,
telemetry_worker_handle,
+ fee_history_cache,
),
};
@@ -233,7 +241,7 @@
Option<&Registry>,
Option<TelemetryHandle>,
&TaskManager,
- &polkadot_service::NewFull<polkadot_service::Client>,
+ Arc<dyn RelayChainInterface>,
Arc<sc_transaction_pool::FullPool<Block, FullClient>>,
Arc<NetworkService<Block, Hash>>,
SyncCryptoStorePtr,
@@ -247,29 +255,26 @@
let parachain_config = prepare_node_config(parachain_config);
let params = new_partial::<BIQ>(¶chain_config, build_import_queue)?;
- let (mut telemetry, filter_pool, frontier_backend, telemetry_worker_handle) = params.other;
+ let (mut telemetry, filter_pool, frontier_backend, telemetry_worker_handle, fee_history_cache) =
+ params.other;
+
+ let client = params.client.clone();
+ let backend = params.backend.clone();
+ let mut task_manager = params.task_manager;
- let relay_chain_full_node =
- cumulus_client_service::build_polkadot_full_node(polkadot_config, telemetry_worker_handle)
+ let (relay_chain_interface, collator_key) =
+ build_relay_chain_interface(polkadot_config, telemetry_worker_handle, &mut task_manager)
.map_err(|e| match e {
polkadot_service::Error::Sub(x) => x,
s => format!("{}", s).into(),
})?;
- let client = params.client.clone();
- let backend = params.backend.clone();
- let block_announce_validator = build_block_announce_validator(
- relay_chain_full_node.client.clone(),
- id,
- Box::new(relay_chain_full_node.network.clone()),
- relay_chain_full_node.backend.clone(),
- );
+ let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id);
let force_authoring = parachain_config.force_authoring;
let validator = parachain_config.role.is_authority();
let prometheus_registry = parachain_config.prometheus_registry().cloned();
let transaction_pool = params.transaction_pool.clone();
- let mut task_manager = params.task_manager;
let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
let (network, system_rpc_tx, start_network) =
@@ -279,7 +284,9 @@
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
import_queue: import_queue.clone(),
- block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),
+ block_announce_validator_builder: Some(Box::new(|_| {
+ Box::new(block_announce_validator)
+ })),
warp_sync: None,
})?;
@@ -287,10 +294,17 @@
let rpc_client = client.clone();
let rpc_pool = transaction_pool.clone();
let select_chain = params.select_chain.clone();
- let is_authority = parachain_config.role.clone().is_authority();
let rpc_network = network.clone();
let rpc_frontier_backend = frontier_backend.clone();
+
+ let block_data_cache = Arc::new(fc_rpc::EthBlockDataCache::new(
+ task_manager.spawn_handle(),
+ overrides_handle(client.clone()),
+ 50,
+ 50,
+ ));
+
let rpc_extensions_builder = Box::new(move |deny_unsafe, _| {
let full_deps = unique_rpc::FullDeps {
backend: rpc_frontier_backend.clone(),
@@ -303,9 +317,13 @@
filter_pool: filter_pool.clone(),
network: rpc_network.clone(),
select_chain: select_chain.clone(),
- is_authority,
+ is_authority: validator,
// TODO: Unhardcode
max_past_logs: 10000,
+ block_data_cache: block_data_cache.clone(),
+ fee_history_cache: fee_history_cache.clone(),
+ // TODO: Unhardcode
+ fee_history_limit: 2048,
};
Ok(unique_rpc::create_full::<_, _, _, _, RuntimeApi, _>(
@@ -346,13 +364,15 @@
Arc::new(move |hash, data| network.announce_block(hash, data))
};
+ let relay_chain_slot_duration = Duration::from_secs(6);
+
if validator {
let parachain_consensus = build_consensus(
client.clone(),
prometheus_registry.as_ref(),
telemetry.as_ref().map(|t| t.handle()),
&task_manager,
- &relay_chain_full_node,
+ relay_chain_interface.clone(),
transaction_pool,
network,
params.keystore_container.sync_keystore(),
@@ -367,10 +387,12 @@
announce_block,
client: client.clone(),
task_manager: &mut task_manager,
- relay_chain_full_node,
spawner,
parachain_consensus,
import_queue,
+ collator_key,
+ relay_chain_interface,
+ relay_chain_slot_duration,
};
start_collator(params).await?;
@@ -380,7 +402,9 @@
announce_block,
task_manager: &mut task_manager,
para_id: id,
- relay_chain_full_node,
+ import_queue,
+ relay_chain_interface,
+ relay_chain_slot_duration,
};
start_full_node(params)?;
@@ -445,7 +469,7 @@
prometheus_registry,
telemetry,
task_manager,
- relay_chain_node,
+ relay_chain_interface,
transaction_pool,
sync_oracle,
keystore,
@@ -460,31 +484,27 @@
telemetry.clone(),
);
- let relay_chain_backend = relay_chain_node.backend.clone();
- let relay_chain_client = relay_chain_node.client.clone();
- Ok(build_aura_consensus::<
+ Ok(AuraConsensus::build::<
sp_consensus_aura::sr25519::AuthorityPair,
- _,
- _,
_,
_,
_,
_,
_,
_,
- _,
>(BuildAuraConsensusParams {
proposer_factory,
create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
- let parachain_inherent =
- cumulus_primitives_parachain_inherent::ParachainInherentData::create_at_with_client(
- relay_parent,
- &relay_chain_client,
- &*relay_chain_backend,
- &validation_data,
- id,
- );
+ let relay_chain_interface = relay_chain_interface.clone();
async move {
+ let parachain_inherent =
+ cumulus_primitives_parachain_inherent::ParachainInherentData::create_at(
+ relay_parent,
+ &relay_chain_interface,
+ &validation_data,
+ id,
+ ).await;
+
let time = sp_timestamp::InherentDataProvider::from_system_time();
let slot =
@@ -502,8 +522,6 @@
}
},
block_import: client.clone(),
- relay_chain_client: relay_chain_node.client.clone(),
- relay_chain_backend: relay_chain_node.backend.clone(),
para_client: client,
backoff_authoring_blocks: Option::<()>::None,
sync_oracle,
node/rpc/Cargo.tomldiffbeforeafterboth--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -13,40 +13,40 @@
futures = { version = "0.3.17", features = ["compat"] }
jsonrpc-core = "18.0.0"
jsonrpc-pubsub = "18.0.0"
-# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
tokio = { version = "0.2.25", features = ["macros", "sync"] }
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
pallet-unique = { path = "../../pallets/unique" }
uc-rpc = { path = "../../client/rpc" }
node/rpc/src/lib.rsdiffbeforeafterboth--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -1,13 +1,16 @@
+use sp_runtime::traits::BlakeTwo256;
use unique_runtime::{Hash, AccountId, CrossAccountId, Index, opaque::Block, BlockNumber, Balance};
use fc_rpc::{
- EthBlockDataCache, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, StorageOverride,
+ EthBlockDataCache, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,
+ StorageOverride, SchemaV2Override, SchemaV3Override,
};
-use fc_rpc_core::types::FilterPool;
+use fc_rpc_core::types::{FilterPool, FeeHistoryCache};
use jsonrpc_pubsub::manager::SubscriptionManager;
use pallet_ethereum::EthereumStorageSchema;
use sc_client_api::{
backend::{AuxStore, StorageProvider},
client::BlockchainEvents,
+ StateBackend, Backend,
};
use sc_finality_grandpa::{
FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
@@ -19,7 +22,6 @@
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
-use sp_consensus::SelectChain;
use sc_service::TransactionPool;
use std::{collections::BTreeMap, marker::PhantomData, sync::Arc};
@@ -64,6 +66,12 @@
pub backend: Arc<fc_db::Backend<Block>>,
/// Maximum number of logs in a query.
pub max_past_logs: u32,
+ /// Maximum fee history cache size.
+ pub fee_history_limit: u64,
+ /// Fee history cache.
+ pub fee_history_cache: FeeHistoryCache,
+ /// Cache for Ethereum block data.
+ pub block_data_cache: Arc<EthBlockDataCache<Block>>,
}
struct AccountCodes<C, B> {
@@ -100,6 +108,41 @@
}
}
+pub fn overrides_handle<C, BE>(client: Arc<C>) -> Arc<OverrideHandle<Block>>
+where
+ C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,
+ C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,
+ C: Send + Sync + 'static,
+ C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
+ C::Api: up_rpc::UniqueApi<Block, CrossAccountId, AccountId>,
+ BE: Backend<Block> + 'static,
+ BE::State: StateBackend<BlakeTwo256>,
+{
+ let mut overrides_map = BTreeMap::new();
+ overrides_map.insert(
+ EthereumStorageSchema::V1,
+ Box::new(SchemaV1Override::new_with_code_provider(
+ client.clone(),
+ Arc::new(AccountCodes::<C, Block>::new(client.clone())),
+ )) as Box<dyn StorageOverride<_> + Send + Sync>,
+ );
+ overrides_map.insert(
+ EthereumStorageSchema::V2,
+ Box::new(SchemaV2Override::new(client.clone()))
+ as Box<dyn StorageOverride<_> + Send + Sync>,
+ );
+ overrides_map.insert(
+ EthereumStorageSchema::V3,
+ Box::new(SchemaV3Override::new(client.clone()))
+ as Box<dyn StorageOverride<_> + Send + Sync>,
+ );
+
+ Arc::new(OverrideHandle {
+ schemas: overrides_map,
+ fallback: Box::new(RuntimeApiStorageOverride::new(client)),
+ })
+}
+
/// Instantiate all Full RPC extensions.
pub fn create_full<C, P, SC, CA, A, B>(
deps: FullDeps<C, P, SC, CA>,
@@ -118,7 +161,6 @@
C::Api: up_rpc::UniqueApi<Block, CrossAccountId, AccountId>,
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,
- SC: SelectChain<Block> + 'static,
P: TransactionPool<Block = Block> + 'static,
CA: ChainApi<Block = Block> + 'static,
{
@@ -138,6 +180,9 @@
pool,
graph,
select_chain: _,
+ fee_history_limit,
+ fee_history_cache,
+ block_data_cache,
enable_dev_signer,
is_authority,
network,
@@ -163,21 +208,8 @@
if enable_dev_signer {
signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);
}
- let mut overrides_map = BTreeMap::new();
- overrides_map.insert(
- EthereumStorageSchema::V1,
- Box::new(SchemaV1Override::new_with_code_provider(
- client.clone(),
- Arc::new(AccountCodes::<C, Block>::new(client.clone())),
- )) as Box<dyn StorageOverride<_> + Send + Sync>,
- );
- let overrides = Arc::new(OverrideHandle {
- schemas: overrides_map,
- fallback: Box::new(RuntimeApiStorageOverride::new(client.clone())),
- });
-
- let block_data_cache = Arc::new(EthBlockDataCache::new(50, 50));
+ let overrides = overrides_handle(client.clone());
io.extend_with(EthApiServer::to_delegate(EthApi::new(
client.clone(),
@@ -191,6 +223,8 @@
is_authority,
max_past_logs,
block_data_cache.clone(),
+ fee_history_limit,
+ fee_history_cache,
)));
io.extend_with(UniqueApi::to_delegate(Unique::new(client.clone())));
@@ -200,7 +234,6 @@
backend,
filter_pool,
500_usize, // max stored filters
- overrides.clone(),
max_past_logs,
block_data_cache,
)));
pallets/common/Cargo.tomldiffbeforeafterboth--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -10,16 +10,16 @@
version = '2.0.0'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
up-evm-mapping = { default-features = false, path = '../../primitives/evm-mapping' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
serde = { version = "1.0.130", default-features = false }
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
pallets/common/src/account.rsdiffbeforeafterboth--- a/pallets/common/src/account.rs
+++ b/pallets/common/src/account.rs
@@ -1,5 +1,5 @@
use crate::Config;
-use codec::{Encode, EncodeLike, Decode};
+use codec::{Encode, EncodeLike, Decode, MaxEncodedLen};
use sp_core::H160;
use scale_info::{Type, TypeInfo};
use core::cmp::Ordering;
@@ -10,7 +10,7 @@
pub use up_evm_mapping::EvmBackwardsAddressMapping;
pub trait CrossAccountId<AccountId>:
- Encode + EncodeLike + Decode + TypeInfo + Clone + PartialEq + Ord + core::fmt::Debug + Default
+ Encode + EncodeLike + Decode + TypeInfo + MaxEncodedLen + Clone + PartialEq + Ord + core::fmt::Debug
// +
// Serialize + Deserialize<'static>
{
@@ -23,7 +23,7 @@
fn conv_eq(&self, other: &Self) -> bool;
}
-#[derive(Encode, Decode, Serialize, Deserialize, TypeInfo)]
+#[derive(Encode, Decode, Serialize, Deserialize, TypeInfo, MaxEncodedLen)]
#[serde(rename_all = "camelCase")]
enum BasicCrossAccountIdRepr<AccountId> {
Substrate(AccountId),
@@ -38,17 +38,17 @@
ethereum: H160,
}
+impl<T: Config> MaxEncodedLen for BasicCrossAccountId<T> {
+ fn max_encoded_len() -> usize {
+ <BasicCrossAccountIdRepr<T::AccountId>>::max_encoded_len()
+ }
+}
+
impl<T: Config> TypeInfo for BasicCrossAccountId<T> {
type Identity = Self;
fn type_info() -> Type {
<BasicCrossAccountIdRepr<T::AccountId>>::type_info()
- }
-}
-
-impl<T: Config> Default for BasicCrossAccountId<T> {
- fn default() -> Self {
- Self::from_sub(T::AccountId::default())
}
}
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -8,13 +8,13 @@
dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo},
ensure, fail,
traits::{Imbalance, Get, Currency},
+ BoundedVec,
};
use pallet_evm::GasWeightMapping;
use up_data_structs::{
COLLECTION_NUMBER_LIMIT, Collection, CollectionId, CreateItemData, ExistenceRequirement,
- MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
- COLLECTION_ADMINS_LIMIT, MetaUpdatePermission, Pays, PostDispatchInfo, TokenId, Weight,
- WithdrawReasons, CollectionStats,
+ MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission, Pays, PostDispatchInfo,
+ TokenId, Weight, WithdrawReasons, CollectionStats, CustomDataLimit,
};
pub use pallet::*;
use sp_core::H160;
@@ -53,8 +53,11 @@
pub fn try_get(id: CollectionId) -> Result<Self, DispatchError> {
Ok(Self::new(id).ok_or(<Error<T>>::CollectionNotFound)?)
}
- pub fn log(&self, log: impl evm_coder::ToLog) {
- self.recorder.log(log)
+ pub fn log_mirrored(&self, log: impl evm_coder::ToLog) {
+ self.recorder.log_mirrored(log)
+ }
+ pub fn log_direct(&self, log: impl evm_coder::ToLog) {
+ self.recorder.log_direct(log)
}
pub fn consume_store_reads(&self, reads: u64) -> evm_coder::execution::Result<()> {
self.recorder
@@ -395,15 +398,7 @@
pub fn init_collection(data: Collection<T::AccountId>) -> Result<CollectionId, DispatchError> {
{
ensure!(
- data.name.len() <= MAX_COLLECTION_NAME_LENGTH,
- Error::<T>::CollectionNameLimitExceeded
- );
- ensure!(
- data.description.len() <= MAX_COLLECTION_DESCRIPTION_LENGTH,
- Error::<T>::CollectionDescriptionLimitExceeded
- );
- ensure!(
- data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH,
+ data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,
Error::<T>::CollectionTokenPrefixLimitExceeded
);
}
@@ -607,14 +602,14 @@
&self,
sender: T::CrossAccountId,
token: TokenId,
- data: Vec<u8>,
+ data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResultWithPostInfo;
fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;
fn token_exists(&self, token: TokenId) -> bool;
fn last_token_id(&self) -> TokenId;
- fn token_owner(&self, token: TokenId) -> T::CrossAccountId;
+ fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId>;
fn const_metadata(&self, token: TokenId) -> Vec<u8>;
fn variable_metadata(&self, token: TokenId) -> Vec<u8>;
pallets/contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/contract-helpers/Cargo.toml
+++ /dev/null
@@ -1,29 +0,0 @@
-[package]
-name = "pallet-contract-helpers"
-version = "0.1.0"
-edition = "2021"
-
-[dependencies.codec]
-default-features = false
-features = ['derive']
-package = 'parity-scale-codec'
-version = '2.3.0'
-
-[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-contracts = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
-
-[features]
-default = ["std"]
-std = [
- "frame-support/std",
- "frame-system/std",
- "pallet-contracts/std",
- "sp-runtime/std",
- "sp-std/std",
-]
pallets/contract-helpers/src/lib.rsdiffbeforeafterboth--- a/pallets/contract-helpers/src/lib.rs
+++ /dev/null
@@ -1,285 +0,0 @@
-#![cfg_attr(not(feature = "std"), no_std)]
-
-pub use pallet::*;
-
-#[frame_support::pallet]
-pub mod pallet {
- use frame_support::sp_runtime::traits::StaticLookup;
- use frame_support::{pallet_prelude::*, traits::IsSubType};
- use frame_system::pallet_prelude::*;
- use frame_system::Config as SysConfig;
- use pallet_contracts::chain_extension::UncheckedFrom;
- use sp_runtime::{
- traits::{DispatchInfoOf, Hash, PostDispatchInfoOf, SignedExtension},
- transaction_validity,
- };
- use sp_std::vec::Vec;
- use up_sponsorship::SponsorshipHandler;
-
- #[pallet::error]
- pub enum Error<T> {
- /// Should be contract owner
- NoPermission,
- }
-
- #[pallet::config]
- pub trait Config: frame_system::Config + pallet_contracts::Config {
- type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;
- }
-
- #[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
- pub struct Pallet<T>(_);
-
- #[pallet::storage]
- pub(super) type Owner<T: Config> = StorageMap<
- Hasher = Twox128,
- Key = T::AccountId,
- Value = T::AccountId,
- QueryKind = ValueQuery,
- >;
-
- #[pallet::storage]
- pub(super) type AllowlistEnabled<T: Config> =
- StorageMap<Hasher = Twox128, Key = T::AccountId, Value = bool, QueryKind = ValueQuery>;
-
- #[pallet::storage]
- pub(super) type Allowlist<T: Config> = StorageDoubleMap<
- Hasher1 = Twox128,
- Key1 = T::AccountId,
- Hasher2 = Twox64Concat,
- Key2 = T::AccountId,
- Value = bool,
- QueryKind = ValueQuery,
- >;
-
- #[pallet::storage]
- pub(super) type SelfSponsoring<T: Config> =
- StorageMap<Hasher = Twox128, Key = T::AccountId, Value = bool, QueryKind = ValueQuery>;
-
- #[pallet::storage]
- pub(super) type SponsoringRateLimit<T: Config> = StorageMap<
- Hasher = Twox128,
- Key = T::AccountId,
- Value = T::BlockNumber,
- QueryKind = ValueQuery,
- OnEmpty = T::DefaultSponsoringRateLimit,
- >;
-
- #[pallet::storage]
- pub(super) type SponsorBasket<T: Config> = StorageDoubleMap<
- Hasher1 = Twox128,
- Key1 = T::AccountId,
- Hasher2 = Twox128,
- Key2 = T::AccountId,
- Value = T::BlockNumber,
- QueryKind = ValueQuery,
- >;
-
- impl<T: Config> Pallet<T> {
- pub fn allowed(contract: T::AccountId, user: T::AccountId, default: bool) -> bool {
- if !<AllowlistEnabled<T>>::get(&contract) {
- return default;
- }
- <Allowlist<T>>::get(&contract, &user) || <Owner<T>>::get(contract) == user
- }
- }
-
- #[pallet::call]
- impl<T: Config> Pallet<T> {
- #[pallet::weight(0)]
- pub fn toggle_sponsoring(
- origin: OriginFor<T>,
- contract: T::AccountId,
- sponsoring: bool,
- ) -> DispatchResult {
- let sender = ensure_signed(origin)?;
- ensure!(
- <Owner<T>>::get(&contract) == sender,
- <Error<T>>::NoPermission
- );
-
- if sponsoring {
- <SelfSponsoring<T>>::insert(contract, true);
- } else {
- <SelfSponsoring<T>>::remove(contract);
- }
- Ok(())
- }
-
- #[pallet::weight(0)]
- pub fn toggle_allowlist(
- origin: OriginFor<T>,
- contract: T::AccountId,
- enabled: bool,
- ) -> DispatchResult {
- let sender = ensure_signed(origin)?;
- ensure!(
- <Owner<T>>::get(&contract) == sender,
- <Error<T>>::NoPermission
- );
-
- if enabled {
- <AllowlistEnabled<T>>::insert(contract, true);
- } else {
- <AllowlistEnabled<T>>::remove(contract);
- }
- Ok(())
- }
-
- #[pallet::weight(0)]
- pub fn toggle_allowed(
- origin: OriginFor<T>,
- contract: T::AccountId,
- user: T::AccountId,
- allowed: bool,
- ) -> DispatchResult {
- let sender = ensure_signed(origin)?;
- ensure!(
- <Owner<T>>::get(&contract) == sender,
- <Error<T>>::NoPermission
- );
-
- if allowed {
- <Allowlist<T>>::insert(contract, user, true);
- } else {
- <Allowlist<T>>::remove(contract, user);
- }
- Ok(())
- }
-
- #[pallet::weight(0)]
- pub fn set_sponsoring_rate_limit(
- origin: OriginFor<T>,
- contract: T::AccountId,
- rate_limit: T::BlockNumber,
- ) -> DispatchResult {
- let sender = ensure_signed(origin)?;
- ensure!(
- <Owner<T>>::get(&contract) == sender,
- <Error<T>>::NoPermission
- );
-
- <SponsoringRateLimit<T>>::insert(contract, rate_limit);
- Ok(())
- }
- }
-
- #[derive(Encode, Decode, Clone, PartialEq, Eq, scale_info::TypeInfo)]
- pub struct ContractHelpersExtension<T: scale_info::TypeInfo>(PhantomData<T>);
- impl<T: scale_info::TypeInfo> core::fmt::Debug for ContractHelpersExtension<T> {
- fn fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
- fmt.debug_struct("ContractHelpersExtension").finish()
- }
- }
-
- type CodeHash<T> = <T as frame_system::Config>::Hash;
- impl<T: scale_info::TypeInfo> SignedExtension for ContractHelpersExtension<T>
- where
- T: Config + Send + Sync,
- <T as SysConfig>::Call: sp_runtime::traits::Dispatchable,
- <T as SysConfig>::Call: IsSubType<pallet_contracts::Call<T>>,
- T::AccountId: UncheckedFrom<T::Hash>,
- T::AccountId: AsRef<[u8]>,
- {
- const IDENTIFIER: &'static str = "ContractHelpers";
- type AccountId = T::AccountId;
- type Call = <T as SysConfig>::Call;
- type AdditionalSigned = ();
- type Pre = Option<(Self::AccountId, CodeHash<T>, Vec<u8>)>;
-
- fn additional_signed(&self) -> Result<(), transaction_validity::TransactionValidityError> {
- Ok(())
- }
-
- fn validate(
- &self,
- who: &T::AccountId,
- call: &Self::Call,
- _info: &DispatchInfoOf<Self::Call>,
- _len: usize,
- ) -> transaction_validity::TransactionValidity {
- if let Some(pallet_contracts::Call::call {
- dest,
- value: _value,
- gas_limit: _gas_limit,
- data: _data,
- }) = IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call)
- {
- let called_contract: T::AccountId =
- T::Lookup::lookup((*dest).clone()).unwrap_or_default();
- if !<Pallet<T>>::allowed(called_contract, who.clone(), true) {
- return Err(transaction_validity::InvalidTransaction::Call.into());
- }
- }
- Ok(transaction_validity::ValidTransaction::default())
- }
-
- fn pre_dispatch(
- self,
- who: &Self::AccountId,
- call: &Self::Call,
- _info: &DispatchInfoOf<Self::Call>,
- _len: usize,
- ) -> Result<Self::Pre, TransactionValidityError> {
- match IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call) {
- Some(pallet_contracts::Call::instantiate {
- code_hash, salt, ..
- }) => Ok(Some((who.clone(), *code_hash, salt.clone()))),
- Some(pallet_contracts::Call::instantiate_with_code { code, salt, .. }) => {
- let code_hash = &T::Hashing::hash(code);
- Ok(Some((who.clone(), *code_hash, salt.clone())))
- }
- _ => Ok(None),
- }
- }
-
- fn post_dispatch(
- pre: Self::Pre,
- _info: &DispatchInfoOf<Self::Call>,
- _post_info: &PostDispatchInfoOf<Self::Call>,
- _len: usize,
- _result: &DispatchResult,
- ) -> Result<(), TransactionValidityError> {
- if let Some((who, code_hash, salt)) = pre {
- let new_contract_address =
- <pallet_contracts::Pallet<T>>::contract_address(&who, &code_hash, &salt);
- <Owner<T>>::insert(&new_contract_address, &who);
- }
-
- Ok(())
- }
- }
-
- pub struct ContractSponsorshipHandler<T>(PhantomData<T>);
- impl<T, C> SponsorshipHandler<T::AccountId, C> for ContractSponsorshipHandler<T>
- where
- T: Config,
- C: IsSubType<pallet_contracts::Call<T>>,
- T::AccountId: UncheckedFrom<T::Hash>,
- T::AccountId: AsRef<[u8]>,
- {
- fn get_sponsor(who: &T::AccountId, call: &C) -> Option<T::AccountId> {
- if let Some(pallet_contracts::Call::call { dest, .. }) =
- IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call)
- {
- let called_contract: T::AccountId =
- T::Lookup::lookup((*dest).clone()).unwrap_or_default();
- if <SelfSponsoring<T>>::get(&called_contract)
- && <Pallet<T>>::allowed(called_contract.clone(), who.clone(), false)
- {
- let last_tx_block = SponsorBasket::<T>::get(&called_contract, &who);
- let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
- let rate_limit = SponsoringRateLimit::<T>::get(&called_contract);
- let limit_time = last_tx_block + rate_limit;
-
- if block_number >= limit_time {
- SponsorBasket::<T>::insert(&called_contract, who, block_number);
- return Some(called_contract);
- }
- }
- }
- None
- }
- }
-}
pallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -7,15 +7,15 @@
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-ethereum = { version = "0.10.0", default-features = false }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+ethereum = { version = "0.11.1", default-features = false }
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
[dependencies.codec]
default-features = false
pallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-coder-substrate/src/lib.rs
+++ b/pallets/evm-coder-substrate/src/lib.rs
@@ -21,7 +21,7 @@
use frame_support::{ensure};
use pallet_evm::{
ExitError, ExitRevert, ExitSucceed, GasWeightMapping, PrecompileFailure, PrecompileOutput,
- PrecompileResult,
+ PrecompileResult, runner::stack::MaybeMirroredLog,
};
use frame_system::ensure_signed;
pub use frame_support::dispatch::DispatchResult;
@@ -29,7 +29,7 @@
use sp_std::cell::RefCell;
use sp_std::vec::Vec;
use sp_core::{H160, H256};
- use ethereum::Log;
+ use ethereum::TransactionV2;
use frame_support::{pallet_prelude::*, traits::PalletInfo};
use frame_system::pallet_prelude::*;
@@ -66,9 +66,9 @@
pub const G_SLOAD_WORD: u64 = 800;
pub const G_SSTORE_WORD: u64 = 20000;
- pub fn generate_transaction() -> ethereum::TransactionV0 {
+ pub fn generate_transaction() -> TransactionV2 {
use ethereum::{TransactionV0, TransactionAction, TransactionSignature};
- TransactionV0 {
+ TransactionV2::Legacy(TransactionV0 {
nonce: 0.into(),
gas_price: 0.into(),
gas_limit: 0.into(),
@@ -78,13 +78,13 @@
input: Vec::from([0, 0, 0, 0]),
// if v is not 27 - then we need to pass some other validity checks
signature: TransactionSignature::new(27, H256([0x88; 32]), H256([0x88; 32])).unwrap(),
- }
+ })
}
#[derive(Default)]
pub struct SubstrateRecorder<T: Config> {
contract: H160,
- logs: RefCell<Vec<Log>>,
+ logs: RefCell<Vec<MaybeMirroredLog>>,
initial_gas: u64,
gas_limit: RefCell<u64>,
_phantom: PhantomData<*const T>,
@@ -104,13 +104,19 @@
pub fn is_empty(&self) -> bool {
self.logs.borrow().is_empty()
}
- // TODO: Replace with real storage in pallet-ethereum,
- // same way as it is done with frame_system's Events
- /// Doesn't consumes any gas, should be used after consume_log_sub
- pub fn log(&self, log: impl ToLog) {
- self.logs.borrow_mut().push(log.to_log(self.contract));
+ // Logs emitted with log_direct appear as substrate evm.Log event
+ pub fn log_direct(&self, log: impl ToLog) {
+ self.logs
+ .borrow_mut()
+ .push(MaybeMirroredLog::direct(log.to_log(self.contract)))
+ }
+ /// If log already has substrate equivalent - then we don't need to emit evm.Log
+ pub fn log_mirrored(&self, log: impl ToLog) {
+ self.logs
+ .borrow_mut()
+ .push(MaybeMirroredLog::mirrored(log.to_log(self.contract)))
}
- pub fn retrieve_logs(self) -> Vec<Log> {
+ pub fn retrieve_logs(self) -> Vec<MaybeMirroredLog> {
self.logs.into_inner()
}
@@ -165,7 +171,8 @@
Ok(Some(v)) => Ok(PrecompileOutput {
exit_status: ExitSucceed::Returned,
cost: self.initial_gas - self.gas_left(),
- logs: self.retrieve_logs(),
+ // TODO: preserve mirroring status
+ logs: self.retrieve_logs().into_iter().map(|l| l.log).collect(),
output: v.finish(),
}),
Ok(None) => return None,
pallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -7,15 +7,15 @@
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
log = "0.4.14"
[dependencies.codec]
pallets/evm-migration/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -7,15 +7,15 @@
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
[dependencies.codec]
default-features = false
pallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -7,16 +7,16 @@
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
[dependencies.codec]
pallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -100,6 +100,10 @@
already_withdrawn.map(|e| e.negative_imbalance),
)
}
+
+ fn pay_priority_fee(tip: U256) {
+ <EVMCurrencyAdapter<<T as Config>::Currency, ()> as pallet_evm::OnChargeEVMTransaction<T>>::pay_priority_fee(tip)
+ }
}
/// Implements sponsoring for evm calls performed from pallet-evm (via api.tx.ethereum.transact/api.tx.evm.call)
pallets/fungible/Cargo.tomldiffbeforeafterboth--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -10,17 +10,17 @@
version = '2.0.0'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
pallet-common = { default-features = false, path = '../common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }
-ethereum = { version = "0.10.0", default-features = false }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+ethereum = { version = "0.11.1", default-features = false }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
pallets/fungible/src/common.rsdiffbeforeafterboth--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -1,10 +1,11 @@
use core::marker::PhantomData;
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight};
+use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
use up_data_structs::TokenId;
use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
use sp_runtime::ArithmeticError;
use sp_std::{vec::Vec, vec};
+use up_data_structs::CustomDataLimit;
use crate::{
Allowance, Balance, Config, Error, FungibleHandle, Pallet, SelfWeightOf, weights::WeightInfo,
@@ -180,7 +181,7 @@
&self,
_sender: T::CrossAccountId,
_token: TokenId,
- _data: Vec<u8>,
+ _data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResultWithPostInfo {
fail!(<Error<T>>::FungibleItemsDontHaveData)
}
@@ -201,8 +202,8 @@
TokenId::default()
}
- fn token_owner(&self, _token: TokenId) -> T::CrossAccountId {
- T::CrossAccountId::default()
+ fn token_owner(&self, _token: TokenId) -> Option<T::CrossAccountId> {
+ None
}
fn const_metadata(&self, _token: TokenId) -> Vec<u8> {
Vec::new()
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -145,7 +145,7 @@
}
<TotalSupply<T>>::insert(collection.id, total_supply);
- collection.log(ERC20Events::Transfer {
+ collection.log_mirrored(ERC20Events::Transfer {
from: *owner.as_eth(),
to: H160::default(),
value: amount.into(),
@@ -201,7 +201,7 @@
<Balance<T>>::insert((collection.id, to), balance_to);
}
- collection.log(ERC20Events::Transfer {
+ collection.log_mirrored(ERC20Events::Transfer {
from: *from.as_eth(),
to: *to.as_eth(),
value: amount.into(),
@@ -258,7 +258,7 @@
for (user, amount) in balances {
<Balance<T>>::insert((collection.id, &user), amount);
- collection.log(ERC20Events::Transfer {
+ collection.log_mirrored(ERC20Events::Transfer {
from: H160::default(),
to: *user.as_eth(),
value: amount.into(),
@@ -286,7 +286,7 @@
<Allowance<T>>::insert((collection.id, owner, spender), amount);
}
- collection.log(ERC20Events::Approval {
+ collection.log_mirrored(ERC20Events::Approval {
owner: *owner.as_eth(),
spender: *spender.as_eth(),
value: amount.into(),
pallets/inflation/Cargo.tomldiffbeforeafterboth--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -43,37 +43,37 @@
default-features = false
optional = true
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.serde]
default-features = false
@@ -83,17 +83,17 @@
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies]
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
pallets/inflation/src/tests.rsdiffbeforeafterboth--- a/pallets/inflation/src/tests.rs
+++ b/pallets/inflation/src/tests.rs
@@ -4,7 +4,7 @@
use frame_support::{
assert_ok, parameter_types,
- traits::{Currency, OnInitialize, Everything},
+ traits::{Currency, OnInitialize, Everything, ConstU32},
};
use frame_system::RawOrigin;
use sp_core::H256;
@@ -81,6 +81,7 @@
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = ();
+ type MaxConsumers = ConstU32<16>;
}
parameter_types! {
pallets/nonfungible/Cargo.tomldiffbeforeafterboth--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -10,17 +10,17 @@
version = '2.0.0'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
pallet-common = { default-features = false, path = '../common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }
-ethereum = { version = "0.10.0", default-features = false }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+ethereum = { version = "0.11.1", default-features = false }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
pallets/nonfungible/src/common.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -1,7 +1,7 @@
use core::marker::PhantomData;
-use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight};
-use up_data_structs::TokenId;
+use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
+use up_data_structs::{TokenId, CustomDataLimit};
use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
use sp_runtime::DispatchError;
use sp_std::vec::Vec;
@@ -188,7 +188,7 @@
&self,
sender: T::CrossAccountId,
token: TokenId,
- data: Vec<u8>,
+ data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResultWithPostInfo {
let len = data.len();
with_weight(
@@ -211,20 +211,20 @@
TokenId(<TokensMinted<T>>::get(self.id))
}
- fn token_owner(&self, token: TokenId) -> T::CrossAccountId {
- <TokenData<T>>::get((self.id, token))
- .map(|t| t.owner)
- .unwrap_or_default()
+ fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId> {
+ <TokenData<T>>::get((self.id, token)).map(|t| t.owner)
}
fn const_metadata(&self, token: TokenId) -> Vec<u8> {
<TokenData<T>>::get((self.id, token))
.map(|t| t.const_data)
.unwrap_or_default()
+ .into_inner()
}
fn variable_metadata(&self, token: TokenId) -> Vec<u8> {
<TokenData<T>>::get((self.id, token))
.map(|t| t.variable_data)
.unwrap_or_default()
+ .into_inner()
}
fn collection_tokens(&self) -> u32 {
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -338,8 +338,14 @@
let caller = T::CrossAccountId::from_eth(caller);
let token = token_id.try_into()?;
- <Pallet<T>>::set_variable_metadata(self, &caller, token, data)
- .map_err(dispatch_to_evm::<T>)?;
+ <Pallet<T>>::set_variable_metadata(
+ self,
+ &caller,
+ token,
+ data.try_into()
+ .map_err(|_| "metadata size exceeded limit")?,
+ )
+ .map_err(dispatch_to_evm::<T>)?;
Ok(())
}
@@ -349,7 +355,8 @@
Ok(<TokenData<T>>::get((self.id, token))
.ok_or("token not found")?
- .variable_data)
+ .variable_data
+ .into_inner())
}
#[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -2,9 +2,7 @@
use erc::ERC721Events;
use frame_support::{BoundedVec, ensure};
-use up_data_structs::{
- AccessMode, CUSTOM_DATA_LIMIT, Collection, CollectionId, CustomDataLimit, TokenId,
-};
+use up_data_structs::{AccessMode, Collection, CollectionId, CustomDataLimit, TokenId};
use pallet_common::{
Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, account::CrossAccountId,
};
@@ -14,7 +12,7 @@
use sp_std::{vec::Vec, vec};
use core::ops::Deref;
use sp_std::collections::btree_map::BTreeMap;
-use codec::{Encode, Decode};
+use codec::{Encode, Decode, MaxEncodedLen};
use scale_info::TypeInfo;
pub use pallet::*;
@@ -31,11 +29,11 @@
}
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
-#[derive(Encode, Decode, TypeInfo)]
-pub struct ItemData<T: Config> {
- pub const_data: Vec<u8>,
- pub variable_data: Vec<u8>,
- pub owner: T::CrossAccountId,
+#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]
+pub struct ItemData<CrossAccountId> {
+ pub const_data: BoundedVec<u8, CustomDataLimit>,
+ pub variable_data: BoundedVec<u8, CustomDataLimit>,
+ pub owner: CrossAccountId,
}
#[frame_support::pallet]
@@ -72,7 +70,7 @@
#[pallet::storage]
pub type TokenData<T: Config> = StorageNMap<
Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),
- Value = ItemData<T>,
+ Value = ItemData<T::CrossAccountId>,
QueryKind = OptionQuery,
>;
@@ -211,7 +209,7 @@
));
}
- collection.log(ERC721Events::Transfer {
+ collection.log_mirrored(ERC721Events::Transfer {
from: *token_data.owner.as_eth(),
to: H160::default(),
token_id: token.into(),
@@ -291,7 +289,7 @@
}
Self::set_allowance_unchecked(collection, from, token, None, true);
- collection.log(ERC721Events::Transfer {
+ collection.log_mirrored(ERC721Events::Transfer {
from: *from.as_eth(),
to: *to.as_eth(),
token_id: token.into(),
@@ -361,14 +359,14 @@
<TokenData<T>>::insert(
(collection.id, token),
ItemData {
- const_data: data.const_data.into(),
- variable_data: data.variable_data.into(),
+ const_data: data.const_data,
+ variable_data: data.variable_data,
owner: data.owner.clone(),
},
);
<Owned<T>>::insert((collection.id, &data.owner, token), true);
- collection.log(ERC721Events::Transfer {
+ collection.log_mirrored(ERC721Events::Transfer {
from: H160::default(),
to: *data.owner.as_eth(),
token_id: token.into(),
@@ -395,7 +393,7 @@
<Allowance<T>>::insert((collection.id, token), spender);
// In ERC721 there is only one possible approved user of token, so we set
// approved user to spender
- collection.log(ERC721Events::Approval {
+ collection.log_mirrored(ERC721Events::Approval {
owner: *sender.as_eth(),
approved: *spender.as_eth(),
token_id: token.into(),
@@ -425,7 +423,7 @@
if !assume_implicit_eth {
// In ERC721 there is only one possible approved user of token, so we set
// approved user to zero address
- collection.log(ERC721Events::Approval {
+ collection.log_mirrored(ERC721Events::Approval {
owner: *sender.as_eth(),
approved: H160::default(),
token_id: token.into(),
@@ -535,12 +533,8 @@
collection: &NonfungibleHandle<T>,
sender: &T::CrossAccountId,
token: TokenId,
- data: Vec<u8>,
+ data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResult {
- ensure!(
- data.len() as u32 <= CUSTOM_DATA_LIMIT,
- <CommonError<T>>::TokenVariableDataLimitExceeded
- );
let token_data =
<TokenData<T>>::get((collection.id, token)).ok_or(<CommonError<T>>::TokenNotFound)?;
collection.check_can_update_meta(sender, &token_data.owner)?;
pallets/refungible/Cargo.tomldiffbeforeafterboth--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -10,14 +10,14 @@
version = '2.0.0'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
pallet-common = { default-features = false, path = '../common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
pallets/refungible/src/common.rsdiffbeforeafterboth--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -1,8 +1,8 @@
use core::marker::PhantomData;
use sp_std::collections::btree_map::BTreeMap;
-use frame_support::{dispatch::DispatchResultWithPostInfo, fail, weights::Weight};
-use up_data_structs::TokenId;
+use frame_support::{dispatch::DispatchResultWithPostInfo, fail, weights::Weight, BoundedVec};
+use up_data_structs::{TokenId, CustomDataLimit};
use pallet_common::{CommonCollectionOperations, CommonWeightInfo, with_weight};
use sp_runtime::DispatchError;
use sp_std::vec::Vec;
@@ -184,7 +184,7 @@
&self,
sender: T::CrossAccountId,
token: TokenId,
- data: Vec<u8>,
+ data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResultWithPostInfo {
let len = data.len();
with_weight(
@@ -207,14 +207,18 @@
TokenId(<TokensMinted<T>>::get(self.id))
}
- fn token_owner(&self, _token: TokenId) -> T::CrossAccountId {
- T::CrossAccountId::default()
+ fn token_owner(&self, _token: TokenId) -> Option<T::CrossAccountId> {
+ None
}
fn const_metadata(&self, token: TokenId) -> Vec<u8> {
- <TokenData<T>>::get((self.id, token)).const_data
+ <TokenData<T>>::get((self.id, token))
+ .const_data
+ .into_inner()
}
fn variable_metadata(&self, token: TokenId) -> Vec<u8> {
- <TokenData<T>>::get((self.id, token)).variable_data
+ <TokenData<T>>::get((self.id, token))
+ .variable_data
+ .into_inner()
}
fn collection_tokens(&self) -> u32 {
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -2,8 +2,7 @@
use frame_support::{ensure, BoundedVec};
use up_data_structs::{
- AccessMode, CUSTOM_DATA_LIMIT, Collection, CollectionId, CustomDataLimit,
- MAX_REFUNGIBLE_PIECES, TokenId,
+ AccessMode, Collection, CollectionId, CustomDataLimit, MAX_REFUNGIBLE_PIECES, TokenId,
};
use pallet_common::{
Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,
@@ -11,7 +10,7 @@
use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};
use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};
use core::ops::Deref;
-use codec::{Encode, Decode};
+use codec::{Encode, Decode, MaxEncodedLen};
use scale_info::TypeInfo;
pub use pallet::*;
@@ -27,10 +26,10 @@
}
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
-#[derive(Encode, Decode, Default, TypeInfo)]
+#[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen)]
pub struct ItemData {
- pub const_data: Vec<u8>,
- pub variable_data: Vec<u8>,
+ pub const_data: BoundedVec<u8, CustomDataLimit>,
+ pub variable_data: BoundedVec<u8, CustomDataLimit>,
}
#[frame_support::pallet]
@@ -437,8 +436,8 @@
<TokenData<T>>::insert(
(collection.id, token_id),
ItemData {
- const_data: token.const_data.into(),
- variable_data: token.variable_data.into(),
+ const_data: token.const_data,
+ variable_data: token.variable_data,
},
);
for (user, amount) in token.users.into_iter() {
@@ -579,12 +578,8 @@
collection: &RefungibleHandle<T>,
sender: &T::CrossAccountId,
token: TokenId,
- data: Vec<u8>,
+ data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResult {
- ensure!(
- data.len() as u32 <= CUSTOM_DATA_LIMIT,
- <CommonError<T>>::TokenVariableDataLimitExceeded
- );
collection.check_can_update_meta(
sender,
&T::CrossAccountId::from_sub(collection.owner.clone()),
pallets/scheduler/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -13,19 +13,19 @@
serde = { version = "1.0.130", default-features = false }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false }
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
log = { version = "0.4.14", default-features = false }
[dev-dependencies]
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-substrate-test-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+substrate-test-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
[features]
default = ["std"]
pallets/scheduler/src/lib.rsdiffbeforeafterboth--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -413,7 +413,11 @@
let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(
s.origin.clone()
).into();
- let sender = ensure_signed(origin).unwrap_or_default();
+ let sender = match ensure_signed(origin) {
+ Ok(v) => v,
+ // TODO: Support for unsigned extrinsics?
+ Err(_) => return Some(Some(s))
+ };
let who_will_pay = T::SponsorshipHandler::get_sponsor(&sender, &s.call).unwrap_or(sender);
let sponsor = T::PalletsOrigin::from(system::RawOrigin::Signed(who_will_pay));
let r = s.call.clone().dispatch(sponsor.into());
@@ -661,84 +665,18 @@
Ok((new_time, new_index))
},
)
- }
-}
-
-impl<T: Config> schedule::Anon<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>
- for Module<T>
-{
- type Address = TaskAddress<T::BlockNumber>;
-
- fn schedule(
- when: DispatchTime<T::BlockNumber>,
- maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
- priority: schedule::Priority,
- origin: T::PalletsOrigin,
- call: <T as Config>::Call,
- ) -> Result<Self::Address, DispatchError> {
- Self::do_schedule(when, maybe_periodic, priority, origin, call)
- }
-
- fn cancel((when, index): Self::Address) -> Result<(), ()> {
- Self::do_cancel(None, (when, index)).map_err(|_| ())
}
-
- fn reschedule(
- address: Self::Address,
- when: DispatchTime<T::BlockNumber>,
- ) -> Result<Self::Address, DispatchError> {
- Self::do_reschedule(address, when)
- }
-
- fn next_dispatch_time((when, index): Self::Address) -> Result<T::BlockNumber, ()> {
- Agenda::<T>::get(when)
- .get(index as usize)
- .ok_or(())
- .map(|_| when)
- }
}
-impl<T: Config> schedule::Named<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>
- for Module<T>
-{
- type Address = TaskAddress<T::BlockNumber>;
-
- fn schedule_named(
- id: Vec<u8>,
- when: DispatchTime<T::BlockNumber>,
- maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
- priority: schedule::Priority,
- origin: T::PalletsOrigin,
- call: <T as Config>::Call,
- ) -> Result<Self::Address, ()> {
- Self::do_schedule_named(id, when, maybe_periodic, priority, origin, call).map_err(|_| ())
- }
-
- fn cancel_named(id: Vec<u8>) -> Result<(), ()> {
- Self::do_cancel_named(None, id).map_err(|_| ())
- }
-
- fn reschedule_named(
- id: Vec<u8>,
- when: DispatchTime<T::BlockNumber>,
- ) -> Result<Self::Address, DispatchError> {
- Self::do_reschedule_named(id, when)
- }
-
- fn next_dispatch_time(id: Vec<u8>) -> Result<T::BlockNumber, ()> {
- Lookup::<T>::get(id)
- .and_then(|(when, index)| Agenda::<T>::get(when).get(index as usize).map(|_| when))
- .ok_or(())
- }
-}
-
#[cfg(test)]
#[allow(clippy::from_over_into)]
mod tests {
use super::*;
use frame_support::{
- ord_parameter_types, parameter_types, traits::Contains, weights::constants::RocksDbWeight,
+ ord_parameter_types, parameter_types,
+ traits::{Contains, ConstU32, EnsureOneOf},
+ weights::constants::RocksDbWeight,
};
use sp_core::H256;
use sp_runtime::{
@@ -746,7 +684,7 @@
testing::Header,
traits::{BlakeTwo256, IdentityLookup},
};
- use frame_system::{EnsureOneOf, EnsureRoot, EnsureSignedBy};
+ use frame_system::{EnsureRoot, EnsureSignedBy};
use crate as scheduler;
mod logger {
@@ -843,6 +781,7 @@
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
+ type MaxConsumers = ConstU32<16>;
}
impl logger::Config for Test {
type Event = Event;
@@ -861,7 +800,7 @@
type PalletsOrigin = OriginCaller;
type Call = Call;
type MaximumWeight = MaximumSchedulerWeight;
- type ScheduleOrigin = EnsureOneOf<u64, EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
+ type ScheduleOrigin = EnsureOneOf<EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = ();
type SponsorshipHandler = ();
pallets/unique/Cargo.tomldiffbeforeafterboth--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -61,42 +61,42 @@
default-features = false
optional = true
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.serde]
default-features = false
@@ -106,17 +106,17 @@
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
################################################################################
@@ -127,11 +127,11 @@
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
] }
-ethereum = { version = "0.10.0", default-features = false }
+ethereum = { version = "0.11.1", default-features = false }
rlp = { default-features = false, version = "0.5.0" }
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.14" }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14' }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16' }
up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
@@ -139,9 +139,9 @@
"serde_no_std",
] }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
hex-literal = "0.3.3"
pallet-common = { default-features = false, path = "../common" }
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -29,7 +29,8 @@
WeightToFeePolynomial, DispatchClass,
},
StorageValue, transactional,
- pallet_prelude::DispatchResultWithPostInfo,
+ pallet_prelude::{DispatchResultWithPostInfo, ConstU32},
+ BoundedVec,
};
use scale_info::TypeInfo;
use frame_system::{self as system, ensure_signed};
@@ -38,8 +39,10 @@
MAX_DECIMAL_POINTS, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP, CUSTOM_DATA_LIMIT,
VARIABLE_ON_CHAIN_SCHEMA_LIMIT, CONST_ON_CHAIN_SCHEMA_LIMIT, OFFCHAIN_SCHEMA_LIMIT,
FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
- NFT_SPONSOR_TRANSFER_TIMEOUT, AccessMode, Collection, CreateItemData, CollectionLimits,
+ NFT_SPONSOR_TRANSFER_TIMEOUT, MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH,
+ MAX_TOKEN_PREFIX_LENGTH, AccessMode, Collection, CreateItemData, CollectionLimits,
CollectionId, CollectionMode, TokenId, SchemaVersion, SponsorshipState, MetaUpdatePermission,
+ CustomDataLimit,
};
use pallet_common::{
account::CrossAccountId, CollectionHandle, Pallet as PalletCommon, Error as CommonError,
@@ -319,9 +322,9 @@
#[weight = <SelfWeightOf<T>>::create_collection()]
#[transactional]
pub fn create_collection(origin,
- collection_name: Vec<u16>,
- collection_description: Vec<u16>,
- token_prefix: Vec<u8>,
+ collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
+ collection_description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
+ token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
mode: CollectionMode) -> DispatchResult {
// Anyone can create a collection
@@ -336,11 +339,11 @@
access: AccessMode::Normal,
description: collection_description,
token_prefix,
- offchain_schema: Vec::new(),
+ offchain_schema: BoundedVec::default(),
schema_version: SchemaVersion::ImageURL,
sponsorship: SponsorshipState::Disabled,
- variable_on_chain_schema: Vec::new(),
- const_on_chain_schema: Vec::new(),
+ variable_on_chain_schema: BoundedVec::default(),
+ const_on_chain_schema: BoundedVec::default(),
limits: Default::default(),
meta_update_permission: Default::default(),
};
@@ -919,7 +922,7 @@
origin,
collection_id: CollectionId,
item_id: TokenId,
- data: Vec<u8>
+ data: BoundedVec<u8, CustomDataLimit>,
) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -1004,15 +1007,12 @@
pub fn set_offchain_schema(
origin,
collection_id: CollectionId,
- schema: Vec<u8>
+ schema: BoundedVec<u8, ConstU32<OFFCHAIN_SCHEMA_LIMIT>>,
) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.check_is_owner_or_admin(&sender)?;
- // check schema limit
- ensure!(schema.len() as u32 <= OFFCHAIN_SCHEMA_LIMIT, "");
-
target_collection.offchain_schema = schema;
<Pallet<T>>::deposit_event(Event::<T>::OffchainSchemaSet(
@@ -1039,15 +1039,12 @@
pub fn set_const_on_chain_schema (
origin,
collection_id: CollectionId,
- schema: Vec<u8>
+ schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>
) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.check_is_owner_or_admin(&sender)?;
- // check schema limit
- ensure!(schema.len() as u32 <= CONST_ON_CHAIN_SCHEMA_LIMIT, "");
-
target_collection.const_on_chain_schema = schema;
<Pallet<T>>::deposit_event(Event::<T>::ConstOnChainSchemaSet(
@@ -1074,14 +1071,11 @@
pub fn set_variable_on_chain_schema (
origin,
collection_id: CollectionId,
- schema: Vec<u8>
+ schema: BoundedVec<u8, ConstU32<VARIABLE_ON_CHAIN_SCHEMA_LIMIT>>
) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.check_is_owner_or_admin(&sender)?;
-
- // check schema limit
- ensure!(schema.len() as u32 <= VARIABLE_ON_CHAIN_SCHEMA_LIMIT, "");
target_collection.variable_on_chain_schema = schema;
pallets/unique/src/mock.rsdiffbeforeafterboth--- a/pallets/unique/src/mock.rs
+++ b/pallets/unique/src/mock.rs
@@ -9,10 +9,11 @@
};
use pallet_transaction_payment::{CurrencyAdapter};
use frame_system as system;
-use pallet_evm::AddressMapping;
+use pallet_evm::{AddressMapping, runner::stack::MaybeMirroredLog};
use pallet_common::account::{EvmBackwardsAddressMapping, CrossAccountId};
-use codec::{Encode, Decode};
+use codec::{Encode, Decode, MaxEncodedLen};
use scale_info::TypeInfo;
+use up_data_structs::ConstU32;
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
type Block = frame_system::mocking::MockBlock<Test>;
@@ -63,6 +64,7 @@
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = ();
+ type MaxConsumers = ConstU32<16>;
}
parameter_types! {
@@ -125,7 +127,7 @@
}
}
-#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, TypeInfo)]
+#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, TypeInfo, MaxEncodedLen)]
pub struct TestCrossAccountId(u64, sp_core::H160);
impl CrossAccountId<u64> for TestCrossAccountId {
fn as_sub(&self) -> &u64 {
@@ -161,7 +163,7 @@
fn submit_logs_transaction(
_source: H160,
_tx: pallet_ethereum::Transaction,
- _logs: Vec<pallet_ethereum::Log>,
+ _logs: Vec<MaybeMirroredLog>,
) {
}
}
pallets/unique/src/tests.rsdiffbeforeafterboth1// Tests to be written here2use super::*;3use crate::mock::*;4use crate::{AccessMode, CollectionMode};5use up_data_structs::{6 COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,7 CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,8 TokenId,9};10use frame_support::{assert_noop, assert_ok};11use sp_std::convert::TryInto;1213fn default_nft_data() -> CreateNftData {14 CreateNftData {15 const_data: vec![1, 2, 3].try_into().unwrap(),16 variable_data: vec![3, 2, 1].try_into().unwrap(),17 }18}1920fn default_fungible_data() -> CreateFungibleData {21 CreateFungibleData { value: 5 }22}2324fn default_re_fungible_data() -> CreateReFungibleData {25 CreateReFungibleData {26 const_data: vec![1, 2, 3].try_into().unwrap(),27 variable_data: vec![3, 2, 1].try_into().unwrap(),28 pieces: 1023,29 }30}3132fn create_test_collection_for_owner(33 mode: &CollectionMode,34 owner: u64,35 id: CollectionId,36) -> CollectionId {37 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();38 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();39 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();4041 let origin1 = Origin::signed(owner);42 assert_ok!(TemplateModule::create_collection(43 origin1,44 col_name1,45 col_desc1,46 token_prefix1,47 mode.clone()48 ));4950 let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();51 let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();52 let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();53 assert_eq!(54 <pallet_common::CollectionById<Test>>::get(id)55 .unwrap()56 .owner,57 owner58 );59 assert_eq!(60 <pallet_common::CollectionById<Test>>::get(id).unwrap().name,61 saved_col_name62 );63 assert_eq!(64 <pallet_common::CollectionById<Test>>::get(id).unwrap().mode,65 *mode66 );67 assert_eq!(68 <pallet_common::CollectionById<Test>>::get(id)69 .unwrap()70 .description,71 saved_description72 );73 assert_eq!(74 <pallet_common::CollectionById<Test>>::get(id)75 .unwrap()76 .token_prefix,77 saved_prefix78 );79 id80}8182fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {83 create_test_collection_for_owner(&mode, 1, id)84}8586fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {87 let origin1 = Origin::signed(1);88 assert_ok!(TemplateModule::create_item(89 origin1,90 collection_id,91 account(1),92 data.clone()93 ));94}9596fn account(sub: u64) -> TestCrossAccountId {97 TestCrossAccountId::from_sub(sub)98}99100// Use cases tests region101// #region102103#[test]104fn set_version_schema() {105 new_test_ext().execute_with(|| {106 let origin1 = Origin::signed(1);107 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));108109 assert_ok!(TemplateModule::set_schema_version(110 origin1,111 collection_id,112 SchemaVersion::Unique113 ));114 assert_eq!(115 <pallet_common::CollectionById<Test>>::get(collection_id)116 .unwrap()117 .schema_version,118 SchemaVersion::Unique119 );120 });121}122123#[test]124fn create_fungible_collection_fails_with_large_decimal_numbers() {125 new_test_ext().execute_with(|| {126 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();127 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();128 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();129130 let origin1 = Origin::signed(1);131 assert_noop!(132 TemplateModule::create_collection(133 origin1,134 col_name1,135 col_desc1,136 token_prefix1,137 CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1)138 ),139 Error::<Test>::CollectionDecimalPointLimitExceeded140 );141 });142}143144#[test]145fn create_nft_item() {146 new_test_ext().execute_with(|| {147 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));148149 let data = default_nft_data();150 create_test_item(collection_id, &data.clone().into());151152 let item = <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1)).unwrap();153 assert_eq!(item.const_data, data.const_data.into_inner());154 assert_eq!(item.variable_data, data.variable_data.into_inner());155 });156}157158// Use cases tests region159// #region160#[test]161fn create_nft_multiple_items() {162 new_test_ext().execute_with(|| {163 create_test_collection(&CollectionMode::NFT, CollectionId(1));164165 let origin1 = Origin::signed(1);166167 let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];168169 assert_ok!(TemplateModule::create_multiple_items(170 origin1,171 CollectionId(1),172 account(1),173 items_data174 .clone()175 .into_iter()176 .map(|d| { d.into() })177 .collect()178 ));179 for (index, data) in items_data.into_iter().enumerate() {180 let item = <pallet_nonfungible::TokenData<Test>>::get((181 CollectionId(1),182 TokenId((index + 1) as u32),183 ))184 .unwrap();185 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());186 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());187 }188 });189}190191#[test]192fn create_refungible_item() {193 new_test_ext().execute_with(|| {194 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));195196 let data = default_re_fungible_data();197 create_test_item(collection_id, &data.clone().into());198 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));199 let balance =200 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1)));201 assert_eq!(item.const_data, data.const_data.into_inner());202 assert_eq!(item.variable_data, data.variable_data.into_inner());203 assert_eq!(balance, 1023);204 });205}206207#[test]208fn create_multiple_refungible_items() {209 new_test_ext().execute_with(|| {210 create_test_collection(&CollectionMode::ReFungible, CollectionId(1));211212 let origin1 = Origin::signed(1);213214 let items_data = vec![215 default_re_fungible_data(),216 default_re_fungible_data(),217 default_re_fungible_data(),218 ];219220 assert_ok!(TemplateModule::create_multiple_items(221 origin1,222 CollectionId(1),223 account(1),224 items_data225 .clone()226 .into_iter()227 .map(|d| { d.into() })228 .collect()229 ));230 for (index, data) in items_data.into_iter().enumerate() {231 let item = <pallet_refungible::TokenData<Test>>::get((232 CollectionId(1),233 TokenId((index + 1) as u32),234 ));235 let balance =236 <pallet_refungible::Balance<Test>>::get((CollectionId(1), TokenId(1), account(1)));237 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());238 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());239 assert_eq!(balance, 1023);240 }241 });242}243244#[test]245fn create_fungible_item() {246 new_test_ext().execute_with(|| {247 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));248249 let data = default_fungible_data();250 create_test_item(collection_id, &data.into());251252 assert_eq!(253 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),254 5255 );256 });257}258259//#[test]260// fn create_multiple_fungible_items() {261// new_test_ext().execute_with(|| {262// default_limits();263264// create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));265266// let origin1 = Origin::signed(1);267268// let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];269270// assert_ok!(TemplateModule::create_multiple_items(271// origin1.clone(),272// 1,273// 1,274// items_data.clone().into_iter().map(|d| { d.into() }).collect()275// ));276277// for (index, _) in items_data.iter().enumerate() {278// assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);279// }280// assert_eq!(TemplateModule::balance_count(1, 1), 3000);281// assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);282// });283// }284285#[test]286fn transfer_fungible_item() {287 new_test_ext().execute_with(|| {288 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));289290 let origin1 = Origin::signed(1);291 let origin2 = Origin::signed(2);292293 let data = default_fungible_data();294 create_test_item(collection_id, &data.into());295296 assert_eq!(297 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),298 5299 );300301 // change owner scenario302 assert_ok!(TemplateModule::transfer(303 origin1,304 account(2),305 CollectionId(1),306 TokenId(0),307 5308 ));309 assert_eq!(310 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),311 0312 );313314 // split item scenario315 assert_ok!(TemplateModule::transfer(316 origin2.clone(),317 account(3),318 CollectionId(1),319 TokenId(0),320 3321 ));322323 // split item and new owner has account scenario324 assert_ok!(TemplateModule::transfer(325 origin2,326 account(3),327 CollectionId(1),328 TokenId(0),329 1330 ));331 assert_eq!(332 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(2))),333 1334 );335 assert_eq!(336 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(3))),337 4338 );339 });340}341342#[test]343fn transfer_refungible_item() {344 new_test_ext().execute_with(|| {345 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));346347 // Create RFT 1 in 1023 pieces for account 1348 let data = default_re_fungible_data();349 create_test_item(collection_id, &data.clone().into());350 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));351 assert_eq!(item.const_data, data.const_data.into_inner());352 assert_eq!(item.variable_data, data.variable_data.into_inner());353 assert_eq!(354 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),355 1356 );357 assert_eq!(358 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),359 1023360 );361 assert_eq!(362 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),363 true364 );365366 // Account 1 transfers all 1023 pieces of RFT 1 to account 2367 let origin1 = Origin::signed(1);368 let origin2 = Origin::signed(2);369 assert_ok!(TemplateModule::transfer(370 origin1,371 account(2),372 CollectionId(1),373 TokenId(1),374 1023375 ));376 assert_eq!(377 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),378 1023379 );380 assert_eq!(381 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),382 0383 );384 assert_eq!(385 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),386 1387 );388 assert_eq!(389 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),390 false391 );392 assert_eq!(393 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),394 true395 );396397 // Account 2 transfers 500 pieces of RFT 1 to account 3398 assert_ok!(TemplateModule::transfer(399 origin2.clone(),400 account(3),401 CollectionId(1),402 TokenId(1),403 500404 ));405 assert_eq!(406 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),407 523408 );409 assert_eq!(410 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),411 500412 );413 assert_eq!(414 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),415 1416 );417 assert_eq!(418 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),419 1420 );421 assert_eq!(422 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),423 true424 );425 assert_eq!(426 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),427 true428 );429430 // Account 2 transfers 200 more pieces of RFT 1 to account 3 with pre-existing balance431 assert_ok!(TemplateModule::transfer(432 origin2,433 account(3),434 CollectionId(1),435 TokenId(1),436 200437 ));438 assert_eq!(439 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),440 323441 );442 assert_eq!(443 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),444 700445 );446 assert_eq!(447 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),448 1449 );450 assert_eq!(451 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),452 1453 );454 assert_eq!(455 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),456 true457 );458 assert_eq!(459 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),460 true461 );462 });463}464465#[test]466fn transfer_nft_item() {467 new_test_ext().execute_with(|| {468 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));469470 let data = default_nft_data();471 create_test_item(collection_id, &data.into());472 assert_eq!(473 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),474 1475 );476 assert_eq!(477 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),478 true479 );480481 let origin1 = Origin::signed(1);482 // default scenario483 assert_ok!(TemplateModule::transfer(484 origin1,485 account(2),486 CollectionId(1),487 TokenId(1),488 1489 ));490 assert_eq!(491 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),492 0493 );494 assert_eq!(495 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),496 1497 );498 assert_eq!(499 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),500 false501 );502 assert_eq!(503 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),504 true505 );506 });507}508509#[test]510fn transfer_nft_item_wrong_value() {511 new_test_ext().execute_with(|| {512 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));513514 let data = default_nft_data();515 create_test_item(collection_id, &data.into());516 assert_eq!(517 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),518 1519 );520 assert_eq!(521 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),522 true523 );524525 let origin1 = Origin::signed(1);526527 assert_noop!(528 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 2)529 .map_err(|e| e.error),530 <pallet_nonfungible::Error::<Test>>::NonfungibleItemsHaveNoAmount531 );532 });533}534535#[test]536fn transfer_nft_item_zero_value() {537 new_test_ext().execute_with(|| {538 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));539540 let data = default_nft_data();541 create_test_item(collection_id, &data.into());542 assert_eq!(543 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),544 1545 );546 assert_eq!(547 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),548 true549 );550551 let origin1 = Origin::signed(1);552553 // Transferring 0 amount works on NFT...554 assert_ok!(TemplateModule::transfer(555 origin1,556 account(2),557 CollectionId(1),558 TokenId(1),559 0560 ));561 // ... and results in no transfer562 assert_eq!(563 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),564 1565 );566 assert_eq!(567 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),568 true569 );570 });571}572573#[test]574fn nft_approve_and_transfer_from() {575 new_test_ext().execute_with(|| {576 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));577578 let data = default_nft_data();579 create_test_item(collection_id, &data.into());580581 let origin1 = Origin::signed(1);582 let origin2 = Origin::signed(2);583584 assert_eq!(585 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),586 1587 );588 assert_eq!(589 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),590 true591 );592593 // neg transfer_from594 assert_noop!(595 TemplateModule::transfer_from(596 origin2.clone(),597 account(1),598 account(2),599 CollectionId(1),600 TokenId(1),601 1602 )603 .map_err(|e| e.error),604 CommonError::<Test>::TokenValueNotEnough605 );606607 // do approve608 assert_ok!(TemplateModule::approve(609 origin1,610 account(2),611 CollectionId(1),612 TokenId(1),613 1614 ));615 assert_eq!(616 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),617 account(2)618 );619620 assert_ok!(TemplateModule::transfer_from(621 origin2,622 account(1),623 account(3),624 CollectionId(1),625 TokenId(1),626 1627 ));628 assert!(629 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()630 );631 });632}633634#[test]635fn nft_approve_and_transfer_from_allow_list() {636 new_test_ext().execute_with(|| {637 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));638639 let origin1 = Origin::signed(1);640 let origin2 = Origin::signed(2);641642 // Create NFT 1 for account 1643 let data = default_nft_data();644 create_test_item(collection_id, &data.clone().into());645 assert_eq!(646 &<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))647 .unwrap()648 .const_data,649 &data.const_data.into_inner()650 );651 assert_eq!(652 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),653 1654 );655 assert_eq!(656 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),657 true658 );659660 // Allow allow-list users to mint and add accounts 1, 2, and 3 to allow-list661 assert_ok!(TemplateModule::set_mint_permission(662 origin1.clone(),663 CollectionId(1),664 true665 ));666 assert_ok!(TemplateModule::set_public_access_mode(667 origin1.clone(),668 CollectionId(1),669 AccessMode::AllowList670 ));671 assert_ok!(TemplateModule::add_to_allow_list(672 origin1.clone(),673 CollectionId(1),674 account(1)675 ));676 assert_ok!(TemplateModule::add_to_allow_list(677 origin1.clone(),678 CollectionId(1),679 account(2)680 ));681 assert_ok!(TemplateModule::add_to_allow_list(682 origin1.clone(),683 CollectionId(1),684 account(3)685 ));686687 // Account 1 approves account 2 for NFT 1688 assert_ok!(TemplateModule::approve(689 origin1.clone(),690 account(2),691 CollectionId(1),692 TokenId(1),693 1694 ));695 assert_eq!(696 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),697 account(2)698 );699700 // Account 2 transfers NFT 1 from account 1 to account 3701 assert_ok!(TemplateModule::transfer_from(702 origin2,703 account(1),704 account(3),705 CollectionId(1),706 TokenId(1),707 1708 ));709 assert!(710 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()711 );712 });713}714715#[test]716fn refungible_approve_and_transfer_from() {717 new_test_ext().execute_with(|| {718 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));719720 let origin1 = Origin::signed(1);721 let origin2 = Origin::signed(2);722723 // Create RFT 1 in 1023 pieces for account 1724 let data = default_re_fungible_data();725 create_test_item(collection_id, &data.into());726727 assert_eq!(728 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),729 1730 );731 assert_eq!(732 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),733 1023734 );735 assert_eq!(736 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),737 true738 );739740 // Allow public minting, enable allow-list and add accounts 1, 2, 3 to allow-list741 assert_ok!(TemplateModule::set_mint_permission(742 origin1.clone(),743 CollectionId(1),744 true745 ));746 assert_ok!(TemplateModule::set_public_access_mode(747 origin1.clone(),748 CollectionId(1),749 AccessMode::AllowList750 ));751 assert_ok!(TemplateModule::add_to_allow_list(752 origin1.clone(),753 CollectionId(1),754 account(1)755 ));756 assert_ok!(TemplateModule::add_to_allow_list(757 origin1.clone(),758 CollectionId(1),759 account(2)760 ));761 assert_ok!(TemplateModule::add_to_allow_list(762 origin1.clone(),763 CollectionId(1),764 account(3)765 ));766767 // Account 1 approves account 2 for 1023 pieces of RFT 1768 assert_ok!(TemplateModule::approve(769 origin1,770 account(2),771 CollectionId(1),772 TokenId(1),773 1023774 ));775 assert_eq!(776 <pallet_refungible::Allowance<Test>>::get((777 CollectionId(1),778 TokenId(1),779 account(1),780 account(2)781 )),782 1023783 );784785 // Account 2 transfers 100 pieces of RFT 1 from account 1 to account 3786 assert_ok!(TemplateModule::transfer_from(787 origin2,788 account(1),789 account(3),790 CollectionId(1),791 TokenId(1),792 100793 ));794 assert_eq!(795 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),796 1797 );798 assert_eq!(799 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),800 1801 );802 assert_eq!(803 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),804 923805 );806 assert_eq!(807 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),808 100809 );810 assert_eq!(811 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),812 true813 );814 assert_eq!(815 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),816 true817 );818 assert_eq!(819 <pallet_refungible::Allowance<Test>>::get((820 CollectionId(1),821 TokenId(1),822 account(1),823 account(2)824 )),825 923826 );827 });828}829830#[test]831fn fungible_approve_and_transfer_from() {832 new_test_ext().execute_with(|| {833 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));834835 let data = default_fungible_data();836 create_test_item(collection_id, &data.into());837838 let origin1 = Origin::signed(1);839 let origin2 = Origin::signed(2);840841 assert_ok!(TemplateModule::set_mint_permission(842 origin1.clone(),843 CollectionId(1),844 true845 ));846 assert_ok!(TemplateModule::set_public_access_mode(847 origin1.clone(),848 CollectionId(1),849 AccessMode::AllowList850 ));851 assert_ok!(TemplateModule::add_to_allow_list(852 origin1.clone(),853 CollectionId(1),854 account(1)855 ));856 assert_ok!(TemplateModule::add_to_allow_list(857 origin1.clone(),858 CollectionId(1),859 account(2)860 ));861 assert_ok!(TemplateModule::add_to_allow_list(862 origin1.clone(),863 CollectionId(1),864 account(3)865 ));866867 // do approve868 assert_ok!(TemplateModule::approve(869 origin1.clone(),870 account(2),871 CollectionId(1),872 TokenId(0),873 5874 ));875 assert_eq!(876 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),877 5878 );879 assert_ok!(TemplateModule::approve(880 origin1,881 account(3),882 CollectionId(1),883 TokenId(0),884 5885 ));886 assert_eq!(887 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),888 5889 );890 assert_eq!(891 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(3))),892 5893 );894895 assert_ok!(TemplateModule::transfer_from(896 origin2.clone(),897 account(1),898 account(3),899 CollectionId(1),900 TokenId(0),901 4902 ));903904 assert_eq!(905 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),906 1907 );908909 assert_noop!(910 TemplateModule::transfer_from(911 origin2,912 account(1),913 account(3),914 CollectionId(1),915 TokenId(0),916 4917 )918 .map_err(|e| e.error),919 CommonError::<Test>::TokenValueNotEnough920 );921 });922}923924#[test]925fn change_collection_owner() {926 new_test_ext().execute_with(|| {927 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));928929 let origin1 = Origin::signed(1);930 assert_ok!(TemplateModule::change_collection_owner(931 origin1,932 collection_id,933 2934 ));935 assert_eq!(936 <pallet_common::CollectionById<Test>>::get(collection_id)937 .unwrap()938 .owner,939 2940 );941 });942}943944#[test]945fn destroy_collection() {946 new_test_ext().execute_with(|| {947 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));948949 let origin1 = Origin::signed(1);950 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));951 });952}953954#[test]955fn burn_nft_item() {956 new_test_ext().execute_with(|| {957 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));958959 let origin1 = Origin::signed(1);960961 let data = default_nft_data();962 create_test_item(collection_id, &data.into());963964 // check balance (collection with id = 1, user id = 1)965 assert_eq!(966 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),967 1968 );969970 // burn item971 assert_ok!(TemplateModule::burn_item(972 origin1.clone(),973 collection_id,974 TokenId(1),975 1976 ));977 assert_eq!(978 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),979 0980 );981 });982}983984#[test]985fn burn_same_nft_item_twice() {986 new_test_ext().execute_with(|| {987 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));988989 let origin1 = Origin::signed(1);990991 let data = default_nft_data();992 create_test_item(collection_id, &data.into());993994 // check balance (collection with id = 1, user id = 1)995 assert_eq!(996 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),997 1998 );9991000 // burn item1001 assert_ok!(TemplateModule::burn_item(1002 origin1.clone(),1003 collection_id,1004 TokenId(1),1005 11006 ));10071008 // burn item again1009 assert_noop!(1010 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1).map_err(|e| e.error),1011 CommonError::<Test>::TokenNotFound1012 );10131014 assert_eq!(1015 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1016 01017 );1018 });1019}10201021#[test]1022fn burn_fungible_item() {1023 new_test_ext().execute_with(|| {1024 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10251026 let origin1 = Origin::signed(1);1027 assert_ok!(TemplateModule::add_collection_admin(1028 origin1.clone(),1029 collection_id,1030 account(2)1031 ));10321033 let data = default_fungible_data();1034 create_test_item(collection_id, &data.into());10351036 // check balance (collection with id = 1, user id = 1)1037 assert_eq!(1038 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1039 51040 );10411042 // burn item1043 assert_ok!(TemplateModule::burn_item(1044 origin1.clone(),1045 CollectionId(1),1046 TokenId(0),1047 51048 ));1049 assert_noop!(1050 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(0), 5).map_err(|e| e.error),1051 CommonError::<Test>::TokenValueTooLow1052 );10531054 assert_eq!(1055 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1056 01057 );1058 });1059}10601061#[test]1062fn burn_fungible_item_with_token_id() {1063 new_test_ext().execute_with(|| {1064 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10651066 let origin1 = Origin::signed(1);1067 assert_ok!(TemplateModule::add_collection_admin(1068 origin1.clone(),1069 collection_id,1070 account(2)1071 ));10721073 let data = default_fungible_data();1074 create_test_item(collection_id, &data.into());10751076 // check balance (collection with id = 1, user id = 1)1077 assert_eq!(1078 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1079 51080 );10811082 // Try to burn item using Token ID1083 assert_noop!(1084 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(1), 5).map_err(|e| e.error),1085 <pallet_fungible::Error::<Test>>::FungibleItemsHaveNoId1086 );1087 });1088}1089#[test]1090fn burn_refungible_item() {1091 new_test_ext().execute_with(|| {1092 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));1093 let origin1 = Origin::signed(1);10941095 assert_ok!(TemplateModule::set_mint_permission(1096 origin1.clone(),1097 collection_id,1098 true1099 ));1100 assert_ok!(TemplateModule::set_public_access_mode(1101 origin1.clone(),1102 collection_id,1103 AccessMode::AllowList1104 ));1105 assert_ok!(TemplateModule::add_to_allow_list(1106 origin1.clone(),1107 collection_id,1108 account(1)1109 ));11101111 assert_ok!(TemplateModule::add_collection_admin(1112 origin1.clone(),1113 collection_id,1114 account(2)1115 ));11161117 let data = default_re_fungible_data();1118 create_test_item(collection_id, &data.into());11191120 // check balance (collection with id = 1, user id = 2)1121 assert_eq!(1122 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),1123 11124 );1125 assert_eq!(1126 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1127 10231128 );11291130 // burn item1131 assert_ok!(TemplateModule::burn_item(1132 origin1.clone(),1133 collection_id,1134 TokenId(1),1135 10231136 ));1137 assert_noop!(1138 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1023)1139 .map_err(|e| e.error),1140 CommonError::<Test>::TokenValueTooLow1141 );11421143 assert_eq!(1144 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1145 01146 );1147 });1148}11491150#[test]1151fn add_collection_admin() {1152 new_test_ext().execute_with(|| {1153 let collection1_id =1154 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1155 let origin1 = Origin::signed(1);11561157 // Add collection admins1158 assert_ok!(TemplateModule::add_collection_admin(1159 origin1.clone(),1160 collection1_id,1161 account(2)1162 ));1163 assert_ok!(TemplateModule::add_collection_admin(1164 origin1,1165 collection1_id,1166 account(3)1167 ));11681169 // Owner is not an admin by default1170 assert_eq!(1171 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(1))),1172 false1173 );1174 assert!(<pallet_common::IsAdmin<Test>>::get((1175 CollectionId(1),1176 account(2)1177 )));1178 assert!(<pallet_common::IsAdmin<Test>>::get((1179 CollectionId(1),1180 account(3)1181 )));1182 });1183}11841185#[test]1186fn remove_collection_admin() {1187 new_test_ext().execute_with(|| {1188 let collection1_id =1189 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1190 let origin1 = Origin::signed(1);1191 let origin2 = Origin::signed(2);11921193 // Add collection admins 2 and 31194 assert_ok!(TemplateModule::add_collection_admin(1195 origin1.clone(),1196 collection1_id,1197 account(2)1198 ));1199 assert_ok!(TemplateModule::add_collection_admin(1200 origin1,1201 collection1_id,1202 account(3)1203 ));12041205 assert!(<pallet_common::IsAdmin<Test>>::get((1206 CollectionId(1),1207 account(2)1208 )));1209 assert!(<pallet_common::IsAdmin<Test>>::get((1210 CollectionId(1),1211 account(3)1212 )));12131214 // remove admin 31215 assert_ok!(TemplateModule::remove_collection_admin(1216 origin2,1217 CollectionId(1),1218 account(3)1219 ));12201221 // 2 is still admin, 3 is not an admin anymore1222 assert!(<pallet_common::IsAdmin<Test>>::get((1223 CollectionId(1),1224 account(2)1225 )));1226 assert_eq!(1227 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(3))),1228 false1229 );1230 });1231}12321233#[test]1234fn balance_of() {1235 new_test_ext().execute_with(|| {1236 let nft_collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1237 let fungible_collection_id =1238 create_test_collection(&CollectionMode::Fungible(3), CollectionId(2));1239 let re_fungible_collection_id =1240 create_test_collection(&CollectionMode::ReFungible, CollectionId(3));12411242 // check balance before1243 assert_eq!(1244 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1245 01246 );1247 assert_eq!(1248 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1249 01250 );1251 assert_eq!(1252 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1253 01254 );12551256 let nft_data = default_nft_data();1257 create_test_item(nft_collection_id, &nft_data.into());12581259 let fungible_data = default_fungible_data();1260 create_test_item(fungible_collection_id, &fungible_data.into());12611262 let re_fungible_data = default_re_fungible_data();1263 create_test_item(re_fungible_collection_id, &re_fungible_data.into());12641265 // check balance (collection with id = 1, user id = 1)1266 assert_eq!(1267 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1268 11269 );1270 assert_eq!(1271 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1272 51273 );1274 assert_eq!(1275 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1276 11277 );12781279 assert_eq!(1280 <pallet_nonfungible::Owned<Test>>::get((nft_collection_id, account(1), TokenId(1))),1281 true1282 );1283 assert_eq!(1284 <pallet_refungible::Owned<Test>>::get((1285 re_fungible_collection_id,1286 account(1),1287 TokenId(1)1288 )),1289 true1290 );1291 });1292}12931294#[test]1295fn approve() {1296 new_test_ext().execute_with(|| {1297 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));12981299 let data = default_nft_data();1300 create_test_item(collection_id, &data.into());13011302 let origin1 = Origin::signed(1);13031304 // approve1305 assert_ok!(TemplateModule::approve(1306 origin1,1307 account(2),1308 CollectionId(1),1309 TokenId(1),1310 11311 ));1312 assert_eq!(1313 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1314 account(2)1315 );1316 });1317}13181319#[test]1320fn transfer_from() {1321 new_test_ext().execute_with(|| {1322 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1323 let origin1 = Origin::signed(1);1324 let origin2 = Origin::signed(2);13251326 let data = default_nft_data();1327 create_test_item(collection_id, &data.into());13281329 // approve1330 assert_ok!(TemplateModule::approve(1331 origin1.clone(),1332 account(2),1333 CollectionId(1),1334 TokenId(1),1335 11336 ));1337 assert_eq!(1338 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1339 account(2)1340 );13411342 assert_ok!(TemplateModule::set_mint_permission(1343 origin1.clone(),1344 CollectionId(1),1345 true1346 ));1347 assert_ok!(TemplateModule::set_public_access_mode(1348 origin1.clone(),1349 CollectionId(1),1350 AccessMode::AllowList1351 ));1352 assert_ok!(TemplateModule::add_to_allow_list(1353 origin1.clone(),1354 CollectionId(1),1355 account(1)1356 ));1357 assert_ok!(TemplateModule::add_to_allow_list(1358 origin1.clone(),1359 CollectionId(1),1360 account(2)1361 ));1362 assert_ok!(TemplateModule::add_to_allow_list(1363 origin1,1364 CollectionId(1),1365 account(3)1366 ));13671368 assert_ok!(TemplateModule::transfer_from(1369 origin2,1370 account(1),1371 account(2),1372 CollectionId(1),1373 TokenId(1),1374 11375 ));13761377 // after transfer1378 assert_eq!(1379 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(1))),1380 01381 );1382 assert_eq!(1383 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(2))),1384 11385 );1386 });1387}13881389// #endregion13901391// Coverage tests region1392// #region13931394#[test]1395fn owner_can_add_address_to_allow_list() {1396 new_test_ext().execute_with(|| {1397 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));13981399 let origin1 = Origin::signed(1);1400 assert_ok!(TemplateModule::add_to_allow_list(1401 origin1,1402 collection_id,1403 account(2)1404 ));1405 assert!(<pallet_common::Allowlist<Test>>::get((1406 collection_id,1407 account(2)1408 )));1409 });1410}14111412#[test]1413fn admin_can_add_address_to_allow_list() {1414 new_test_ext().execute_with(|| {1415 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1416 let origin1 = Origin::signed(1);1417 let origin2 = Origin::signed(2);14181419 assert_ok!(TemplateModule::add_collection_admin(1420 origin1,1421 collection_id,1422 account(2)1423 ));1424 assert_ok!(TemplateModule::add_to_allow_list(1425 origin2,1426 collection_id,1427 account(3)1428 ));1429 assert!(<pallet_common::Allowlist<Test>>::get((1430 collection_id,1431 account(3)1432 )));1433 });1434}14351436#[test]1437fn nonprivileged_user_cannot_add_address_to_allow_list() {1438 new_test_ext().execute_with(|| {1439 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14401441 let origin2 = Origin::signed(2);1442 assert_noop!(1443 TemplateModule::add_to_allow_list(origin2, collection_id, account(3)),1444 CommonError::<Test>::NoPermission1445 );1446 });1447}14481449#[test]1450fn nobody_can_add_address_to_allow_list_of_nonexisting_collection() {1451 new_test_ext().execute_with(|| {1452 let origin1 = Origin::signed(1);14531454 assert_noop!(1455 TemplateModule::add_to_allow_list(origin1, CollectionId(1), account(2)),1456 CommonError::<Test>::CollectionNotFound1457 );1458 });1459}14601461#[test]1462fn nobody_can_add_address_to_allow_list_of_deleted_collection() {1463 new_test_ext().execute_with(|| {1464 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14651466 let origin1 = Origin::signed(1);1467 assert_ok!(TemplateModule::destroy_collection(1468 origin1.clone(),1469 collection_id1470 ));1471 assert_noop!(1472 TemplateModule::add_to_allow_list(origin1, collection_id, account(2)),1473 CommonError::<Test>::CollectionNotFound1474 );1475 });1476}14771478// If address is already added to allow list, nothing happens1479#[test]1480fn address_is_already_added_to_allow_list() {1481 new_test_ext().execute_with(|| {1482 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1483 let origin1 = Origin::signed(1);14841485 assert_ok!(TemplateModule::add_to_allow_list(1486 origin1.clone(),1487 collection_id,1488 account(2)1489 ));1490 assert_ok!(TemplateModule::add_to_allow_list(1491 origin1,1492 collection_id,1493 account(2)1494 ));1495 assert!(<pallet_common::Allowlist<Test>>::get((1496 collection_id,1497 account(2)1498 )));1499 });1500}15011502#[test]1503fn owner_can_remove_address_from_allow_list() {1504 new_test_ext().execute_with(|| {1505 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15061507 let origin1 = Origin::signed(1);1508 assert_ok!(TemplateModule::add_to_allow_list(1509 origin1.clone(),1510 collection_id,1511 account(2)1512 ));1513 assert_ok!(TemplateModule::remove_from_allow_list(1514 origin1,1515 collection_id,1516 account(2)1517 ));1518 assert_eq!(1519 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1520 false1521 );1522 });1523}15241525#[test]1526fn admin_can_remove_address_from_allow_list() {1527 new_test_ext().execute_with(|| {1528 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1529 let origin1 = Origin::signed(1);1530 let origin2 = Origin::signed(2);15311532 // Owner adds admin1533 assert_ok!(TemplateModule::add_collection_admin(1534 origin1.clone(),1535 collection_id,1536 account(2)1537 ));15381539 // Owner adds address 3 to allow list1540 assert_ok!(TemplateModule::add_to_allow_list(1541 origin1,1542 collection_id,1543 account(3)1544 ));15451546 // Admin removes address 3 from allow list1547 assert_ok!(TemplateModule::remove_from_allow_list(1548 origin2,1549 collection_id,1550 account(3)1551 ));1552 assert_eq!(1553 <pallet_common::Allowlist<Test>>::get((collection_id, account(3))),1554 false1555 );1556 });1557}15581559#[test]1560fn nonprivileged_user_cannot_remove_address_from_allow_list() {1561 new_test_ext().execute_with(|| {1562 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1563 let origin1 = Origin::signed(1);1564 let origin2 = Origin::signed(2);15651566 assert_ok!(TemplateModule::add_to_allow_list(1567 origin1,1568 collection_id,1569 account(2)1570 ));1571 assert_noop!(1572 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1573 CommonError::<Test>::NoPermission1574 );1575 assert!(<pallet_common::Allowlist<Test>>::get((1576 collection_id,1577 account(2)1578 )));1579 });1580}15811582#[test]1583fn nobody_can_remove_address_from_allow_list_of_nonexisting_collection() {1584 new_test_ext().execute_with(|| {1585 let origin1 = Origin::signed(1);15861587 assert_noop!(1588 TemplateModule::remove_from_allow_list(origin1, CollectionId(1), account(2)),1589 CommonError::<Test>::CollectionNotFound1590 );1591 });1592}15931594#[test]1595fn nobody_can_remove_address_from_allow_list_of_deleted_collection() {1596 new_test_ext().execute_with(|| {1597 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1598 let origin1 = Origin::signed(1);1599 let origin2 = Origin::signed(2);16001601 // Add account 2 to allow list1602 assert_ok!(TemplateModule::add_to_allow_list(1603 origin1.clone(),1604 collection_id,1605 account(2)1606 ));16071608 // Account 2 is in collection allow-list1609 assert!(<pallet_common::Allowlist<Test>>::get((1610 collection_id,1611 account(2)1612 )));16131614 // Destroy collection1615 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));16161617 // Attempt to remove account 2 from collection allow-list => error1618 assert_noop!(1619 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1620 CommonError::<Test>::CollectionNotFound1621 );16221623 // Account 2 is not found in collection allow-list anyway1624 assert_eq!(1625 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1626 false1627 );1628 });1629}16301631// If address is already removed from allow list, nothing happens1632#[test]1633fn address_is_already_removed_from_allow_list() {1634 new_test_ext().execute_with(|| {1635 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1636 let origin1 = Origin::signed(1);16371638 assert_ok!(TemplateModule::add_to_allow_list(1639 origin1.clone(),1640 collection_id,1641 account(2)1642 ));1643 assert_ok!(TemplateModule::remove_from_allow_list(1644 origin1.clone(),1645 collection_id,1646 account(2)1647 ));1648 assert_eq!(1649 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1650 false1651 );1652 assert_ok!(TemplateModule::remove_from_allow_list(1653 origin1,1654 collection_id,1655 account(2)1656 ));1657 assert_eq!(1658 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1659 false1660 );1661 });1662}16631664// If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom (2 tests)1665#[test]1666fn allow_list_test_1() {1667 new_test_ext().execute_with(|| {1668 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));16691670 let origin1 = Origin::signed(1);16711672 let data = default_nft_data();1673 create_test_item(collection_id, &data.into());16741675 assert_ok!(TemplateModule::set_public_access_mode(1676 origin1.clone(),1677 collection_id,1678 AccessMode::AllowList1679 ));1680 assert_ok!(TemplateModule::add_to_allow_list(1681 origin1.clone(),1682 collection_id,1683 account(2)1684 ));16851686 assert_noop!(1687 TemplateModule::transfer(origin1, account(3), CollectionId(1), TokenId(1), 1)1688 .map_err(|e| e.error),1689 CommonError::<Test>::AddressNotInAllowlist1690 );1691 });1692}16931694#[test]1695fn allow_list_test_2() {1696 new_test_ext().execute_with(|| {1697 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1698 let origin1 = Origin::signed(1);16991700 let data = default_nft_data();1701 create_test_item(collection_id, &data.into());17021703 assert_ok!(TemplateModule::set_public_access_mode(1704 origin1.clone(),1705 collection_id,1706 AccessMode::AllowList1707 ));1708 assert_ok!(TemplateModule::add_to_allow_list(1709 origin1.clone(),1710 collection_id,1711 account(1)1712 ));1713 assert_ok!(TemplateModule::add_to_allow_list(1714 origin1.clone(),1715 collection_id,1716 account(2)1717 ));17181719 // do approve1720 assert_ok!(TemplateModule::approve(1721 origin1.clone(),1722 account(1),1723 collection_id,1724 TokenId(1),1725 11726 ));1727 assert_eq!(1728 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1729 account(1)1730 );17311732 assert_ok!(TemplateModule::remove_from_allow_list(1733 origin1.clone(),1734 collection_id,1735 account(1)1736 ));17371738 assert_noop!(1739 TemplateModule::transfer_from(1740 origin1,1741 account(1),1742 account(3),1743 CollectionId(1),1744 TokenId(1),1745 11746 )1747 .map_err(|e| e.error),1748 CommonError::<Test>::AddressNotInAllowlist1749 );1750 });1751}17521753// If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom (2 tests)1754#[test]1755fn allow_list_test_3() {1756 new_test_ext().execute_with(|| {1757 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17581759 let origin1 = Origin::signed(1);17601761 let data = default_nft_data();1762 create_test_item(collection_id, &data.into());17631764 assert_ok!(TemplateModule::set_public_access_mode(1765 origin1.clone(),1766 collection_id,1767 AccessMode::AllowList1768 ));1769 assert_ok!(TemplateModule::add_to_allow_list(1770 origin1.clone(),1771 collection_id,1772 account(1)1773 ));17741775 assert_noop!(1776 TemplateModule::transfer(origin1, account(3), collection_id, TokenId(1), 1)1777 .map_err(|e| e.error),1778 CommonError::<Test>::AddressNotInAllowlist1779 );1780 });1781}17821783#[test]1784fn allow_list_test_4() {1785 new_test_ext().execute_with(|| {1786 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17871788 let origin1 = Origin::signed(1);17891790 let data = default_nft_data();1791 create_test_item(collection_id, &data.into());17921793 assert_ok!(TemplateModule::set_public_access_mode(1794 origin1.clone(),1795 collection_id,1796 AccessMode::AllowList1797 ));1798 assert_ok!(TemplateModule::add_to_allow_list(1799 origin1.clone(),1800 collection_id,1801 account(1)1802 ));1803 assert_ok!(TemplateModule::add_to_allow_list(1804 origin1.clone(),1805 collection_id,1806 account(2)1807 ));18081809 // do approve1810 assert_ok!(TemplateModule::approve(1811 origin1.clone(),1812 account(1),1813 collection_id,1814 TokenId(1),1815 11816 ));1817 assert_eq!(1818 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1819 account(1)1820 );18211822 assert_ok!(TemplateModule::remove_from_allow_list(1823 origin1.clone(),1824 collection_id,1825 account(2)1826 ));18271828 assert_noop!(1829 TemplateModule::transfer_from(1830 origin1,1831 account(1),1832 account(3),1833 collection_id,1834 TokenId(1),1835 11836 )1837 .map_err(|e| e.error),1838 CommonError::<Test>::AddressNotInAllowlist1839 );1840 });1841}18421843// If Public Access mode is set to AllowList, tokens can’t be destroyed by a non-allowlisted address (even if it owned them before enabling AllowList mode)1844#[test]1845fn allow_list_test_5() {1846 new_test_ext().execute_with(|| {1847 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18481849 let origin1 = Origin::signed(1);18501851 let data = default_nft_data();1852 create_test_item(collection_id, &data.into());18531854 assert_ok!(TemplateModule::set_public_access_mode(1855 origin1.clone(),1856 collection_id,1857 AccessMode::AllowList1858 ));1859 assert_noop!(1860 TemplateModule::burn_item(origin1.clone(), CollectionId(1), TokenId(1), 1)1861 .map_err(|e| e.error),1862 CommonError::<Test>::AddressNotInAllowlist1863 );1864 });1865}18661867// If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).1868#[test]1869fn allow_list_test_6() {1870 new_test_ext().execute_with(|| {1871 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18721873 let origin1 = Origin::signed(1);18741875 let data = default_nft_data();1876 create_test_item(collection_id, &data.into());18771878 assert_ok!(TemplateModule::set_public_access_mode(1879 origin1.clone(),1880 collection_id,1881 AccessMode::AllowList1882 ));18831884 // do approve1885 assert_noop!(1886 TemplateModule::approve(origin1, account(1), CollectionId(1), TokenId(1), 1)1887 .map_err(|e| e.error),1888 CommonError::<Test>::AddressNotInAllowlist1889 );1890 });1891}18921893// If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests) and1894// tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests)1895#[test]1896fn allow_list_test_7() {1897 new_test_ext().execute_with(|| {1898 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18991900 let data = default_nft_data();1901 create_test_item(collection_id, &data.into());19021903 let origin1 = Origin::signed(1);19041905 assert_ok!(TemplateModule::set_public_access_mode(1906 origin1.clone(),1907 collection_id,1908 AccessMode::AllowList1909 ));1910 assert_ok!(TemplateModule::add_to_allow_list(1911 origin1.clone(),1912 collection_id,1913 account(1)1914 ));1915 assert_ok!(TemplateModule::add_to_allow_list(1916 origin1.clone(),1917 collection_id,1918 account(2)1919 ));19201921 assert_ok!(TemplateModule::transfer(1922 origin1,1923 account(2),1924 CollectionId(1),1925 TokenId(1),1926 11927 ));1928 });1929}19301931#[test]1932fn allow_list_test_8() {1933 new_test_ext().execute_with(|| {1934 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19351936 // Create NFT for account 11937 let data = default_nft_data();1938 create_test_item(collection_id, &data.into());19391940 let origin1 = Origin::signed(1);19411942 // Toggle Allow List mode and add accounts 1 and 21943 assert_ok!(TemplateModule::set_public_access_mode(1944 origin1.clone(),1945 collection_id,1946 AccessMode::AllowList1947 ));1948 assert_ok!(TemplateModule::add_to_allow_list(1949 origin1.clone(),1950 collection_id,1951 account(1)1952 ));1953 assert_ok!(TemplateModule::add_to_allow_list(1954 origin1.clone(),1955 collection_id,1956 account(2)1957 ));19581959 // Sself-approve account 1 for NFT 11960 assert_ok!(TemplateModule::approve(1961 origin1.clone(),1962 account(1),1963 CollectionId(1),1964 TokenId(1),1965 11966 ));1967 assert_eq!(1968 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1969 account(1)1970 );19711972 // Transfer from 1 to 21973 assert_ok!(TemplateModule::transfer_from(1974 origin1,1975 account(1),1976 account(2),1977 CollectionId(1),1978 TokenId(1),1979 11980 ));1981 });1982}19831984// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.1985#[test]1986fn allow_list_test_9() {1987 new_test_ext().execute_with(|| {1988 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1989 let origin1 = Origin::signed(1);19901991 assert_ok!(TemplateModule::set_public_access_mode(1992 origin1.clone(),1993 collection_id,1994 AccessMode::AllowList1995 ));1996 assert_ok!(TemplateModule::set_mint_permission(1997 origin1,1998 collection_id,1999 false2000 ));20012002 let data = default_nft_data();2003 create_test_item(collection_id, &data.into());2004 });2005}20062007// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.2008#[test]2009fn allow_list_test_10() {2010 new_test_ext().execute_with(|| {2011 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20122013 let origin1 = Origin::signed(1);2014 let origin2 = Origin::signed(2);20152016 assert_ok!(TemplateModule::set_public_access_mode(2017 origin1.clone(),2018 collection_id,2019 AccessMode::AllowList2020 ));2021 assert_ok!(TemplateModule::set_mint_permission(2022 origin1.clone(),2023 collection_id,2024 false2025 ));20262027 assert_ok!(TemplateModule::add_collection_admin(2028 origin1,2029 collection_id,2030 account(2)2031 ));20322033 assert_ok!(TemplateModule::create_item(2034 origin2,2035 collection_id,2036 account(2),2037 default_nft_data().into()2038 ));2039 });2040}20412042// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and allow listed address.2043#[test]2044fn allow_list_test_11() {2045 new_test_ext().execute_with(|| {2046 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20472048 let origin1 = Origin::signed(1);2049 let origin2 = Origin::signed(2);20502051 assert_ok!(TemplateModule::set_public_access_mode(2052 origin1.clone(),2053 collection_id,2054 AccessMode::AllowList2055 ));2056 assert_ok!(TemplateModule::set_mint_permission(2057 origin1.clone(),2058 collection_id,2059 false2060 ));2061 assert_ok!(TemplateModule::add_to_allow_list(2062 origin1,2063 collection_id,2064 account(2)2065 ));20662067 assert_noop!(2068 TemplateModule::create_item(2069 origin2,2070 CollectionId(1),2071 account(2),2072 default_nft_data().into()2073 )2074 .map_err(|e| e.error),2075 CommonError::<Test>::PublicMintingNotAllowed2076 );2077 });2078}20792080// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-allow listed address.2081#[test]2082fn allow_list_test_12() {2083 new_test_ext().execute_with(|| {2084 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20852086 let origin1 = Origin::signed(1);2087 let origin2 = Origin::signed(2);20882089 assert_ok!(TemplateModule::set_public_access_mode(2090 origin1.clone(),2091 collection_id,2092 AccessMode::AllowList2093 ));2094 assert_ok!(TemplateModule::set_mint_permission(2095 origin1,2096 collection_id,2097 false2098 ));20992100 assert_noop!(2101 TemplateModule::create_item(2102 origin2,2103 CollectionId(1),2104 account(2),2105 default_nft_data().into()2106 )2107 .map_err(|e| e.error),2108 CommonError::<Test>::PublicMintingNotAllowed2109 );2110 });2111}21122113// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.2114#[test]2115fn allow_list_test_13() {2116 new_test_ext().execute_with(|| {2117 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21182119 let origin1 = Origin::signed(1);21202121 assert_ok!(TemplateModule::set_public_access_mode(2122 origin1.clone(),2123 collection_id,2124 AccessMode::AllowList2125 ));2126 assert_ok!(TemplateModule::set_mint_permission(2127 origin1,2128 collection_id,2129 true2130 ));21312132 let data = default_nft_data();2133 create_test_item(collection_id, &data.into());2134 });2135}21362137// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.2138#[test]2139fn allow_list_test_14() {2140 new_test_ext().execute_with(|| {2141 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21422143 let origin1 = Origin::signed(1);2144 let origin2 = Origin::signed(2);21452146 assert_ok!(TemplateModule::set_public_access_mode(2147 origin1.clone(),2148 collection_id,2149 AccessMode::AllowList2150 ));2151 assert_ok!(TemplateModule::set_mint_permission(2152 origin1.clone(),2153 collection_id,2154 true2155 ));21562157 assert_ok!(TemplateModule::add_collection_admin(2158 origin1,2159 collection_id,2160 account(2)2161 ));21622163 assert_ok!(TemplateModule::create_item(2164 origin2,2165 collection_id,2166 account(2),2167 default_nft_data().into()2168 ));2169 });2170}21712172// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-allow listed address.2173#[test]2174fn allow_list_test_15() {2175 new_test_ext().execute_with(|| {2176 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21772178 let origin1 = Origin::signed(1);2179 let origin2 = Origin::signed(2);21802181 assert_ok!(TemplateModule::set_public_access_mode(2182 origin1.clone(),2183 collection_id,2184 AccessMode::AllowList2185 ));2186 assert_ok!(TemplateModule::set_mint_permission(2187 origin1,2188 collection_id,2189 true2190 ));21912192 assert_noop!(2193 TemplateModule::create_item(2194 origin2,2195 collection_id,2196 account(2),2197 default_nft_data().into()2198 )2199 .map_err(|e| e.error),2200 CommonError::<Test>::AddressNotInAllowlist2201 );2202 });2203}22042205// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by non-privileged and allow listed address.2206#[test]2207fn allow_list_test_16() {2208 new_test_ext().execute_with(|| {2209 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22102211 let origin1 = Origin::signed(1);2212 let origin2 = Origin::signed(2);22132214 assert_ok!(TemplateModule::set_public_access_mode(2215 origin1.clone(),2216 collection_id,2217 AccessMode::AllowList2218 ));2219 assert_ok!(TemplateModule::set_mint_permission(2220 origin1.clone(),2221 collection_id,2222 true2223 ));2224 assert_ok!(TemplateModule::add_to_allow_list(2225 origin1,2226 collection_id,2227 account(2)2228 ));22292230 assert_ok!(TemplateModule::create_item(2231 origin2,2232 collection_id,2233 account(2),2234 default_nft_data().into()2235 ));2236 });2237}22382239// Total number of collections. Positive test2240#[test]2241fn total_number_collections_bound() {2242 new_test_ext().execute_with(|| {2243 create_test_collection(&CollectionMode::NFT, CollectionId(1));2244 });2245}22462247#[test]2248fn create_max_collections() {2249 new_test_ext().execute_with(|| {2250 for i in 1..COLLECTION_NUMBER_LIMIT {2251 create_test_collection(&CollectionMode::NFT, CollectionId(i));2252 }2253 });2254}22552256// Total number of collections. Negative test2257#[test]2258fn total_number_collections_bound_neg() {2259 new_test_ext().execute_with(|| {2260 let origin1 = Origin::signed(1);22612262 for i in 1..=COLLECTION_NUMBER_LIMIT {2263 create_test_collection(&CollectionMode::NFT, CollectionId(i));2264 }22652266 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();2267 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();2268 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();22692270 // 11-th collection in chain. Expects error2271 assert_noop!(2272 TemplateModule::create_collection(2273 origin1,2274 col_name1,2275 col_desc1,2276 token_prefix1,2277 CollectionMode::NFT2278 ),2279 CommonError::<Test>::TotalCollectionsLimitExceeded2280 );2281 });2282}22832284// Owned tokens by a single address. Positive test2285#[test]2286fn owned_tokens_bound() {2287 new_test_ext().execute_with(|| {2288 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22892290 let data = default_nft_data();2291 create_test_item(collection_id, &data.clone().into());2292 create_test_item(collection_id, &data.into());2293 });2294}22952296// Owned tokens by a single address. Negotive test2297#[test]2298fn owned_tokens_bound_neg() {2299 new_test_ext().execute_with(|| {2300 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23012302 let origin1 = Origin::signed(1);23032304 for _ in 1..=MAX_TOKEN_OWNERSHIP {2305 let data = default_nft_data();2306 create_test_item(collection_id, &data.clone().into());2307 }23082309 let data = default_nft_data();2310 assert_noop!(2311 TemplateModule::create_item(origin1, CollectionId(1), account(1), data.into())2312 .map_err(|e| e.error),2313 CommonError::<Test>::AccountTokenLimitExceeded2314 );2315 });2316}23172318// Number of collection admins. Positive test2319#[test]2320fn collection_admins_bound() {2321 new_test_ext().execute_with(|| {2322 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23232324 let origin1 = Origin::signed(1);23252326 assert_ok!(TemplateModule::add_collection_admin(2327 origin1.clone(),2328 collection_id,2329 account(2)2330 ));2331 assert_ok!(TemplateModule::add_collection_admin(2332 origin1,2333 collection_id,2334 account(3)2335 ));2336 });2337}23382339// Number of collection admins. Negotive test2340#[test]2341fn collection_admins_bound_neg() {2342 new_test_ext().execute_with(|| {2343 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23442345 let origin1 = Origin::signed(1);23462347 for i in 0..COLLECTION_ADMINS_LIMIT {2348 assert_ok!(TemplateModule::add_collection_admin(2349 origin1.clone(),2350 collection_id,2351 account((2 + i).into())2352 ));2353 }2354 assert_noop!(2355 TemplateModule::add_collection_admin(2356 origin1,2357 collection_id,2358 account((3 + COLLECTION_ADMINS_LIMIT).into())2359 ),2360 CommonError::<Test>::CollectionAdminCountExceeded2361 );2362 });2363}2364// #endregion23652366#[test]2367fn set_const_on_chain_schema() {2368 new_test_ext().execute_with(|| {2369 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23702371 let origin1 = Origin::signed(1);2372 assert_ok!(TemplateModule::set_const_on_chain_schema(2373 origin1,2374 collection_id,2375 b"test const on chain schema".to_vec()2376 ));23772378 assert_eq!(2379 <pallet_common::CollectionById<Test>>::get(collection_id)2380 .unwrap()2381 .const_on_chain_schema,2382 b"test const on chain schema".to_vec()2383 );2384 assert_eq!(2385 <pallet_common::CollectionById<Test>>::get(collection_id)2386 .unwrap()2387 .variable_on_chain_schema,2388 b"".to_vec()2389 );2390 });2391}23922393#[test]2394fn set_variable_on_chain_schema() {2395 new_test_ext().execute_with(|| {2396 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23972398 let origin1 = Origin::signed(1);2399 assert_ok!(TemplateModule::set_variable_on_chain_schema(2400 origin1,2401 collection_id,2402 b"test variable on chain schema".to_vec()2403 ));24042405 assert_eq!(2406 <pallet_common::CollectionById<Test>>::get(collection_id)2407 .unwrap()2408 .const_on_chain_schema,2409 b"".to_vec()2410 );2411 assert_eq!(2412 <pallet_common::CollectionById<Test>>::get(collection_id)2413 .unwrap()2414 .variable_on_chain_schema,2415 b"test variable on chain schema".to_vec()2416 );2417 });2418}24192420#[test]2421fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {2422 new_test_ext().execute_with(|| {2423 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24242425 let origin1 = Origin::signed(1);24262427 let data = default_nft_data();2428 create_test_item(CollectionId(1), &data.into());24292430 let variable_data = b"test data".to_vec();2431 assert_ok!(TemplateModule::set_variable_meta_data(2432 origin1,2433 collection_id,2434 TokenId(1),2435 variable_data.clone()2436 ));24372438 assert_eq!(2439 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2440 .unwrap()2441 .variable_data,2442 variable_data2443 );2444 });2445}24462447#[test]2448fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {2449 new_test_ext().execute_with(|| {2450 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));24512452 let origin1 = Origin::signed(1);24532454 let data = default_re_fungible_data();2455 create_test_item(collection_id, &data.into());24562457 let variable_data = b"test data".to_vec();2458 assert_ok!(TemplateModule::set_variable_meta_data(2459 origin1,2460 collection_id,2461 TokenId(1),2462 variable_data.clone()2463 ));24642465 assert_eq!(2466 <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1))).variable_data,2467 variable_data2468 );2469 });2470}24712472#[test]2473fn set_variable_meta_data_on_fungible_token_fails() {2474 new_test_ext().execute_with(|| {2475 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));24762477 let origin1 = Origin::signed(1);24782479 let data = default_fungible_data();2480 create_test_item(collection_id, &data.into());24812482 let variable_data = b"test data".to_vec();2483 assert_noop!(2484 TemplateModule::set_variable_meta_data(2485 origin1,2486 collection_id,2487 TokenId(0),2488 variable_data2489 )2490 .map_err(|e| e.error),2491 <pallet_fungible::Error<Test>>::FungibleItemsDontHaveData2492 );2493 });2494}24952496#[test]2497fn set_variable_meta_data_on_nft_token_fails_for_big_data() {2498 new_test_ext().execute_with(|| {2499 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));25002501 let origin1 = Origin::signed(1);25022503 let data = default_nft_data();2504 create_test_item(collection_id, &data.into());25052506 let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();2507 assert_noop!(2508 TemplateModule::set_variable_meta_data(2509 origin1,2510 collection_id,2511 TokenId(1),2512 variable_data2513 )2514 .map_err(|e| e.error),2515 CommonError::<Test>::TokenVariableDataLimitExceeded2516 );2517 });2518}25192520#[test]2521fn set_variable_meta_data_on_re_fungible_token_fails_for_big_data() {2522 new_test_ext().execute_with(|| {2523 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));25242525 let origin1 = Origin::signed(1);25262527 let data = default_re_fungible_data();2528 create_test_item(collection_id, &data.into());25292530 let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();2531 assert_noop!(2532 TemplateModule::set_variable_meta_data(2533 origin1,2534 collection_id,2535 TokenId(1),2536 variable_data2537 )2538 .map_err(|e| e.error),2539 CommonError::<Test>::TokenVariableDataLimitExceeded2540 );2541 });2542}25432544#[test]2545fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {2546 new_test_ext().execute_with(|| {2547 //default_limits();25482549 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));25502551 let origin1 = Origin::signed(1);25522553 let data = default_nft_data();2554 create_test_item(collection_id, &data.into());25552556 assert_ok!(TemplateModule::set_meta_update_permission_flag(2557 origin1.clone(),2558 collection_id,2559 MetaUpdatePermission::ItemOwner,2560 ));25612562 let variable_data = b"ten chars.".to_vec();2563 assert_ok!(TemplateModule::set_variable_meta_data(2564 origin1,2565 collection_id,2566 TokenId(1),2567 variable_data.clone()2568 ));25692570 assert_eq!(2571 <pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))2572 .unwrap()2573 .variable_data,2574 variable_data2575 );2576 });2577}25782579#[test]2580fn set_variable_meta_data_on_nft_with_item_owner_permission_flag_neg() {2581 new_test_ext().execute_with(|| {2582 let collection_id =2583 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));25842585 let origin1 = Origin::signed(1);25862587 assert_ok!(TemplateModule::set_mint_permission(2588 origin1.clone(),2589 collection_id,2590 true2591 ));2592 assert_ok!(TemplateModule::add_to_allow_list(2593 origin1.clone(),2594 collection_id,2595 account(1)2596 ));25972598 let data = default_nft_data();2599 create_test_item(collection_id, &data.into());26002601 assert_ok!(TemplateModule::set_meta_update_permission_flag(2602 origin1.clone(),2603 collection_id,2604 MetaUpdatePermission::ItemOwner,2605 ));26062607 let variable_data = b"1234567890123".to_vec();2608 assert_noop!(2609 TemplateModule::set_variable_meta_data(2610 origin1,2611 collection_id,2612 TokenId(1),2613 variable_data.clone()2614 )2615 .map_err(|e| e.error),2616 CommonError::<Test>::TokenVariableDataLimitExceeded2617 );2618 })2619}26202621#[test]2622fn collection_transfer_flag_works() {2623 new_test_ext().execute_with(|| {2624 let origin1 = Origin::signed(1);26252626 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2627 assert_ok!(TemplateModule::set_transfers_enabled_flag(2628 origin1,2629 collection_id,2630 true2631 ));26322633 let data = default_nft_data();2634 create_test_item(collection_id, &data.into());2635 assert_eq!(2636 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2637 12638 );2639 assert_eq!(2640 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2641 true2642 );26432644 let origin1 = Origin::signed(1);26452646 // default scenario2647 assert_ok!(TemplateModule::transfer(2648 origin1,2649 account(2),2650 collection_id,2651 TokenId(1),2652 12653 ));2654 assert_eq!(2655 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2656 false2657 );2658 assert_eq!(2659 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2660 true2661 );2662 assert_eq!(2663 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2664 02665 );2666 assert_eq!(2667 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2668 12669 );2670 });2671}26722673#[test]2674fn set_variable_meta_data_on_nft_with_admin_flag() {2675 new_test_ext().execute_with(|| {2676 // default_limits();26772678 let collection_id =2679 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26802681 let origin1 = Origin::signed(1);2682 let origin2 = Origin::signed(2);26832684 assert_ok!(TemplateModule::set_mint_permission(2685 origin2.clone(),2686 collection_id,2687 true2688 ));2689 assert_ok!(TemplateModule::add_to_allow_list(2690 origin2.clone(),2691 collection_id,2692 account(1)2693 ));26942695 assert_ok!(TemplateModule::add_collection_admin(2696 origin2.clone(),2697 collection_id,2698 account(1)2699 ));27002701 let data = default_nft_data();2702 create_test_item(collection_id, &data.into());27032704 assert_ok!(TemplateModule::set_meta_update_permission_flag(2705 origin2.clone(),2706 collection_id,2707 MetaUpdatePermission::Admin,2708 ));27092710 let variable_data = b"test.".to_vec();2711 assert_ok!(TemplateModule::set_variable_meta_data(2712 origin1,2713 collection_id,2714 TokenId(1),2715 variable_data.clone()2716 ));27172718 assert_eq!(2719 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2720 .unwrap()2721 .variable_data,2722 variable_data2723 );2724 });2725}27262727#[test]2728fn set_variable_meta_data_on_nft_with_admin_flag_neg() {2729 new_test_ext().execute_with(|| {2730 // default_limits();27312732 let collection_id =2733 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27342735 let origin1 = Origin::signed(1);2736 let origin2 = Origin::signed(2);27372738 assert_ok!(TemplateModule::set_mint_permission(2739 origin2.clone(),2740 collection_id,2741 true2742 ));2743 assert_ok!(TemplateModule::add_to_allow_list(2744 origin2.clone(),2745 collection_id,2746 account(1)2747 ));27482749 let data = default_nft_data();2750 create_test_item(collection_id, &data.into());27512752 assert_ok!(TemplateModule::set_meta_update_permission_flag(2753 origin2.clone(),2754 collection_id,2755 MetaUpdatePermission::Admin,2756 ));27572758 let variable_data = b"test.".to_vec();2759 assert_noop!(2760 TemplateModule::set_variable_meta_data(2761 origin1,2762 collection_id,2763 TokenId(1),2764 variable_data.clone()2765 )2766 .map_err(|e| e.error),2767 CommonError::<Test>::NoPermission2768 );2769 });2770}27712772#[test]2773fn set_variable_meta_flag_after_freeze() {2774 new_test_ext().execute_with(|| {2775 // default_limits();27762777 let collection_id =2778 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27792780 let origin2 = Origin::signed(2);27812782 assert_ok!(TemplateModule::set_meta_update_permission_flag(2783 origin2.clone(),2784 collection_id,2785 MetaUpdatePermission::None,2786 ));2787 assert_noop!(2788 TemplateModule::set_meta_update_permission_flag(2789 origin2.clone(),2790 collection_id,2791 MetaUpdatePermission::Admin2792 ),2793 CommonError::<Test>::MetadataFlagFrozen2794 );2795 });2796}27972798#[test]2799fn set_variable_meta_data_on_nft_with_none_flag_neg() {2800 new_test_ext().execute_with(|| {2801 // default_limits();28022803 let collection_id =2804 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));2805 let origin1 = Origin::signed(1);28062807 let data = default_nft_data();2808 create_test_item(collection_id, &data.into());28092810 assert_ok!(TemplateModule::set_meta_update_permission_flag(2811 origin1.clone(),2812 collection_id,2813 MetaUpdatePermission::None,2814 ));28152816 let variable_data = b"test.".to_vec();2817 assert_noop!(2818 TemplateModule::set_variable_meta_data(2819 origin1.clone(),2820 collection_id,2821 TokenId(1),2822 variable_data.clone()2823 )2824 .map_err(|e| e.error),2825 CommonError::<Test>::NoPermission2826 );2827 });2828}28292830#[test]2831fn collection_transfer_flag_works_neg() {2832 new_test_ext().execute_with(|| {2833 let origin1 = Origin::signed(1);28342835 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2836 assert_ok!(TemplateModule::set_transfers_enabled_flag(2837 origin1,2838 collection_id,2839 false2840 ));28412842 let data = default_nft_data();2843 create_test_item(collection_id, &data.into());2844 assert_eq!(2845 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2846 12847 );2848 assert_eq!(2849 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2850 true2851 );28522853 let origin1 = Origin::signed(1);28542855 // default scenario2856 assert_noop!(2857 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 1)2858 .map_err(|e| e.error),2859 CommonError::<Test>::TransferNotAllowed2860 );2861 assert_eq!(2862 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2863 12864 );2865 assert_eq!(2866 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2867 02868 );2869 assert_eq!(2870 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2871 true2872 );2873 assert_eq!(2874 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2875 false2876 );2877 });2878}1// Tests to be written here2use super::*;3use crate::mock::*;4use crate::{AccessMode, CollectionMode};5use up_data_structs::{6 COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,7 CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,8 TokenId,9};10use frame_support::{assert_noop, assert_ok};11use sp_std::convert::TryInto;1213fn default_nft_data() -> CreateNftData {14 CreateNftData {15 const_data: vec![1, 2, 3].try_into().unwrap(),16 variable_data: vec![3, 2, 1].try_into().unwrap(),17 }18}1920fn default_fungible_data() -> CreateFungibleData {21 CreateFungibleData { value: 5 }22}2324fn default_re_fungible_data() -> CreateReFungibleData {25 CreateReFungibleData {26 const_data: vec![1, 2, 3].try_into().unwrap(),27 variable_data: vec![3, 2, 1].try_into().unwrap(),28 pieces: 1023,29 }30}3132fn create_test_collection_for_owner(33 mode: &CollectionMode,34 owner: u64,35 id: CollectionId,36) -> CollectionId {37 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();38 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();39 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();4041 let origin1 = Origin::signed(owner);42 assert_ok!(TemplateModule::create_collection(43 origin1,44 col_name1.try_into().unwrap(),45 col_desc1.try_into().unwrap(),46 token_prefix1.try_into().unwrap(),47 mode.clone()48 ));4950 let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();51 let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();52 let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();53 assert_eq!(54 <pallet_common::CollectionById<Test>>::get(id)55 .unwrap()56 .owner,57 owner58 );59 assert_eq!(60 <pallet_common::CollectionById<Test>>::get(id).unwrap().name,61 saved_col_name62 );63 assert_eq!(64 <pallet_common::CollectionById<Test>>::get(id).unwrap().mode,65 *mode66 );67 assert_eq!(68 <pallet_common::CollectionById<Test>>::get(id)69 .unwrap()70 .description,71 saved_description72 );73 assert_eq!(74 <pallet_common::CollectionById<Test>>::get(id)75 .unwrap()76 .token_prefix,77 saved_prefix78 );79 id80}8182fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {83 create_test_collection_for_owner(&mode, 1, id)84}8586fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {87 let origin1 = Origin::signed(1);88 assert_ok!(TemplateModule::create_item(89 origin1,90 collection_id,91 account(1),92 data.clone()93 ));94}9596fn account(sub: u64) -> TestCrossAccountId {97 TestCrossAccountId::from_sub(sub)98}99100// Use cases tests region101// #region102103#[test]104fn set_version_schema() {105 new_test_ext().execute_with(|| {106 let origin1 = Origin::signed(1);107 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));108109 assert_ok!(TemplateModule::set_schema_version(110 origin1,111 collection_id,112 SchemaVersion::Unique113 ));114 assert_eq!(115 <pallet_common::CollectionById<Test>>::get(collection_id)116 .unwrap()117 .schema_version,118 SchemaVersion::Unique119 );120 });121}122123#[test]124fn create_fungible_collection_fails_with_large_decimal_numbers() {125 new_test_ext().execute_with(|| {126 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();127 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();128 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();129130 let origin1 = Origin::signed(1);131 assert_noop!(132 TemplateModule::create_collection(133 origin1,134 col_name1.try_into().unwrap(),135 col_desc1.try_into().unwrap(),136 token_prefix1.try_into().unwrap(),137 CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1)138 ),139 Error::<Test>::CollectionDecimalPointLimitExceeded140 );141 });142}143144#[test]145fn create_nft_item() {146 new_test_ext().execute_with(|| {147 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));148149 let data = default_nft_data();150 create_test_item(collection_id, &data.clone().into());151152 let item = <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1)).unwrap();153 assert_eq!(item.const_data, data.const_data.into_inner());154 assert_eq!(item.variable_data, data.variable_data.into_inner());155 });156}157158// Use cases tests region159// #region160#[test]161fn create_nft_multiple_items() {162 new_test_ext().execute_with(|| {163 create_test_collection(&CollectionMode::NFT, CollectionId(1));164165 let origin1 = Origin::signed(1);166167 let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];168169 assert_ok!(TemplateModule::create_multiple_items(170 origin1,171 CollectionId(1),172 account(1),173 items_data174 .clone()175 .into_iter()176 .map(|d| { d.into() })177 .collect()178 ));179 for (index, data) in items_data.into_iter().enumerate() {180 let item = <pallet_nonfungible::TokenData<Test>>::get((181 CollectionId(1),182 TokenId((index + 1) as u32),183 ))184 .unwrap();185 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());186 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());187 }188 });189}190191#[test]192fn create_refungible_item() {193 new_test_ext().execute_with(|| {194 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));195196 let data = default_re_fungible_data();197 create_test_item(collection_id, &data.clone().into());198 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));199 let balance =200 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1)));201 assert_eq!(item.const_data, data.const_data.into_inner());202 assert_eq!(item.variable_data, data.variable_data.into_inner());203 assert_eq!(balance, 1023);204 });205}206207#[test]208fn create_multiple_refungible_items() {209 new_test_ext().execute_with(|| {210 create_test_collection(&CollectionMode::ReFungible, CollectionId(1));211212 let origin1 = Origin::signed(1);213214 let items_data = vec![215 default_re_fungible_data(),216 default_re_fungible_data(),217 default_re_fungible_data(),218 ];219220 assert_ok!(TemplateModule::create_multiple_items(221 origin1,222 CollectionId(1),223 account(1),224 items_data225 .clone()226 .into_iter()227 .map(|d| { d.into() })228 .collect()229 ));230 for (index, data) in items_data.into_iter().enumerate() {231 let item = <pallet_refungible::TokenData<Test>>::get((232 CollectionId(1),233 TokenId((index + 1) as u32),234 ));235 let balance =236 <pallet_refungible::Balance<Test>>::get((CollectionId(1), TokenId(1), account(1)));237 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());238 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());239 assert_eq!(balance, 1023);240 }241 });242}243244#[test]245fn create_fungible_item() {246 new_test_ext().execute_with(|| {247 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));248249 let data = default_fungible_data();250 create_test_item(collection_id, &data.into());251252 assert_eq!(253 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),254 5255 );256 });257}258259//#[test]260// fn create_multiple_fungible_items() {261// new_test_ext().execute_with(|| {262// default_limits();263264// create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));265266// let origin1 = Origin::signed(1);267268// let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];269270// assert_ok!(TemplateModule::create_multiple_items(271// origin1.clone(),272// 1,273// 1,274// items_data.clone().into_iter().map(|d| { d.into() }).collect()275// ));276277// for (index, _) in items_data.iter().enumerate() {278// assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);279// }280// assert_eq!(TemplateModule::balance_count(1, 1), 3000);281// assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);282// });283// }284285#[test]286fn transfer_fungible_item() {287 new_test_ext().execute_with(|| {288 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));289290 let origin1 = Origin::signed(1);291 let origin2 = Origin::signed(2);292293 let data = default_fungible_data();294 create_test_item(collection_id, &data.into());295296 assert_eq!(297 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),298 5299 );300301 // change owner scenario302 assert_ok!(TemplateModule::transfer(303 origin1,304 account(2),305 CollectionId(1),306 TokenId(0),307 5308 ));309 assert_eq!(310 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),311 0312 );313314 // split item scenario315 assert_ok!(TemplateModule::transfer(316 origin2.clone(),317 account(3),318 CollectionId(1),319 TokenId(0),320 3321 ));322323 // split item and new owner has account scenario324 assert_ok!(TemplateModule::transfer(325 origin2,326 account(3),327 CollectionId(1),328 TokenId(0),329 1330 ));331 assert_eq!(332 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(2))),333 1334 );335 assert_eq!(336 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(3))),337 4338 );339 });340}341342#[test]343fn transfer_refungible_item() {344 new_test_ext().execute_with(|| {345 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));346347 // Create RFT 1 in 1023 pieces for account 1348 let data = default_re_fungible_data();349 create_test_item(collection_id, &data.clone().into());350 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));351 assert_eq!(item.const_data, data.const_data.into_inner());352 assert_eq!(item.variable_data, data.variable_data.into_inner());353 assert_eq!(354 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),355 1356 );357 assert_eq!(358 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),359 1023360 );361 assert_eq!(362 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),363 true364 );365366 // Account 1 transfers all 1023 pieces of RFT 1 to account 2367 let origin1 = Origin::signed(1);368 let origin2 = Origin::signed(2);369 assert_ok!(TemplateModule::transfer(370 origin1,371 account(2),372 CollectionId(1),373 TokenId(1),374 1023375 ));376 assert_eq!(377 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),378 1023379 );380 assert_eq!(381 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),382 0383 );384 assert_eq!(385 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),386 1387 );388 assert_eq!(389 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),390 false391 );392 assert_eq!(393 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),394 true395 );396397 // Account 2 transfers 500 pieces of RFT 1 to account 3398 assert_ok!(TemplateModule::transfer(399 origin2.clone(),400 account(3),401 CollectionId(1),402 TokenId(1),403 500404 ));405 assert_eq!(406 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),407 523408 );409 assert_eq!(410 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),411 500412 );413 assert_eq!(414 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),415 1416 );417 assert_eq!(418 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),419 1420 );421 assert_eq!(422 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),423 true424 );425 assert_eq!(426 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),427 true428 );429430 // Account 2 transfers 200 more pieces of RFT 1 to account 3 with pre-existing balance431 assert_ok!(TemplateModule::transfer(432 origin2,433 account(3),434 CollectionId(1),435 TokenId(1),436 200437 ));438 assert_eq!(439 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),440 323441 );442 assert_eq!(443 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),444 700445 );446 assert_eq!(447 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),448 1449 );450 assert_eq!(451 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),452 1453 );454 assert_eq!(455 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),456 true457 );458 assert_eq!(459 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),460 true461 );462 });463}464465#[test]466fn transfer_nft_item() {467 new_test_ext().execute_with(|| {468 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));469470 let data = default_nft_data();471 create_test_item(collection_id, &data.into());472 assert_eq!(473 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),474 1475 );476 assert_eq!(477 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),478 true479 );480481 let origin1 = Origin::signed(1);482 // default scenario483 assert_ok!(TemplateModule::transfer(484 origin1,485 account(2),486 CollectionId(1),487 TokenId(1),488 1489 ));490 assert_eq!(491 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),492 0493 );494 assert_eq!(495 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),496 1497 );498 assert_eq!(499 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),500 false501 );502 assert_eq!(503 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),504 true505 );506 });507}508509#[test]510fn transfer_nft_item_wrong_value() {511 new_test_ext().execute_with(|| {512 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));513514 let data = default_nft_data();515 create_test_item(collection_id, &data.into());516 assert_eq!(517 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),518 1519 );520 assert_eq!(521 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),522 true523 );524525 let origin1 = Origin::signed(1);526527 assert_noop!(528 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 2)529 .map_err(|e| e.error),530 <pallet_nonfungible::Error::<Test>>::NonfungibleItemsHaveNoAmount531 );532 });533}534535#[test]536fn transfer_nft_item_zero_value() {537 new_test_ext().execute_with(|| {538 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));539540 let data = default_nft_data();541 create_test_item(collection_id, &data.into());542 assert_eq!(543 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),544 1545 );546 assert_eq!(547 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),548 true549 );550551 let origin1 = Origin::signed(1);552553 // Transferring 0 amount works on NFT...554 assert_ok!(TemplateModule::transfer(555 origin1,556 account(2),557 CollectionId(1),558 TokenId(1),559 0560 ));561 // ... and results in no transfer562 assert_eq!(563 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),564 1565 );566 assert_eq!(567 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),568 true569 );570 });571}572573#[test]574fn nft_approve_and_transfer_from() {575 new_test_ext().execute_with(|| {576 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));577578 let data = default_nft_data();579 create_test_item(collection_id, &data.into());580581 let origin1 = Origin::signed(1);582 let origin2 = Origin::signed(2);583584 assert_eq!(585 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),586 1587 );588 assert_eq!(589 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),590 true591 );592593 // neg transfer_from594 assert_noop!(595 TemplateModule::transfer_from(596 origin2.clone(),597 account(1),598 account(2),599 CollectionId(1),600 TokenId(1),601 1602 )603 .map_err(|e| e.error),604 CommonError::<Test>::TokenValueNotEnough605 );606607 // do approve608 assert_ok!(TemplateModule::approve(609 origin1,610 account(2),611 CollectionId(1),612 TokenId(1),613 1614 ));615 assert_eq!(616 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),617 account(2)618 );619620 assert_ok!(TemplateModule::transfer_from(621 origin2,622 account(1),623 account(3),624 CollectionId(1),625 TokenId(1),626 1627 ));628 assert!(629 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()630 );631 });632}633634#[test]635fn nft_approve_and_transfer_from_allow_list() {636 new_test_ext().execute_with(|| {637 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));638639 let origin1 = Origin::signed(1);640 let origin2 = Origin::signed(2);641642 // Create NFT 1 for account 1643 let data = default_nft_data();644 create_test_item(collection_id, &data.clone().into());645 assert_eq!(646 &<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))647 .unwrap()648 .const_data,649 &data.const_data.into_inner()650 );651 assert_eq!(652 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),653 1654 );655 assert_eq!(656 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),657 true658 );659660 // Allow allow-list users to mint and add accounts 1, 2, and 3 to allow-list661 assert_ok!(TemplateModule::set_mint_permission(662 origin1.clone(),663 CollectionId(1),664 true665 ));666 assert_ok!(TemplateModule::set_public_access_mode(667 origin1.clone(),668 CollectionId(1),669 AccessMode::AllowList670 ));671 assert_ok!(TemplateModule::add_to_allow_list(672 origin1.clone(),673 CollectionId(1),674 account(1)675 ));676 assert_ok!(TemplateModule::add_to_allow_list(677 origin1.clone(),678 CollectionId(1),679 account(2)680 ));681 assert_ok!(TemplateModule::add_to_allow_list(682 origin1.clone(),683 CollectionId(1),684 account(3)685 ));686687 // Account 1 approves account 2 for NFT 1688 assert_ok!(TemplateModule::approve(689 origin1.clone(),690 account(2),691 CollectionId(1),692 TokenId(1),693 1694 ));695 assert_eq!(696 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),697 account(2)698 );699700 // Account 2 transfers NFT 1 from account 1 to account 3701 assert_ok!(TemplateModule::transfer_from(702 origin2,703 account(1),704 account(3),705 CollectionId(1),706 TokenId(1),707 1708 ));709 assert!(710 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()711 );712 });713}714715#[test]716fn refungible_approve_and_transfer_from() {717 new_test_ext().execute_with(|| {718 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));719720 let origin1 = Origin::signed(1);721 let origin2 = Origin::signed(2);722723 // Create RFT 1 in 1023 pieces for account 1724 let data = default_re_fungible_data();725 create_test_item(collection_id, &data.into());726727 assert_eq!(728 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),729 1730 );731 assert_eq!(732 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),733 1023734 );735 assert_eq!(736 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),737 true738 );739740 // Allow public minting, enable allow-list and add accounts 1, 2, 3 to allow-list741 assert_ok!(TemplateModule::set_mint_permission(742 origin1.clone(),743 CollectionId(1),744 true745 ));746 assert_ok!(TemplateModule::set_public_access_mode(747 origin1.clone(),748 CollectionId(1),749 AccessMode::AllowList750 ));751 assert_ok!(TemplateModule::add_to_allow_list(752 origin1.clone(),753 CollectionId(1),754 account(1)755 ));756 assert_ok!(TemplateModule::add_to_allow_list(757 origin1.clone(),758 CollectionId(1),759 account(2)760 ));761 assert_ok!(TemplateModule::add_to_allow_list(762 origin1.clone(),763 CollectionId(1),764 account(3)765 ));766767 // Account 1 approves account 2 for 1023 pieces of RFT 1768 assert_ok!(TemplateModule::approve(769 origin1,770 account(2),771 CollectionId(1),772 TokenId(1),773 1023774 ));775 assert_eq!(776 <pallet_refungible::Allowance<Test>>::get((777 CollectionId(1),778 TokenId(1),779 account(1),780 account(2)781 )),782 1023783 );784785 // Account 2 transfers 100 pieces of RFT 1 from account 1 to account 3786 assert_ok!(TemplateModule::transfer_from(787 origin2,788 account(1),789 account(3),790 CollectionId(1),791 TokenId(1),792 100793 ));794 assert_eq!(795 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),796 1797 );798 assert_eq!(799 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),800 1801 );802 assert_eq!(803 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),804 923805 );806 assert_eq!(807 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),808 100809 );810 assert_eq!(811 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),812 true813 );814 assert_eq!(815 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),816 true817 );818 assert_eq!(819 <pallet_refungible::Allowance<Test>>::get((820 CollectionId(1),821 TokenId(1),822 account(1),823 account(2)824 )),825 923826 );827 });828}829830#[test]831fn fungible_approve_and_transfer_from() {832 new_test_ext().execute_with(|| {833 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));834835 let data = default_fungible_data();836 create_test_item(collection_id, &data.into());837838 let origin1 = Origin::signed(1);839 let origin2 = Origin::signed(2);840841 assert_ok!(TemplateModule::set_mint_permission(842 origin1.clone(),843 CollectionId(1),844 true845 ));846 assert_ok!(TemplateModule::set_public_access_mode(847 origin1.clone(),848 CollectionId(1),849 AccessMode::AllowList850 ));851 assert_ok!(TemplateModule::add_to_allow_list(852 origin1.clone(),853 CollectionId(1),854 account(1)855 ));856 assert_ok!(TemplateModule::add_to_allow_list(857 origin1.clone(),858 CollectionId(1),859 account(2)860 ));861 assert_ok!(TemplateModule::add_to_allow_list(862 origin1.clone(),863 CollectionId(1),864 account(3)865 ));866867 // do approve868 assert_ok!(TemplateModule::approve(869 origin1.clone(),870 account(2),871 CollectionId(1),872 TokenId(0),873 5874 ));875 assert_eq!(876 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),877 5878 );879 assert_ok!(TemplateModule::approve(880 origin1,881 account(3),882 CollectionId(1),883 TokenId(0),884 5885 ));886 assert_eq!(887 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),888 5889 );890 assert_eq!(891 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(3))),892 5893 );894895 assert_ok!(TemplateModule::transfer_from(896 origin2.clone(),897 account(1),898 account(3),899 CollectionId(1),900 TokenId(0),901 4902 ));903904 assert_eq!(905 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),906 1907 );908909 assert_noop!(910 TemplateModule::transfer_from(911 origin2,912 account(1),913 account(3),914 CollectionId(1),915 TokenId(0),916 4917 )918 .map_err(|e| e.error),919 CommonError::<Test>::TokenValueNotEnough920 );921 });922}923924#[test]925fn change_collection_owner() {926 new_test_ext().execute_with(|| {927 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));928929 let origin1 = Origin::signed(1);930 assert_ok!(TemplateModule::change_collection_owner(931 origin1,932 collection_id,933 2934 ));935 assert_eq!(936 <pallet_common::CollectionById<Test>>::get(collection_id)937 .unwrap()938 .owner,939 2940 );941 });942}943944#[test]945fn destroy_collection() {946 new_test_ext().execute_with(|| {947 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));948949 let origin1 = Origin::signed(1);950 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));951 });952}953954#[test]955fn burn_nft_item() {956 new_test_ext().execute_with(|| {957 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));958959 let origin1 = Origin::signed(1);960961 let data = default_nft_data();962 create_test_item(collection_id, &data.into());963964 // check balance (collection with id = 1, user id = 1)965 assert_eq!(966 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),967 1968 );969970 // burn item971 assert_ok!(TemplateModule::burn_item(972 origin1.clone(),973 collection_id,974 TokenId(1),975 1976 ));977 assert_eq!(978 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),979 0980 );981 });982}983984#[test]985fn burn_same_nft_item_twice() {986 new_test_ext().execute_with(|| {987 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));988989 let origin1 = Origin::signed(1);990991 let data = default_nft_data();992 create_test_item(collection_id, &data.into());993994 // check balance (collection with id = 1, user id = 1)995 assert_eq!(996 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),997 1998 );9991000 // burn item1001 assert_ok!(TemplateModule::burn_item(1002 origin1.clone(),1003 collection_id,1004 TokenId(1),1005 11006 ));10071008 // burn item again1009 assert_noop!(1010 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1).map_err(|e| e.error),1011 CommonError::<Test>::TokenNotFound1012 );10131014 assert_eq!(1015 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1016 01017 );1018 });1019}10201021#[test]1022fn burn_fungible_item() {1023 new_test_ext().execute_with(|| {1024 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10251026 let origin1 = Origin::signed(1);1027 assert_ok!(TemplateModule::add_collection_admin(1028 origin1.clone(),1029 collection_id,1030 account(2)1031 ));10321033 let data = default_fungible_data();1034 create_test_item(collection_id, &data.into());10351036 // check balance (collection with id = 1, user id = 1)1037 assert_eq!(1038 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1039 51040 );10411042 // burn item1043 assert_ok!(TemplateModule::burn_item(1044 origin1.clone(),1045 CollectionId(1),1046 TokenId(0),1047 51048 ));1049 assert_noop!(1050 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(0), 5).map_err(|e| e.error),1051 CommonError::<Test>::TokenValueTooLow1052 );10531054 assert_eq!(1055 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1056 01057 );1058 });1059}10601061#[test]1062fn burn_fungible_item_with_token_id() {1063 new_test_ext().execute_with(|| {1064 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10651066 let origin1 = Origin::signed(1);1067 assert_ok!(TemplateModule::add_collection_admin(1068 origin1.clone(),1069 collection_id,1070 account(2)1071 ));10721073 let data = default_fungible_data();1074 create_test_item(collection_id, &data.into());10751076 // check balance (collection with id = 1, user id = 1)1077 assert_eq!(1078 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1079 51080 );10811082 // Try to burn item using Token ID1083 assert_noop!(1084 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(1), 5).map_err(|e| e.error),1085 <pallet_fungible::Error::<Test>>::FungibleItemsHaveNoId1086 );1087 });1088}1089#[test]1090fn burn_refungible_item() {1091 new_test_ext().execute_with(|| {1092 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));1093 let origin1 = Origin::signed(1);10941095 assert_ok!(TemplateModule::set_mint_permission(1096 origin1.clone(),1097 collection_id,1098 true1099 ));1100 assert_ok!(TemplateModule::set_public_access_mode(1101 origin1.clone(),1102 collection_id,1103 AccessMode::AllowList1104 ));1105 assert_ok!(TemplateModule::add_to_allow_list(1106 origin1.clone(),1107 collection_id,1108 account(1)1109 ));11101111 assert_ok!(TemplateModule::add_collection_admin(1112 origin1.clone(),1113 collection_id,1114 account(2)1115 ));11161117 let data = default_re_fungible_data();1118 create_test_item(collection_id, &data.into());11191120 // check balance (collection with id = 1, user id = 2)1121 assert_eq!(1122 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),1123 11124 );1125 assert_eq!(1126 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1127 10231128 );11291130 // burn item1131 assert_ok!(TemplateModule::burn_item(1132 origin1.clone(),1133 collection_id,1134 TokenId(1),1135 10231136 ));1137 assert_noop!(1138 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1023)1139 .map_err(|e| e.error),1140 CommonError::<Test>::TokenValueTooLow1141 );11421143 assert_eq!(1144 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1145 01146 );1147 });1148}11491150#[test]1151fn add_collection_admin() {1152 new_test_ext().execute_with(|| {1153 let collection1_id =1154 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1155 let origin1 = Origin::signed(1);11561157 // Add collection admins1158 assert_ok!(TemplateModule::add_collection_admin(1159 origin1.clone(),1160 collection1_id,1161 account(2)1162 ));1163 assert_ok!(TemplateModule::add_collection_admin(1164 origin1,1165 collection1_id,1166 account(3)1167 ));11681169 // Owner is not an admin by default1170 assert_eq!(1171 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(1))),1172 false1173 );1174 assert!(<pallet_common::IsAdmin<Test>>::get((1175 CollectionId(1),1176 account(2)1177 )));1178 assert!(<pallet_common::IsAdmin<Test>>::get((1179 CollectionId(1),1180 account(3)1181 )));1182 });1183}11841185#[test]1186fn remove_collection_admin() {1187 new_test_ext().execute_with(|| {1188 let collection1_id =1189 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1190 let origin1 = Origin::signed(1);1191 let origin2 = Origin::signed(2);11921193 // Add collection admins 2 and 31194 assert_ok!(TemplateModule::add_collection_admin(1195 origin1.clone(),1196 collection1_id,1197 account(2)1198 ));1199 assert_ok!(TemplateModule::add_collection_admin(1200 origin1,1201 collection1_id,1202 account(3)1203 ));12041205 assert!(<pallet_common::IsAdmin<Test>>::get((1206 CollectionId(1),1207 account(2)1208 )));1209 assert!(<pallet_common::IsAdmin<Test>>::get((1210 CollectionId(1),1211 account(3)1212 )));12131214 // remove admin 31215 assert_ok!(TemplateModule::remove_collection_admin(1216 origin2,1217 CollectionId(1),1218 account(3)1219 ));12201221 // 2 is still admin, 3 is not an admin anymore1222 assert!(<pallet_common::IsAdmin<Test>>::get((1223 CollectionId(1),1224 account(2)1225 )));1226 assert_eq!(1227 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(3))),1228 false1229 );1230 });1231}12321233#[test]1234fn balance_of() {1235 new_test_ext().execute_with(|| {1236 let nft_collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1237 let fungible_collection_id =1238 create_test_collection(&CollectionMode::Fungible(3), CollectionId(2));1239 let re_fungible_collection_id =1240 create_test_collection(&CollectionMode::ReFungible, CollectionId(3));12411242 // check balance before1243 assert_eq!(1244 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1245 01246 );1247 assert_eq!(1248 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1249 01250 );1251 assert_eq!(1252 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1253 01254 );12551256 let nft_data = default_nft_data();1257 create_test_item(nft_collection_id, &nft_data.into());12581259 let fungible_data = default_fungible_data();1260 create_test_item(fungible_collection_id, &fungible_data.into());12611262 let re_fungible_data = default_re_fungible_data();1263 create_test_item(re_fungible_collection_id, &re_fungible_data.into());12641265 // check balance (collection with id = 1, user id = 1)1266 assert_eq!(1267 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1268 11269 );1270 assert_eq!(1271 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1272 51273 );1274 assert_eq!(1275 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1276 11277 );12781279 assert_eq!(1280 <pallet_nonfungible::Owned<Test>>::get((nft_collection_id, account(1), TokenId(1))),1281 true1282 );1283 assert_eq!(1284 <pallet_refungible::Owned<Test>>::get((1285 re_fungible_collection_id,1286 account(1),1287 TokenId(1)1288 )),1289 true1290 );1291 });1292}12931294#[test]1295fn approve() {1296 new_test_ext().execute_with(|| {1297 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));12981299 let data = default_nft_data();1300 create_test_item(collection_id, &data.into());13011302 let origin1 = Origin::signed(1);13031304 // approve1305 assert_ok!(TemplateModule::approve(1306 origin1,1307 account(2),1308 CollectionId(1),1309 TokenId(1),1310 11311 ));1312 assert_eq!(1313 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1314 account(2)1315 );1316 });1317}13181319#[test]1320fn transfer_from() {1321 new_test_ext().execute_with(|| {1322 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1323 let origin1 = Origin::signed(1);1324 let origin2 = Origin::signed(2);13251326 let data = default_nft_data();1327 create_test_item(collection_id, &data.into());13281329 // approve1330 assert_ok!(TemplateModule::approve(1331 origin1.clone(),1332 account(2),1333 CollectionId(1),1334 TokenId(1),1335 11336 ));1337 assert_eq!(1338 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1339 account(2)1340 );13411342 assert_ok!(TemplateModule::set_mint_permission(1343 origin1.clone(),1344 CollectionId(1),1345 true1346 ));1347 assert_ok!(TemplateModule::set_public_access_mode(1348 origin1.clone(),1349 CollectionId(1),1350 AccessMode::AllowList1351 ));1352 assert_ok!(TemplateModule::add_to_allow_list(1353 origin1.clone(),1354 CollectionId(1),1355 account(1)1356 ));1357 assert_ok!(TemplateModule::add_to_allow_list(1358 origin1.clone(),1359 CollectionId(1),1360 account(2)1361 ));1362 assert_ok!(TemplateModule::add_to_allow_list(1363 origin1,1364 CollectionId(1),1365 account(3)1366 ));13671368 assert_ok!(TemplateModule::transfer_from(1369 origin2,1370 account(1),1371 account(2),1372 CollectionId(1),1373 TokenId(1),1374 11375 ));13761377 // after transfer1378 assert_eq!(1379 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(1))),1380 01381 );1382 assert_eq!(1383 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(2))),1384 11385 );1386 });1387}13881389// #endregion13901391// Coverage tests region1392// #region13931394#[test]1395fn owner_can_add_address_to_allow_list() {1396 new_test_ext().execute_with(|| {1397 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));13981399 let origin1 = Origin::signed(1);1400 assert_ok!(TemplateModule::add_to_allow_list(1401 origin1,1402 collection_id,1403 account(2)1404 ));1405 assert!(<pallet_common::Allowlist<Test>>::get((1406 collection_id,1407 account(2)1408 )));1409 });1410}14111412#[test]1413fn admin_can_add_address_to_allow_list() {1414 new_test_ext().execute_with(|| {1415 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1416 let origin1 = Origin::signed(1);1417 let origin2 = Origin::signed(2);14181419 assert_ok!(TemplateModule::add_collection_admin(1420 origin1,1421 collection_id,1422 account(2)1423 ));1424 assert_ok!(TemplateModule::add_to_allow_list(1425 origin2,1426 collection_id,1427 account(3)1428 ));1429 assert!(<pallet_common::Allowlist<Test>>::get((1430 collection_id,1431 account(3)1432 )));1433 });1434}14351436#[test]1437fn nonprivileged_user_cannot_add_address_to_allow_list() {1438 new_test_ext().execute_with(|| {1439 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14401441 let origin2 = Origin::signed(2);1442 assert_noop!(1443 TemplateModule::add_to_allow_list(origin2, collection_id, account(3)),1444 CommonError::<Test>::NoPermission1445 );1446 });1447}14481449#[test]1450fn nobody_can_add_address_to_allow_list_of_nonexisting_collection() {1451 new_test_ext().execute_with(|| {1452 let origin1 = Origin::signed(1);14531454 assert_noop!(1455 TemplateModule::add_to_allow_list(origin1, CollectionId(1), account(2)),1456 CommonError::<Test>::CollectionNotFound1457 );1458 });1459}14601461#[test]1462fn nobody_can_add_address_to_allow_list_of_deleted_collection() {1463 new_test_ext().execute_with(|| {1464 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14651466 let origin1 = Origin::signed(1);1467 assert_ok!(TemplateModule::destroy_collection(1468 origin1.clone(),1469 collection_id1470 ));1471 assert_noop!(1472 TemplateModule::add_to_allow_list(origin1, collection_id, account(2)),1473 CommonError::<Test>::CollectionNotFound1474 );1475 });1476}14771478// If address is already added to allow list, nothing happens1479#[test]1480fn address_is_already_added_to_allow_list() {1481 new_test_ext().execute_with(|| {1482 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1483 let origin1 = Origin::signed(1);14841485 assert_ok!(TemplateModule::add_to_allow_list(1486 origin1.clone(),1487 collection_id,1488 account(2)1489 ));1490 assert_ok!(TemplateModule::add_to_allow_list(1491 origin1,1492 collection_id,1493 account(2)1494 ));1495 assert!(<pallet_common::Allowlist<Test>>::get((1496 collection_id,1497 account(2)1498 )));1499 });1500}15011502#[test]1503fn owner_can_remove_address_from_allow_list() {1504 new_test_ext().execute_with(|| {1505 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15061507 let origin1 = Origin::signed(1);1508 assert_ok!(TemplateModule::add_to_allow_list(1509 origin1.clone(),1510 collection_id,1511 account(2)1512 ));1513 assert_ok!(TemplateModule::remove_from_allow_list(1514 origin1,1515 collection_id,1516 account(2)1517 ));1518 assert_eq!(1519 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1520 false1521 );1522 });1523}15241525#[test]1526fn admin_can_remove_address_from_allow_list() {1527 new_test_ext().execute_with(|| {1528 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1529 let origin1 = Origin::signed(1);1530 let origin2 = Origin::signed(2);15311532 // Owner adds admin1533 assert_ok!(TemplateModule::add_collection_admin(1534 origin1.clone(),1535 collection_id,1536 account(2)1537 ));15381539 // Owner adds address 3 to allow list1540 assert_ok!(TemplateModule::add_to_allow_list(1541 origin1,1542 collection_id,1543 account(3)1544 ));15451546 // Admin removes address 3 from allow list1547 assert_ok!(TemplateModule::remove_from_allow_list(1548 origin2,1549 collection_id,1550 account(3)1551 ));1552 assert_eq!(1553 <pallet_common::Allowlist<Test>>::get((collection_id, account(3))),1554 false1555 );1556 });1557}15581559#[test]1560fn nonprivileged_user_cannot_remove_address_from_allow_list() {1561 new_test_ext().execute_with(|| {1562 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1563 let origin1 = Origin::signed(1);1564 let origin2 = Origin::signed(2);15651566 assert_ok!(TemplateModule::add_to_allow_list(1567 origin1,1568 collection_id,1569 account(2)1570 ));1571 assert_noop!(1572 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1573 CommonError::<Test>::NoPermission1574 );1575 assert!(<pallet_common::Allowlist<Test>>::get((1576 collection_id,1577 account(2)1578 )));1579 });1580}15811582#[test]1583fn nobody_can_remove_address_from_allow_list_of_nonexisting_collection() {1584 new_test_ext().execute_with(|| {1585 let origin1 = Origin::signed(1);15861587 assert_noop!(1588 TemplateModule::remove_from_allow_list(origin1, CollectionId(1), account(2)),1589 CommonError::<Test>::CollectionNotFound1590 );1591 });1592}15931594#[test]1595fn nobody_can_remove_address_from_allow_list_of_deleted_collection() {1596 new_test_ext().execute_with(|| {1597 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1598 let origin1 = Origin::signed(1);1599 let origin2 = Origin::signed(2);16001601 // Add account 2 to allow list1602 assert_ok!(TemplateModule::add_to_allow_list(1603 origin1.clone(),1604 collection_id,1605 account(2)1606 ));16071608 // Account 2 is in collection allow-list1609 assert!(<pallet_common::Allowlist<Test>>::get((1610 collection_id,1611 account(2)1612 )));16131614 // Destroy collection1615 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));16161617 // Attempt to remove account 2 from collection allow-list => error1618 assert_noop!(1619 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1620 CommonError::<Test>::CollectionNotFound1621 );16221623 // Account 2 is not found in collection allow-list anyway1624 assert_eq!(1625 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1626 false1627 );1628 });1629}16301631// If address is already removed from allow list, nothing happens1632#[test]1633fn address_is_already_removed_from_allow_list() {1634 new_test_ext().execute_with(|| {1635 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1636 let origin1 = Origin::signed(1);16371638 assert_ok!(TemplateModule::add_to_allow_list(1639 origin1.clone(),1640 collection_id,1641 account(2)1642 ));1643 assert_ok!(TemplateModule::remove_from_allow_list(1644 origin1.clone(),1645 collection_id,1646 account(2)1647 ));1648 assert_eq!(1649 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1650 false1651 );1652 assert_ok!(TemplateModule::remove_from_allow_list(1653 origin1,1654 collection_id,1655 account(2)1656 ));1657 assert_eq!(1658 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1659 false1660 );1661 });1662}16631664// If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom (2 tests)1665#[test]1666fn allow_list_test_1() {1667 new_test_ext().execute_with(|| {1668 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));16691670 let origin1 = Origin::signed(1);16711672 let data = default_nft_data();1673 create_test_item(collection_id, &data.into());16741675 assert_ok!(TemplateModule::set_public_access_mode(1676 origin1.clone(),1677 collection_id,1678 AccessMode::AllowList1679 ));1680 assert_ok!(TemplateModule::add_to_allow_list(1681 origin1.clone(),1682 collection_id,1683 account(2)1684 ));16851686 assert_noop!(1687 TemplateModule::transfer(origin1, account(3), CollectionId(1), TokenId(1), 1)1688 .map_err(|e| e.error),1689 CommonError::<Test>::AddressNotInAllowlist1690 );1691 });1692}16931694#[test]1695fn allow_list_test_2() {1696 new_test_ext().execute_with(|| {1697 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1698 let origin1 = Origin::signed(1);16991700 let data = default_nft_data();1701 create_test_item(collection_id, &data.into());17021703 assert_ok!(TemplateModule::set_public_access_mode(1704 origin1.clone(),1705 collection_id,1706 AccessMode::AllowList1707 ));1708 assert_ok!(TemplateModule::add_to_allow_list(1709 origin1.clone(),1710 collection_id,1711 account(1)1712 ));1713 assert_ok!(TemplateModule::add_to_allow_list(1714 origin1.clone(),1715 collection_id,1716 account(2)1717 ));17181719 // do approve1720 assert_ok!(TemplateModule::approve(1721 origin1.clone(),1722 account(1),1723 collection_id,1724 TokenId(1),1725 11726 ));1727 assert_eq!(1728 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1729 account(1)1730 );17311732 assert_ok!(TemplateModule::remove_from_allow_list(1733 origin1.clone(),1734 collection_id,1735 account(1)1736 ));17371738 assert_noop!(1739 TemplateModule::transfer_from(1740 origin1,1741 account(1),1742 account(3),1743 CollectionId(1),1744 TokenId(1),1745 11746 )1747 .map_err(|e| e.error),1748 CommonError::<Test>::AddressNotInAllowlist1749 );1750 });1751}17521753// If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom (2 tests)1754#[test]1755fn allow_list_test_3() {1756 new_test_ext().execute_with(|| {1757 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17581759 let origin1 = Origin::signed(1);17601761 let data = default_nft_data();1762 create_test_item(collection_id, &data.into());17631764 assert_ok!(TemplateModule::set_public_access_mode(1765 origin1.clone(),1766 collection_id,1767 AccessMode::AllowList1768 ));1769 assert_ok!(TemplateModule::add_to_allow_list(1770 origin1.clone(),1771 collection_id,1772 account(1)1773 ));17741775 assert_noop!(1776 TemplateModule::transfer(origin1, account(3), collection_id, TokenId(1), 1)1777 .map_err(|e| e.error),1778 CommonError::<Test>::AddressNotInAllowlist1779 );1780 });1781}17821783#[test]1784fn allow_list_test_4() {1785 new_test_ext().execute_with(|| {1786 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17871788 let origin1 = Origin::signed(1);17891790 let data = default_nft_data();1791 create_test_item(collection_id, &data.into());17921793 assert_ok!(TemplateModule::set_public_access_mode(1794 origin1.clone(),1795 collection_id,1796 AccessMode::AllowList1797 ));1798 assert_ok!(TemplateModule::add_to_allow_list(1799 origin1.clone(),1800 collection_id,1801 account(1)1802 ));1803 assert_ok!(TemplateModule::add_to_allow_list(1804 origin1.clone(),1805 collection_id,1806 account(2)1807 ));18081809 // do approve1810 assert_ok!(TemplateModule::approve(1811 origin1.clone(),1812 account(1),1813 collection_id,1814 TokenId(1),1815 11816 ));1817 assert_eq!(1818 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1819 account(1)1820 );18211822 assert_ok!(TemplateModule::remove_from_allow_list(1823 origin1.clone(),1824 collection_id,1825 account(2)1826 ));18271828 assert_noop!(1829 TemplateModule::transfer_from(1830 origin1,1831 account(1),1832 account(3),1833 collection_id,1834 TokenId(1),1835 11836 )1837 .map_err(|e| e.error),1838 CommonError::<Test>::AddressNotInAllowlist1839 );1840 });1841}18421843// If Public Access mode is set to AllowList, tokens can’t be destroyed by a non-allowlisted address (even if it owned them before enabling AllowList mode)1844#[test]1845fn allow_list_test_5() {1846 new_test_ext().execute_with(|| {1847 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18481849 let origin1 = Origin::signed(1);18501851 let data = default_nft_data();1852 create_test_item(collection_id, &data.into());18531854 assert_ok!(TemplateModule::set_public_access_mode(1855 origin1.clone(),1856 collection_id,1857 AccessMode::AllowList1858 ));1859 assert_noop!(1860 TemplateModule::burn_item(origin1.clone(), CollectionId(1), TokenId(1), 1)1861 .map_err(|e| e.error),1862 CommonError::<Test>::AddressNotInAllowlist1863 );1864 });1865}18661867// If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).1868#[test]1869fn allow_list_test_6() {1870 new_test_ext().execute_with(|| {1871 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18721873 let origin1 = Origin::signed(1);18741875 let data = default_nft_data();1876 create_test_item(collection_id, &data.into());18771878 assert_ok!(TemplateModule::set_public_access_mode(1879 origin1.clone(),1880 collection_id,1881 AccessMode::AllowList1882 ));18831884 // do approve1885 assert_noop!(1886 TemplateModule::approve(origin1, account(1), CollectionId(1), TokenId(1), 1)1887 .map_err(|e| e.error),1888 CommonError::<Test>::AddressNotInAllowlist1889 );1890 });1891}18921893// If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests) and1894// tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests)1895#[test]1896fn allow_list_test_7() {1897 new_test_ext().execute_with(|| {1898 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18991900 let data = default_nft_data();1901 create_test_item(collection_id, &data.into());19021903 let origin1 = Origin::signed(1);19041905 assert_ok!(TemplateModule::set_public_access_mode(1906 origin1.clone(),1907 collection_id,1908 AccessMode::AllowList1909 ));1910 assert_ok!(TemplateModule::add_to_allow_list(1911 origin1.clone(),1912 collection_id,1913 account(1)1914 ));1915 assert_ok!(TemplateModule::add_to_allow_list(1916 origin1.clone(),1917 collection_id,1918 account(2)1919 ));19201921 assert_ok!(TemplateModule::transfer(1922 origin1,1923 account(2),1924 CollectionId(1),1925 TokenId(1),1926 11927 ));1928 });1929}19301931#[test]1932fn allow_list_test_8() {1933 new_test_ext().execute_with(|| {1934 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19351936 // Create NFT for account 11937 let data = default_nft_data();1938 create_test_item(collection_id, &data.into());19391940 let origin1 = Origin::signed(1);19411942 // Toggle Allow List mode and add accounts 1 and 21943 assert_ok!(TemplateModule::set_public_access_mode(1944 origin1.clone(),1945 collection_id,1946 AccessMode::AllowList1947 ));1948 assert_ok!(TemplateModule::add_to_allow_list(1949 origin1.clone(),1950 collection_id,1951 account(1)1952 ));1953 assert_ok!(TemplateModule::add_to_allow_list(1954 origin1.clone(),1955 collection_id,1956 account(2)1957 ));19581959 // Sself-approve account 1 for NFT 11960 assert_ok!(TemplateModule::approve(1961 origin1.clone(),1962 account(1),1963 CollectionId(1),1964 TokenId(1),1965 11966 ));1967 assert_eq!(1968 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1969 account(1)1970 );19711972 // Transfer from 1 to 21973 assert_ok!(TemplateModule::transfer_from(1974 origin1,1975 account(1),1976 account(2),1977 CollectionId(1),1978 TokenId(1),1979 11980 ));1981 });1982}19831984// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.1985#[test]1986fn allow_list_test_9() {1987 new_test_ext().execute_with(|| {1988 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1989 let origin1 = Origin::signed(1);19901991 assert_ok!(TemplateModule::set_public_access_mode(1992 origin1.clone(),1993 collection_id,1994 AccessMode::AllowList1995 ));1996 assert_ok!(TemplateModule::set_mint_permission(1997 origin1,1998 collection_id,1999 false2000 ));20012002 let data = default_nft_data();2003 create_test_item(collection_id, &data.into());2004 });2005}20062007// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.2008#[test]2009fn allow_list_test_10() {2010 new_test_ext().execute_with(|| {2011 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20122013 let origin1 = Origin::signed(1);2014 let origin2 = Origin::signed(2);20152016 assert_ok!(TemplateModule::set_public_access_mode(2017 origin1.clone(),2018 collection_id,2019 AccessMode::AllowList2020 ));2021 assert_ok!(TemplateModule::set_mint_permission(2022 origin1.clone(),2023 collection_id,2024 false2025 ));20262027 assert_ok!(TemplateModule::add_collection_admin(2028 origin1,2029 collection_id,2030 account(2)2031 ));20322033 assert_ok!(TemplateModule::create_item(2034 origin2,2035 collection_id,2036 account(2),2037 default_nft_data().into()2038 ));2039 });2040}20412042// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and allow listed address.2043#[test]2044fn allow_list_test_11() {2045 new_test_ext().execute_with(|| {2046 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20472048 let origin1 = Origin::signed(1);2049 let origin2 = Origin::signed(2);20502051 assert_ok!(TemplateModule::set_public_access_mode(2052 origin1.clone(),2053 collection_id,2054 AccessMode::AllowList2055 ));2056 assert_ok!(TemplateModule::set_mint_permission(2057 origin1.clone(),2058 collection_id,2059 false2060 ));2061 assert_ok!(TemplateModule::add_to_allow_list(2062 origin1,2063 collection_id,2064 account(2)2065 ));20662067 assert_noop!(2068 TemplateModule::create_item(2069 origin2,2070 CollectionId(1),2071 account(2),2072 default_nft_data().into()2073 )2074 .map_err(|e| e.error),2075 CommonError::<Test>::PublicMintingNotAllowed2076 );2077 });2078}20792080// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-allow listed address.2081#[test]2082fn allow_list_test_12() {2083 new_test_ext().execute_with(|| {2084 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20852086 let origin1 = Origin::signed(1);2087 let origin2 = Origin::signed(2);20882089 assert_ok!(TemplateModule::set_public_access_mode(2090 origin1.clone(),2091 collection_id,2092 AccessMode::AllowList2093 ));2094 assert_ok!(TemplateModule::set_mint_permission(2095 origin1,2096 collection_id,2097 false2098 ));20992100 assert_noop!(2101 TemplateModule::create_item(2102 origin2,2103 CollectionId(1),2104 account(2),2105 default_nft_data().into()2106 )2107 .map_err(|e| e.error),2108 CommonError::<Test>::PublicMintingNotAllowed2109 );2110 });2111}21122113// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.2114#[test]2115fn allow_list_test_13() {2116 new_test_ext().execute_with(|| {2117 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21182119 let origin1 = Origin::signed(1);21202121 assert_ok!(TemplateModule::set_public_access_mode(2122 origin1.clone(),2123 collection_id,2124 AccessMode::AllowList2125 ));2126 assert_ok!(TemplateModule::set_mint_permission(2127 origin1,2128 collection_id,2129 true2130 ));21312132 let data = default_nft_data();2133 create_test_item(collection_id, &data.into());2134 });2135}21362137// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.2138#[test]2139fn allow_list_test_14() {2140 new_test_ext().execute_with(|| {2141 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21422143 let origin1 = Origin::signed(1);2144 let origin2 = Origin::signed(2);21452146 assert_ok!(TemplateModule::set_public_access_mode(2147 origin1.clone(),2148 collection_id,2149 AccessMode::AllowList2150 ));2151 assert_ok!(TemplateModule::set_mint_permission(2152 origin1.clone(),2153 collection_id,2154 true2155 ));21562157 assert_ok!(TemplateModule::add_collection_admin(2158 origin1,2159 collection_id,2160 account(2)2161 ));21622163 assert_ok!(TemplateModule::create_item(2164 origin2,2165 collection_id,2166 account(2),2167 default_nft_data().into()2168 ));2169 });2170}21712172// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-allow listed address.2173#[test]2174fn allow_list_test_15() {2175 new_test_ext().execute_with(|| {2176 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21772178 let origin1 = Origin::signed(1);2179 let origin2 = Origin::signed(2);21802181 assert_ok!(TemplateModule::set_public_access_mode(2182 origin1.clone(),2183 collection_id,2184 AccessMode::AllowList2185 ));2186 assert_ok!(TemplateModule::set_mint_permission(2187 origin1,2188 collection_id,2189 true2190 ));21912192 assert_noop!(2193 TemplateModule::create_item(2194 origin2,2195 collection_id,2196 account(2),2197 default_nft_data().into()2198 )2199 .map_err(|e| e.error),2200 CommonError::<Test>::AddressNotInAllowlist2201 );2202 });2203}22042205// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by non-privileged and allow listed address.2206#[test]2207fn allow_list_test_16() {2208 new_test_ext().execute_with(|| {2209 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22102211 let origin1 = Origin::signed(1);2212 let origin2 = Origin::signed(2);22132214 assert_ok!(TemplateModule::set_public_access_mode(2215 origin1.clone(),2216 collection_id,2217 AccessMode::AllowList2218 ));2219 assert_ok!(TemplateModule::set_mint_permission(2220 origin1.clone(),2221 collection_id,2222 true2223 ));2224 assert_ok!(TemplateModule::add_to_allow_list(2225 origin1,2226 collection_id,2227 account(2)2228 ));22292230 assert_ok!(TemplateModule::create_item(2231 origin2,2232 collection_id,2233 account(2),2234 default_nft_data().into()2235 ));2236 });2237}22382239// Total number of collections. Positive test2240#[test]2241fn total_number_collections_bound() {2242 new_test_ext().execute_with(|| {2243 create_test_collection(&CollectionMode::NFT, CollectionId(1));2244 });2245}22462247#[test]2248fn create_max_collections() {2249 new_test_ext().execute_with(|| {2250 for i in 1..COLLECTION_NUMBER_LIMIT {2251 create_test_collection(&CollectionMode::NFT, CollectionId(i));2252 }2253 });2254}22552256// Total number of collections. Negative test2257#[test]2258fn total_number_collections_bound_neg() {2259 new_test_ext().execute_with(|| {2260 let origin1 = Origin::signed(1);22612262 for i in 1..=COLLECTION_NUMBER_LIMIT {2263 create_test_collection(&CollectionMode::NFT, CollectionId(i));2264 }22652266 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();2267 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();2268 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();22692270 // 11-th collection in chain. Expects error2271 assert_noop!(2272 TemplateModule::create_collection(2273 origin1,2274 col_name1.try_into().unwrap(),2275 col_desc1.try_into().unwrap(),2276 token_prefix1.try_into().unwrap(),2277 CollectionMode::NFT2278 ),2279 CommonError::<Test>::TotalCollectionsLimitExceeded2280 );2281 });2282}22832284// Owned tokens by a single address. Positive test2285#[test]2286fn owned_tokens_bound() {2287 new_test_ext().execute_with(|| {2288 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22892290 let data = default_nft_data();2291 create_test_item(collection_id, &data.clone().into());2292 create_test_item(collection_id, &data.into());2293 });2294}22952296// Owned tokens by a single address. Negotive test2297#[test]2298fn owned_tokens_bound_neg() {2299 new_test_ext().execute_with(|| {2300 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23012302 let origin1 = Origin::signed(1);23032304 for _ in 1..=MAX_TOKEN_OWNERSHIP {2305 let data = default_nft_data();2306 create_test_item(collection_id, &data.clone().into());2307 }23082309 let data = default_nft_data();2310 assert_noop!(2311 TemplateModule::create_item(origin1, CollectionId(1), account(1), data.into())2312 .map_err(|e| e.error),2313 CommonError::<Test>::AccountTokenLimitExceeded2314 );2315 });2316}23172318// Number of collection admins. Positive test2319#[test]2320fn collection_admins_bound() {2321 new_test_ext().execute_with(|| {2322 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23232324 let origin1 = Origin::signed(1);23252326 assert_ok!(TemplateModule::add_collection_admin(2327 origin1.clone(),2328 collection_id,2329 account(2)2330 ));2331 assert_ok!(TemplateModule::add_collection_admin(2332 origin1,2333 collection_id,2334 account(3)2335 ));2336 });2337}23382339// Number of collection admins. Negotive test2340#[test]2341fn collection_admins_bound_neg() {2342 new_test_ext().execute_with(|| {2343 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23442345 let origin1 = Origin::signed(1);23462347 for i in 0..COLLECTION_ADMINS_LIMIT {2348 assert_ok!(TemplateModule::add_collection_admin(2349 origin1.clone(),2350 collection_id,2351 account((2 + i).into())2352 ));2353 }2354 assert_noop!(2355 TemplateModule::add_collection_admin(2356 origin1,2357 collection_id,2358 account((3 + COLLECTION_ADMINS_LIMIT).into())2359 ),2360 CommonError::<Test>::CollectionAdminCountExceeded2361 );2362 });2363}2364// #endregion23652366#[test]2367fn set_const_on_chain_schema() {2368 new_test_ext().execute_with(|| {2369 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23702371 let origin1 = Origin::signed(1);2372 assert_ok!(TemplateModule::set_const_on_chain_schema(2373 origin1,2374 collection_id,2375 b"test const on chain schema".to_vec().try_into().unwrap()2376 ));23772378 assert_eq!(2379 <pallet_common::CollectionById<Test>>::get(collection_id)2380 .unwrap()2381 .const_on_chain_schema,2382 b"test const on chain schema".to_vec()2383 );2384 assert_eq!(2385 <pallet_common::CollectionById<Test>>::get(collection_id)2386 .unwrap()2387 .variable_on_chain_schema,2388 b"".to_vec()2389 );2390 });2391}23922393#[test]2394fn set_variable_on_chain_schema() {2395 new_test_ext().execute_with(|| {2396 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23972398 let origin1 = Origin::signed(1);2399 assert_ok!(TemplateModule::set_variable_on_chain_schema(2400 origin1,2401 collection_id,2402 b"test variable on chain schema"2403 .to_vec()2404 .try_into()2405 .unwrap()2406 ));24072408 assert_eq!(2409 <pallet_common::CollectionById<Test>>::get(collection_id)2410 .unwrap()2411 .const_on_chain_schema,2412 b"".to_vec()2413 );2414 assert_eq!(2415 <pallet_common::CollectionById<Test>>::get(collection_id)2416 .unwrap()2417 .variable_on_chain_schema,2418 b"test variable on chain schema".to_vec()2419 );2420 });2421}24222423#[test]2424fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {2425 new_test_ext().execute_with(|| {2426 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24272428 let origin1 = Origin::signed(1);24292430 let data = default_nft_data();2431 create_test_item(CollectionId(1), &data.into());24322433 let variable_data = b"test data".to_vec();2434 assert_ok!(TemplateModule::set_variable_meta_data(2435 origin1,2436 collection_id,2437 TokenId(1),2438 variable_data.clone().try_into().unwrap()2439 ));24402441 assert_eq!(2442 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2443 .unwrap()2444 .variable_data,2445 variable_data2446 );2447 });2448}24492450#[test]2451fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {2452 new_test_ext().execute_with(|| {2453 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));24542455 let origin1 = Origin::signed(1);24562457 let data = default_re_fungible_data();2458 create_test_item(collection_id, &data.into());24592460 let variable_data = b"test data".to_vec();2461 assert_ok!(TemplateModule::set_variable_meta_data(2462 origin1,2463 collection_id,2464 TokenId(1),2465 variable_data.clone().try_into().unwrap()2466 ));24672468 assert_eq!(2469 <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1))).variable_data,2470 variable_data2471 );2472 });2473}24742475#[test]2476fn set_variable_meta_data_on_fungible_token_fails() {2477 new_test_ext().execute_with(|| {2478 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));24792480 let origin1 = Origin::signed(1);24812482 let data = default_fungible_data();2483 create_test_item(collection_id, &data.into());24842485 let variable_data = b"test data".to_vec();2486 assert_noop!(2487 TemplateModule::set_variable_meta_data(2488 origin1,2489 collection_id,2490 TokenId(0),2491 variable_data.try_into().unwrap()2492 )2493 .map_err(|e| e.error),2494 <pallet_fungible::Error<Test>>::FungibleItemsDontHaveData2495 );2496 });2497}24982499#[test]2500fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {2501 new_test_ext().execute_with(|| {2502 //default_limits();25032504 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));25052506 let origin1 = Origin::signed(1);25072508 let data = default_nft_data();2509 create_test_item(collection_id, &data.into());25102511 assert_ok!(TemplateModule::set_meta_update_permission_flag(2512 origin1.clone(),2513 collection_id,2514 MetaUpdatePermission::ItemOwner,2515 ));25162517 let variable_data = b"ten chars.".to_vec();2518 assert_ok!(TemplateModule::set_variable_meta_data(2519 origin1,2520 collection_id,2521 TokenId(1),2522 variable_data.clone().try_into().unwrap()2523 ));25242525 assert_eq!(2526 <pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))2527 .unwrap()2528 .variable_data,2529 variable_data2530 );2531 });2532}25332534#[test]2535fn collection_transfer_flag_works() {2536 new_test_ext().execute_with(|| {2537 let origin1 = Origin::signed(1);25382539 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2540 assert_ok!(TemplateModule::set_transfers_enabled_flag(2541 origin1,2542 collection_id,2543 true2544 ));25452546 let data = default_nft_data();2547 create_test_item(collection_id, &data.into());2548 assert_eq!(2549 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2550 12551 );2552 assert_eq!(2553 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2554 true2555 );25562557 let origin1 = Origin::signed(1);25582559 // default scenario2560 assert_ok!(TemplateModule::transfer(2561 origin1,2562 account(2),2563 collection_id,2564 TokenId(1),2565 12566 ));2567 assert_eq!(2568 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2569 false2570 );2571 assert_eq!(2572 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2573 true2574 );2575 assert_eq!(2576 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2577 02578 );2579 assert_eq!(2580 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2581 12582 );2583 });2584}25852586#[test]2587fn set_variable_meta_data_on_nft_with_admin_flag() {2588 new_test_ext().execute_with(|| {2589 // default_limits();25902591 let collection_id =2592 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));25932594 let origin1 = Origin::signed(1);2595 let origin2 = Origin::signed(2);25962597 assert_ok!(TemplateModule::set_mint_permission(2598 origin2.clone(),2599 collection_id,2600 true2601 ));2602 assert_ok!(TemplateModule::add_to_allow_list(2603 origin2.clone(),2604 collection_id,2605 account(1)2606 ));26072608 assert_ok!(TemplateModule::add_collection_admin(2609 origin2.clone(),2610 collection_id,2611 account(1)2612 ));26132614 let data = default_nft_data();2615 create_test_item(collection_id, &data.into());26162617 assert_ok!(TemplateModule::set_meta_update_permission_flag(2618 origin2.clone(),2619 collection_id,2620 MetaUpdatePermission::Admin,2621 ));26222623 let variable_data = b"test.".to_vec();2624 assert_ok!(TemplateModule::set_variable_meta_data(2625 origin1,2626 collection_id,2627 TokenId(1),2628 variable_data.clone().try_into().unwrap()2629 ));26302631 assert_eq!(2632 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2633 .unwrap()2634 .variable_data,2635 variable_data2636 );2637 });2638}26392640#[test]2641fn set_variable_meta_data_on_nft_with_admin_flag_neg() {2642 new_test_ext().execute_with(|| {2643 // default_limits();26442645 let collection_id =2646 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26472648 let origin1 = Origin::signed(1);2649 let origin2 = Origin::signed(2);26502651 assert_ok!(TemplateModule::set_mint_permission(2652 origin2.clone(),2653 collection_id,2654 true2655 ));2656 assert_ok!(TemplateModule::add_to_allow_list(2657 origin2.clone(),2658 collection_id,2659 account(1)2660 ));26612662 let data = default_nft_data();2663 create_test_item(collection_id, &data.into());26642665 assert_ok!(TemplateModule::set_meta_update_permission_flag(2666 origin2.clone(),2667 collection_id,2668 MetaUpdatePermission::Admin,2669 ));26702671 let variable_data = b"test.".to_vec();2672 assert_noop!(2673 TemplateModule::set_variable_meta_data(2674 origin1,2675 collection_id,2676 TokenId(1),2677 variable_data.try_into().unwrap()2678 )2679 .map_err(|e| e.error),2680 CommonError::<Test>::NoPermission2681 );2682 });2683}26842685#[test]2686fn set_variable_meta_flag_after_freeze() {2687 new_test_ext().execute_with(|| {2688 // default_limits();26892690 let collection_id =2691 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26922693 let origin2 = Origin::signed(2);26942695 assert_ok!(TemplateModule::set_meta_update_permission_flag(2696 origin2.clone(),2697 collection_id,2698 MetaUpdatePermission::None,2699 ));2700 assert_noop!(2701 TemplateModule::set_meta_update_permission_flag(2702 origin2.clone(),2703 collection_id,2704 MetaUpdatePermission::Admin2705 ),2706 CommonError::<Test>::MetadataFlagFrozen2707 );2708 });2709}27102711#[test]2712fn set_variable_meta_data_on_nft_with_none_flag_neg() {2713 new_test_ext().execute_with(|| {2714 // default_limits();27152716 let collection_id =2717 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));2718 let origin1 = Origin::signed(1);27192720 let data = default_nft_data();2721 create_test_item(collection_id, &data.into());27222723 assert_ok!(TemplateModule::set_meta_update_permission_flag(2724 origin1.clone(),2725 collection_id,2726 MetaUpdatePermission::None,2727 ));27282729 let variable_data = b"test.".to_vec();2730 assert_noop!(2731 TemplateModule::set_variable_meta_data(2732 origin1.clone(),2733 collection_id,2734 TokenId(1),2735 variable_data.try_into().unwrap()2736 )2737 .map_err(|e| e.error),2738 CommonError::<Test>::NoPermission2739 );2740 });2741}27422743#[test]2744fn collection_transfer_flag_works_neg() {2745 new_test_ext().execute_with(|| {2746 let origin1 = Origin::signed(1);27472748 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2749 assert_ok!(TemplateModule::set_transfers_enabled_flag(2750 origin1,2751 collection_id,2752 false2753 ));27542755 let data = default_nft_data();2756 create_test_item(collection_id, &data.into());2757 assert_eq!(2758 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2759 12760 );2761 assert_eq!(2762 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2763 true2764 );27652766 let origin1 = Origin::signed(1);27672768 // default scenario2769 assert_noop!(2770 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 1)2771 .map_err(|e| e.error),2772 CommonError::<Test>::TransferNotAllowed2773 );2774 assert_eq!(2775 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2776 12777 );2778 assert_eq!(2779 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2780 02781 );2782 assert_eq!(2783 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2784 true2785 );2786 assert_eq!(2787 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2788 false2789 );2790 });2791}primitives/data-structs/Cargo.tomldiffbeforeafterboth--- a/primitives/data-structs/Cargo.toml
+++ b/primitives/data-structs/Cargo.toml
@@ -16,11 +16,11 @@
serde = { version = "1.0.130", features = [
'derive',
], default-features = false, optional = true }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
derivative = "2.2.0"
[features]
primitives/data-structs/src/lib.rsdiffbeforeafterboth--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -22,6 +22,7 @@
WeightToFeePolynomial, DispatchClass,
},
StorageValue, transactional,
+ pallet_prelude::ConstU32,
};
use derivative::Derivative;
use scale_info::TypeInfo;
@@ -65,9 +66,9 @@
pub const VARIABLE_ON_CHAIN_SCHEMA_LIMIT: u32 = 8192;
pub const CONST_ON_CHAIN_SCHEMA_LIMIT: u32 = 1048576;
-pub const MAX_COLLECTION_NAME_LENGTH: usize = 64;
-pub const MAX_COLLECTION_DESCRIPTION_LENGTH: usize = 256;
-pub const MAX_TOKEN_PREFIX_LENGTH: usize = 16;
+pub const MAX_COLLECTION_NAME_LENGTH: u32 = 64;
+pub const MAX_COLLECTION_DESCRIPTION_LENGTH: u32 = 256;
+pub const MAX_TOKEN_PREFIX_LENGTH: u32 = 16;
/// How much items can be created per single
/// create_many call
@@ -77,13 +78,39 @@
pub const CustomDataLimit: u32 = CUSTOM_DATA_LIMIT;
}
-#[derive(Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug, Default, TypeInfo)]
+#[derive(
+ Encode,
+ Decode,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Clone,
+ Copy,
+ Debug,
+ Default,
+ TypeInfo,
+ MaxEncodedLen,
+)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct CollectionId(pub u32);
impl EncodeLike<u32> for CollectionId {}
impl EncodeLike<CollectionId> for u32 {}
-#[derive(Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug, Default, TypeInfo)]
+#[derive(
+ Encode,
+ Decode,
+ PartialEq,
+ Eq,
+ PartialOrd,
+ Ord,
+ Clone,
+ Copy,
+ Debug,
+ Default,
+ TypeInfo,
+ MaxEncodedLen,
+)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct TokenId(pub u32);
impl EncodeLike<u32> for TokenId {}
@@ -121,7 +148,7 @@
pub type DecimalPoints = u8;
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub enum CollectionMode {
NFT,
@@ -144,7 +171,7 @@
fn resolve(who: &AccountId, call: &Call) -> Option<AccountId>;
}
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub enum AccessMode {
Normal,
@@ -156,7 +183,7 @@
}
}
-#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub enum SchemaVersion {
ImageURL,
@@ -175,7 +202,7 @@
pub fraction: u128,
}
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub enum SponsorshipState<AccountId> {
/// The fees are applied to the transaction sender
@@ -211,22 +238,28 @@
}
}
-#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct Collection<AccountId> {
pub owner: AccountId,
pub mode: CollectionMode,
pub access: AccessMode,
- pub name: Vec<u16>, // 64 include null escape char
- pub description: Vec<u16>, // 256 include null escape char
- pub token_prefix: Vec<u8>, // 16 include null escape char
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
pub mint_mode: bool,
- pub offchain_schema: Vec<u8>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub offchain_schema: BoundedVec<u8, ConstU32<OFFCHAIN_SCHEMA_LIMIT>>,
pub schema_version: SchemaVersion,
pub sponsorship: SponsorshipState<AccountId>,
- pub limits: CollectionLimits, // Collection private restrictions
- pub variable_on_chain_schema: Vec<u8>, //
- pub const_on_chain_schema: Vec<u8>, //
+ pub limits: CollectionLimits, // Collection private restrictions
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub variable_on_chain_schema: BoundedVec<u8, ConstU32<VARIABLE_ON_CHAIN_SCHEMA_LIMIT>>,
+ #[cfg_attr(feature = "serde1", serde(with = "bounded_serde"))]
+ pub const_on_chain_schema: BoundedVec<u8, ConstU32<CONST_ON_CHAIN_SCHEMA_LIMIT>>,
pub meta_update_permission: MetaUpdatePermission,
}
@@ -253,7 +286,7 @@
}
/// All fields are wrapped in `Option`s, where None means chain default
-#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
pub struct CollectionLimits {
pub account_token_ownership_limit: Option<u32>,
@@ -378,7 +411,7 @@
pub pieces: u128,
}
-#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo)]
+#[derive(Encode, Decode, Debug, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum MetaUpdatePermission {
ItemOwner,
primitives/evm-mapping/Cargo.tomldiffbeforeafterboth--- a/primitives/evm-mapping/Cargo.toml
+++ b/primitives/evm-mapping/Cargo.toml
@@ -4,8 +4,8 @@
edition = "2021"
[dependencies]
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
[features]
default = ["std"]
primitives/rpc/Cargo.tomldiffbeforeafterboth--- a/primitives/rpc/Cargo.toml
+++ b/primitives/rpc/Cargo.toml
@@ -9,10 +9,10 @@
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
"derive",
] }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.14' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
[features]
default = ["std"]
primitives/rpc/src/lib.rsdiffbeforeafterboth--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -9,14 +9,18 @@
type Result<T> = core::result::Result<T, DispatchError>;
sp_api::decl_runtime_apis! {
+ #[api_version(2)]
pub trait UniqueApi<CrossAccountId, AccountId> where
AccountId: Decode,
CrossAccountId: pallet_common::account::CrossAccountId<AccountId>,
{
+ #[changed_in(2)]
+ fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId>;
+
fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>>;
fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool>;
- fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId>;
+ fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>>;
fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>>;
fn variable_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>>;
runtime/Cargo.tomldiffbeforeafterboth--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -10,7 +10,7 @@
license = 'All Rights Reserved'
name = 'unique-runtime'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.14'
+version = '0.9.16'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
@@ -69,6 +69,7 @@
'pallet-evm-transaction-payment/std',
'pallet-evm-coder-substrate/std',
'pallet-ethereum/std',
+ 'pallet-base-fee/std',
'fp-rpc/std',
'up-rpc/std',
'up-evm-mapping/std',
@@ -117,33 +118,33 @@
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-executive]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-system-benchmarking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.frame-system-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.hex-literal]
optional = true
@@ -158,131 +159,131 @@
[dependencies.pallet-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
# Contracts specific packages
# [dependencies.pallet-contracts]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-primitives]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-rpc-runtime-api]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
# version = '4.0.0-dev'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-sudo]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-transaction-payment-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.pallet-treasury]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
# [dependencies.pallet-vesting]
# default-features = false
# git = 'https://github.com/paritytech/substrate.git'
-# branch = 'polkadot-v0.9.14'
+# branch = 'polkadot-v0.9.16'
[dependencies.sp-arithmetic]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-block-builder]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-inherents]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-offchain]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-transaction-pool]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.sp-version]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
[dependencies.smallvec]
version = '1.6.1'
@@ -292,47 +293,47 @@
[dependencies.parachain-info]
default-features = false
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
[dependencies.cumulus-pallet-aura-ext]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
[dependencies.cumulus-pallet-parachain-system]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
[dependencies.cumulus-primitives-core]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
[dependencies.cumulus-pallet-xcm]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
[dependencies.cumulus-pallet-dmp-queue]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
[dependencies.cumulus-pallet-xcmp-queue]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
[dependencies.cumulus-primitives-utility]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
[dependencies.cumulus-primitives-timestamp]
-git = 'https://github.com/UniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.14'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.16'
default-features = false
################################################################################
@@ -340,33 +341,33 @@
[dependencies.polkadot-parachain]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
default-features = false
[dependencies.xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
default-features = false
[dependencies.xcm-builder]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
default-features = false
[dependencies.xcm-executor]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
default-features = false
[dependencies.pallet-xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.14'
+branch = 'release-v0.9.16'
default-features = false
[dependencies.orml-vesting]
git = 'https://github.com/UniqueNetwork/open-runtime-module-library'
-branch = 'polkadot-v0.9.14'
-version = "0.4.1-dev"
+branch = 'unique-polkadot-v0.9.16'
+version = "0.4.1-dev"
default-features = false
################################################################################
@@ -388,20 +389,21 @@
pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }
pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false }
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
-pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.14', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
+pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.16', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }
pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }
pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }
pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.14" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.16" }
################################################################################
# Build Dependencies
[build-dependencies.substrate-wasm-builder]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.14'
+branch = 'polkadot-v0.9.16'
runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -23,10 +23,11 @@
use sp_runtime::{
Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,
traits::{
- AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify, AccountIdConversion,
+ AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify,
+ AccountIdConversion, Zero,
},
transaction_validity::{TransactionSource, TransactionValidity},
- ApplyExtrinsicResult, MultiSignature,
+ ApplyExtrinsicResult, MultiSignature, RuntimeAppPublic,
};
use sp_std::prelude::*;
@@ -45,8 +46,9 @@
dispatch::DispatchResult,
PalletId, parameter_types, StorageValue, ConsensusEngineId,
traits::{
- Everything, Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem,
- LockIdentifier, OnUnbalanced, Randomness, FindAuthor,
+ tokens::currency::Currency as CurrencyT, OnUnbalanced as OnUnbalancedT, Everything,
+ Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem, LockIdentifier,
+ OnUnbalanced, Randomness, FindAuthor,
},
weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
@@ -68,10 +70,10 @@
use codec::{Encode, Decode};
use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, OnMethodCall};
use fp_rpc::TransactionStatus;
-use sp_core::crypto::Public;
use sp_runtime::{
- traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf},
+ traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating},
transaction_validity::TransactionValidityError,
+ SaturatedConversion,
};
// pub use pallet_timestamp::Call as TimestampCall;
@@ -83,12 +85,23 @@
use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};
use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
- EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,
- ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative,
- SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
- SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
+ EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser,
+ ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
+ SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
+};
+use xcm_executor::{Config, XcmExecutor, Assets};
+use sp_std::{marker::PhantomData};
+
+use xcm::latest::{
+ // Xcm,
+ AssetId::{Concrete},
+ Fungibility::Fungible as XcmFungible,
+ MultiAsset,
+ Error as XcmError,
};
-use xcm_executor::{Config, XcmExecutor};
+use xcm_executor::traits::{MatchesFungible, WeightTrader};
+//use xcm_executor::traits::MatchesFungible;
+use sp_runtime::traits::CheckedConversion;
// mod chain_extension;
// use crate::chain_extension::{NFTExtension, Imbalance};
@@ -147,10 +160,11 @@
spec_name: create_runtime_str!("quartz"),
impl_name: create_runtime_str!("quartz"),
authoring_version: 1,
- spec_version: 914000,
- impl_version: 1,
+ spec_version: 916001,
+ impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
+ state_version: 0,
};
pub const MILLISECS_PER_BLOCK: u64 = 12000;
@@ -283,7 +297,8 @@
type CallOrigin = EnsureAddressTruncated;
type WithdrawOrigin = EnsureAddressTruncated;
type AddressMapping = HashedAddressMapping<Self::Hashing>;
- type Precompiles = ();
+ type PrecompilesType = ();
+ type PrecompilesValue = ();
type Currency = Balances;
type Event = Event;
type OnMethodCall = (
@@ -370,6 +385,7 @@
type SystemWeightInfo = frame_system::weights::SubstrateWeight<Self>;
/// Version of the runtime.
type Version = Version;
+ type MaxConsumers = ConstU32<16>;
}
parameter_types! {
@@ -501,6 +517,7 @@
parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub const ProposalBondMinimum: Balance = 1 * UNIQUE;
+ pub const ProposalBondMaximum: Balance = 1000 * UNIQUE;
pub const SpendPeriod: BlockNumber = 5 * MINUTES;
pub const Burn: Permill = Permill::from_percent(0);
pub const TipCountdown: BlockNumber = 1 * DAYS;
@@ -526,6 +543,7 @@
type OnSlash = ();
type ProposalBond = ProposalBond;
type ProposalBondMinimum = ProposalBondMinimum;
+ type ProposalBondMaximum = ProposalBondMaximum;
type SpendPeriod = SpendPeriod;
type Burn = Burn;
type BurnDestination = ();
@@ -575,8 +593,8 @@
impl cumulus_pallet_parachain_system::Config for Runtime {
type Event = Event;
- type OnValidationData = ();
type SelfParaId = parachain_info::Pallet<Self>;
+ type OnSystemEvent = ();
// type DownwardMessageHandlers = cumulus_primitives_utility::UnqueuedDmpAsParent<
// MaxDownwardMessageWeight,
// XcmExecutor<XcmConfig>,
@@ -612,12 +630,22 @@
AccountId32Aliases<RelayNetwork, AccountId>,
);
+pub struct OnlySelfCurrency;
+impl<B: TryFrom<u128>> MatchesFungible<B> for OnlySelfCurrency {
+ fn matches_fungible(a: &MultiAsset) -> Option<B> {
+ match (&a.id, &a.fun) {
+ (Concrete(_), XcmFungible(ref amount)) => CheckedConversion::checked_from(*amount),
+ _ => None,
+ }
+ }
+}
+
/// Means for transacting assets on this chain.
pub type LocalAssetTransactor = CurrencyAdapter<
// Use this currency:
Balances,
// Use this currency when it is a fungible asset matching the given location or name:
- IsConcrete<RelayLocation>,
+ OnlySelfCurrency,
// Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:
LocationToAccountId,
// Our chain's account ID type (we can't get away without mentioning it explicitly):
@@ -673,6 +701,88 @@
// ^^^ Parent & its unit plurality gets free execution
);
+pub struct UsingOnlySelfCurrencyComponents<
+ WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,
+ AssetId: Get<MultiLocation>,
+ AccountId,
+ Currency: CurrencyT<AccountId>,
+ OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,
+>(
+ Weight,
+ Currency::Balance,
+ PhantomData<(WeightToFee, AssetId, AccountId, Currency, OnUnbalanced)>,
+);
+impl<
+ WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,
+ AssetId: Get<MultiLocation>,
+ AccountId,
+ Currency: CurrencyT<AccountId>,
+ OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,
+ > WeightTrader
+ for UsingOnlySelfCurrencyComponents<WeightToFee, AssetId, AccountId, Currency, OnUnbalanced>
+{
+ fn new() -> Self {
+ Self(0, Zero::zero(), PhantomData)
+ }
+
+ fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {
+ let amount = WeightToFee::calc(&weight);
+ let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?;
+
+ // location to this parachain through relay chain
+ let option1: xcm::v1::AssetId = Concrete(MultiLocation {
+ parents: 1,
+ interior: X1(Parachain(ParachainInfo::parachain_id().into())),
+ });
+ // direct location
+ let option2: xcm::v1::AssetId = Concrete(MultiLocation {
+ parents: 0,
+ interior: Here,
+ });
+
+ let required = if payment.fungible.contains_key(&option1) {
+ (option1, u128_amount).into()
+ } else if payment.fungible.contains_key(&option2) {
+ (option2, u128_amount).into()
+ } else {
+ (Concrete(MultiLocation::default()), u128_amount).into()
+ };
+
+ let unused = payment
+ .checked_sub(required)
+ .map_err(|_| XcmError::TooExpensive)?;
+ self.0 = self.0.saturating_add(weight);
+ self.1 = self.1.saturating_add(amount);
+ Ok(unused)
+ }
+
+ fn refund_weight(&mut self, weight: Weight) -> Option<MultiAsset> {
+ let weight = weight.min(self.0);
+ let amount = WeightToFee::calc(&weight);
+ self.0 -= weight;
+ self.1 = self.1.saturating_sub(amount);
+ let amount: u128 = amount.saturated_into();
+ if amount > 0 {
+ Some((AssetId::get(), amount).into())
+ } else {
+ None
+ }
+ }
+}
+impl<
+ WeightToFee: WeightToFeePolynomial<Balance = Currency::Balance>,
+ AssetId: Get<MultiLocation>,
+ AccountId,
+ Currency: CurrencyT<AccountId>,
+ OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,
+ > Drop
+ for UsingOnlySelfCurrencyComponents<WeightToFee, AssetId, AccountId, Currency, OnUnbalanced>
+{
+ fn drop(&mut self) {
+ OnUnbalanced::on_unbalanced(Currency::issue(self.1));
+ }
+}
+
pub struct XcmConfig;
impl Config for XcmConfig {
type Call = Call;
@@ -685,7 +795,13 @@
type LocationInverter = LocationInverter<Ancestry>;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
- type Trader = UsingComponents<IdentityFee<Balance>, RelayLocation, AccountId, Balances, ()>;
+ type Trader = UsingOnlySelfCurrencyComponents<
+ IdentityFee<Balance>,
+ RelayLocation,
+ AccountId,
+ Balances,
+ (),
+ >;
type ResponseHandler = (); // Don't handle responses for now.
type SubscriptionService = PolkadotXcm;
@@ -741,6 +857,7 @@
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
type VersionWrapper = ();
+ type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
}
impl cumulus_pallet_dmp_queue::Config for Runtime {
@@ -961,7 +1078,7 @@
Block,
frame_system::ChainContext<Runtime>,
Runtime,
- AllPallets,
+ AllPalletsReversedWithSystemFirst,
>;
impl_opaque_keys! {
@@ -1038,7 +1155,7 @@
dispatch_unique_runtime!(collection.token_exists(token))
}
- fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId, DispatchError> {
+ fn token_owner(collection: CollectionId, token: TokenId) -> Result<Option<CrossAccountId>, DispatchError> {
dispatch_unique_runtime!(collection.token_owner(token))
}
fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {
@@ -1186,9 +1303,11 @@
data: Vec<u8>,
value: U256,
gas_limit: U256,
- gas_price: Option<U256>,
+ max_fee_per_gas: Option<U256>,
+ max_priority_fee_per_gas: Option<U256>,
nonce: Option<U256>,
estimate: bool,
+ access_list: Option<Vec<(H160, Vec<H256>)>>,
) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
let config = if estimate {
let mut config = <Runtime as pallet_evm::Config>::config().clone();
@@ -1204,8 +1323,10 @@
data,
value,
gas_limit.low_u64(),
- gas_price,
+ max_fee_per_gas,
+ max_priority_fee_per_gas,
nonce,
+ access_list.unwrap_or_default(),
config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
).map_err(|err| err.into())
}
@@ -1216,9 +1337,11 @@
data: Vec<u8>,
value: U256,
gas_limit: U256,
- gas_price: Option<U256>,
+ max_fee_per_gas: Option<U256>,
+ max_priority_fee_per_gas: Option<U256>,
nonce: Option<U256>,
estimate: bool,
+ access_list: Option<Vec<(H160, Vec<H256>)>>,
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
let config = if estimate {
let mut config = <Runtime as pallet_evm::Config>::config().clone();
@@ -1233,8 +1356,10 @@
data,
value,
gas_limit.low_u64(),
- gas_price,
+ max_fee_per_gas,
+ max_priority_fee_per_gas,
nonce,
+ access_list.unwrap_or_default(),
config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),
).map_err(|err| err.into())
}
@@ -1269,6 +1394,10 @@
_ => None
}).collect()
}
+
+ fn elasticity() -> Option<Permill> {
+ None
+ }
}
impl sp_session::SessionKeys<Block> for Runtime {
@@ -1294,8 +1423,8 @@
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
- fn collect_collation_info() -> cumulus_primitives_core::CollationInfo {
- ParachainSystem::collect_collation_info()
+ fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
+ ParachainSystem::collect_collation_info(header)
}
}
@@ -1374,7 +1503,7 @@
list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
// list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);
- let storage_info = AllPalletsWithSystem::storage_info();
+ let storage_info = AllPalletsReversedWithSystemFirst::storage_info();
return (list, storage_info)
}
tests/README.mddiffbeforeafterboth--- a/tests/README.md
+++ b/tests/README.md
@@ -5,7 +5,7 @@
1. Checkout polkadot in sibling folder with this project
```bash
git clone https://github.com/paritytech/polkadot.git && cd polkadot
-git checkout release-v0.9.14
+git checkout release-v0.9.16
```
2. Build with nightly-2021-11-11
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -64,6 +64,7 @@
"testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",
"testSetVariableMetadataSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetadataSponsoringRateLimit.test.ts",
"testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",
+ "testXcmTransfer": "mocha --timeout 9999999 -r ts-node/register ./**/xcmTransfer.test.ts",
"testPalletPresence": "mocha --timeout 9999999 -r ts-node/register ./**/pallet-presence.test.ts",
"testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",
"testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",
tests/src/eth/payable.test.tsdiffbeforeafterboth--- a/tests/src/eth/payable.test.ts
+++ b/tests/src/eth/payable.test.ts
@@ -34,6 +34,8 @@
GAS_ARGS.gas,
await web3.eth.getGasPrice(),
null,
+ null,
+ [],
);
const events = await submitTransactionAsync(alice, tx);
const result = getGenericResult(events);
tests/src/eth/util/helpers.tsdiffbeforeafterboth--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -249,6 +249,8 @@
GAS_ARGS.gas,
await web3.eth.getGasPrice(),
null,
+ null,
+ [],
);
const events = await submitTransactionAsync(from, tx);
expect(events.some(({event: {section, method}}) => section == 'evm' && method == 'Executed')).to.be.true;
tests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-consts.ts
+++ b/tests/src/interfaces/augment-api-consts.ts
@@ -2,7 +2,7 @@
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api/types';
-import type { Vec, u128, u16, u32, u64, u8 } from '@polkadot/types';
+import type { Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types';
import type { Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
import type { Codec } from '@polkadot/types/types';
@@ -36,6 +36,9 @@
[key: string]: Codec;
};
inflation: {
+ /**
+ * Number of blocks that pass between treasury balance updates due to inflation
+ **/
inflationBlockInterval: u32 & AugmentedConst<ApiType>;
/**
* Generic const
@@ -146,6 +149,10 @@
**/
proposalBond: Permill & AugmentedConst<ApiType>;
/**
+ * Maximum amount of funds that should be placed in a deposit for making a proposal.
+ **/
+ proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
+ /**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -61,9 +61,9 @@
**/
CantApproveMoreThanOwned: AugmentedError<ApiType>;
/**
- * Exceeded max admin amount
+ * Exceeded max admin count
**/
- CollectionAdminAmountExceeded: AugmentedError<ApiType>;
+ CollectionAdminCountExceeded: AugmentedError<ApiType>;
/**
* Collection description can not be longer than 255 char.
**/
@@ -227,7 +227,7 @@
/**
* Tried to set data for fungible item
**/
- FungibleItemsHaveData: AugmentedError<ApiType>;
+ FungibleItemsDontHaveData: AugmentedError<ApiType>;
/**
* Not default id passed as TokenId argument
**/
@@ -381,6 +381,10 @@
};
system: {
/**
+ * The origin filter prevent the call to be dispatched.
+ **/
+ CallFiltered: AugmentedError<ApiType>;
+ /**
* Failed to extract the runtime version from the new runtime.
*
* Either calling `Core_version` or decoding `RuntimeVersion` failed.
@@ -485,6 +489,10 @@
};
xcmpQueue: {
/**
+ * Bad overweight index.
+ **/
+ BadOverweightIndex: AugmentedError<ApiType>;
+ /**
* Bad XCM data.
**/
BadXcm: AugmentedError<ApiType>;
@@ -497,6 +505,10 @@
**/
FailedToSend: AugmentedError<ApiType>;
/**
+ * Provided weight is possibly not enough to execute the message.
+ **/
+ WeightOverLimit: AugmentedError<ApiType>;
+ /**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
tests/src/interfaces/augment-api-events.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -2,7 +2,7 @@
/* eslint-disable */
import type { EthereumLog, EvmCoreErrorExitReason } from './ethereum';
-import type { PalletCommonAccountBasicCrossAccountIdRepr } from './unique';
+import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode } from './unique';
import type { ApiTypes } from '@polkadot/api/types';
import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types';
import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
@@ -12,48 +12,45 @@
export interface AugmentedEvents<ApiType> {
balances: {
/**
- * A balance was set by root. \[who, free, reserved\]
+ * A balance was set by root.
**/
BalanceSet: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
/**
- * Some amount was deposited into the account (e.g. for transaction fees). \[who,
- * deposit\]
+ * Some amount was deposited (e.g. for transaction fees).
**/
Deposit: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* An account was removed whose balance was non-zero but below ExistentialDeposit,
- * resulting in an outright loss. \[account, balance\]
+ * resulting in an outright loss.
**/
DustLost: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * An account was created with some free balance. \[account, free_balance\]
+ * An account was created with some free balance.
**/
Endowed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * Some balance was reserved (moved from free to reserved). \[who, value\]
+ * Some balance was reserved (moved from free to reserved).
**/
Reserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* Some balance was moved from the reserve of the first account to the second account.
* Final argument indicates the destination balance type.
- * \[from, to, balance, destination_status\]
**/
ReserveRepatriated: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128, FrameSupportTokensMiscBalanceStatus]>;
/**
- * Some amount was removed from the account (e.g. for misbehavior). \[who,
- * amount_slashed\]
+ * Some amount was removed from the account (e.g. for misbehavior).
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * Transfer succeeded. \[from, to, value\]
+ * Transfer succeeded.
**/
Transfer: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
/**
- * Some balance was unreserved (moved from reserved to free). \[who, value\]
+ * Some balance was unreserved (moved from reserved to free).
**/
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * Some amount was withdrawn from the account (e.g. for transaction fees). \[who, value\]
+ * Some amount was withdrawn from the account (e.g. for transaction fees).
**/
Withdraw: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
@@ -87,6 +84,14 @@
**/
CollectionCreated: AugmentedEvent<ApiType, [u32, u8, AccountId32]>;
/**
+ * New collection was destroyed
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique identifier of collection.
+ **/
+ CollectionDestroyed: AugmentedEvent<ApiType, [u32]>;
+ /**
* New item was created.
*
* # Arguments
@@ -289,7 +294,7 @@
InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;
/**
* Expected query response has been received but the expected origin location placed in
- * storate by this runtime previously cannot be decoded. The query remains registered.
+ * storage by this runtime previously cannot be decoded. The query remains registered.
*
* This is unexpected (since a location placed in storage in a previously executing
* runtime should be readable prior to query timeout) and dangerous since the possibly
@@ -390,9 +395,9 @@
};
sudo: {
/**
- * The \[sudoer\] just switched identity; the old key is supplied.
+ * The \[sudoer\] just switched identity; the old key is supplied if one existed.
**/
- KeyChanged: AugmentedEvent<ApiType, [AccountId32]>;
+ KeyChanged: AugmentedEvent<ApiType, [Option<AccountId32>]>;
/**
* A sudo just took place. \[result\]
**/
@@ -412,23 +417,23 @@
**/
CodeUpdated: AugmentedEvent<ApiType, []>;
/**
- * An extrinsic failed. \[error, info\]
+ * An extrinsic failed.
**/
ExtrinsicFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError, FrameSupportWeightsDispatchInfo]>;
/**
- * An extrinsic completed successfully. \[info\]
+ * An extrinsic completed successfully.
**/
ExtrinsicSuccess: AugmentedEvent<ApiType, [FrameSupportWeightsDispatchInfo]>;
/**
- * An \[account\] was reaped.
+ * An account was reaped.
**/
KilledAccount: AugmentedEvent<ApiType, [AccountId32]>;
/**
- * A new \[account\] was created.
+ * A new account was created.
**/
NewAccount: AugmentedEvent<ApiType, [AccountId32]>;
/**
- * On on-chain remark happened. \[origin, remark_hash\]
+ * On on-chain remark happened.
**/
Remarked: AugmentedEvent<ApiType, [AccountId32, H256]>;
/**
@@ -438,32 +443,31 @@
};
treasury: {
/**
- * Some funds have been allocated. \[proposal_index, award, beneficiary\]
+ * Some funds have been allocated.
**/
Awarded: AugmentedEvent<ApiType, [u32, u128, AccountId32]>;
/**
- * Some of our funds have been burnt. \[burn\]
+ * Some of our funds have been burnt.
**/
Burnt: AugmentedEvent<ApiType, [u128]>;
/**
- * Some funds have been deposited. \[deposit\]
+ * Some funds have been deposited.
**/
Deposit: AugmentedEvent<ApiType, [u128]>;
/**
- * New proposal. \[proposal_index\]
+ * New proposal.
**/
Proposed: AugmentedEvent<ApiType, [u32]>;
/**
- * A proposal was rejected; funds were slashed. \[proposal_index, slashed\]
+ * A proposal was rejected; funds were slashed.
**/
Rejected: AugmentedEvent<ApiType, [u32, u128]>;
/**
* Spending has finished; this is the amount that rolls over until next spend.
- * \[budget_remaining\]
**/
Rollover: AugmentedEvent<ApiType, [u128]>;
/**
- * We have ended a spend period and will now allocate funds. \[budget_remaining\]
+ * We have ended a spend period and will now allocate funds.
**/
Spending: AugmentedEvent<ApiType, [u128]>;
/**
@@ -471,17 +475,159 @@
**/
[key: string]: AugmentedEvent<ApiType>;
};
+ unique: {
+ /**
+ * Address was add to allow list
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * user: Address.
+ **/
+ AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Address was remove from allow list
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * user: Address.
+ **/
+ AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Collection admin was added
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * admin: Admin address.
+ **/
+ CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Collection admin was removed
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * admin: Admin address.
+ **/
+ CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ /**
+ * Collection limits was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ CollectionLimitSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Collection owned was change
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * owner: New owner address.
+ **/
+ CollectionOwnedChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;
+ /**
+ * Collection sponsor was removed
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ CollectionSponsorRemoved: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Collection sponsor was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * owner: New sponsor address.
+ **/
+ CollectionSponsorSet: AugmentedEvent<ApiType, [u32, AccountId32]>;
+ /**
+ * const on chain schema was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ ConstOnChainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Mint permission was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ MintPermissionSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Offchain schema was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ OffchainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Public access mode was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * mode: New access state.
+ **/
+ PublicAccessModeSet: AugmentedEvent<ApiType, [u32, UpDataStructsAccessMode]>;
+ /**
+ * Schema version was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ SchemaVersionSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * New sponsor was confirm
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ *
+ * * sponsor: New sponsor address.
+ **/
+ SponsorshipConfirmed: AugmentedEvent<ApiType, [u32, AccountId32]>;
+ /**
+ * Variable on chain schema was set
+ *
+ * # Arguments
+ *
+ * * collection_id: Globally unique collection identifier.
+ **/
+ VariableOnChainSchemaSet: AugmentedEvent<ApiType, [u32]>;
+ /**
+ * Generic event
+ **/
+ [key: string]: AugmentedEvent<ApiType>;
+ };
vesting: {
/**
- * Claimed vesting. \[who, locked_amount\]
+ * Claimed vesting.
**/
Claimed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
- * Added new vesting schedule. \[from, to, vesting_schedule\]
+ * Added new vesting schedule.
**/
VestingScheduleAdded: AugmentedEvent<ApiType, [AccountId32, AccountId32, OrmlVestingVestingSchedule]>;
/**
- * Updated vesting schedules. \[who\]
+ * Updated vesting schedules.
**/
VestingSchedulesUpdated: AugmentedEvent<ApiType, [AccountId32]>;
/**
@@ -503,6 +649,14 @@
**/
Fail: AugmentedEvent<ApiType, [Option<H256>, XcmV2TraitsError]>;
/**
+ * An XCM exceeded the individual message weight budget.
+ **/
+ OverweightEnqueued: AugmentedEvent<ApiType, [u32, u32, u64, u64]>;
+ /**
+ * An XCM from the overweight queue was executed with the given actual weight used.
+ **/
+ OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
+ /**
* Some XCM was executed ok.
**/
Success: AugmentedEvent<ApiType, [Option<H256>]>;
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -1,8 +1,8 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
-import type { EthereumBlock, EthereumReceipt, EthereumTransactionLegacyTransaction, FpRpcTransactionStatus } from './ethereum';
-import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
+import type { EthereumBlock, FpRpcTransactionStatus } from './ethereum';
+import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueQueueConfigData, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique';
import type { ApiTypes } from '@polkadot/api/types';
import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
@@ -105,7 +105,7 @@
/**
* The current Ethereum receipts.
**/
- currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceipt>>>, []> & QueryableStorageEntry<ApiType, []>;
+ currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceiptReceiptV3>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current transaction statuses.
**/
@@ -113,7 +113,7 @@
/**
* Current building block's transactions and receipts.
**/
- pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionLegacyTransaction, FpRpcTransactionStatus, EthereumReceipt]>>>, []> & QueryableStorageEntry<ApiType, []>;
+ pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
@@ -163,10 +163,22 @@
};
inflation: {
/**
- * Current block inflation
+ * Current inflation for `InflationBlockInterval` number of blocks
**/
blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
+ * Next target (relay) block when inflation will be applied
+ **/
+ nextInflationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
+ /**
+ * Next target (relay) block when inflation is recalculated
+ **/
+ nextRecalculationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
+ /**
+ * Relay block when inflation has started
+ **/
+ startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
+ /**
* starting year total issuance
**/
startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
@@ -208,6 +220,12 @@
**/
authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;
/**
+ * A custom head data that should be returned as result of `validate_block`.
+ *
+ * See [`Pallet::set_custom_validation_head_data`] for more information.
+ **/
+ customValidationHeadData: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
+ /**
* Were the validation data set to notify the relay chain?
**/
didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
@@ -353,7 +371,7 @@
/**
* The `AccountId` of the sudo key.
**/
- key: AugmentedQuery<ApiType, () => Observable<AccountId32>, []> & QueryableStorageEntry<ApiType, []>;
+ key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
@@ -540,7 +558,7 @@
/**
* Status of the inbound XCMP channels.
**/
- inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueInboundStatus, Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>]>>>, []> & QueryableStorageEntry<ApiType, []>;
+ inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueInboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The messages outbound in a given XCMP channel.
**/
@@ -553,7 +571,19 @@
* case of the need to send a high-priority signal message this block.
* The bool is true if there is a signal message waiting to be sent.
**/
- outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, CumulusPalletXcmpQueueOutboundStatus, bool, u16, u16]>>>, []> & QueryableStorageEntry<ApiType, []>;
+ outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueOutboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;
+ /**
+ * The messages that exceeded max individual message weight budget.
+ *
+ * These message stay in this storage map until they are manually dispatched via
+ * `service_overweight`.
+ **/
+ overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
+ /**
+ * The number of overweight messages ever recorded in `Overweight`. Also doubles as the next
+ * available free overweight index.
+ **/
+ overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The configuration which controls the dynamics of the outbound queue.
**/
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -1,14 +1,13 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
-import type { EthereumTransactionLegacyTransaction } from './ethereum';
import type { CumulusPrimitivesParachainInherentParachainInherentData } from './polkadot';
import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion } from './unique';
import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';
-import type { SpCoreChangesTrieChangesTrieConfiguration, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
import type { AnyNumber, ITuple } from '@polkadot/types/types';
declare module '@polkadot/api/types/submittable' {
@@ -33,28 +32,17 @@
* Set the balances of a given account.
*
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
- * also decrease the total issuance of the system (`TotalIssuance`).
+ * also alter the total issuance of the system (`TotalIssuance`) appropriately.
* If the new free or reserved balance is below the existential deposit,
* it will reset the account nonce (`frame_system::AccountNonce`).
*
* The dispatch origin for this call is `root`.
- *
- * # <weight>
- * - Independent of the arguments.
- * - Contains a limited number of reads and writes.
- * ---------------------
- * - Base Weight:
- * - Creating: 27.56 µs
- * - Killing: 35.11 µs
- * - DB Weight: 1 Read, 1 Write to `who`
- * # </weight>
**/
setBalance: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, newFree: Compact<u128> | AnyNumber | Uint8Array, newReserved: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, Compact<u128>]>;
/**
* Transfer some liquid free balance to another account.
*
* `transfer` will set the `FreeBalance` of the sender and receiver.
- * It will decrease the total issuance of the system by the `TransferFee`.
* If the sender's account is below the existential deposit as a result
* of the transfer, the account will be reaped.
*
@@ -75,8 +63,6 @@
* - `transfer_keep_alive` works the same way as `transfer`, but has an additional check
* that the transfer will not kill the origin account.
* ---------------------------------
- * - Base Weight: 73.64 µs, worst case scenario (account created, account removed)
- * - DB Weight: 1 Read and 1 Write to destination account
* - Origin account is already in memory, so no DB operations for them.
* # </weight>
**/
@@ -108,11 +94,6 @@
* 99% of the time you want [`transfer`] instead.
*
* [`transfer`]: struct.Pallet.html#method.transfer
- * # <weight>
- * - Cheaper than transfer because account cannot be killed.
- * - Base Weight: 51.4 µs
- * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)
- * #</weight>
**/
transferKeepAlive: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>]>;
/**
@@ -157,7 +138,7 @@
/**
* Transact an Ethereum transaction.
**/
- transact: AugmentedSubmittable<(transaction: EthereumTransactionLegacyTransaction | { nonce?: any; gasPrice?: any; gasLimit?: any; action?: any; value?: any; input?: any; signature?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [EthereumTransactionLegacyTransaction]>;
+ transact: AugmentedSubmittable<(transaction: EthereumTransactionTransactionV2 | { Legacy: any } | { EIP2930: any } | { EIP1559: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [EthereumTransactionTransactionV2]>;
/**
* Generic tx
**/
@@ -167,16 +148,16 @@
/**
* Issue an EVM call operation. This is similar to a message call transaction in Ethereum.
**/
- call: AugmentedSubmittable<(source: H160 | string | Uint8Array, target: H160 | string | Uint8Array, input: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, gasPrice: U256 | AnyNumber | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, H160, Bytes, U256, u64, U256, Option<U256>]>;
+ call: AugmentedSubmittable<(source: H160 | string | Uint8Array, target: H160 | string | Uint8Array, input: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | object | string | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array, accessList: Vec<ITuple<[H160, Vec<H256>]>> | ([H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]])[]) => SubmittableExtrinsic<ApiType>, [H160, H160, Bytes, U256, u64, U256, Option<U256>, Option<U256>, Vec<ITuple<[H160, Vec<H256>]>>]>;
/**
* Issue an EVM create operation. This is similar to a contract creation transaction in
* Ethereum.
**/
- create: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, gasPrice: U256 | AnyNumber | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes, U256, u64, U256, Option<U256>]>;
+ create: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | object | string | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array, accessList: Vec<ITuple<[H160, Vec<H256>]>> | ([H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]])[]) => SubmittableExtrinsic<ApiType>, [H160, Bytes, U256, u64, U256, Option<U256>, Option<U256>, Vec<ITuple<[H160, Vec<H256>]>>]>;
/**
* Issue an EVM create2 operation.
**/
- create2: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, salt: H256 | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, gasPrice: U256 | AnyNumber | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes, H256, U256, u64, U256, Option<U256>]>;
+ create2: AugmentedSubmittable<(source: H160 | string | Uint8Array, init: Bytes | string | Uint8Array, salt: H256 | string | Uint8Array, value: U256 | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, maxFeePerGas: U256 | AnyNumber | Uint8Array, maxPriorityFeePerGas: Option<U256> | null | object | string | Uint8Array, nonce: Option<U256> | null | object | string | Uint8Array, accessList: Vec<ITuple<[H160, Vec<H256>]>> | ([H160 | string | Uint8Array, Vec<H256> | (H256 | string | Uint8Array)[]])[]) => SubmittableExtrinsic<ApiType>, [H160, Bytes, H256, U256, u64, U256, Option<U256>, Option<U256>, Vec<ITuple<[H160, Vec<H256>]>>]>;
/**
* Withdraw balance from EVM into currency/balances pallet.
**/
@@ -197,6 +178,20 @@
};
inflation: {
/**
+ * This method sets the inflation start date. Can be only called once.
+ * Inflation start block can be backdated and will catch up. The method will create Treasury
+ * account if it does not exist and perform the first inflation deposit.
+ *
+ * # Permissions
+ *
+ * * Root
+ *
+ * # Arguments
+ *
+ * * inflation_start_relay_block: The relay chain block at which inflation should start
+ **/
+ startInflation: AugmentedSubmittable<(inflationStartRelayBlock: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+ /**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
@@ -300,8 +295,8 @@
* an `AccountId32` value.
* - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the
* `dest` side. May not be empty.
- * - `dest_weight`: Equal to the total weight on `dest` of the XCM message
- * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`.
+ * - `fee_asset_item`: The index into `assets` of the item which should be used to pay
+ * fees.
* - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
**/
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
@@ -339,8 +334,8 @@
* an `AccountId32` value.
* - `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the
* `dest` side. May not be empty.
- * - `dest_weight`: Equal to the total weight on `dest` of the XCM message
- * `Teleport { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`.
+ * - `fee_asset_item`: The index into `assets` of the item which should be used to pay
+ * fees.
**/
teleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32]>;
/**
@@ -374,7 +369,7 @@
* - Weight of derivative `call` execution + 10,000.
* # </weight>
**/
- sudo: AugmentedSubmittable<(call: Call) => SubmittableExtrinsic<ApiType>, [Call]>;
+ sudo: AugmentedSubmittable<(call: Call | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
/**
* Authenticates the sudo key and dispatches a function call with `Signed` origin from
* a given account.
@@ -388,7 +383,7 @@
* - Weight of derivative `call` execution + 10,000.
* # </weight>
**/
- sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, ) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
+ sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
/**
* Authenticates the sudo key and dispatches a function call with `Root` origin.
* This function does not check the weight of the call, and instead allows the
@@ -401,7 +396,7 @@
* - The weight of this call is defined by the caller.
* # </weight>
**/
- sudoUncheckedWeight: AugmentedSubmittable<(call: Call, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
+ sudoUncheckedWeight: AugmentedSubmittable<(call: Call | string | Uint8Array, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
/**
* Generic tx
**/
@@ -417,24 +412,10 @@
*
* **NOTE:** We rely on the Root origin to provide us the number of subkeys under
* the prefix we are removing to accurately calculate the weight of this function.
- *
- * # <weight>
- * - `O(P)` where `P` amount of keys with prefix `prefix`
- * - `P` storage deletions.
- * - Base Weight: 0.834 * P µs
- * - Writes: Number of subkeys + 1
- * # </weight>
**/
killPrefix: AugmentedSubmittable<(prefix: Bytes | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32]>;
/**
* Kill some items from storage.
- *
- * # <weight>
- * - `O(IK)` where `I` length of `keys` and `K` length of one key
- * - `I` storage deletions.
- * - Base Weight: .378 * i µs
- * - Writes: Number of items
- * # </weight>
**/
killStorage: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>]>;
/**
@@ -455,19 +436,6 @@
**/
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
- * Set the new changes trie configuration.
- *
- * # <weight>
- * - `O(1)`
- * - 1 storage write or delete (codec `O(1)`).
- * - 1 call to `deposit_log`: Uses `append` API, so O(1)
- * - Base Weight: 7.218 µs
- * - DB Weight:
- * - Writes: Changes Trie, System Digest
- * # </weight>
- **/
- setChangesTrieConfig: AugmentedSubmittable<(changesTrieConfig: Option<SpCoreChangesTrieChangesTrieConfiguration> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpCoreChangesTrieChangesTrieConfiguration>]>;
- /**
* Set the new runtime code.
*
* # <weight>
@@ -496,25 +464,10 @@
setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Set the number of pages in the WebAssembly environment's heap.
- *
- * # <weight>
- * - `O(1)`
- * - 1 storage write.
- * - Base Weight: 1.405 µs
- * - 1 write to HEAP_PAGES
- * - 1 digest item
- * # </weight>
**/
setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
/**
* Set some items of storage.
- *
- * # <weight>
- * - `O(I)` where `I` length of `items`
- * - `I` storage writes (`O(1)`).
- * - Base Weight: 0.568 * i µs
- * - Writes: Number of items
- * # </weight>
**/
setStorage: AugmentedSubmittable<(items: Vec<ITuple<[Bytes, Bytes]>> | ([Bytes | string | Uint8Array, Bytes | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>, [Vec<ITuple<[Bytes, Bytes]>>]>;
/**
@@ -1026,6 +979,22 @@
};
xcmpQueue: {
/**
+ * Services a single overweight XCM.
+ *
+ * - `origin`: Must pass `ExecuteOverweightOrigin`.
+ * - `index`: The index of the overweight XCM to service
+ * - `weight_limit`: The amount of weight that XCM execution may take.
+ *
+ * Errors:
+ * - `BadOverweightIndex`: XCM under `index` is not found in the `Overweight` storage map.
+ * - `BadXcm`: XCM under `index` cannot be properly decoded into a valid XCM format.
+ * - `WeightOverLimit`: XCM execution may use greater `weight_limit`.
+ *
+ * Events:
+ * - `OverweightServiced`: On success.
+ **/
+ serviceOverweight: AugmentedSubmittable<(index: u64 | AnyNumber | Uint8Array, weightLimit: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64, u64]>;
+ /**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
tests/src/xcmTransfer.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/xcmTransfer.test.ts
@@ -0,0 +1,178 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+import chai from 'chai';
+import chaiAsPromised from 'chai-as-promised';
+
+import {WsProvider} from '@polkadot/api';
+import {ApiOptions} from '@polkadot/api/types';
+import {IKeyringPair} from '@polkadot/types/types';
+import privateKey from './substrate/privateKey';
+import usingApi, {submitTransactionAsync} from './substrate/substrate-api';
+import {getGenericResult} from './util/helpers';
+import waitNewBlocks from './substrate/wait-new-blocks';
+import getBalance from './substrate/get-balance';
+import {alicesPublicKey} from './accounts';
+
+chai.use(chaiAsPromised);
+const expect = chai.expect;
+
+const UNIQUE_CHAIN = 1000;
+const KARURA_CHAIN = 2000;
+const KARURA_PORT = '9946';
+
+describe('Integration test: Exchanging QTZ with Karura', () => {
+ let alice: IKeyringPair;
+
+ before(async () => {
+ await usingApi(async () => {
+ alice = privateKey('//Alice');
+ });
+
+ const karuraApiOptions: ApiOptions = {
+ provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT),
+ };
+
+ await usingApi(async (api) => {
+ const destination = {
+ V0: {
+ X2: [
+ 'Parent',
+ {
+ Parachain: UNIQUE_CHAIN,
+ },
+ ],
+ },
+ };
+
+ const metadata =
+ {
+ name: 'QTZ',
+ symbol: 'QTZ',
+ decimals: 18,
+ minimalBalance: 1,
+ };
+
+ const tx = api.tx.assetRegistry.registerForeignAsset(destination, metadata);
+ const sudoTx = api.tx.sudo.sudo(tx as any);
+ const events = await submitTransactionAsync(alice, sudoTx);
+ const result = getGenericResult(events);
+ expect(result.success).to.be.true;
+ }, karuraApiOptions);
+ });
+
+ it('Should connect and send QTZ to Karura', async () => {
+ let balanceOnKaruraBefore: bigint;
+
+ await usingApi(async (api) => {
+ const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;
+ balanceOnKaruraBefore = free;
+ }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
+
+ await usingApi(async (api) => {
+ const destination = {
+ V0: {
+ X2: [
+ 'Parent',
+ {
+ Parachain: KARURA_CHAIN,
+ },
+ ],
+ },
+ };
+
+ const beneficiary = {
+ V0: {
+ X1: {
+ AccountId32: {
+ network: 'Any',
+ id: alice.addressRaw,
+ },
+ },
+ },
+ };
+
+ const assets = {
+ V1: [
+ {
+ id: {
+ Concrete: {
+ parents: 0,
+ interior: 'Here',
+ },
+ },
+ fun: {
+ Fungible: 5000000000,
+ },
+ },
+ ],
+ };
+
+ const feeAssetItem = 0;
+
+ const weightLimit = {
+ Limited: 5000000000,
+ };
+
+ const tx = api.tx.polkadotXcm.limitedReserveTransferAssets(destination, beneficiary, assets, feeAssetItem, weightLimit);
+ const events = await submitTransactionAsync(alice, tx);
+ const result = getGenericResult(events);
+ expect(result.success).to.be.true;
+ });
+
+ await usingApi(async (api) => {
+ // todo do something about instant sealing, where there might not be any new blocks
+ await waitNewBlocks(api, 3);
+ const {free} = (await api.query.tokens.accounts(alice.addressRaw, {ForeignAsset: 0})).toJSON() as any;
+ expect(free > balanceOnKaruraBefore).to.be.true;
+ }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
+ });
+
+ it('Should connect to Karura and send QTZ back', async () => {
+ let balanceBefore: bigint;
+
+ await usingApi(async (api) => {
+ [balanceBefore] = await getBalance(api, [alicesPublicKey]);
+ });
+
+ await usingApi(async (api) => {
+ const destination = {
+ V0: {
+ X3: [
+ 'Parent',
+ {
+ Parachain: UNIQUE_CHAIN,
+ },
+ {
+ AccountId32: {
+ network: 'Any',
+ id: alice.addressRaw,
+ },
+ },
+ ],
+ },
+ };
+
+ const id = {
+ ForeignAsset: 0,
+ };
+
+ const amount = 5000000000;
+ const destWeight = 50000000;
+
+ const tx = api.tx.xTokens.transfer(id, amount, destination, destWeight);
+ const events = await submitTransactionAsync(alice, tx);
+ const result = getGenericResult(events);
+ expect(result.success).to.be.true;
+ }, {provider: new WsProvider('ws://127.0.0.1:' + KARURA_PORT)});
+
+ await usingApi(async (api) => {
+ // todo do something about instant sealing, where there might not be any new blocks
+ await waitNewBlocks(api, 3);
+ const [balanceAfter] = await getBalance(api, [alicesPublicKey]);
+ expect(balanceAfter > balanceBefore).to.be.true;
+ });
+ });
+});
\ No newline at end of file