difftreelog
feat(Scheduler [WIP]) critical improvements
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -42,7 +42,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 +77,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 +108,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 +225,7 @@
"parking",
"polling",
"slab",
- "socket2 0.4.2",
+ "socket2 0.4.4",
"waker-fn",
"winapi 0.3.9",
]
@@ -288,7 +288,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 +296,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 +310,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 +335,7 @@
"futures-sink",
"futures-util",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -348,7 +348,7 @@
"futures-sink",
"futures-util",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -385,9 +385,9 @@
[[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",
"cc",
@@ -432,7 +432,7 @@
dependencies = [
"beefy-primitives",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"parity-scale-codec",
"parking_lot 0.11.2",
@@ -460,7 +460,7 @@
dependencies = [
"beefy-gadget",
"beefy-primitives",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -494,9 +494,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,7 +621,7 @@
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
"block-padding 0.2.1",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -853,9 +853,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 +899,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",
]
@@ -1025,7 +1025,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 +1039,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]]
@@ -1228,18 +1228,18 @@
[[package]]
name = "crc32fast"
-version = "1.3.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836"
+checksum = "a2209c310e29876f7f0b2721e7e26b84aff178aa3da5d091f9bfbf47669e60e3"
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 +1258,9 @@
[[package]]
name = "crossbeam-epoch"
-version = "0.9.5"
+version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd"
+checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
@@ -1271,9 +1271,9 @@
[[package]]
name = "crossbeam-utils"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
+checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120"
dependencies = [
"cfg-if 1.0.0",
"lazy_static",
@@ -1301,7 +1301,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 +1311,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",
]
@@ -1372,7 +1372,7 @@
"cumulus-client-consensus-common",
"cumulus-client-network",
"cumulus-primitives-core",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"parking_lot 0.10.2",
"polkadot-node-primitives",
@@ -1395,7 +1395,7 @@
"async-trait",
"cumulus-client-consensus-common",
"cumulus-primitives-core",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-client",
"sc-client-api",
@@ -1424,7 +1424,7 @@
dependencies = [
"async-trait",
"dyn-clone",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-primitives",
"sc-client-api",
@@ -1443,7 +1443,7 @@
source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"parity-scale-codec",
"parking_lot 0.10.2",
@@ -1466,7 +1466,7 @@
source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
dependencies = [
"cumulus-primitives-core",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"parity-scale-codec",
"polkadot-node-primitives",
@@ -1829,7 +1829,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -1941,7 +1941,7 @@
"ed25519",
"rand 0.7.3",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"zeroize",
]
@@ -2117,9 +2117,9 @@
[[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"
@@ -2206,7 +2206,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
]
[[package]]
@@ -2223,9 +2223,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 +2233,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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"async-trait",
"derive_more",
"fc-db",
"fp-consensus",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"parity-scale-codec",
"sc-client-api",
@@ -2260,7 +2260,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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"fp-storage",
"kvdb",
@@ -2276,13 +2276,13 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"fc-consensus",
"fc-db",
"fp-consensus",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"sc-client-api",
@@ -2294,7 +2294,7 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"ethereum-types",
@@ -2306,7 +2306,7 @@
"fp-evm",
"fp-rpc",
"fp-storage",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-util",
"jsonrpc-core",
"jsonrpc-pubsub",
@@ -2338,7 +2338,7 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum-types",
"jsonrpc-core",
@@ -2376,7 +2376,7 @@
checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"num-traits",
@@ -2399,9 +2399,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"
@@ -2459,7 +2459,7 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"parity-scale-codec",
@@ -2473,7 +2473,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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"evm",
"impl-trait-for-tuples",
@@ -2487,7 +2487,7 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"ethereum-types",
@@ -2504,7 +2504,7 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.9.0",
"frame-support",
@@ -2521,7 +2521,7 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
[[package]]
name = "frame-benchmarking"
@@ -2784,9 +2784,9 @@
[[package]]
name = "futures"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cd0210d8c325c245ff06fd95a3b13689a1a276ac8cfa8e8720cb840bfb84b9e"
+checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4"
dependencies = [
"futures-channel",
"futures-core",
@@ -2799,9 +2799,9 @@
[[package]]
name = "futures-channel"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27"
+checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b"
dependencies = [
"futures-core",
"futures-sink",
@@ -2809,15 +2809,15 @@
[[package]]
name = "futures-core"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445"
+checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7"
[[package]]
name = "futures-executor"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b808bf53348a36cab739d7e04755909b9fcaaa69b7d7e588b37b6ec62704c97"
+checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a"
dependencies = [
"futures-core",
"futures-task",
@@ -2827,9 +2827,9 @@
[[package]]
name = "futures-io"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11"
+checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2"
[[package]]
name = "futures-lite"
@@ -2842,15 +2842,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.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a89f17b21645bc4ed773c69af9c9a0effd4a3f1a3876eadd453469f8854e7fdd"
+checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c"
dependencies = [
"proc-macro2",
"quote",
@@ -2870,15 +2870,15 @@
[[package]]
name = "futures-sink"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af"
+checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508"
[[package]]
name = "futures-task"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12"
+checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72"
[[package]]
name = "futures-timer"
@@ -2894,9 +2894,9 @@
[[package]]
name = "futures-util"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e"
+checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164"
dependencies = [
"futures 0.1.31",
"futures-channel",
@@ -2906,7 +2906,7 @@
"futures-sink",
"futures-task",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"pin-utils",
"slab",
]
@@ -2922,9 +2922,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 +2945,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",
@@ -3002,22 +3002,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 +3026,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",
@@ -3154,7 +3153,7 @@
checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1"
dependencies = [
"digest 0.9.0",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"hmac 0.8.1",
]
@@ -3171,13 +3170,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,7 +3187,7 @@
dependencies = [
"bytes 1.1.0",
"http",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -3233,10 +3232,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 +3253,7 @@
"log",
"rustls",
"rustls-native-certs",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-rustls",
"webpki",
]
@@ -3315,7 +3314,7 @@
checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179"
dependencies = [
"async-io",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-lite",
"if-addrs",
"ipnet",
@@ -3364,9 +3363,9 @@
[[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",
@@ -3384,9 +3383,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"
@@ -3403,7 +3402,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 2.0.2",
]
@@ -3466,6 +3465,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 +3481,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 +3495,7 @@
checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-pubsub",
"log",
@@ -3505,7 +3510,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-executor",
"futures-util",
"log",
@@ -3520,7 +3525,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-client-transports",
]
@@ -3542,7 +3547,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"hyper",
"jsonrpc-core",
"jsonrpc-server-utils",
@@ -3558,7 +3563,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
@@ -3573,7 +3578,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"lazy_static",
"log",
@@ -3589,12 +3594,12 @@
checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4"
dependencies = [
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"globset",
"jsonrpc-core",
"lazy_static",
"log",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-stream",
"tokio-util",
"unicase",
@@ -3606,7 +3611,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
@@ -3679,17 +3684,17 @@
"arrayvec 0.7.2",
"async-trait",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"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",
]
@@ -3858,9 +3863,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 +3879,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",
@@ -3896,7 +3901,7 @@
dependencies = [
"atomic",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"lazy_static",
"libp2p-core",
"libp2p-deflate",
@@ -3924,7 +3929,7 @@
"libp2p-yamux",
"multiaddr",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"smallvec",
"wasm-timer",
]
@@ -3940,7 +3945,7 @@
"ed25519-dalek",
"either",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"lazy_static",
"libsecp256k1 0.7.0",
@@ -3949,13 +3954,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 +3975,7 @@
checksum = "51a800adb195f33de63f4b17b63fe64cfc23bf2c6a0d3d0d5321328664e65197"
dependencies = [
"flate2",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
]
@@ -3981,7 +3986,7 @@
checksum = "bb8f89d15cb6e3c5bc22afff7513b11bab7856f2872d3cfba86f7f63a06bc498"
dependencies = [
"async-std-resolver",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"smallvec",
@@ -3996,7 +4001,7 @@
dependencies = [
"cuckoofilter",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4017,7 +4022,7 @@
"byteorder",
"bytes 1.1.0",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex_fmt",
"libp2p-core",
"libp2p-swarm",
@@ -4026,7 +4031,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 +4043,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cca1275574183f288ff8b72d535d5ffa5ea9292ef7829af8b47dcb197c7b0dcd"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4060,14 +4065,14 @@
"bytes 1.1.0",
"either",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"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 +4089,7 @@
"async-io",
"data-encoding",
"dns-parser",
- "futures 0.3.18",
+ "futures 0.3.19",
"if-watch",
"lazy_static",
"libp2p-core",
@@ -4092,7 +4097,7 @@
"log",
"rand 0.8.4",
"smallvec",
- "socket2 0.4.2",
+ "socket2 0.4.4",
"void",
]
@@ -4118,7 +4123,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"nohash-hasher",
@@ -4136,14 +4141,14 @@
dependencies = [
"bytes 1.1.0",
"curve25519-dalek 3.2.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"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 +4161,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80ef7b0ec5cf06530d9eb6cf59ae49d46a2c45663bde31c25a12f682664adbcf"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4173,7 +4178,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"prost",
@@ -4188,9 +4193,9 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"salsa20",
"sha3 0.9.1",
@@ -4204,12 +4209,12 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libp2p-core",
"libp2p-swarm",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"prost",
"prost-build",
"rand 0.7.3",
@@ -4227,14 +4232,14 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bimap",
- "futures 0.3.18",
+ "futures 0.3.19",
"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 +4254,11 @@
dependencies = [
"async-trait",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"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 +4272,7 @@
checksum = "3f5184a508f223bc100a12665517773fb8730e9f36fc09eefb670bf01b107ae9"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"rand 0.7.3",
@@ -4293,14 +4298,14 @@
checksum = "7399c5b6361ef525d41c11fcf51635724f832baf5819b30d3d873eabb4fbae4b"
dependencies = [
"async-io",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"if-watch",
"ipnet",
"libc",
"libp2p-core",
"log",
- "socket2 0.4.2",
+ "socket2 0.4.4",
]
[[package]]
@@ -4310,7 +4315,7 @@
checksum = "b8b7563e46218165dfd60f64b96f7ce84590d75f53ecbdc74a7dd01450dc5973"
dependencies = [
"async-std",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
]
@@ -4321,7 +4326,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1008a302b73c5020251f9708c653f5ed08368e530e247cc9cd2f109ff30042cf"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"js-sys",
"libp2p-core",
"parity-send-wrapper",
@@ -4336,7 +4341,7 @@
checksum = "22e12df82d1ed64969371a9e65ea92b91064658604cc2576c2757f18ead9a1cf"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-rustls",
"libp2p-core",
"log",
@@ -4353,7 +4358,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7362abb8867d7187e7e93df17f460d554c997fc5c8ac57dc1259057f6889af"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"parking_lot 0.11.2",
"thiserror",
@@ -4403,7 +4408,7 @@
"libsecp256k1-gen-genmult",
"rand 0.8.4",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"typenum",
]
@@ -4489,9 +4494,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",
]
@@ -4517,9 +4522,9 @@
[[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",
]
@@ -4615,9 +4620,9 @@
[[package]]
name = "memmap2"
-version = "0.5.0"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e"
+checksum = "fe3179b85e1fd8b14447cbebadb75e45a1002f541b925f0bfec366d56a81c56d"
dependencies = [
"libc",
]
@@ -4675,7 +4680,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"thiserror",
"tracing",
@@ -4683,12 +4688,12 @@
[[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.19",
+ "rand 0.8.4",
"thrift",
]
@@ -4818,9 +4823,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 +4837,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 +4870,9 @@
checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab"
dependencies = [
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"smallvec",
"unsigned-varint 0.7.1",
]
@@ -5018,9 +5023,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 +5044,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 +5067,7 @@
checksum = "7337d80c23c2d8b1349563981bc4fb531220733743ba8115454a67b181173f0d"
dependencies = [
"dtoa",
- "itoa",
+ "itoa 0.4.8",
"open-metrics-client-derive-text-encode",
"owning_ref",
]
@@ -5080,9 +5085,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 +5101,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=polkadot-v0.9.14#8d7122899566e9c48b52d1de17c900ef6753c7a3"
dependencies = [
"frame-support",
"frame-system",
@@ -5505,7 +5510,7 @@
[[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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"ethereum-types",
@@ -5517,6 +5522,7 @@
"fp-storage",
"frame-support",
"frame-system",
+ "log",
"pallet-balances",
"pallet-evm",
"pallet-timestamp",
@@ -5534,7 +5540,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.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"evm",
"evm-gasometer",
@@ -6355,9 +6361,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 +6416,11 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libc",
"log",
"rand 0.7.3",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"winapi 0.3.9",
]
@@ -6503,7 +6509,7 @@
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [
"instant",
- "lock_api 0.4.5",
+ "lock_api 0.4.6",
"parking_lot_core 0.8.5",
]
@@ -6632,27 +6638,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 +6667,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 +6684,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"
@@ -6705,7 +6711,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -6719,7 +6725,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -6733,8 +6739,8 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.19",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6754,8 +6760,8 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.19",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6775,7 +6781,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"frame-benchmarking-cli",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"polkadot-node-core-pvf",
"polkadot-service",
@@ -6826,7 +6832,7 @@
dependencies = [
"always-assert",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -6859,8 +6865,8 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.19",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6894,7 +6900,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
@@ -6915,7 +6921,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"parking_lot 0.11.2",
"polkadot-node-network-protocol",
@@ -6933,7 +6939,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-primitives",
@@ -6953,10 +6959,10 @@
dependencies = [
"bitvec",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"kvdb",
- "lru 0.7.0",
+ "lru 0.7.2",
"merlin",
"parity-scale-codec",
"polkadot-node-jaeger",
@@ -6980,7 +6986,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bitvec",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"kvdb",
"parity-scale-codec",
@@ -7000,7 +7006,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bitvec",
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-erasure-coding",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7017,7 +7023,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7033,7 +7039,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-node-core-pvf",
"polkadot-node-primitives",
@@ -7050,7 +7056,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7065,7 +7071,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"kvdb",
"parity-scale-codec",
@@ -7084,7 +7090,7 @@
dependencies = [
"bitvec",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"kvdb",
"parity-scale-codec",
"polkadot-node-primitives",
@@ -7101,7 +7107,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-primitives",
@@ -7115,7 +7121,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-subsystem",
"polkadot-primitives",
@@ -7132,7 +7138,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bitvec",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -7150,11 +7156,11 @@
"assert_matches",
"async-process",
"async-std",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libc",
"parity-scale-codec",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-core-primitives",
"polkadot-node-subsystem-util",
"polkadot-parachain",
@@ -7177,7 +7183,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"memory-lru",
"parity-util-mem",
"polkadot-node-subsystem",
@@ -7213,7 +7219,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"metered-channel",
"substrate-prometheus-endpoint",
@@ -7226,7 +7232,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-node-jaeger",
"polkadot-node-primitives",
@@ -7243,7 +7249,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bounded-vec",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-parachain",
"polkadot-primitives",
@@ -7275,7 +7281,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-jaeger",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -7295,12 +7301,12 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"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",
@@ -7320,9 +7326,9 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
- "lru 0.7.0",
+ "lru 0.7.2",
"parity-util-mem",
"parking_lot 0.11.2",
"polkadot-node-metrics",
@@ -7342,10 +7348,10 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"metered-channel",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-overseer-gen-proc-macro",
@@ -7620,12 +7626,12 @@
"beefy-gadget",
"beefy-primitives",
"frame-system-rpc-runtime-api",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex-literal",
"kusama-runtime",
"kvdb",
"kvdb-rocksdb",
- "lru 0.7.0",
+ "lru 0.7.2",
"pallet-babe",
"pallet-im-online",
"pallet-mmr-primitives",
@@ -7717,7 +7723,7 @@
dependencies = [
"arrayvec 0.5.2",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"indexmap",
"parity-scale-codec",
"polkadot-node-network-protocol",
@@ -7810,7 +7816,7 @@
"frame-benchmarking",
"frame-system",
"futures 0.1.31",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex",
"pallet-balances",
"pallet-staking",
@@ -7851,7 +7857,7 @@
"sp-state-machine",
"substrate-test-client",
"tempfile",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tracing",
]
@@ -7893,9 +7899,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 +7974,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",
]
@@ -8087,9 +8093,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 +8167,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 +8259,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",
]
@@ -8377,9 +8383,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"
@@ -8521,7 +8527,7 @@
"cc",
"errno",
"io-lifetimes",
- "itoa",
+ "itoa 0.4.8",
"libc",
"linux-raw-sys",
"once_cell",
@@ -8604,8 +8610,8 @@
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.19",
+ "pin-project 0.4.29",
"static_assertions",
]
@@ -8660,7 +8666,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"ip_network",
"libp2p",
@@ -8685,7 +8691,7 @@
version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -8725,7 +8731,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"impl-trait-for-tuples",
- "memmap2 0.5.0",
+ "memmap2 0.5.2",
"parity-scale-codec",
"sc-chain-spec-derive",
"sc-network",
@@ -8754,7 +8760,7 @@
dependencies = [
"chrono",
"fdlimit",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex",
"libp2p",
"log",
@@ -8782,7 +8788,7 @@
"structopt",
"thiserror",
"tiny-bip39",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -8791,7 +8797,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"log",
"parity-scale-codec",
@@ -8844,7 +8850,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libp2p",
"log",
@@ -8869,7 +8875,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"parity-scale-codec",
"sc-block-builder",
@@ -8899,7 +8905,7 @@
"async-trait",
"derive_more",
"fork-tree",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"merlin",
"num-bigint",
@@ -8940,7 +8946,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -8977,7 +8983,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -9097,7 +9103,7 @@
"dyn-clone",
"finality-grandpa",
"fork-tree",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -9131,7 +9137,7 @@
dependencies = [
"derive_more",
"finality-grandpa",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -9154,7 +9160,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"ansi_term",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-util-mem",
@@ -9195,7 +9201,7 @@
"either",
"fnv",
"fork-tree",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"hex",
"ip_network",
@@ -9203,10 +9209,10 @@
"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",
@@ -9236,11 +9242,11 @@
version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libp2p",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"sc-network",
"sp-runtime",
"substrate-prometheus-endpoint",
@@ -9254,7 +9260,7 @@
dependencies = [
"bytes 1.1.0",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"hex",
"hyper",
@@ -9280,7 +9286,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p",
"log",
"sc-utils",
@@ -9302,7 +9308,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"jsonrpc-core",
"jsonrpc-pubsub",
@@ -9333,7 +9339,7 @@
version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -9358,7 +9364,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-http-server",
"jsonrpc-ipc-server",
@@ -9367,7 +9373,7 @@
"log",
"serde_json",
"substrate-prometheus-endpoint",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -9378,7 +9384,7 @@
"async-trait",
"directories",
"exit-future",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"hash-db",
"jsonrpc-core",
@@ -9387,7 +9393,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 +9435,7 @@
"substrate-prometheus-endpoint",
"tempfile",
"thiserror",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tracing",
"tracing-futures",
]
@@ -9476,11 +9482,11 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"chrono",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p",
"log",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"serde",
"serde_json",
@@ -9535,7 +9541,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"intervalier",
"linked-hash-map",
"log",
@@ -9563,7 +9569,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"serde",
"sp-blockchain",
@@ -9576,7 +9582,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"lazy_static",
"prometheus",
@@ -9669,9 +9675,9 @@
[[package]]
name = "security-framework"
-version = "2.4.2"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87"
+checksum = "3fed7948b6c68acbb6e20c334f55ad635dc0f75506963de4464289fbd3b051ac"
dependencies = [
"bitflags",
"core-foundation",
@@ -9682,9 +9688,9 @@
[[package]]
name = "security-framework-sys"
-version = "2.4.2"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e"
+checksum = "a57321bf8bc2362081b2599912d2961fe899c0efadf1b4b2f8d48b3e253bb96c"
dependencies = [
"core-foundation-sys",
"libc",
@@ -9743,18 +9749,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 +9769,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 +9817,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",
@@ -9864,9 +9870,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 +9889,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"
@@ -9928,9 +9934,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 +9957,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 +9975,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 +9992,7 @@
"base64",
"bytes 1.1.0",
"flate2",
- "futures 0.3.18",
+ "futures 0.3.19",
"httparse",
"log",
"rand 0.8.4",
@@ -10092,9 +10098,9 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"parity-scale-codec",
"parking_lot 0.11.2",
"sp-api",
@@ -10111,7 +10117,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -10200,7 +10206,7 @@
"byteorder",
"dyn-clonable",
"ed25519-dalek",
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"hash256-std-hasher",
"hex",
@@ -10220,7 +10226,7 @@
"schnorrkel",
"secrecy",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"sp-core-hashing",
"sp-debug-derive",
"sp-externalities",
@@ -10244,7 +10250,7 @@
dependencies = [
"blake2-rfc",
"byteorder",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"sp-std",
"tiny-keccak",
"twox-hash",
@@ -10328,7 +10334,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"libsecp256k1 0.7.0",
"log",
@@ -10365,7 +10371,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"merlin",
"parity-scale-codec",
"parking_lot 0.11.2",
@@ -10706,9 +10712,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 +10788,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",
@@ -10834,7 +10840,7 @@
"hmac 0.11.0",
"pbkdf2 0.8.0",
"schnorrkel",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"zeroize",
]
@@ -10852,7 +10858,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"frame-system-rpc-runtime-api",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -10879,7 +10885,7 @@
"hyper",
"log",
"prometheus",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -10888,7 +10894,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex",
"parity-scale-codec",
"sc-client-api",
@@ -10913,9 +10919,9 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"substrate-test-utils-derive",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -10958,9 +10964,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 +10993,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",
@@ -11045,9 +11051,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 +11069,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 +11103,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 +11148,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 +11177,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 +11193,7 @@
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"webpki",
]
@@ -11199,8 +11204,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 +11219,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 +11240,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 +11263,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 +11277,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",
]
@@ -11353,9 +11359,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 +11383,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",
@@ -11432,9 +11438,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 +11449,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 +11479,9 @@
[[package]]
name = "uint"
-version = "0.9.1"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f"
+checksum = "1b1b413ebfe8c2c74a69ff124699dd156a7fa41cb1d09ba6df94aa2f2b0a4a3a"
dependencies = [
"byteorder",
"crunchy",
@@ -11546,7 +11552,7 @@
"fp-rpc",
"frame-benchmarking",
"frame-benchmarking-cli",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-pubsub",
"log",
@@ -11610,7 +11616,7 @@
"fc-rpc",
"fc-rpc-core",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-pubsub",
"pallet-ethereum",
@@ -11726,7 +11732,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",
]
@@ -11834,6 +11840,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 +11869,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 +11920,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 +11930,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 +11945,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 +11957,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 +11967,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 +11980,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"
@@ -11989,7 +12001,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"js-sys",
"parking_lot 0.11.2",
"pin-utils",
@@ -12075,7 +12087,7 @@
"log",
"rsix",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"toml",
"winapi 0.3.9",
"zstd",
@@ -12188,9 +12200,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",
@@ -12310,9 +12322,9 @@
[[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",
@@ -12471,7 +12483,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"nohash-hasher",
"parking_lot 0.11.2",
@@ -12487,18 +12499,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 +12520,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 +12539,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",
pallets/scheduler/src/lib.rsdiffbeforeafterboth--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -59,7 +59,7 @@
use codec::{Encode, Decode, Codec};
use sp_runtime::{
RuntimeDebug,
- traits::{Zero, One, BadOrigin, Saturating},
+ traits::{Zero, One, BadOrigin, Saturating, SignedExtension},
};
use frame_support::{
decl_module, decl_storage, decl_event, decl_error,
@@ -75,8 +75,6 @@
pub use weights::WeightInfo;
use up_sponsorship::SponsorshipHandler;
use scale_info::TypeInfo;
-
-pub const MAX_TASK_ID_LENGTH_IN_BYTES: u32 = 16;
/// Our pallet's configuration trait. All our types and constants go in here. If the
/// pallet is dependent on specific other pallets, then their configuration traits
@@ -118,8 +116,15 @@
/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;
+
+ /// Unchecked extrinsic type as expected by the runtime that uses this pallet.
+ type PaymentHandler: SignedExtension;
}
+pub const MAX_TASK_ID_LENGTH_IN_BYTES: u8 = 16;
+
+pub const PERIODIC_CALLS_LIMIT: u32 = 100;
+
// pub type SelfWeightInfo<T> = <T as system::Config>::WeightInfo;
/// Just a simple index for naming period tasks.
@@ -250,7 +255,7 @@
)
{
let origin = <T as Config>::Origin::from(origin);
- Self::do_schedule(DispatchTime::At(when), maybe_periodic, priority, origin.caller().clone(), *call)?;
+ Self::do_schedule_nameless(DispatchTime::At(when), maybe_periodic, priority, origin.caller().clone(), *call)?;
}
/// Cancel an anonymously scheduled task.
@@ -326,7 +331,7 @@
) {
T::ScheduleOrigin::ensure_origin(origin.clone())?;
let origin = <T as Config>::Origin::from(origin);
- Self::do_schedule(
+ Self::do_schedule_nameless(
DispatchTime::After(after), maybe_periodic, priority, origin.caller().clone(), *call
)?;
}
@@ -364,7 +369,8 @@
/// # </weight>
fn on_initialize(now: T::BlockNumber) -> Weight {
let limit = T::MaximumWeight::get();
- let mut queued = Agenda::<T>::take(now).into_iter()
+ let mut queued = Agenda::<T>::take(now)
+ .into_iter()
.enumerate()
.filter_map(|(index, s)| s.map(|inner| (index as u32, inner)))
.collect::<Vec<_>>();
@@ -377,7 +383,7 @@
}
queued.sort_by_key(|(_, s)| s.priority);
let base_weight: Weight = T::DbWeight::get().reads_writes(1, 2); // Agenda + Agenda(next)
- let mut total_weight: Weight = 0;
+ let mut total_weight: Weight = 0; // T::WeightInfo::on_initialize(0)
queued.into_iter()
.enumerate()
.scan(base_weight, |cumulative_weight, (order, (index, s))| {
@@ -412,13 +418,13 @@
// - It is the first item in the schedule
if s.priority <= schedule::HARD_DEADLINE || cumulative_weight <= limit || order == 0 {
- let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(
- s.origin.clone()
- ).into();
- let sender = ensure_signed(origin).unwrap_or_default();
- 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());
+ // let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(
+ // s.origin.clone()
+ // ).into();
+ // let sender = ensure_signed(origin).unwrap_or_default();
+ // 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());
let maybe_id = s.maybe_id.clone();
if let Some((period, count)) = s.maybe_periodic {
if count > 1 {
@@ -439,7 +445,7 @@
Self::deposit_event(RawEvent::Dispatched(
(now, index),
maybe_id,
- r.map(|_| ()).map_err(|e| e.error)
+ Ok(())// r.map(|_| ()).map_err(|e| e.error)
));
total_weight = cumulative_weight;
None
@@ -476,21 +482,32 @@
}
fn do_schedule(
+ maybe_id: Option<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<TaskAddress<T::BlockNumber>, DispatchError> {
+ ) -> Result<(T::BlockNumber, u32), DispatchError> {
let when = Self::resolve_time(when)?;
+ let sender = ensure_signed(
+ <<T as Config>::Origin as From<T::PalletsOrigin>>::from(origin.clone()).into()
+ ).unwrap_or_default();
+ let who_will_pay = T::SponsorshipHandler::get_sponsor(&sender, &call).unwrap_or(sender);
+ let sponsor = T::PalletsOrigin::from(system::RawOrigin::Signed(who_will_pay));
+ let r = call.clone().dispatch(sponsor.into());
+
+ //T::PaymentHandler::validate(sponsor.into(), call.clone(), ); todo dispatch call
+
// sanitize maybe_periodic
let maybe_periodic = maybe_periodic
.filter(|p| p.1 > 1 && !p.0.is_zero())
- // Remove one from the number of repetitions since we will schedule one now.
- .map(|(p, c)| (p, c - 1));
+ // Limit the repetitions to 100 calls and remove one from the number of repetitions since we will schedule one now.
+ .map(|(p, c)| (p, std::cmp::min(c, PERIODIC_CALLS_LIMIT) - 1));
+
let s = Some(Scheduled {
- maybe_id: None,
+ maybe_id,
priority,
call,
maybe_periodic,
@@ -506,9 +523,23 @@
expected from the runtime configuration. An update might be needed.",
);
}
+
+ Ok((when, index))
+ }
+
+ fn do_schedule_nameless(
+ when: DispatchTime<T::BlockNumber>,
+ maybe_periodic: Option<schedule::Period<T::BlockNumber>>,
+ priority: schedule::Priority,
+ origin: T::PalletsOrigin,
+ call: <T as Config>::Call,
+ ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {
+ let address = Self::do_schedule(None, when, maybe_periodic, priority, origin, call)?;
+ let (when, index) = address;
+
Self::deposit_event(RawEvent::Scheduled(when, index));
- Ok((when, index))
+ Ok(address)
}
fn do_cancel(
@@ -578,35 +609,11 @@
return Err(Error::<T>::FailedToSchedule.into());
}
- let when = Self::resolve_time(when)?;
-
- // sanitize maybe_periodic
- let maybe_periodic = maybe_periodic
- .filter(|p| p.1 > 1 && !p.0.is_zero())
- // Remove one from the number of repetitions since we will schedule one now.
- .map(|(p, c)| (p, c - 1));
+ let address = Self::do_schedule(Some(id.clone()), when, maybe_periodic, priority, origin, call)?;
+ let (when, index) = address;
- let s = Scheduled {
- maybe_id: Some(id.clone()),
- priority,
- call,
- maybe_periodic,
- origin,
- _phantom: Default::default(),
- };
- Agenda::<T>::append(when, Some(s));
- let index = Agenda::<T>::decode_len(when).unwrap_or(1) as u32 - 1;
- if index > T::MaxScheduledPerBlock::get() {
- log::warn!(
- target: "runtime::scheduler",
- "Warning: There are more items queued in the Scheduler than \
- expected from the runtime configuration. An update might be needed.",
- );
- }
- let address = (when, index);
Lookup::<T>::insert(&id, &address);
Self::deposit_event(RawEvent::Scheduled(when, index));
-
Ok(address)
}
@@ -680,7 +687,7 @@
origin: T::PalletsOrigin,
call: <T as Config>::Call,
) -> Result<Self::Address, DispatchError> {
- Self::do_schedule(when, maybe_periodic, priority, origin, call)
+ Self::do_schedule_nameless(when, maybe_periodic, priority, origin, call)
}
fn cancel((when, index): Self::Address) -> Result<(), ()> {
@@ -796,8 +803,6 @@
}
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
- // todo check current cumulus implementation, add changes accordingly, do something with signedExtra and (un)checked extrinsic (integral to Scheduler?)
- // todo to include pallet in runtime, not only uncomment but also (implement?) trait
type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
@@ -871,5 +876,6 @@
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = ();
type SponsorshipHandler = ();
+ type PaymentHandler = ();
}
}
runtime/src/lib.rsdiffbeforeafterboth1//2// This file is subject to the terms and conditions defined in3// file 'LICENSE', which is part of this source code package.4//56//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.78#![cfg_attr(not(feature = "std"), no_std)]9// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.10#![recursion_limit = "1024"]11#![allow(clippy::from_over_into, clippy::identity_op)]12#![allow(clippy::fn_to_numeric_cast_with_truncation)]13// Make the WASM binary available.14#[cfg(feature = "std")]15include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));1617use sp_api::impl_runtime_apis;18use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};19use sp_runtime::DispatchError;20// #[cfg(any(feature = "std", test))]21// pub use sp_runtime::BuildStorage;2223use sp_runtime::{24 Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,25 traits::{26 AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify, AccountIdConversion,27 },28 transaction_validity::{TransactionSource, TransactionValidity},29 ApplyExtrinsicResult, MultiSignature,30};3132use sp_std::prelude::*;3334#[cfg(feature = "std")]35use sp_version::NativeVersion;36use sp_version::RuntimeVersion;37pub use pallet_transaction_payment::{38 Multiplier, TargetedFeeAdjustment, FeeDetails, RuntimeDispatchInfo,39};40// A few exports that help ease life for downstream crates.41pub use pallet_balances::Call as BalancesCall;42pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};43pub use frame_support::{44 construct_runtime, match_type,45 dispatch::DispatchResult,46 PalletId, parameter_types, StorageValue, ConsensusEngineId,47 traits::{48 Everything, Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem,49 LockIdentifier, OnUnbalanced, Randomness, FindAuthor,50 },51 weights::{52 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},53 DispatchClass, DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,54 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients,55 },56};57use up_data_structs::*;58// use pallet_contracts::weights::WeightInfo;59// #[cfg(any(feature = "std", test))]60use frame_system::{61 self as frame_system, EnsureRoot, EnsureSigned,62 limits::{BlockWeights, BlockLength},63};64use sp_arithmetic::{65 traits::{BaseArithmetic, Unsigned},66};67use smallvec::smallvec;68use codec::{Encode, Decode};69use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, OnMethodCall};70use fp_rpc::TransactionStatus;71use sp_core::crypto::Public;72use sp_runtime::{73 traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf},74 transaction_validity::TransactionValidityError,75};7677// pub use pallet_timestamp::Call as TimestampCall;78pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;7980// Polkadot imports81use pallet_xcm::XcmPassthrough;82use polkadot_parachain::primitives::Sibling;83use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};84use xcm_builder::{85 AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,86 EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,87 ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative,88 SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,89 SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,90};91use xcm_executor::{Config, XcmExecutor};9293// mod chain_extension;94// use crate::chain_extension::{NFTExtension, Imbalance};9596/// An index to a block.97pub type BlockNumber = u32;9899/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.100pub type Signature = MultiSignature;101102/// Some way of identifying an account on the chain. We intentionally make it equivalent103/// to the public key of our transaction signing scheme.104pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;105106pub type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;107108/// The type for looking up accounts. We don't expect more than 4 billion of them, but you109/// never know...110pub type AccountIndex = u32;111112/// Balance of an account.113pub type Balance = u128;114115/// Index of a transaction in the chain.116pub type Index = u32;117118/// A hash of some data used by the chain.119pub type Hash = sp_core::H256;120121/// Digest item type.122pub type DigestItem = generic::DigestItem;123124/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know125/// the specifics of the runtime. They can then be made to be agnostic over specific formats126/// of data like extrinsics, allowing for them to continue syncing the network through upgrades127/// to even the core data structures.128pub mod opaque {129 use super::*;130131 pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;132133 /// Opaque block type.134 pub type Block = generic::Block<Header, UncheckedExtrinsic>;135136 pub type SessionHandlers = ();137138 impl_opaque_keys! {139 pub struct SessionKeys {140 pub aura: Aura,141 }142 }143}144145/// This runtime version.146pub const VERSION: RuntimeVersion = RuntimeVersion {147 spec_name: create_runtime_str!("opal"),148 impl_name: create_runtime_str!("opal"),149 authoring_version: 1,150 spec_version: 914000,151 impl_version: 1,152 apis: RUNTIME_API_VERSIONS,153 transaction_version: 1,154};155156pub const MILLISECS_PER_BLOCK: u64 = 12000;157158pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;159160// These time units are defined in number of blocks.161pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);162pub const HOURS: BlockNumber = MINUTES * 60;163pub const DAYS: BlockNumber = HOURS * 24;164165parameter_types! {166 pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS;167}168169#[derive(codec::Encode, codec::Decode)]170pub enum XCMPMessage<XAccountId, XBalance> {171 /// Transfer tokens to the given account from the Parachain account.172 TransferToken(XAccountId, XBalance),173}174175/// The version information used to identify this runtime when compiled natively.176#[cfg(feature = "std")]177pub fn native_version() -> NativeVersion {178 NativeVersion {179 runtime_version: VERSION,180 can_author_with: Default::default(),181 }182}183184type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;185186pub struct DealWithFees;187impl OnUnbalanced<NegativeImbalance> for DealWithFees {188 fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item = NegativeImbalance>) {189 if let Some(fees) = fees_then_tips.next() {190 // for fees, 100% to treasury191 let mut split = fees.ration(100, 0);192 if let Some(tips) = fees_then_tips.next() {193 // for tips, if any, 100% to treasury194 tips.ration_merge_into(100, 0, &mut split);195 }196 Treasury::on_unbalanced(split.0);197 // Author::on_unbalanced(split.1);198 }199 }200}201202/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.203/// This is used to limit the maximal weight of a single extrinsic.204const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);205/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used206/// by Operational extrinsics.207const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);208/// We allow for 2 seconds of compute with a 6 second average block time.209const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;210211parameter_types! {212 pub const BlockHashCount: BlockNumber = 2400;213 pub RuntimeBlockLength: BlockLength =214 BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);215 pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);216 pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;217 pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()218 .base_block(BlockExecutionWeight::get())219 .for_class(DispatchClass::all(), |weights| {220 weights.base_extrinsic = ExtrinsicBaseWeight::get();221 })222 .for_class(DispatchClass::Normal, |weights| {223 weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);224 })225 .for_class(DispatchClass::Operational, |weights| {226 weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);227 // Operational transactions have some extra reserved space, so that they228 // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.229 weights.reserved = Some(230 MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT231 );232 })233 .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)234 .build_or_panic();235 pub const Version: RuntimeVersion = VERSION;236 pub const SS58Prefix: u8 = 42;237}238239parameter_types! {240 pub const ChainId: u64 = 8888;241}242243pub struct FixedFee;244impl FeeCalculator for FixedFee {245 fn min_gas_price() -> U256 {246 // Targeting 0.15 UNQ per transfer247 1_024_947_215_000u64.into()248 }249}250251// Assuming slowest ethereum opcode is SSTORE, with gas price of 20000 as our worst case252// (contract, which only writes a lot of data),253// approximating on top of our real store write weight254parameter_types! {255 pub const WritesPerSecond: u64 = WEIGHT_PER_SECOND / <Runtime as frame_system::Config>::DbWeight::get().write;256 pub const GasPerSecond: u64 = WritesPerSecond::get() * 20000;257 pub const WeightPerGas: u64 = WEIGHT_PER_SECOND / GasPerSecond::get();258}259260/// Limiting EVM execution to 50% of block for substrate users and management tasks261/// EVM transaction consumes more weight than substrate's, so we can't rely on them being262/// scheduled fairly263const EVM_DISPATCH_RATIO: Perbill = Perbill::from_percent(50);264parameter_types! {265 pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * EVM_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WeightPerGas::get());266}267268pub enum FixedGasWeightMapping {}269impl GasWeightMapping for FixedGasWeightMapping {270 fn gas_to_weight(gas: u64) -> Weight {271 gas.saturating_mul(WeightPerGas::get())272 }273 fn weight_to_gas(weight: Weight) -> u64 {274 weight / WeightPerGas::get()275 }276}277278impl pallet_evm::Config for Runtime {279 type BlockGasLimit = BlockGasLimit;280 type FeeCalculator = FixedFee;281 type GasWeightMapping = FixedGasWeightMapping;282 type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;283 type CallOrigin = EnsureAddressTruncated;284 type WithdrawOrigin = EnsureAddressTruncated;285 type AddressMapping = HashedAddressMapping<Self::Hashing>;286 type Precompiles = ();287 type Currency = Balances;288 type Event = Event;289 type OnMethodCall = (290 pallet_evm_migration::OnMethodCall<Self>,291 pallet_unique::UniqueErcSupport<Self>,292 pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,293 );294 type OnCreate = pallet_evm_contract_helpers::HelpersOnCreate<Self>;295 type ChainId = ChainId;296 type Runner = pallet_evm::runner::stack::Runner<Self>;297 type OnChargeTransaction = pallet_evm_transaction_payment::OnChargeTransaction<Self>;298 type TransactionValidityHack = pallet_evm_transaction_payment::TransactionValidityHack<Self>;299 type FindAuthor = EthereumFindAuthor<Aura>;300}301302impl pallet_evm_migration::Config for Runtime {303 type WeightInfo = pallet_evm_migration::weights::SubstrateWeight<Self>;304}305306pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);307impl<F: FindAuthor<u32>> FindAuthor<H160> for EthereumFindAuthor<F> {308 fn find_author<'a, I>(digests: I) -> Option<H160>309 where310 I: 'a + IntoIterator<Item = (ConsensusEngineId, &'a [u8])>,311 {312 if let Some(author_index) = F::find_author(digests) {313 let authority_id = Aura::authorities()[author_index as usize].clone();314 return Some(H160::from_slice(&authority_id.to_raw_vec()[4..24]));315 }316 None317 }318}319320impl pallet_ethereum::Config for Runtime {321 type Event = Event;322 type StateRoot = pallet_ethereum::IntermediateStateRoot;323}324325impl pallet_randomness_collective_flip::Config for Runtime {}326327impl frame_system::Config for Runtime {328 /// The data to be stored in an account.329 type AccountData = pallet_balances::AccountData<Balance>;330 /// The identifier used to distinguish between accounts.331 type AccountId = AccountId;332 /// The basic call filter to use in dispatchable.333 type BaseCallFilter = Everything;334 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).335 type BlockHashCount = BlockHashCount;336 /// The maximum length of a block (in bytes).337 type BlockLength = RuntimeBlockLength;338 /// The index type for blocks.339 type BlockNumber = BlockNumber;340 /// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.341 type BlockWeights = RuntimeBlockWeights;342 /// The aggregated dispatch type that is available for extrinsics.343 type Call = Call;344 /// The weight of database operations that the runtime can invoke.345 type DbWeight = RocksDbWeight;346 /// The ubiquitous event type.347 type Event = Event;348 /// The type for hashing blocks and tries.349 type Hash = Hash;350 /// The hashing algorithm used.351 type Hashing = BlakeTwo256;352 /// The header type.353 type Header = generic::Header<BlockNumber, BlakeTwo256>;354 /// The index type for storing how many extrinsics an account has signed.355 type Index = Index;356 /// The lookup mechanism to get account ID from whatever is passed in dispatchers.357 type Lookup = AccountIdLookup<AccountId, ()>;358 /// What to do if an account is fully reaped from the system.359 type OnKilledAccount = ();360 /// What to do if a new account is created.361 type OnNewAccount = ();362 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;363 /// The ubiquitous origin type.364 type Origin = Origin;365 /// This type is being generated by `construct_runtime!`.366 type PalletInfo = PalletInfo;367 /// This is used as an identifier of the chain. 42 is the generic substrate prefix.368 type SS58Prefix = SS58Prefix;369 /// Weight information for the extrinsics of this pallet.370 type SystemWeightInfo = frame_system::weights::SubstrateWeight<Self>;371 /// Version of the runtime.372 type Version = Version;373}374375parameter_types! {376 pub const MinimumPeriod: u64 = SLOT_DURATION / 2;377}378379impl pallet_timestamp::Config for Runtime {380 /// A timestamp: milliseconds since the unix epoch.381 type Moment = u64;382 type OnTimestampSet = ();383 type MinimumPeriod = MinimumPeriod;384 type WeightInfo = ();385}386387parameter_types! {388 // pub const ExistentialDeposit: u128 = 500;389 pub const ExistentialDeposit: u128 = 0;390 pub const MaxLocks: u32 = 50;391}392393impl pallet_balances::Config for Runtime {394 type MaxLocks = MaxLocks;395 type MaxReserves = ();396 type ReserveIdentifier = [u8; 8];397 /// The type for recording an account's balance.398 type Balance = Balance;399 /// The ubiquitous event type.400 type Event = Event;401 type DustRemoval = Treasury;402 type ExistentialDeposit = ExistentialDeposit;403 type AccountStore = System;404 type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;405}406407pub const MICROUNIQUE: Balance = 1_000_000_000_000;408pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;409pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;410pub const UNIQUE: Balance = 100 * CENTIUNIQUE;411412pub const fn deposit(items: u32, bytes: u32) -> Balance {413 items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE414}415416/*417parameter_types! {418 pub TombstoneDeposit: Balance = deposit(419 1,420 sp_std::mem::size_of::<pallet_contracts::Pallet<Runtime>> as u32,421 );422 pub DepositPerContract: Balance = TombstoneDeposit::get();423 pub const DepositPerStorageByte: Balance = deposit(0, 1);424 pub const DepositPerStorageItem: Balance = deposit(1, 0);425 pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);426 pub const SurchargeReward: Balance = 150 * MILLIUNIQUE;427 pub const SignedClaimHandicap: u32 = 2;428 pub const MaxDepth: u32 = 32;429 pub const MaxValueSize: u32 = 16 * 1024;430 pub const MaxCodeSize: u32 = 1024 * 1024 * 25; // 25 Mb431 // The lazy deletion runs inside on_initialize.432 pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *433 RuntimeBlockWeights::get().max_block;434 // The weight needed for decoding the queue should be less or equal than a fifth435 // of the overall weight dedicated to the lazy deletion.436 pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (437 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -438 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)439 )) / 5) as u32;440 pub Schedule: pallet_contracts::Schedule<Runtime> = Default::default();441}442443impl pallet_contracts::Config for Runtime {444 type Time = Timestamp;445 type Randomness = RandomnessCollectiveFlip;446 type Currency = Balances;447 type Event = Event;448 type RentPayment = ();449 type SignedClaimHandicap = SignedClaimHandicap;450 type TombstoneDeposit = TombstoneDeposit;451 type DepositPerContract = DepositPerContract;452 type DepositPerStorageByte = DepositPerStorageByte;453 type DepositPerStorageItem = DepositPerStorageItem;454 type RentFraction = RentFraction;455 type SurchargeReward = SurchargeReward;456 type WeightPrice = pallet_transaction_payment::Pallet<Self>;457 type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;458 type ChainExtension = NFTExtension;459 type DeletionQueueDepth = DeletionQueueDepth;460 type DeletionWeightLimit = DeletionWeightLimit;461 type Schedule = Schedule;462 type CallStack = [pallet_contracts::Frame<Self>; 31];463}464*/465466parameter_types! {467 pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer468 /// This value increases the priority of `Operational` transactions by adding469 /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.470 pub const OperationalFeeMultiplier: u8 = 5;471}472473/// Linear implementor of `WeightToFeePolynomial`474pub struct LinearFee<T>(sp_std::marker::PhantomData<T>);475476impl<T> WeightToFeePolynomial for LinearFee<T>477where478 T: BaseArithmetic + From<u32> + Copy + Unsigned,479{480 type Balance = T;481482 fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {483 smallvec!(WeightToFeeCoefficient {484 // Targeting 0.1 Unique per NFT transfer485 coeff_integer: 142_688_000u32.into(),486 coeff_frac: Perbill::zero(),487 negative: false,488 degree: 1,489 })490 }491}492493impl pallet_transaction_payment::Config for Runtime {494 type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees>;495 type TransactionByteFee = TransactionByteFee;496 type OperationalFeeMultiplier = OperationalFeeMultiplier;497 type WeightToFee = LinearFee<Balance>;498 type FeeMultiplierUpdate = ();499}500501parameter_types! {502 pub const ProposalBond: Permill = Permill::from_percent(5);503 pub const ProposalBondMinimum: Balance = 1 * UNIQUE;504 pub const SpendPeriod: BlockNumber = 5 * MINUTES;505 pub const Burn: Permill = Permill::from_percent(0);506 pub const TipCountdown: BlockNumber = 1 * DAYS;507 pub const TipFindersFee: Percent = Percent::from_percent(20);508 pub const TipReportDepositBase: Balance = 1 * UNIQUE;509 pub const DataDepositPerByte: Balance = 1 * CENTIUNIQUE;510 pub const BountyDepositBase: Balance = 1 * UNIQUE;511 pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS;512 pub const TreasuryModuleId: PalletId = PalletId(*b"py/trsry");513 pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS;514 pub const MaximumReasonLength: u32 = 16384;515 pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);516 pub const BountyValueMinimum: Balance = 5 * UNIQUE;517 pub const MaxApprovals: u32 = 100;518}519520impl pallet_treasury::Config for Runtime {521 type PalletId = TreasuryModuleId;522 type Currency = Balances;523 type ApproveOrigin = EnsureRoot<AccountId>;524 type RejectOrigin = EnsureRoot<AccountId>;525 type Event = Event;526 type OnSlash = ();527 type ProposalBond = ProposalBond;528 type ProposalBondMinimum = ProposalBondMinimum;529 type SpendPeriod = SpendPeriod;530 type Burn = Burn;531 type BurnDestination = ();532 type SpendFunds = ();533 type WeightInfo = pallet_treasury::weights::SubstrateWeight<Self>;534 type MaxApprovals = MaxApprovals;535}536537impl pallet_sudo::Config for Runtime {538 type Event = Event;539 type Call = Call;540}541542pub struct RelayChainBlockNumberProvider<T>(sp_std::marker::PhantomData<T>);543544impl<T: cumulus_pallet_parachain_system::Config> BlockNumberProvider545 for RelayChainBlockNumberProvider<T>546{547 type BlockNumber = BlockNumber;548549 fn current_block_number() -> Self::BlockNumber {550 cumulus_pallet_parachain_system::Pallet::<T>::validation_data()551 .map(|d| d.relay_parent_number)552 .unwrap_or_default()553 }554}555556parameter_types! {557 pub const MinVestedTransfer: Balance = 10 * UNIQUE;558 pub const MaxVestingSchedules: u32 = 28;559}560561impl orml_vesting::Config for Runtime {562 type Event = Event;563 type Currency = pallet_balances::Pallet<Runtime>;564 type MinVestedTransfer = MinVestedTransfer;565 type VestedTransferOrigin = EnsureSigned<AccountId>;566 type WeightInfo = ();567 type MaxVestingSchedules = MaxVestingSchedules;568 type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;569}570571parameter_types! {572 pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;573 pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;574}575576impl cumulus_pallet_parachain_system::Config for Runtime {577 type Event = Event;578 type OnValidationData = ();579 type SelfParaId = parachain_info::Pallet<Self>;580 // type DownwardMessageHandlers = cumulus_primitives_utility::UnqueuedDmpAsParent<581 // MaxDownwardMessageWeight,582 // XcmExecutor<XcmConfig>,583 // Call,584 // >;585 type OutboundXcmpMessageSource = XcmpQueue;586 type DmpMessageHandler = DmpQueue;587 type ReservedDmpWeight = ReservedDmpWeight;588 type ReservedXcmpWeight = ReservedXcmpWeight;589 type XcmpMessageHandler = XcmpQueue;590}591592impl parachain_info::Config for Runtime {}593594impl cumulus_pallet_aura_ext::Config for Runtime {}595596parameter_types! {597 pub const RelayLocation: MultiLocation = MultiLocation::parent();598 pub const RelayNetwork: NetworkId = NetworkId::Polkadot;599 pub RelayOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();600 pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();601}602603/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used604/// when determining ownership of accounts for asset transacting and when attempting to use XCM605/// `Transact` in order to determine the dispatch Origin.606pub type LocationToAccountId = (607 // The parent (Relay-chain) origin converts to the default `AccountId`.608 ParentIsDefault<AccountId>,609 // Sibling parachain origins convert to AccountId via the `ParaId::into`.610 SiblingParachainConvertsVia<Sibling, AccountId>,611 // Straight up local `AccountId32` origins just alias directly to `AccountId`.612 AccountId32Aliases<RelayNetwork, AccountId>,613);614615/// Means for transacting assets on this chain.616pub type LocalAssetTransactor = CurrencyAdapter<617 // Use this currency:618 Balances,619 // Use this currency when it is a fungible asset matching the given location or name:620 IsConcrete<RelayLocation>,621 // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:622 LocationToAccountId,623 // Our chain's account ID type (we can't get away without mentioning it explicitly):624 AccountId,625 // We don't track any teleports.626 (),627>;628629/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,630/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can631/// biases the kind of local `Origin` it will become.632pub type XcmOriginToTransactDispatchOrigin = (633 // Sovereign account converter; this attempts to derive an `AccountId` from the origin location634 // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for635 // foreign chains who want to have a local sovereign account on this chain which they control.636 SovereignSignedViaLocation<LocationToAccountId, Origin>,637 // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when638 // recognised.639 RelayChainAsNative<RelayOrigin, Origin>,640 // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when641 // recognised.642 SiblingParachainAsNative<cumulus_pallet_xcm::Origin, Origin>,643 // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a644 // transaction from the Root origin.645 ParentAsSuperuser<Origin>,646 // Native signed account converter; this just converts an `AccountId32` origin into a normal647 // `Origin::Signed` origin of the same 32-byte value.648 SignedAccountId32AsNative<RelayNetwork, Origin>,649 // Xcm origins can be represented natively under the Xcm pallet's Xcm origin.650 XcmPassthrough<Origin>,651);652653parameter_types! {654 // One XCM operation is 1_000_000 weight - almost certainly a conservative estimate.655 pub UnitWeightCost: Weight = 1_000_000;656 // 1200 UNIQUEs buy 1 second of weight.657 pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), 1_200 * UNIQUE);658 pub const MaxInstructions: u32 = 100;659 pub const MaxAuthorities: u32 = 100_000;660}661662match_type! {663 pub type ParentOrParentsUnitPlurality: impl Contains<MultiLocation> = {664 MultiLocation { parents: 1, interior: Here } |665 MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Unit, .. }) }666 };667}668669pub type Barrier = (670 TakeWeightCredit,671 AllowTopLevelPaidExecutionFrom<Everything>,672 AllowUnpaidExecutionFrom<ParentOrParentsUnitPlurality>,673 // ^^^ Parent & its unit plurality gets free execution674);675676pub struct XcmConfig;677impl Config for XcmConfig {678 type Call = Call;679 type XcmSender = XcmRouter;680 // How to withdraw and deposit an asset.681 type AssetTransactor = LocalAssetTransactor;682 type OriginConverter = XcmOriginToTransactDispatchOrigin;683 type IsReserve = NativeAsset;684 type IsTeleporter = (); // Teleportation is disabled685 type LocationInverter = LocationInverter<Ancestry>;686 type Barrier = Barrier;687 type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;688 type Trader = UsingComponents<IdentityFee<Balance>, RelayLocation, AccountId, Balances, ()>;689 type ResponseHandler = (); // Don't handle responses for now.690 type SubscriptionService = PolkadotXcm;691692 type AssetTrap = PolkadotXcm;693 type AssetClaims = PolkadotXcm;694}695696// parameter_types! {697// pub const MaxDownwardMessageWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10;698// }699700/// No local origins on this chain are allowed to dispatch XCM sends/executions.701pub type LocalOriginToLocation = (SignedToAccountId32<Origin, AccountId, RelayNetwork>,);702703/// The means for routing XCM messages which are not for local execution into the right message704/// queues.705pub type XcmRouter = (706 // Two routers - use UMP to communicate with the relay chain:707 cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,708 // ..and XCMP to communicate with the sibling chains.709 XcmpQueue,710);711712impl pallet_evm_coder_substrate::Config for Runtime {713 type EthereumTransactionSender = pallet_ethereum::Pallet<Self>;714 type GasWeightMapping = FixedGasWeightMapping;715}716717impl pallet_xcm::Config for Runtime {718 type Event = Event;719 type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;720 type XcmRouter = XcmRouter;721 type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;722 type XcmExecuteFilter = Everything;723 type XcmExecutor = XcmExecutor<XcmConfig>;724 type XcmTeleportFilter = Everything;725 type XcmReserveTransferFilter = Everything;726 type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;727 type LocationInverter = LocationInverter<Ancestry>;728 type Origin = Origin;729 type Call = Call;730 const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;731 type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;732}733734impl cumulus_pallet_xcm::Config for Runtime {735 type Event = Event;736 type XcmExecutor = XcmExecutor<XcmConfig>;737}738739impl cumulus_pallet_xcmp_queue::Config for Runtime {740 type Event = Event;741 type XcmExecutor = XcmExecutor<XcmConfig>;742 type ChannelInfo = ParachainSystem;743 type VersionWrapper = ();744}745746impl cumulus_pallet_dmp_queue::Config for Runtime {747 type Event = Event;748 type XcmExecutor = XcmExecutor<XcmConfig>;749 type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;750}751752impl pallet_aura::Config for Runtime {753 type AuthorityId = AuraId;754 type DisabledValidators = ();755 type MaxAuthorities = MaxAuthorities;756}757758parameter_types! {759 pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account();760 pub const CollectionCreationPrice: Balance = 100 * UNIQUE;761}762763impl pallet_common::Config for Runtime {764 type Event = Event;765 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;766 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;767 type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;768769 type Currency = Balances;770 type CollectionCreationPrice = CollectionCreationPrice;771 type TreasuryAccountId = TreasuryAccountId;772}773774impl pallet_fungible::Config for Runtime {775 type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;776}777impl pallet_refungible::Config for Runtime {778 type WeightInfo = pallet_refungible::weights::SubstrateWeight<Self>;779}780impl pallet_nonfungible::Config for Runtime {781 type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;782}783784impl pallet_unique::Config for Runtime {785 type Event = Event;786 type WeightInfo = pallet_unique::weights::SubstrateWeight<Self>;787}788789parameter_types! {790 pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied791}792793/// Used for the pallet inflation794impl pallet_inflation::Config for Runtime {795 type Currency = Balances;796 type TreasuryAccountId = TreasuryAccountId;797 type InflationBlockInterval = InflationBlockInterval;798 type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;799}800801// parameter_types! {802// pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *803// RuntimeBlockWeights::get().max_block;804// pub const MaxScheduledPerBlock: u32 = 50;805// }806807type EvmSponsorshipHandler = (808 pallet_unique::UniqueEthSponsorshipHandler<Runtime>,809 pallet_evm_contract_helpers::HelpersContractSponsoring<Runtime>,810);811type SponsorshipHandler = (812 pallet_unique::UniqueSponsorshipHandler<Runtime>,813 //pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,814 pallet_evm_transaction_payment::BridgeSponsorshipHandler<Runtime>,815);816817// impl pallet_unq_scheduler::Config for Runtime {818// type Event = Event;819// type Origin = Origin;820// type PalletsOrigin = OriginCaller;821// type Call = Call;822// type MaximumWeight = MaximumSchedulerWeight;823// type ScheduleOrigin = EnsureSigned<AccountId>;824// type MaxScheduledPerBlock = MaxScheduledPerBlock;825// type SponsorshipHandler = SponsorshipHandler;826// type WeightInfo = ();827// }828829impl pallet_evm_transaction_payment::Config for Runtime {830 type EvmSponsorshipHandler = EvmSponsorshipHandler;831 type Currency = Balances;832 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;833 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;834}835836impl pallet_charge_transaction::Config for Runtime {837 type SponsorshipHandler = SponsorshipHandler;838}839840// impl pallet_contract_helpers::Config for Runtime {841// type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;842// }843844parameter_types! {845 // 0x842899ECF380553E8a4de75bF534cdf6fBF64049846 pub const HelpersContractAddress: H160 = H160([847 0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49,848 ]);849}850851impl pallet_evm_contract_helpers::Config for Runtime {852 type ContractAddress = HelpersContractAddress;853 type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;854}855856construct_runtime!(857 pub enum Runtime where858 Block = Block,859 NodeBlock = opaque::Block,860 UncheckedExtrinsic = UncheckedExtrinsic861 {862 ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,863 ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,864865 Aura: pallet_aura::{Pallet, Config<T>} = 22,866 AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,867868 Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,869 RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,870 Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,871 TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33,872 Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,873 Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,874 System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 36,875 Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,876 // Vesting: pallet_vesting::{Pallet, Call, Config<T>, Storage, Event<T>} = 37,877 // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,878879 // XCM helpers.880 XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,881 PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,882 CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,883 DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,884885 // Unique Pallets886 Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,887 Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,888 // Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,889 // free = 63890 Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,891 // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,892 Common: pallet_common::{Pallet, Storage, Event<T>} = 66,893 Fungible: pallet_fungible::{Pallet, Storage} = 67,894 Refungible: pallet_refungible::{Pallet, Storage} = 68,895 Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,896897 // Frontier898 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,899 Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,900901 EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,902 EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,903 EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,904 EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,905 }906);907908pub struct TransactionConverter;909910impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {911 fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {912 UncheckedExtrinsic::new_unsigned(913 pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),914 )915 }916}917918impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConverter {919 fn convert_transaction(920 &self,921 transaction: pallet_ethereum::Transaction,922 ) -> opaque::UncheckedExtrinsic {923 let extrinsic = UncheckedExtrinsic::new_unsigned(924 pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),925 );926 let encoded = extrinsic.encode();927 opaque::UncheckedExtrinsic::decode(&mut &encoded[..])928 .expect("Encoded extrinsic is always valid")929 }930}931932/// The address format for describing accounts.933pub type Address = sp_runtime::MultiAddress<AccountId, ()>;934/// Block header type as expected by this runtime.935pub type Header = generic::Header<BlockNumber, BlakeTwo256>;936/// Block type as expected by this runtime.937pub type Block = generic::Block<Header, UncheckedExtrinsic>;938/// A Block signed with a Justification939pub type SignedBlock = generic::SignedBlock<Block>;940/// BlockId type as expected by this runtime.941pub type BlockId = generic::BlockId<Block>;942/// The SignedExtension to the basic transaction logic.943pub type SignedExtra = (944 frame_system::CheckSpecVersion<Runtime>,945 // system::CheckTxVersion<Runtime>,946 frame_system::CheckGenesis<Runtime>,947 frame_system::CheckEra<Runtime>,948 frame_system::CheckNonce<Runtime>,949 frame_system::CheckWeight<Runtime>,950 pallet_charge_transaction::ChargeTransactionPayment<Runtime>,951 //pallet_contract_helpers::ContractHelpersExtension<Runtime>,952);953/// Unchecked extrinsic type as expected by this runtime.954pub type UncheckedExtrinsic =955 fp_self_contained::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;956/// Extrinsic type that has already been checked.957pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic<AccountId, Call, SignedExtra, H160>;958/// Executive: handles dispatch to the various modules.959pub type Executive = frame_executive::Executive<960 Runtime,961 Block,962 frame_system::ChainContext<Runtime>,963 Runtime,964 AllPallets,965>;966967impl_opaque_keys! {968 pub struct SessionKeys {969 pub aura: Aura,970 }971}972973impl fp_self_contained::SelfContainedCall for Call {974 type SignedInfo = H160;975976 fn is_self_contained(&self) -> bool {977 match self {978 Call::Ethereum(call) => call.is_self_contained(),979 _ => false,980 }981 }982983 fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {984 match self {985 Call::Ethereum(call) => call.check_self_contained(),986 _ => None,987 }988 }989990 fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option<TransactionValidity> {991 match self {992 Call::Ethereum(call) => call.validate_self_contained(info),993 _ => None,994 }995 }996997 fn pre_dispatch_self_contained(998 &self,999 info: &Self::SignedInfo,1000 ) -> Option<Result<(), TransactionValidityError>> {1001 match self {1002 Call::Ethereum(call) => call.pre_dispatch_self_contained(info),1003 _ => None,1004 }1005 }10061007 fn apply_self_contained(1008 self,1009 info: Self::SignedInfo,1010 ) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {1011 match self {1012 call @ Call::Ethereum(pallet_ethereum::Call::transact { .. }) => Some(call.dispatch(1013 Origin::from(pallet_ethereum::RawOrigin::EthereumTransaction(info)),1014 )),1015 _ => None,1016 }1017 }1018}10191020macro_rules! dispatch_unique_runtime {1021 ($collection:ident.$method:ident($($name:ident),*)) => {{1022 use pallet_unique::dispatch::Dispatched;10231024 let collection = Dispatched::dispatch(<pallet_common::CollectionHandle<Runtime>>::try_get($collection)?);1025 let dispatch = collection.as_dyn();10261027 Ok(dispatch.$method($($name),*))1028 }};1029}1030impl_runtime_apis! {1031 impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId>1032 for Runtime1033 {1034 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {1035 dispatch_unique_runtime!(collection.account_tokens(account))1036 }1037 fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool, DispatchError> {1038 dispatch_unique_runtime!(collection.token_exists(token))1039 }10401041 fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId, DispatchError> {1042 dispatch_unique_runtime!(collection.token_owner(token))1043 }1044 fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {1045 dispatch_unique_runtime!(collection.const_metadata(token))1046 }1047 fn variable_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {1048 dispatch_unique_runtime!(collection.variable_metadata(token))1049 }10501051 fn collection_tokens(collection: CollectionId) -> Result<u32, DispatchError> {1052 dispatch_unique_runtime!(collection.collection_tokens())1053 }1054 fn account_balance(collection: CollectionId, account: CrossAccountId) -> Result<u32, DispatchError> {1055 dispatch_unique_runtime!(collection.account_balance(account))1056 }1057 fn balance(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<u128, DispatchError> {1058 dispatch_unique_runtime!(collection.balance(account, token))1059 }1060 fn allowance(1061 collection: CollectionId,1062 sender: CrossAccountId,1063 spender: CrossAccountId,1064 token: TokenId,1065 ) -> Result<u128, DispatchError> {1066 dispatch_unique_runtime!(collection.allowance(sender, spender, token))1067 }10681069 fn eth_contract_code(account: H160) -> Option<Vec<u8>> {1070 <pallet_unique::UniqueErcSupport<Runtime>>::get_code(&account)1071 .or_else(|| <pallet_evm_migration::OnMethodCall<Runtime>>::get_code(&account))1072 .or_else(|| <pallet_evm_contract_helpers::HelpersOnMethodCall<Self>>::get_code(&account))1073 }1074 fn adminlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {1075 Ok(<pallet_common::Pallet<Runtime>>::adminlist(collection))1076 }1077 fn allowlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {1078 Ok(<pallet_common::Pallet<Runtime>>::allowlist(collection))1079 }1080 fn allowed(collection: CollectionId, user: CrossAccountId) -> Result<bool, DispatchError> {1081 Ok(<pallet_common::Pallet<Runtime>>::allowed(collection, user))1082 }1083 fn last_token_id(collection: CollectionId) -> Result<TokenId, DispatchError> {1084 dispatch_unique_runtime!(collection.last_token_id())1085 }1086 fn collection_by_id(collection: CollectionId) -> Result<Option<Collection<AccountId>>, DispatchError> {1087 Ok(<pallet_common::CollectionById<Runtime>>::get(collection))1088 }1089 fn collection_stats() -> Result<CollectionStats, DispatchError> {1090 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())1091 }1092 }10931094 impl sp_api::Core<Block> for Runtime {1095 fn version() -> RuntimeVersion {1096 VERSION1097 }10981099 fn execute_block(block: Block) {1100 Executive::execute_block(block)1101 }11021103 fn initialize_block(header: &<Block as BlockT>::Header) {1104 Executive::initialize_block(header)1105 }1106 }11071108 impl sp_api::Metadata<Block> for Runtime {1109 fn metadata() -> OpaqueMetadata {1110 OpaqueMetadata::new(Runtime::metadata().into())1111 }1112 }11131114 impl sp_block_builder::BlockBuilder<Block> for Runtime {1115 fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {1116 Executive::apply_extrinsic(extrinsic)1117 }11181119 fn finalize_block() -> <Block as BlockT>::Header {1120 Executive::finalize_block()1121 }11221123 fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {1124 data.create_extrinsics()1125 }11261127 fn check_inherents(1128 block: Block,1129 data: sp_inherents::InherentData,1130 ) -> sp_inherents::CheckInherentsResult {1131 data.check_extrinsics(&block)1132 }11331134 // fn random_seed() -> <Block as BlockT>::Hash {1135 // RandomnessCollectiveFlip::random_seed().01136 // }1137 }11381139 impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {1140 fn validate_transaction(1141 source: TransactionSource,1142 tx: <Block as BlockT>::Extrinsic,1143 hash: <Block as BlockT>::Hash,1144 ) -> TransactionValidity {1145 Executive::validate_transaction(source, tx, hash)1146 }1147 }11481149 impl sp_offchain::OffchainWorkerApi<Block> for Runtime {1150 fn offchain_worker(header: &<Block as BlockT>::Header) {1151 Executive::offchain_worker(header)1152 }1153 }11541155 impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {1156 fn chain_id() -> u64 {1157 <Runtime as pallet_evm::Config>::ChainId::get()1158 }11591160 fn account_basic(address: H160) -> EVMAccount {1161 EVM::account_basic(&address)1162 }11631164 fn gas_price() -> U256 {1165 <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price()1166 }11671168 fn account_code_at(address: H160) -> Vec<u8> {1169 EVM::account_codes(address)1170 }11711172 fn author() -> H160 {1173 <pallet_evm::Pallet<Runtime>>::find_author()1174 }11751176 fn storage_at(address: H160, index: U256) -> H256 {1177 let mut tmp = [0u8; 32];1178 index.to_big_endian(&mut tmp);1179 EVM::account_storages(address, H256::from_slice(&tmp[..]))1180 }11811182 #[allow(clippy::redundant_closure)]1183 fn call(1184 from: H160,1185 to: H160,1186 data: Vec<u8>,1187 value: U256,1188 gas_limit: U256,1189 gas_price: Option<U256>,1190 nonce: Option<U256>,1191 estimate: bool,1192 ) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {1193 let config = if estimate {1194 let mut config = <Runtime as pallet_evm::Config>::config().clone();1195 config.estimate = true;1196 Some(config)1197 } else {1198 None1199 };12001201 <Runtime as pallet_evm::Config>::Runner::call(1202 from,1203 to,1204 data,1205 value,1206 gas_limit.low_u64(),1207 gas_price,1208 nonce,1209 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),1210 ).map_err(|err| err.into())1211 }12121213 #[allow(clippy::redundant_closure)]1214 fn create(1215 from: H160,1216 data: Vec<u8>,1217 value: U256,1218 gas_limit: U256,1219 gas_price: Option<U256>,1220 nonce: Option<U256>,1221 estimate: bool,1222 ) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {1223 let config = if estimate {1224 let mut config = <Runtime as pallet_evm::Config>::config().clone();1225 config.estimate = true;1226 Some(config)1227 } else {1228 None1229 };12301231 <Runtime as pallet_evm::Config>::Runner::create(1232 from,1233 data,1234 value,1235 gas_limit.low_u64(),1236 gas_price,1237 nonce,1238 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),1239 ).map_err(|err| err.into())1240 }12411242 fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {1243 Ethereum::current_transaction_statuses()1244 }12451246 fn current_block() -> Option<pallet_ethereum::Block> {1247 Ethereum::current_block()1248 }12491250 fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {1251 Ethereum::current_receipts()1252 }12531254 fn current_all() -> (1255 Option<pallet_ethereum::Block>,1256 Option<Vec<pallet_ethereum::Receipt>>,1257 Option<Vec<TransactionStatus>>1258 ) {1259 (1260 Ethereum::current_block(),1261 Ethereum::current_receipts(),1262 Ethereum::current_transaction_statuses()1263 )1264 }12651266 fn extrinsic_filter(xts: Vec<<Block as sp_api::BlockT>::Extrinsic>) -> Vec<pallet_ethereum::Transaction> {1267 xts.into_iter().filter_map(|xt| match xt.0.function {1268 Call::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction),1269 _ => None1270 }).collect()1271 }1272 }12731274 impl sp_session::SessionKeys<Block> for Runtime {1275 fn decode_session_keys(1276 encoded: Vec<u8>,1277 ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {1278 SessionKeys::decode_into_raw_public_keys(&encoded)1279 }12801281 fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {1282 SessionKeys::generate(seed)1283 }1284 }12851286 impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {1287 fn slot_duration() -> sp_consensus_aura::SlotDuration {1288 sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())1289 }12901291 fn authorities() -> Vec<AuraId> {1292 Aura::authorities().to_vec()1293 }1294 }12951296 impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {1297 fn collect_collation_info() -> cumulus_primitives_core::CollationInfo {1298 ParachainSystem::collect_collation_info()1299 }1300 }13011302 impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {1303 fn account_nonce(account: AccountId) -> Index {1304 System::account_nonce(account)1305 }1306 }13071308 impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {1309 fn query_info(uxt: <Block as BlockT>::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance> {1310 TransactionPayment::query_info(uxt, len)1311 }1312 fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {1313 TransactionPayment::query_fee_details(uxt, len)1314 }1315 }13161317 /*1318 impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>1319 for Runtime1320 {1321 fn call(1322 origin: AccountId,1323 dest: AccountId,1324 value: Balance,1325 gas_limit: u64,1326 input_data: Vec<u8>,1327 ) -> pallet_contracts_primitives::ContractExecResult {1328 Contracts::bare_call(origin, dest, value, gas_limit, input_data, false)1329 }13301331 fn instantiate(1332 origin: AccountId,1333 endowment: Balance,1334 gas_limit: u64,1335 code: pallet_contracts_primitives::Code<Hash>,1336 data: Vec<u8>,1337 salt: Vec<u8>,1338 ) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, BlockNumber>1339 {1340 Contracts::bare_instantiate(origin, endowment, gas_limit, code, data, salt, true, false)1341 }13421343 fn get_storage(1344 address: AccountId,1345 key: [u8; 32],1346 ) -> pallet_contracts_primitives::GetStorageResult {1347 Contracts::get_storage(address, key)1348 }13491350 fn rent_projection(1351 address: AccountId,1352 ) -> pallet_contracts_primitives::RentProjectionResult<BlockNumber> {1353 Contracts::rent_projection(address)1354 }1355 }1356 */13571358 #[cfg(feature = "runtime-benchmarks")]1359 impl frame_benchmarking::Benchmark<Block> for Runtime {1360 fn benchmark_metadata(extra: bool) -> (1361 Vec<frame_benchmarking::BenchmarkList>,1362 Vec<frame_support::traits::StorageInfo>,1363 ) {1364 use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};1365 use frame_support::traits::StorageInfoTrait;13661367 let mut list = Vec::<BenchmarkList>::new();13681369 list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);1370 list_benchmark!(list, extra, pallet_unique, Unique);1371 list_benchmark!(list, extra, pallet_inflation, Inflation);1372 list_benchmark!(list, extra, pallet_fungible, Fungible);1373 list_benchmark!(list, extra, pallet_refungible, Refungible);1374 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);1375 // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);13761377 let storage_info = AllPalletsWithSystem::storage_info();13781379 return (list, storage_info)1380 }13811382 fn dispatch_benchmark(1383 config: frame_benchmarking::BenchmarkConfig1384 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {1385 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};13861387 let allowlist: Vec<TrackedStorageKey> = vec![1388 // Block Number1389 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),1390 // Total Issuance1391 hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),1392 // Execution Phase1393 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),1394 // Event Count1395 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),1396 // System Events1397 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),1398 ];13991400 let mut batches = Vec::<BenchmarkBatch>::new();1401 let params = (&config, &allowlist);14021403 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);1404 add_benchmark!(params, batches, pallet_unique, Unique);1405 add_benchmark!(params, batches, pallet_inflation, Inflation);1406 add_benchmark!(params, batches, pallet_fungible, Fungible);1407 add_benchmark!(params, batches, pallet_refungible, Refungible);1408 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);1409 // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);14101411 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }1412 Ok(batches)1413 }1414 }1415}14161417struct CheckInherents;14181419impl cumulus_pallet_parachain_system::CheckInherents<Block> for CheckInherents {1420 fn check_inherents(1421 block: &Block,1422 relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof,1423 ) -> sp_inherents::CheckInherentsResult {1424 let relay_chain_slot = relay_state_proof1425 .read_slot()1426 .expect("Could not read the relay chain slot from the proof");14271428 let inherent_data =1429 cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration(1430 relay_chain_slot,1431 sp_std::time::Duration::from_secs(6),1432 )1433 .create_inherent_data()1434 .expect("Could not create the timestamp inherent data");14351436 inherent_data.check_extrinsics(block)1437 }1438}14391440cumulus_pallet_parachain_system::register_validate_block!(1441 Runtime = Runtime,1442 BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,1443 CheckInherents = CheckInherents,1444);1//2// This file is subject to the terms and conditions defined in3// file 'LICENSE', which is part of this source code package.4//56//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.78#![cfg_attr(not(feature = "std"), no_std)]9// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.10#![recursion_limit = "1024"]11#![allow(clippy::from_over_into, clippy::identity_op)]12#![allow(clippy::fn_to_numeric_cast_with_truncation)]13// Make the WASM binary available.14#[cfg(feature = "std")]15include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));1617use sp_api::impl_runtime_apis;18use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160};19use sp_runtime::DispatchError;20// #[cfg(any(feature = "std", test))]21// pub use sp_runtime::BuildStorage;2223use sp_runtime::{24 Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys,25 traits::{26 AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify, AccountIdConversion,27 },28 transaction_validity::{TransactionSource, TransactionValidity},29 ApplyExtrinsicResult, MultiSignature,30};3132use sp_std::prelude::*;3334#[cfg(feature = "std")]35use sp_version::NativeVersion;36use sp_version::RuntimeVersion;37pub use pallet_transaction_payment::{38 Multiplier, TargetedFeeAdjustment, FeeDetails, RuntimeDispatchInfo,39};40// A few exports that help ease life for downstream crates.41pub use pallet_balances::Call as BalancesCall;42pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};43pub use frame_support::{44 construct_runtime, match_type,45 dispatch::DispatchResult,46 PalletId, parameter_types, StorageValue, ConsensusEngineId,47 traits::{48 Everything, Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem,49 LockIdentifier, OnUnbalanced, Randomness, FindAuthor,50 },51 weights::{52 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},53 DispatchClass, DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,54 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients,55 },56};57use up_data_structs::*;58// use pallet_contracts::weights::WeightInfo;59// #[cfg(any(feature = "std", test))]60use frame_system::{61 self as frame_system, EnsureRoot, EnsureSigned,62 limits::{BlockWeights, BlockLength},63};64use sp_arithmetic::{65 traits::{BaseArithmetic, Unsigned},66};67use smallvec::smallvec;68use codec::{Encode, Decode};69use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, OnMethodCall};70use fp_rpc::TransactionStatus;71use sp_core::crypto::Public;72use sp_runtime::{73 traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf},74 transaction_validity::TransactionValidityError,75};7677// pub use pallet_timestamp::Call as TimestampCall;78pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;7980// Polkadot imports81use pallet_xcm::XcmPassthrough;82use polkadot_parachain::primitives::Sibling;83use xcm::v1::{BodyId, Junction::*, MultiLocation, NetworkId, Junctions::*};84use xcm_builder::{85 AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,86 EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset,87 ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative,88 SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,89 SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,90};91use xcm_executor::{Config, XcmExecutor};9293// mod chain_extension;94// use crate::chain_extension::{NFTExtension, Imbalance};9596/// An index to a block.97pub type BlockNumber = u32;9899/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.100pub type Signature = MultiSignature;101102/// Some way of identifying an account on the chain. We intentionally make it equivalent103/// to the public key of our transaction signing scheme.104pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;105106pub type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;107108/// The type for looking up accounts. We don't expect more than 4 billion of them, but you109/// never know...110pub type AccountIndex = u32;111112/// Balance of an account.113pub type Balance = u128;114115/// Index of a transaction in the chain.116pub type Index = u32;117118/// A hash of some data used by the chain.119pub type Hash = sp_core::H256;120121/// Digest item type.122pub type DigestItem = generic::DigestItem;123124/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know125/// the specifics of the runtime. They can then be made to be agnostic over specific formats126/// of data like extrinsics, allowing for them to continue syncing the network through upgrades127/// to even the core data structures.128pub mod opaque {129 use super::*;130131 pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;132133 /// Opaque block type.134 pub type Block = generic::Block<Header, UncheckedExtrinsic>;135136 pub type SessionHandlers = ();137138 impl_opaque_keys! {139 pub struct SessionKeys {140 pub aura: Aura,141 }142 }143}144145/// This runtime version.146pub const VERSION: RuntimeVersion = RuntimeVersion {147 spec_name: create_runtime_str!("opal"),148 impl_name: create_runtime_str!("opal"),149 authoring_version: 1,150 spec_version: 914000,151 impl_version: 1,152 apis: RUNTIME_API_VERSIONS,153 transaction_version: 1,154};155156pub const MILLISECS_PER_BLOCK: u64 = 12000;157158pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;159160// These time units are defined in number of blocks.161pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);162pub const HOURS: BlockNumber = MINUTES * 60;163pub const DAYS: BlockNumber = HOURS * 24;164165parameter_types! {166 pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS;167}168169#[derive(codec::Encode, codec::Decode)]170pub enum XCMPMessage<XAccountId, XBalance> {171 /// Transfer tokens to the given account from the Parachain account.172 TransferToken(XAccountId, XBalance),173}174175/// The version information used to identify this runtime when compiled natively.176#[cfg(feature = "std")]177pub fn native_version() -> NativeVersion {178 NativeVersion {179 runtime_version: VERSION,180 can_author_with: Default::default(),181 }182}183184type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;185186pub struct DealWithFees;187impl OnUnbalanced<NegativeImbalance> for DealWithFees {188 fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item = NegativeImbalance>) {189 if let Some(fees) = fees_then_tips.next() {190 // for fees, 100% to treasury191 let mut split = fees.ration(100, 0);192 if let Some(tips) = fees_then_tips.next() {193 // for tips, if any, 100% to treasury194 tips.ration_merge_into(100, 0, &mut split);195 }196 Treasury::on_unbalanced(split.0);197 // Author::on_unbalanced(split.1);198 }199 }200}201202/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.203/// This is used to limit the maximal weight of a single extrinsic.204const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);205/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used206/// by Operational extrinsics.207const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);208/// We allow for 2 seconds of compute with a 6 second average block time.209const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;210211parameter_types! {212 pub const BlockHashCount: BlockNumber = 2400;213 pub RuntimeBlockLength: BlockLength =214 BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);215 pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);216 pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;217 pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()218 .base_block(BlockExecutionWeight::get())219 .for_class(DispatchClass::all(), |weights| {220 weights.base_extrinsic = ExtrinsicBaseWeight::get();221 })222 .for_class(DispatchClass::Normal, |weights| {223 weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);224 })225 .for_class(DispatchClass::Operational, |weights| {226 weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);227 // Operational transactions have some extra reserved space, so that they228 // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.229 weights.reserved = Some(230 MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT231 );232 })233 .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)234 .build_or_panic();235 pub const Version: RuntimeVersion = VERSION;236 pub const SS58Prefix: u8 = 42;237}238239parameter_types! {240 pub const ChainId: u64 = 8888;241}242243pub struct FixedFee;244impl FeeCalculator for FixedFee {245 fn min_gas_price() -> U256 {246 // Targeting 0.15 UNQ per transfer247 1_024_947_215_000u64.into()248 }249}250251// Assuming slowest ethereum opcode is SSTORE, with gas price of 20000 as our worst case252// (contract, which only writes a lot of data),253// approximating on top of our real store write weight254parameter_types! {255 pub const WritesPerSecond: u64 = WEIGHT_PER_SECOND / <Runtime as frame_system::Config>::DbWeight::get().write;256 pub const GasPerSecond: u64 = WritesPerSecond::get() * 20000;257 pub const WeightPerGas: u64 = WEIGHT_PER_SECOND / GasPerSecond::get();258}259260/// Limiting EVM execution to 50% of block for substrate users and management tasks261/// EVM transaction consumes more weight than substrate's, so we can't rely on them being262/// scheduled fairly263const EVM_DISPATCH_RATIO: Perbill = Perbill::from_percent(50);264parameter_types! {265 pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * EVM_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WeightPerGas::get());266}267268pub enum FixedGasWeightMapping {}269impl GasWeightMapping for FixedGasWeightMapping {270 fn gas_to_weight(gas: u64) -> Weight {271 gas.saturating_mul(WeightPerGas::get())272 }273 fn weight_to_gas(weight: Weight) -> u64 {274 weight / WeightPerGas::get()275 }276}277278impl pallet_evm::Config for Runtime {279 type BlockGasLimit = BlockGasLimit;280 type FeeCalculator = FixedFee;281 type GasWeightMapping = FixedGasWeightMapping;282 type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;283 type CallOrigin = EnsureAddressTruncated;284 type WithdrawOrigin = EnsureAddressTruncated;285 type AddressMapping = HashedAddressMapping<Self::Hashing>;286 type Precompiles = ();287 type Currency = Balances;288 type Event = Event;289 type OnMethodCall = (290 pallet_evm_migration::OnMethodCall<Self>,291 pallet_unique::UniqueErcSupport<Self>,292 pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,293 );294 type OnCreate = pallet_evm_contract_helpers::HelpersOnCreate<Self>;295 type ChainId = ChainId;296 type Runner = pallet_evm::runner::stack::Runner<Self>;297 type OnChargeTransaction = pallet_evm_transaction_payment::OnChargeTransaction<Self>;298 type TransactionValidityHack = pallet_evm_transaction_payment::TransactionValidityHack<Self>;299 type FindAuthor = EthereumFindAuthor<Aura>;300}301302impl pallet_evm_migration::Config for Runtime {303 type WeightInfo = pallet_evm_migration::weights::SubstrateWeight<Self>;304}305306pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);307impl<F: FindAuthor<u32>> FindAuthor<H160> for EthereumFindAuthor<F> {308 fn find_author<'a, I>(digests: I) -> Option<H160>309 where310 I: 'a + IntoIterator<Item = (ConsensusEngineId, &'a [u8])>,311 {312 if let Some(author_index) = F::find_author(digests) {313 let authority_id = Aura::authorities()[author_index as usize].clone();314 return Some(H160::from_slice(&authority_id.to_raw_vec()[4..24]));315 }316 None317 }318}319320impl pallet_ethereum::Config for Runtime {321 type Event = Event;322 type StateRoot = pallet_ethereum::IntermediateStateRoot;323}324325impl pallet_randomness_collective_flip::Config for Runtime {}326327impl frame_system::Config for Runtime {328 /// The data to be stored in an account.329 type AccountData = pallet_balances::AccountData<Balance>;330 /// The identifier used to distinguish between accounts.331 type AccountId = AccountId;332 /// The basic call filter to use in dispatchable.333 type BaseCallFilter = Everything;334 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).335 type BlockHashCount = BlockHashCount;336 /// The maximum length of a block (in bytes).337 type BlockLength = RuntimeBlockLength;338 /// The index type for blocks.339 type BlockNumber = BlockNumber;340 /// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.341 type BlockWeights = RuntimeBlockWeights;342 /// The aggregated dispatch type that is available for extrinsics.343 type Call = Call;344 /// The weight of database operations that the runtime can invoke.345 type DbWeight = RocksDbWeight;346 /// The ubiquitous event type.347 type Event = Event;348 /// The type for hashing blocks and tries.349 type Hash = Hash;350 /// The hashing algorithm used.351 type Hashing = BlakeTwo256;352 /// The header type.353 type Header = generic::Header<BlockNumber, BlakeTwo256>;354 /// The index type for storing how many extrinsics an account has signed.355 type Index = Index;356 /// The lookup mechanism to get account ID from whatever is passed in dispatchers.357 type Lookup = AccountIdLookup<AccountId, ()>;358 /// What to do if an account is fully reaped from the system.359 type OnKilledAccount = ();360 /// What to do if a new account is created.361 type OnNewAccount = ();362 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;363 /// The ubiquitous origin type.364 type Origin = Origin;365 /// This type is being generated by `construct_runtime!`.366 type PalletInfo = PalletInfo;367 /// This is used as an identifier of the chain. 42 is the generic substrate prefix.368 type SS58Prefix = SS58Prefix;369 /// Weight information for the extrinsics of this pallet.370 type SystemWeightInfo = frame_system::weights::SubstrateWeight<Self>;371 /// Version of the runtime.372 type Version = Version;373}374375parameter_types! {376 pub const MinimumPeriod: u64 = SLOT_DURATION / 2;377}378379impl pallet_timestamp::Config for Runtime {380 /// A timestamp: milliseconds since the unix epoch.381 type Moment = u64;382 type OnTimestampSet = ();383 type MinimumPeriod = MinimumPeriod;384 type WeightInfo = ();385}386387parameter_types! {388 // pub const ExistentialDeposit: u128 = 500;389 pub const ExistentialDeposit: u128 = 0;390 pub const MaxLocks: u32 = 50;391}392393impl pallet_balances::Config for Runtime {394 type MaxLocks = MaxLocks;395 type MaxReserves = ();396 type ReserveIdentifier = [u8; 8];397 /// The type for recording an account's balance.398 type Balance = Balance;399 /// The ubiquitous event type.400 type Event = Event;401 type DustRemoval = Treasury;402 type ExistentialDeposit = ExistentialDeposit;403 type AccountStore = System;404 type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;405}406407pub const MICROUNIQUE: Balance = 1_000_000_000_000;408pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;409pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;410pub const UNIQUE: Balance = 100 * CENTIUNIQUE;411412pub const fn deposit(items: u32, bytes: u32) -> Balance {413 items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE414}415416/*417parameter_types! {418 pub TombstoneDeposit: Balance = deposit(419 1,420 sp_std::mem::size_of::<pallet_contracts::Pallet<Runtime>> as u32,421 );422 pub DepositPerContract: Balance = TombstoneDeposit::get();423 pub const DepositPerStorageByte: Balance = deposit(0, 1);424 pub const DepositPerStorageItem: Balance = deposit(1, 0);425 pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);426 pub const SurchargeReward: Balance = 150 * MILLIUNIQUE;427 pub const SignedClaimHandicap: u32 = 2;428 pub const MaxDepth: u32 = 32;429 pub const MaxValueSize: u32 = 16 * 1024;430 pub const MaxCodeSize: u32 = 1024 * 1024 * 25; // 25 Mb431 // The lazy deletion runs inside on_initialize.432 pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *433 RuntimeBlockWeights::get().max_block;434 // The weight needed for decoding the queue should be less or equal than a fifth435 // of the overall weight dedicated to the lazy deletion.436 pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (437 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -438 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)439 )) / 5) as u32;440 pub Schedule: pallet_contracts::Schedule<Runtime> = Default::default();441}442443impl pallet_contracts::Config for Runtime {444 type Time = Timestamp;445 type Randomness = RandomnessCollectiveFlip;446 type Currency = Balances;447 type Event = Event;448 type RentPayment = ();449 type SignedClaimHandicap = SignedClaimHandicap;450 type TombstoneDeposit = TombstoneDeposit;451 type DepositPerContract = DepositPerContract;452 type DepositPerStorageByte = DepositPerStorageByte;453 type DepositPerStorageItem = DepositPerStorageItem;454 type RentFraction = RentFraction;455 type SurchargeReward = SurchargeReward;456 type WeightPrice = pallet_transaction_payment::Pallet<Self>;457 type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;458 type ChainExtension = NFTExtension;459 type DeletionQueueDepth = DeletionQueueDepth;460 type DeletionWeightLimit = DeletionWeightLimit;461 type Schedule = Schedule;462 type CallStack = [pallet_contracts::Frame<Self>; 31];463}464*/465466parameter_types! {467 pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer468 /// This value increases the priority of `Operational` transactions by adding469 /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.470 pub const OperationalFeeMultiplier: u8 = 5;471}472473/// Linear implementor of `WeightToFeePolynomial`474pub struct LinearFee<T>(sp_std::marker::PhantomData<T>);475476impl<T> WeightToFeePolynomial for LinearFee<T>477where478 T: BaseArithmetic + From<u32> + Copy + Unsigned,479{480 type Balance = T;481482 fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {483 smallvec!(WeightToFeeCoefficient {484 // Targeting 0.1 Unique per NFT transfer485 coeff_integer: 142_688_000u32.into(),486 coeff_frac: Perbill::zero(),487 negative: false,488 degree: 1,489 })490 }491}492493impl pallet_transaction_payment::Config for Runtime {494 type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees>;495 type TransactionByteFee = TransactionByteFee;496 type OperationalFeeMultiplier = OperationalFeeMultiplier;497 type WeightToFee = LinearFee<Balance>;498 type FeeMultiplierUpdate = ();499}500501parameter_types! {502 pub const ProposalBond: Permill = Permill::from_percent(5);503 pub const ProposalBondMinimum: Balance = 1 * UNIQUE;504 pub const SpendPeriod: BlockNumber = 5 * MINUTES;505 pub const Burn: Permill = Permill::from_percent(0);506 pub const TipCountdown: BlockNumber = 1 * DAYS;507 pub const TipFindersFee: Percent = Percent::from_percent(20);508 pub const TipReportDepositBase: Balance = 1 * UNIQUE;509 pub const DataDepositPerByte: Balance = 1 * CENTIUNIQUE;510 pub const BountyDepositBase: Balance = 1 * UNIQUE;511 pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS;512 pub const TreasuryModuleId: PalletId = PalletId(*b"py/trsry");513 pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS;514 pub const MaximumReasonLength: u32 = 16384;515 pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);516 pub const BountyValueMinimum: Balance = 5 * UNIQUE;517 pub const MaxApprovals: u32 = 100;518}519520impl pallet_treasury::Config for Runtime {521 type PalletId = TreasuryModuleId;522 type Currency = Balances;523 type ApproveOrigin = EnsureRoot<AccountId>;524 type RejectOrigin = EnsureRoot<AccountId>;525 type Event = Event;526 type OnSlash = ();527 type ProposalBond = ProposalBond;528 type ProposalBondMinimum = ProposalBondMinimum;529 type SpendPeriod = SpendPeriod;530 type Burn = Burn;531 type BurnDestination = ();532 type SpendFunds = ();533 type WeightInfo = pallet_treasury::weights::SubstrateWeight<Self>;534 type MaxApprovals = MaxApprovals;535}536537impl pallet_sudo::Config for Runtime {538 type Event = Event;539 type Call = Call;540}541542pub struct RelayChainBlockNumberProvider<T>(sp_std::marker::PhantomData<T>);543544impl<T: cumulus_pallet_parachain_system::Config> BlockNumberProvider545 for RelayChainBlockNumberProvider<T>546{547 type BlockNumber = BlockNumber;548549 fn current_block_number() -> Self::BlockNumber {550 cumulus_pallet_parachain_system::Pallet::<T>::validation_data()551 .map(|d| d.relay_parent_number)552 .unwrap_or_default()553 }554}555556parameter_types! {557 pub const MinVestedTransfer: Balance = 10 * UNIQUE;558 pub const MaxVestingSchedules: u32 = 28;559}560561impl orml_vesting::Config for Runtime {562 type Event = Event;563 type Currency = pallet_balances::Pallet<Runtime>;564 type MinVestedTransfer = MinVestedTransfer;565 type VestedTransferOrigin = EnsureSigned<AccountId>;566 type WeightInfo = ();567 type MaxVestingSchedules = MaxVestingSchedules;568 type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;569}570571parameter_types! {572 pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;573 pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;574}575576impl cumulus_pallet_parachain_system::Config for Runtime {577 type Event = Event;578 type OnValidationData = ();579 type SelfParaId = parachain_info::Pallet<Self>;580 // type DownwardMessageHandlers = cumulus_primitives_utility::UnqueuedDmpAsParent<581 // MaxDownwardMessageWeight,582 // XcmExecutor<XcmConfig>,583 // Call,584 // >;585 type OutboundXcmpMessageSource = XcmpQueue;586 type DmpMessageHandler = DmpQueue;587 type ReservedDmpWeight = ReservedDmpWeight;588 type ReservedXcmpWeight = ReservedXcmpWeight;589 type XcmpMessageHandler = XcmpQueue;590}591592impl parachain_info::Config for Runtime {}593594impl cumulus_pallet_aura_ext::Config for Runtime {}595596parameter_types! {597 pub const RelayLocation: MultiLocation = MultiLocation::parent();598 pub const RelayNetwork: NetworkId = NetworkId::Polkadot;599 pub RelayOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();600 pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();601}602603/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used604/// when determining ownership of accounts for asset transacting and when attempting to use XCM605/// `Transact` in order to determine the dispatch Origin.606pub type LocationToAccountId = (607 // The parent (Relay-chain) origin converts to the default `AccountId`.608 ParentIsDefault<AccountId>,609 // Sibling parachain origins convert to AccountId via the `ParaId::into`.610 SiblingParachainConvertsVia<Sibling, AccountId>,611 // Straight up local `AccountId32` origins just alias directly to `AccountId`.612 AccountId32Aliases<RelayNetwork, AccountId>,613);614615/// Means for transacting assets on this chain.616pub type LocalAssetTransactor = CurrencyAdapter<617 // Use this currency:618 Balances,619 // Use this currency when it is a fungible asset matching the given location or name:620 IsConcrete<RelayLocation>,621 // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:622 LocationToAccountId,623 // Our chain's account ID type (we can't get away without mentioning it explicitly):624 AccountId,625 // We don't track any teleports.626 (),627>;628629/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,630/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can631/// biases the kind of local `Origin` it will become.632pub type XcmOriginToTransactDispatchOrigin = (633 // Sovereign account converter; this attempts to derive an `AccountId` from the origin location634 // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for635 // foreign chains who want to have a local sovereign account on this chain which they control.636 SovereignSignedViaLocation<LocationToAccountId, Origin>,637 // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when638 // recognised.639 RelayChainAsNative<RelayOrigin, Origin>,640 // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when641 // recognised.642 SiblingParachainAsNative<cumulus_pallet_xcm::Origin, Origin>,643 // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a644 // transaction from the Root origin.645 ParentAsSuperuser<Origin>,646 // Native signed account converter; this just converts an `AccountId32` origin into a normal647 // `Origin::Signed` origin of the same 32-byte value.648 SignedAccountId32AsNative<RelayNetwork, Origin>,649 // Xcm origins can be represented natively under the Xcm pallet's Xcm origin.650 XcmPassthrough<Origin>,651);652653parameter_types! {654 // One XCM operation is 1_000_000 weight - almost certainly a conservative estimate.655 pub UnitWeightCost: Weight = 1_000_000;656 // 1200 UNIQUEs buy 1 second of weight.657 pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), 1_200 * UNIQUE);658 pub const MaxInstructions: u32 = 100;659 pub const MaxAuthorities: u32 = 100_000;660}661662match_type! {663 pub type ParentOrParentsUnitPlurality: impl Contains<MultiLocation> = {664 MultiLocation { parents: 1, interior: Here } |665 MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Unit, .. }) }666 };667}668669pub type Barrier = (670 TakeWeightCredit,671 AllowTopLevelPaidExecutionFrom<Everything>,672 AllowUnpaidExecutionFrom<ParentOrParentsUnitPlurality>,673 // ^^^ Parent & its unit plurality gets free execution674);675676pub struct XcmConfig;677impl Config for XcmConfig {678 type Call = Call;679 type XcmSender = XcmRouter;680 // How to withdraw and deposit an asset.681 type AssetTransactor = LocalAssetTransactor;682 type OriginConverter = XcmOriginToTransactDispatchOrigin;683 type IsReserve = NativeAsset;684 type IsTeleporter = (); // Teleportation is disabled685 type LocationInverter = LocationInverter<Ancestry>;686 type Barrier = Barrier;687 type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;688 type Trader = UsingComponents<IdentityFee<Balance>, RelayLocation, AccountId, Balances, ()>;689 type ResponseHandler = (); // Don't handle responses for now.690 type SubscriptionService = PolkadotXcm;691692 type AssetTrap = PolkadotXcm;693 type AssetClaims = PolkadotXcm;694}695696// parameter_types! {697// pub const MaxDownwardMessageWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10;698// }699700/// No local origins on this chain are allowed to dispatch XCM sends/executions.701pub type LocalOriginToLocation = (SignedToAccountId32<Origin, AccountId, RelayNetwork>,);702703/// The means for routing XCM messages which are not for local execution into the right message704/// queues.705pub type XcmRouter = (706 // Two routers - use UMP to communicate with the relay chain:707 cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,708 // ..and XCMP to communicate with the sibling chains.709 XcmpQueue,710);711712impl pallet_evm_coder_substrate::Config for Runtime {713 type EthereumTransactionSender = pallet_ethereum::Pallet<Self>;714 type GasWeightMapping = FixedGasWeightMapping;715}716717impl pallet_xcm::Config for Runtime {718 type Event = Event;719 type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;720 type XcmRouter = XcmRouter;721 type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;722 type XcmExecuteFilter = Everything;723 type XcmExecutor = XcmExecutor<XcmConfig>;724 type XcmTeleportFilter = Everything;725 type XcmReserveTransferFilter = Everything;726 type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;727 type LocationInverter = LocationInverter<Ancestry>;728 type Origin = Origin;729 type Call = Call;730 const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;731 type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;732}733734impl cumulus_pallet_xcm::Config for Runtime {735 type Event = Event;736 type XcmExecutor = XcmExecutor<XcmConfig>;737}738739impl cumulus_pallet_xcmp_queue::Config for Runtime {740 type Event = Event;741 type XcmExecutor = XcmExecutor<XcmConfig>;742 type ChannelInfo = ParachainSystem;743 type VersionWrapper = ();744}745746impl cumulus_pallet_dmp_queue::Config for Runtime {747 type Event = Event;748 type XcmExecutor = XcmExecutor<XcmConfig>;749 type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;750}751752impl pallet_aura::Config for Runtime {753 type AuthorityId = AuraId;754 type DisabledValidators = ();755 type MaxAuthorities = MaxAuthorities;756}757758parameter_types! {759 pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account();760 pub const CollectionCreationPrice: Balance = 100 * UNIQUE;761}762763impl pallet_common::Config for Runtime {764 type Event = Event;765 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;766 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;767 type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;768769 type Currency = Balances;770 type CollectionCreationPrice = CollectionCreationPrice;771 type TreasuryAccountId = TreasuryAccountId;772}773774impl pallet_fungible::Config for Runtime {775 type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;776}777impl pallet_refungible::Config for Runtime {778 type WeightInfo = pallet_refungible::weights::SubstrateWeight<Self>;779}780impl pallet_nonfungible::Config for Runtime {781 type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;782}783784impl pallet_unique::Config for Runtime {785 type Event = Event;786 type WeightInfo = pallet_unique::weights::SubstrateWeight<Self>;787}788789parameter_types! {790 pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied791}792793/// Used for the pallet inflation794impl pallet_inflation::Config for Runtime {795 type Currency = Balances;796 type TreasuryAccountId = TreasuryAccountId;797 type InflationBlockInterval = InflationBlockInterval;798 type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;799}800801parameter_types! {802 pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *803 RuntimeBlockWeights::get().max_block;804 pub const MaxScheduledPerBlock: u32 = 50;805}806807type EvmSponsorshipHandler = (808 pallet_unique::UniqueEthSponsorshipHandler<Runtime>,809 pallet_evm_contract_helpers::HelpersContractSponsoring<Runtime>,810);811type SponsorshipHandler = (812 pallet_unique::UniqueSponsorshipHandler<Runtime>,813 //pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,814 pallet_evm_transaction_payment::BridgeSponsorshipHandler<Runtime>,815);816817impl pallet_unq_scheduler::Config for Runtime {818 type Event = Event;819 type Origin = Origin;820 type PalletsOrigin = OriginCaller;821 type Call = Call;822 type MaximumWeight = MaximumSchedulerWeight;823 type ScheduleOrigin = EnsureSigned<AccountId>;824 type MaxScheduledPerBlock = MaxScheduledPerBlock;825 type SponsorshipHandler = SponsorshipHandler;826 type WeightInfo = ();827 type PaymentHandler = pallet_charge_transaction::ChargeTransactionPayment<Runtime>;828}829830impl pallet_evm_transaction_payment::Config for Runtime {831 type EvmSponsorshipHandler = EvmSponsorshipHandler;832 type Currency = Balances;833 type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;834 type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;835}836837impl pallet_charge_transaction::Config for Runtime {838 type SponsorshipHandler = SponsorshipHandler;839}840841// impl pallet_contract_helpers::Config for Runtime {842// type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;843// }844845parameter_types! {846 // 0x842899ECF380553E8a4de75bF534cdf6fBF64049847 pub const HelpersContractAddress: H160 = H160([848 0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49,849 ]);850}851852impl pallet_evm_contract_helpers::Config for Runtime {853 type ContractAddress = HelpersContractAddress;854 type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;855}856857construct_runtime!(858 pub enum Runtime where859 Block = Block,860 NodeBlock = opaque::Block,861 UncheckedExtrinsic = UncheckedExtrinsic862 {863 ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,864 ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,865866 Aura: pallet_aura::{Pallet, Config<T>} = 22,867 AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,868869 Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,870 RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,871 Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,872 TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 33,873 Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,874 Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,875 System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 36,876 Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,877 // Vesting: pallet_vesting::{Pallet, Call, Config<T>, Storage, Event<T>} = 37,878 // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,879880 // XCM helpers.881 XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,882 PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,883 CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,884 DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,885886 // Unique Pallets887 Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,888 Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,889 Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,890 // free = 63891 Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,892 // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,893 Common: pallet_common::{Pallet, Storage, Event<T>} = 66,894 Fungible: pallet_fungible::{Pallet, Storage} = 67,895 Refungible: pallet_refungible::{Pallet, Storage} = 68,896 Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,897898 // Frontier899 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,900 Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,901902 EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,903 EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,904 EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,905 EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,906 }907);908909pub struct TransactionConverter;910911impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {912 fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {913 UncheckedExtrinsic::new_unsigned(914 pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),915 )916 }917}918919impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConverter {920 fn convert_transaction(921 &self,922 transaction: pallet_ethereum::Transaction,923 ) -> opaque::UncheckedExtrinsic {924 let extrinsic = UncheckedExtrinsic::new_unsigned(925 pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),926 );927 let encoded = extrinsic.encode();928 opaque::UncheckedExtrinsic::decode(&mut &encoded[..])929 .expect("Encoded extrinsic is always valid")930 }931}932933/// The address format for describing accounts.934pub type Address = sp_runtime::MultiAddress<AccountId, ()>;935/// Block header type as expected by this runtime.936pub type Header = generic::Header<BlockNumber, BlakeTwo256>;937/// Block type as expected by this runtime.938pub type Block = generic::Block<Header, UncheckedExtrinsic>;939/// A Block signed with a Justification940pub type SignedBlock = generic::SignedBlock<Block>;941/// BlockId type as expected by this runtime.942pub type BlockId = generic::BlockId<Block>;943/// The SignedExtension to the basic transaction logic.944pub type SignedExtra = (945 frame_system::CheckSpecVersion<Runtime>,946 // system::CheckTxVersion<Runtime>,947 frame_system::CheckGenesis<Runtime>,948 frame_system::CheckEra<Runtime>,949 frame_system::CheckNonce<Runtime>,950 frame_system::CheckWeight<Runtime>,951 pallet_charge_transaction::ChargeTransactionPayment<Runtime>,952 //pallet_contract_helpers::ContractHelpersExtension<Runtime>,953);954/// Unchecked extrinsic type as expected by this runtime.955pub type UncheckedExtrinsic =956 fp_self_contained::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;957/// Extrinsic type that has already been checked.958pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic<AccountId, Call, SignedExtra, H160>;959/// Executive: handles dispatch to the various modules.960pub type Executive = frame_executive::Executive<961 Runtime,962 Block,963 frame_system::ChainContext<Runtime>,964 Runtime,965 AllPallets,966>;967968impl_opaque_keys! {969 pub struct SessionKeys {970 pub aura: Aura,971 }972}973974impl fp_self_contained::SelfContainedCall for Call {975 type SignedInfo = H160;976977 fn is_self_contained(&self) -> bool {978 match self {979 Call::Ethereum(call) => call.is_self_contained(),980 _ => false,981 }982 }983984 fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {985 match self {986 Call::Ethereum(call) => call.check_self_contained(),987 _ => None,988 }989 }990991 fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option<TransactionValidity> {992 match self {993 Call::Ethereum(call) => call.validate_self_contained(info),994 _ => None,995 }996 }997998 fn pre_dispatch_self_contained(999 &self,1000 info: &Self::SignedInfo,1001 ) -> Option<Result<(), TransactionValidityError>> {1002 match self {1003 Call::Ethereum(call) => call.pre_dispatch_self_contained(info),1004 _ => None,1005 }1006 }10071008 fn apply_self_contained(1009 self,1010 info: Self::SignedInfo,1011 ) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {1012 match self {1013 call @ Call::Ethereum(pallet_ethereum::Call::transact { .. }) => Some(call.dispatch(1014 Origin::from(pallet_ethereum::RawOrigin::EthereumTransaction(info)),1015 )),1016 _ => None,1017 }1018 }1019}10201021macro_rules! dispatch_unique_runtime {1022 ($collection:ident.$method:ident($($name:ident),*)) => {{1023 use pallet_unique::dispatch::Dispatched;10241025 let collection = Dispatched::dispatch(<pallet_common::CollectionHandle<Runtime>>::try_get($collection)?);1026 let dispatch = collection.as_dyn();10271028 Ok(dispatch.$method($($name),*))1029 }};1030}1031impl_runtime_apis! {1032 impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId>1033 for Runtime1034 {1035 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {1036 dispatch_unique_runtime!(collection.account_tokens(account))1037 }1038 fn token_exists(collection: CollectionId, token: TokenId) -> Result<bool, DispatchError> {1039 dispatch_unique_runtime!(collection.token_exists(token))1040 }10411042 fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId, DispatchError> {1043 dispatch_unique_runtime!(collection.token_owner(token))1044 }1045 fn const_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {1046 dispatch_unique_runtime!(collection.const_metadata(token))1047 }1048 fn variable_metadata(collection: CollectionId, token: TokenId) -> Result<Vec<u8>, DispatchError> {1049 dispatch_unique_runtime!(collection.variable_metadata(token))1050 }10511052 fn collection_tokens(collection: CollectionId) -> Result<u32, DispatchError> {1053 dispatch_unique_runtime!(collection.collection_tokens())1054 }1055 fn account_balance(collection: CollectionId, account: CrossAccountId) -> Result<u32, DispatchError> {1056 dispatch_unique_runtime!(collection.account_balance(account))1057 }1058 fn balance(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<u128, DispatchError> {1059 dispatch_unique_runtime!(collection.balance(account, token))1060 }1061 fn allowance(1062 collection: CollectionId,1063 sender: CrossAccountId,1064 spender: CrossAccountId,1065 token: TokenId,1066 ) -> Result<u128, DispatchError> {1067 dispatch_unique_runtime!(collection.allowance(sender, spender, token))1068 }10691070 fn eth_contract_code(account: H160) -> Option<Vec<u8>> {1071 <pallet_unique::UniqueErcSupport<Runtime>>::get_code(&account)1072 .or_else(|| <pallet_evm_migration::OnMethodCall<Runtime>>::get_code(&account))1073 .or_else(|| <pallet_evm_contract_helpers::HelpersOnMethodCall<Self>>::get_code(&account))1074 }1075 fn adminlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {1076 Ok(<pallet_common::Pallet<Runtime>>::adminlist(collection))1077 }1078 fn allowlist(collection: CollectionId) -> Result<Vec<CrossAccountId>, DispatchError> {1079 Ok(<pallet_common::Pallet<Runtime>>::allowlist(collection))1080 }1081 fn allowed(collection: CollectionId, user: CrossAccountId) -> Result<bool, DispatchError> {1082 Ok(<pallet_common::Pallet<Runtime>>::allowed(collection, user))1083 }1084 fn last_token_id(collection: CollectionId) -> Result<TokenId, DispatchError> {1085 dispatch_unique_runtime!(collection.last_token_id())1086 }1087 fn collection_by_id(collection: CollectionId) -> Result<Option<Collection<AccountId>>, DispatchError> {1088 Ok(<pallet_common::CollectionById<Runtime>>::get(collection))1089 }1090 fn collection_stats() -> Result<CollectionStats, DispatchError> {1091 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())1092 }1093 }10941095 impl sp_api::Core<Block> for Runtime {1096 fn version() -> RuntimeVersion {1097 VERSION1098 }10991100 fn execute_block(block: Block) {1101 Executive::execute_block(block)1102 }11031104 fn initialize_block(header: &<Block as BlockT>::Header) {1105 Executive::initialize_block(header)1106 }1107 }11081109 impl sp_api::Metadata<Block> for Runtime {1110 fn metadata() -> OpaqueMetadata {1111 OpaqueMetadata::new(Runtime::metadata().into())1112 }1113 }11141115 impl sp_block_builder::BlockBuilder<Block> for Runtime {1116 fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {1117 Executive::apply_extrinsic(extrinsic)1118 }11191120 fn finalize_block() -> <Block as BlockT>::Header {1121 Executive::finalize_block()1122 }11231124 fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {1125 data.create_extrinsics()1126 }11271128 fn check_inherents(1129 block: Block,1130 data: sp_inherents::InherentData,1131 ) -> sp_inherents::CheckInherentsResult {1132 data.check_extrinsics(&block)1133 }11341135 // fn random_seed() -> <Block as BlockT>::Hash {1136 // RandomnessCollectiveFlip::random_seed().01137 // }1138 }11391140 impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {1141 fn validate_transaction(1142 source: TransactionSource,1143 tx: <Block as BlockT>::Extrinsic,1144 hash: <Block as BlockT>::Hash,1145 ) -> TransactionValidity {1146 Executive::validate_transaction(source, tx, hash)1147 }1148 }11491150 impl sp_offchain::OffchainWorkerApi<Block> for Runtime {1151 fn offchain_worker(header: &<Block as BlockT>::Header) {1152 Executive::offchain_worker(header)1153 }1154 }11551156 impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {1157 fn chain_id() -> u64 {1158 <Runtime as pallet_evm::Config>::ChainId::get()1159 }11601161 fn account_basic(address: H160) -> EVMAccount {1162 EVM::account_basic(&address)1163 }11641165 fn gas_price() -> U256 {1166 <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price()1167 }11681169 fn account_code_at(address: H160) -> Vec<u8> {1170 EVM::account_codes(address)1171 }11721173 fn author() -> H160 {1174 <pallet_evm::Pallet<Runtime>>::find_author()1175 }11761177 fn storage_at(address: H160, index: U256) -> H256 {1178 let mut tmp = [0u8; 32];1179 index.to_big_endian(&mut tmp);1180 EVM::account_storages(address, H256::from_slice(&tmp[..]))1181 }11821183 #[allow(clippy::redundant_closure)]1184 fn call(1185 from: H160,1186 to: H160,1187 data: Vec<u8>,1188 value: U256,1189 gas_limit: U256,1190 gas_price: Option<U256>,1191 nonce: Option<U256>,1192 estimate: bool,1193 ) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {1194 let config = if estimate {1195 let mut config = <Runtime as pallet_evm::Config>::config().clone();1196 config.estimate = true;1197 Some(config)1198 } else {1199 None1200 };12011202 <Runtime as pallet_evm::Config>::Runner::call(1203 from,1204 to,1205 data,1206 value,1207 gas_limit.low_u64(),1208 gas_price,1209 nonce,1210 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),1211 ).map_err(|err| err.into())1212 }12131214 #[allow(clippy::redundant_closure)]1215 fn create(1216 from: H160,1217 data: Vec<u8>,1218 value: U256,1219 gas_limit: U256,1220 gas_price: Option<U256>,1221 nonce: Option<U256>,1222 estimate: bool,1223 ) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {1224 let config = if estimate {1225 let mut config = <Runtime as pallet_evm::Config>::config().clone();1226 config.estimate = true;1227 Some(config)1228 } else {1229 None1230 };12311232 <Runtime as pallet_evm::Config>::Runner::create(1233 from,1234 data,1235 value,1236 gas_limit.low_u64(),1237 gas_price,1238 nonce,1239 config.as_ref().unwrap_or_else(|| <Runtime as pallet_evm::Config>::config()),1240 ).map_err(|err| err.into())1241 }12421243 fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {1244 Ethereum::current_transaction_statuses()1245 }12461247 fn current_block() -> Option<pallet_ethereum::Block> {1248 Ethereum::current_block()1249 }12501251 fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {1252 Ethereum::current_receipts()1253 }12541255 fn current_all() -> (1256 Option<pallet_ethereum::Block>,1257 Option<Vec<pallet_ethereum::Receipt>>,1258 Option<Vec<TransactionStatus>>1259 ) {1260 (1261 Ethereum::current_block(),1262 Ethereum::current_receipts(),1263 Ethereum::current_transaction_statuses()1264 )1265 }12661267 fn extrinsic_filter(xts: Vec<<Block as sp_api::BlockT>::Extrinsic>) -> Vec<pallet_ethereum::Transaction> {1268 xts.into_iter().filter_map(|xt| match xt.0.function {1269 Call::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction),1270 _ => None1271 }).collect()1272 }1273 }12741275 impl sp_session::SessionKeys<Block> for Runtime {1276 fn decode_session_keys(1277 encoded: Vec<u8>,1278 ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {1279 SessionKeys::decode_into_raw_public_keys(&encoded)1280 }12811282 fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {1283 SessionKeys::generate(seed)1284 }1285 }12861287 impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {1288 fn slot_duration() -> sp_consensus_aura::SlotDuration {1289 sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())1290 }12911292 fn authorities() -> Vec<AuraId> {1293 Aura::authorities().to_vec()1294 }1295 }12961297 impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {1298 fn collect_collation_info() -> cumulus_primitives_core::CollationInfo {1299 ParachainSystem::collect_collation_info()1300 }1301 }13021303 impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {1304 fn account_nonce(account: AccountId) -> Index {1305 System::account_nonce(account)1306 }1307 }13081309 impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {1310 fn query_info(uxt: <Block as BlockT>::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance> {1311 TransactionPayment::query_info(uxt, len)1312 }1313 fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {1314 TransactionPayment::query_fee_details(uxt, len)1315 }1316 }13171318 /*1319 impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>1320 for Runtime1321 {1322 fn call(1323 origin: AccountId,1324 dest: AccountId,1325 value: Balance,1326 gas_limit: u64,1327 input_data: Vec<u8>,1328 ) -> pallet_contracts_primitives::ContractExecResult {1329 Contracts::bare_call(origin, dest, value, gas_limit, input_data, false)1330 }13311332 fn instantiate(1333 origin: AccountId,1334 endowment: Balance,1335 gas_limit: u64,1336 code: pallet_contracts_primitives::Code<Hash>,1337 data: Vec<u8>,1338 salt: Vec<u8>,1339 ) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, BlockNumber>1340 {1341 Contracts::bare_instantiate(origin, endowment, gas_limit, code, data, salt, true, false)1342 }13431344 fn get_storage(1345 address: AccountId,1346 key: [u8; 32],1347 ) -> pallet_contracts_primitives::GetStorageResult {1348 Contracts::get_storage(address, key)1349 }13501351 fn rent_projection(1352 address: AccountId,1353 ) -> pallet_contracts_primitives::RentProjectionResult<BlockNumber> {1354 Contracts::rent_projection(address)1355 }1356 }1357 */13581359 #[cfg(feature = "runtime-benchmarks")]1360 impl frame_benchmarking::Benchmark<Block> for Runtime {1361 fn benchmark_metadata(extra: bool) -> (1362 Vec<frame_benchmarking::BenchmarkList>,1363 Vec<frame_support::traits::StorageInfo>,1364 ) {1365 use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};1366 use frame_support::traits::StorageInfoTrait;13671368 let mut list = Vec::<BenchmarkList>::new();13691370 list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);1371 list_benchmark!(list, extra, pallet_unique, Unique);1372 list_benchmark!(list, extra, pallet_inflation, Inflation);1373 list_benchmark!(list, extra, pallet_fungible, Fungible);1374 list_benchmark!(list, extra, pallet_refungible, Refungible);1375 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);1376 // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);13771378 let storage_info = AllPalletsWithSystem::storage_info();13791380 return (list, storage_info)1381 }13821383 fn dispatch_benchmark(1384 config: frame_benchmarking::BenchmarkConfig1385 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {1386 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};13871388 let allowlist: Vec<TrackedStorageKey> = vec![1389 // Block Number1390 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),1391 // Total Issuance1392 hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),1393 // Execution Phase1394 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),1395 // Event Count1396 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),1397 // System Events1398 hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),1399 ];14001401 let mut batches = Vec::<BenchmarkBatch>::new();1402 let params = (&config, &allowlist);14031404 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);1405 add_benchmark!(params, batches, pallet_unique, Unique);1406 add_benchmark!(params, batches, pallet_inflation, Inflation);1407 add_benchmark!(params, batches, pallet_fungible, Fungible);1408 add_benchmark!(params, batches, pallet_refungible, Refungible);1409 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);1410 // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);14111412 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }1413 Ok(batches)1414 }1415 }1416}14171418struct CheckInherents;14191420impl cumulus_pallet_parachain_system::CheckInherents<Block> for CheckInherents {1421 fn check_inherents(1422 block: &Block,1423 relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof,1424 ) -> sp_inherents::CheckInherentsResult {1425 let relay_chain_slot = relay_state_proof1426 .read_slot()1427 .expect("Could not read the relay chain slot from the proof");14281429 let inherent_data =1430 cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration(1431 relay_chain_slot,1432 sp_std::time::Duration::from_secs(6),1433 )1434 .create_inherent_data()1435 .expect("Could not create the timestamp inherent data");14361437 inherent_data.check_extrinsics(block)1438 }1439}14401441cumulus_pallet_parachain_system::register_validate_block!(1442 Runtime = Runtime,1443 BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,1444 CheckInherents = CheckInherents,1445);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",
+ "testScheduler": "mocha --timeout 9999999 -r ts-node/register ./**/scheduler.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/scheduler.test.tsdiffbeforeafterboth--- a/tests/src/scheduler.test.ts
+++ b/tests/src/scheduler.test.ts
@@ -14,14 +14,23 @@
setCollectionSponsorExpectSuccess,
confirmSponsorshipExpectSuccess,
} from './util/helpers';
+import {IKeyringPair} from '@polkadot/types/types';
chai.use(chaiAsPromised);
-describe.skip('Integration Test scheduler base transaction', () => {
+describe('Integration Test scheduler base transaction', () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+
+ before(async() => {
+ await usingApi(async () => {
+ alice = privateKey('//Alice');
+ bob = privateKey('//Bob');
+ });
+ });
+
it('User can transfer owned token with delay (scheduler)', async () => {
await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
// nft
const nftCollectionId = await createCollectionExpectSuccess();
const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');