difftreelog
fix implement RPC
in: master
29 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -23,9 +23,9 @@
[[package]]
name = "addr2line"
-version = "0.15.1"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a"
+checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a"
dependencies = [
"gimli 0.24.0",
]
@@ -106,26 +106,12 @@
]
[[package]]
-name = "alga"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2"
-dependencies = [
- "approx 0.3.2",
- "num-complex 0.2.4",
- "num-traits",
-]
-
-[[package]]
-<<<<<<< HEAD
-=======
name = "always-assert"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbf688625d06217d5b1bb0ea9d9c44a1635fd0ee3534466388d18203174f4d11"
[[package]]
->>>>>>> origin/develop
name = "ansi_term"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -145,24 +131,24 @@
[[package]]
name = "anyhow"
-version = "1.0.40"
+version = "1.0.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b"
+checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61"
[[package]]
name = "approx"
-version = "0.3.2"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"
+checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278"
dependencies = [
"num-traits",
]
[[package]]
name = "approx"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278"
+checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e"
dependencies = [
"num-traits",
]
@@ -190,9 +176,9 @@
[[package]]
name = "arrayvec"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a2f58b0bb10c380af2b26e57212856b8c9a59e0925b4c20f4a174a49734eaf7"
+checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd"
[[package]]
name = "asn1_der"
@@ -324,11 +310,7 @@
"async-io",
"async-lock",
"async-process",
-<<<<<<< HEAD
- "crossbeam-utils 0.8.4",
-=======
- "crossbeam-utils 0.8.3",
->>>>>>> origin/develop
+ "crossbeam-utils 0.8.5",
"futures-channel",
"futures-core",
"futures-io",
@@ -347,9 +329,9 @@
[[package]]
name = "async-std-resolver"
-version = "0.20.1"
+version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f665c56111e244fe38e7708ee10948a4356ad6a548997c21f5a63a0f4e0edc4d"
+checksum = "ed4e2c3da14d8ad45acb1e3191db7a918e9505b6f155b218e70a7c9a1a48c638"
dependencies = [
"async-std",
"async-trait",
@@ -367,15 +349,9 @@
[[package]]
name = "async-trait"
-<<<<<<< HEAD
version = "0.1.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722"
-=======
-version = "0.1.49"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589652ce7ccb335d1e7ecb3be145425702b290dbcb7029bbeaae263fc1d87b48"
->>>>>>> origin/develop
dependencies = [
"proc-macro2",
"quote",
@@ -442,20 +418,16 @@
[[package]]
name = "backtrace"
-version = "0.3.59"
+version = "0.3.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"
+checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282"
dependencies = [
- "addr2line 0.15.1",
+ "addr2line 0.15.2",
"cc",
"cfg-if 1.0.0",
"libc",
"miniz_oxide",
-<<<<<<< HEAD
- "object 0.24.0",
-=======
- "object",
->>>>>>> origin/develop
+ "object 0.25.3",
"rustc-demangle",
]
@@ -495,10 +467,10 @@
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=polkadot-v0.9.3#063e18a1f82945d5a304906db92bfbb571bac459"
dependencies = [
"beefy-primitives",
- "futures 0.3.14",
+ "futures 0.3.15",
"hex",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sc-client-api",
"sc-keystore",
@@ -524,13 +496,13 @@
dependencies = [
"beefy-gadget",
"beefy-primitives",
- "futures 0.3.14",
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
- "jsonrpc-pubsub",
+ "futures 0.3.15",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
+ "jsonrpc-pubsub 15.1.0",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-rpc",
"serde",
"serde_json",
@@ -543,7 +515,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=polkadot-v0.9.3#063e18a1f82945d5a304906db92bfbb571bac459"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-application-crypto",
"sp-core",
@@ -569,11 +541,6 @@
"bitflags",
"cexpr",
"clang-sys",
-<<<<<<< HEAD
-=======
- "clap",
- "env_logger 0.7.1",
->>>>>>> origin/develop
"lazy_static",
"lazycell",
"peeking_take_while",
@@ -592,7 +559,6 @@
[[package]]
name = "bitvec"
-<<<<<<< HEAD
version = "0.17.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c"
@@ -606,11 +572,6 @@
version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848"
-=======
-version = "0.20.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f682656975d3a682daff957be4ddeb65d6ad656737cd821f2d00685ae466af1"
->>>>>>> origin/develop
dependencies = [
"funty",
"radium 0.6.2",
@@ -663,9 +624,9 @@
[[package]]
name = "blake3"
-version = "0.3.7"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f"
+checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3"
dependencies = [
"arrayref",
"arrayvec 0.5.2",
@@ -743,7 +704,7 @@
dependencies = [
"finality-grandpa",
"frame-support",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-finality-grandpa",
@@ -759,7 +720,7 @@
"bp-runtime",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-std",
]
@@ -772,7 +733,7 @@
"bp-runtime",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-core",
"sp-runtime",
@@ -789,7 +750,7 @@
"bp-messages",
"bp-polkadot-core",
"bp-runtime",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-runtime",
"sp-std",
@@ -804,7 +765,7 @@
"frame-support",
"hash-db",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -821,7 +782,7 @@
"bp-header-chain",
"ed25519-dalek",
"finality-grandpa",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-finality-grandpa",
"sp-runtime",
@@ -837,7 +798,7 @@
"bp-messages",
"bp-polkadot-core",
"bp-runtime",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-runtime",
"sp-std",
@@ -870,20 +831,15 @@
[[package]]
name = "bumpalo"
-version = "3.6.1"
-<<<<<<< HEAD
+version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe"
+checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"
[[package]]
name = "byte-slice-cast"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3"
-=======
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe"
->>>>>>> origin/develop
[[package]]
name = "byte-slice-cast"
@@ -956,9 +912,9 @@
[[package]]
name = "cc"
-version = "1.0.67"
+version = "1.0.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
+checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787"
dependencies = [
"jobserver",
]
@@ -1240,7 +1196,7 @@
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
- "itertools 0.10.0",
+ "itertools 0.10.1",
"log",
"serde",
"smallvec 1.6.1",
@@ -1264,11 +1220,7 @@
checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
dependencies = [
"cfg-if 1.0.0",
-<<<<<<< HEAD
- "crossbeam-utils 0.8.4",
-=======
- "crossbeam-utils 0.8.3",
->>>>>>> origin/develop
+ "crossbeam-utils 0.8.5",
]
[[package]]
@@ -1289,13 +1241,8 @@
checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
dependencies = [
"cfg-if 1.0.0",
-<<<<<<< HEAD
- "crossbeam-epoch 0.9.4",
- "crossbeam-utils 0.8.4",
-=======
- "crossbeam-epoch 0.9.3",
- "crossbeam-utils 0.8.3",
->>>>>>> origin/develop
+ "crossbeam-epoch 0.9.5",
+ "crossbeam-utils 0.8.5",
]
[[package]]
@@ -1315,23 +1262,14 @@
[[package]]
name = "crossbeam-epoch"
-<<<<<<< HEAD
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52fb27eab85b17fbb9f6fd667089e07d6a2eb8743d02639ee7f6a7a7729c9c94"
-dependencies = [
- "cfg-if 1.0.0",
- "crossbeam-utils 0.8.4",
-=======
-version = "0.9.3"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12"
+checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd"
dependencies = [
"cfg-if 1.0.0",
- "crossbeam-utils 0.8.3",
->>>>>>> origin/develop
+ "crossbeam-utils 0.8.5",
"lazy_static",
- "memoffset 0.6.3",
+ "memoffset 0.6.4",
"scopeguard",
]
@@ -1359,17 +1297,10 @@
[[package]]
name = "crossbeam-utils"
-<<<<<<< HEAD
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278"
-=======
-version = "0.8.3"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49"
->>>>>>> origin/develop
+checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
dependencies = [
- "autocfg",
"cfg-if 1.0.0",
"lazy_static",
]
@@ -1441,22 +1372,15 @@
]
[[package]]
-<<<<<<< HEAD
-name = "curve25519-dalek"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3"
-=======
name = "cumulus-client-collator"
version = "0.1.0"
source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.3#78b31b21122995b49f3c2cfe2791f188e33e5917"
->>>>>>> origin/develop
dependencies = [
"cumulus-client-consensus-common",
"cumulus-client-network",
"cumulus-primitives-core",
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -1479,8 +1403,8 @@
"async-trait",
"cumulus-client-consensus-common",
"cumulus-primitives-core",
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"polkadot-service",
"sc-client-api",
@@ -1508,8 +1432,8 @@
dependencies = [
"async-trait",
"dyn-clone",
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"polkadot-primitives",
"polkadot-runtime",
"sc-client-api",
@@ -1531,9 +1455,9 @@
source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.3#78b31b21122995b49f3c2cfe2791f188e33e5917"
dependencies = [
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"polkadot-node-primitives",
"polkadot-parachain",
@@ -1555,9 +1479,9 @@
source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.3#78b31b21122995b49f3c2cfe2791f188e33e5917"
dependencies = [
"cumulus-primitives-core",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-overseer",
@@ -1565,7 +1489,7 @@
"polkadot-primitives",
"polkadot-service",
"polkadot-statement-table",
- "rand 0.8.3",
+ "rand 0.8.4",
"sc-client-api",
"sp-api",
"sp-consensus",
@@ -1584,7 +1508,7 @@
"cumulus-client-consensus-common",
"cumulus-client-pov-recovery",
"cumulus-primitives-core",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"polkadot-overseer",
"polkadot-primitives",
@@ -1612,7 +1536,7 @@
"frame-support",
"frame-system",
"pallet-aura",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-application-crypto",
"sp-consensus-aura",
@@ -1629,9 +1553,9 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
- "rand 0.8.3",
- "rand_chacha 0.3.0",
+ "parity-scale-codec 2.1.3",
+ "rand 0.8.4",
+ "rand_chacha 0.3.1",
"sp-io",
"sp-runtime",
"sp-std",
@@ -1653,7 +1577,7 @@
"log",
"memory-db",
"pallet-balances",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"serde",
"sp-core",
@@ -1677,7 +1601,7 @@
"cumulus-primitives-core",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-io",
"sp-runtime",
@@ -1694,9 +1618,9 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
- "rand 0.8.3",
- "rand_chacha 0.3.0",
+ "parity-scale-codec 2.1.3",
+ "rand 0.8.4",
+ "rand_chacha 0.3.1",
"sp-runtime",
"sp-std",
"xcm",
@@ -1709,8 +1633,8 @@
source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.3#78b31b21122995b49f3c2cfe2791f188e33e5917"
dependencies = [
"frame-support",
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-primitives",
@@ -1728,7 +1652,7 @@
dependencies = [
"async-trait",
"cumulus-primitives-core",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-service",
"sc-client-api",
"sp-api",
@@ -1748,8 +1672,8 @@
dependencies = [
"cumulus-primitives-core",
"frame-support",
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-primitives",
@@ -1828,9 +1752,9 @@
[[package]]
name = "data-encoding-macro"
-version = "0.1.10"
+version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a94feec3d2ba66c0b6621bca8bc6f68415b1e5c69af3586fdd0af9fd9f29b17"
+checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca"
dependencies = [
"data-encoding",
"data-encoding-macro-internal",
@@ -1838,9 +1762,9 @@
[[package]]
name = "data-encoding-macro-internal"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0f83e699727abca3c56e187945f303389590305ab2f0185ea445aa66e8d5f2a"
+checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db"
dependencies = [
"data-encoding",
"syn",
@@ -1859,15 +1783,9 @@
[[package]]
name = "derive_more"
-<<<<<<< HEAD
version = "0.99.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320"
-=======
-version = "0.99.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6"
->>>>>>> origin/develop
dependencies = [
"convert_case",
"proc-macro2",
@@ -2058,9 +1976,9 @@
[[package]]
name = "env_logger"
-version = "0.8.3"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f"
+checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"
dependencies = [
"atty",
"humantime 2.1.0",
@@ -2077,9 +1995,9 @@
[[package]]
name = "erased-serde"
-version = "0.3.13"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0465971a8cc1fa2455c8465aaa377131e1f1cf4983280f474a13e68793aa770c"
+checksum = "e5b36e6f2295f393f44894c6031f67df4d185b984cd54d08f768ce678007efcd"
dependencies = [
"serde",
]
@@ -2107,7 +2025,6 @@
[[package]]
name = "ethbloom"
-<<<<<<< HEAD
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71a6567e6fd35589fea0c63b94b4cf2e55573e413901bdbe60ab15cf0e25e5df"
@@ -2121,27 +2038,19 @@
[[package]]
name = "ethbloom"
-=======
->>>>>>> origin/develop
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "779864b9c7f7ead1f092972c3257496c6a84b46dba2ce131dd8a282cb2cc5972"
dependencies = [
"crunchy",
-<<<<<<< HEAD
"fixed-hash 0.7.0",
"impl-codec 0.5.0",
"impl-rlp 0.3.0",
-=======
- "fixed-hash",
- "impl-rlp",
->>>>>>> origin/develop
"impl-serde",
"tiny-keccak",
]
[[package]]
-<<<<<<< HEAD
name = "ethereum"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2151,7 +2060,7 @@
"funty",
"hash-db",
"hash256-std-hasher",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"rlp 0.5.0",
"rlp-derive",
"serde",
@@ -2190,14 +2099,11 @@
]
[[package]]
-=======
->>>>>>> origin/develop
name = "ethereum-types"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd"
dependencies = [
-<<<<<<< HEAD
"ethbloom 0.11.0",
"fixed-hash 0.7.0",
"impl-codec 0.5.0",
@@ -2205,14 +2111,6 @@
"impl-serde",
"primitive-types 0.9.0",
"uint 0.9.0",
-=======
- "ethbloom",
- "fixed-hash",
- "impl-rlp",
- "impl-serde",
- "primitive-types",
- "uint",
->>>>>>> origin/develop
]
[[package]]
@@ -2224,7 +2122,7 @@
[[package]]
name = "evm"
version = "0.27.0"
-source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output#081b56a17b8e587655bf45cacc1c823265530b50"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
dependencies = [
"environmental",
"ethereum",
@@ -2232,7 +2130,7 @@
"evm-gasometer",
"evm-runtime",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"primitive-types 0.9.0",
"rlp 0.5.0",
"serde",
@@ -2266,10 +2164,10 @@
[[package]]
name = "evm-core"
version = "0.27.1"
-source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output#081b56a17b8e587655bf45cacc1c823265530b50"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
dependencies = [
"funty",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"primitive-types 0.9.0",
"serde",
]
@@ -2277,7 +2175,7 @@
[[package]]
name = "evm-gasometer"
version = "0.27.0"
-source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output#081b56a17b8e587655bf45cacc1c823265530b50"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
dependencies = [
"environmental",
"evm-core",
@@ -2288,7 +2186,7 @@
[[package]]
name = "evm-runtime"
version = "0.27.0"
-source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output#081b56a17b8e587655bf45cacc1c823265530b50"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
dependencies = [
"environmental",
"evm-core",
@@ -2302,11 +2200,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
]
[[package]]
@@ -2355,15 +2249,16 @@
[[package]]
name = "fc-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
+ "async-trait",
"derive_more",
"fc-db",
"fp-consensus",
"fp-rpc",
"futures 0.3.15",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sp-api",
"sp-block-builder",
@@ -2379,11 +2274,11 @@
[[package]]
name = "fc-db"
version = "1.0.0"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
"kvdb",
"kvdb-rocksdb",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sp-core",
"sp-database",
@@ -2393,7 +2288,7 @@
[[package]]
name = "fc-mapping-sync"
version = "2.0.0-dev"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
"fc-consensus",
"fc-db",
@@ -2411,7 +2306,7 @@
[[package]]
name = "fc-rpc"
version = "2.0.0-dev"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
"ethereum",
"ethereum-types 0.11.0",
@@ -2432,7 +2327,7 @@
"log",
"pallet-ethereum",
"pallet-evm",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"rand 0.7.3",
"rlp 0.5.0",
"rustc-hex",
@@ -2452,7 +2347,7 @@
[[package]]
name = "fc-rpc-core"
version = "1.1.0-dev"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
"ethereum-types 0.11.0",
"jsonrpc-core 15.1.0",
@@ -2485,20 +2380,16 @@
[[package]]
name = "finality-grandpa"
-version = "0.14.0"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6447e2f8178843749e8c8003206def83ec124a7859475395777a28b5338647c"
+checksum = "74a1bfdcc776e63e49f741c7ce6116fa1b887e8ac2e3ccb14dd4aa113e54feb9"
dependencies = [
"either",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 3.0.2",
"log",
"num-traits",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
]
@@ -2521,7 +2412,7 @@
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
dependencies = [
"byteorder",
- "rand 0.8.3",
+ "rand 0.8.4",
"rustc-hex",
"static_assertions",
]
@@ -2570,13 +2461,9 @@
[[package]]
name = "fork-tree"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
]
[[package]]
@@ -2592,10 +2479,10 @@
[[package]]
name = "fp-consensus"
version = "1.0.0"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
"ethereum",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"rlp 0.5.0",
"sha3 0.8.2",
"sp-core",
@@ -2606,11 +2493,11 @@
[[package]]
name = "fp-evm"
version = "2.0.0"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
"evm",
"impl-trait-for-tuples 0.1.3",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-std",
@@ -2619,12 +2506,12 @@
[[package]]
name = "fp-rpc"
version = "2.0.0"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
dependencies = [
"ethereum",
"ethereum-types 0.11.0",
"fp-evm",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-core",
"sp-io",
@@ -2635,26 +2522,18 @@
[[package]]
name = "fp-storage"
version = "1.0.1"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
[[package]]
name = "frame-benchmarking"
version = "3.1.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-support",
"frame-system",
"linregress",
"log",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
-=======
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"paste",
"sp-api",
"sp-io",
@@ -2667,17 +2546,13 @@
[[package]]
name = "frame-benchmarking-cli"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"Inflector",
"chrono",
"frame-benchmarking",
"handlebars",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sc-cli",
"sc-client-db",
"sc-executor",
@@ -2698,7 +2573,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
"sp-npos-elections",
"sp-std",
@@ -2707,20 +2582,11 @@
[[package]]
name = "frame-executive"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "frame-support",
- "frame-system",
- "parity-scale-codec 2.1.1",
- "serde",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -2731,13 +2597,9 @@
[[package]]
name = "frame-metadata"
version = "13.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-std",
@@ -2746,11 +2608,7 @@
[[package]]
name = "frame-support"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"bitflags",
"frame-metadata",
@@ -2758,11 +2616,7 @@
"impl-trait-for-tuples 0.2.1",
"log",
"once_cell",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
-=======
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"paste",
"serde",
"smallvec 1.6.1",
@@ -2780,11 +2634,7 @@
[[package]]
name = "frame-support-procedural"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"Inflector",
"frame-support-procedural-tools",
@@ -2796,11 +2646,7 @@
[[package]]
name = "frame-support-procedural-tools"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate 1.0.0",
@@ -2812,11 +2658,7 @@
[[package]]
name = "frame-support-procedural-tools-derive"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"proc-macro2",
"quote",
@@ -2826,21 +2668,12 @@
[[package]]
name = "frame-system"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "frame-support",
- "impl-trait-for-tuples 0.2.1",
- "log",
- "parity-scale-codec 2.1.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-support",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"log",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -2852,16 +2685,12 @@
[[package]]
name = "frame-system-benchmarking"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-runtime",
"sp-std",
@@ -2870,13 +2699,9 @@
[[package]]
name = "frame-system-rpc-runtime-api"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-api",
]
@@ -2886,7 +2711,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-support",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-runtime",
"sp-std",
@@ -2894,9 +2719,9 @@
[[package]]
name = "fs-err"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcd1163ae48bda72a20ae26d66a04d3094135cadab911cff418ae5e33f253431"
+checksum = "5ebd3504ad6116843b8375ad70df74e7bfe83cac77a1f3fe73200c844d43bfe0"
[[package]]
name = "fs-swap"
@@ -2921,16 +2746,6 @@
]
[[package]]
-name = "fs2"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
-dependencies = [
- "libc",
- "winapi 0.3.9",
-]
-
-[[package]]
name = "fuchsia-cprng"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2966,15 +2781,9 @@
[[package]]
name = "futures"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27"
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9d5813545e459ad3ca1bff9915e9ad7f1a47dc6a91b627ce321d5863b7dd253"
->>>>>>> origin/develop
dependencies = [
"futures-channel",
"futures-core",
@@ -2987,15 +2796,9 @@
[[package]]
name = "futures-channel"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2"
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce79c6a52a299137a6013061e0cf0e688fce5d7f1bc60125f520912fdb29ec25"
->>>>>>> origin/develop
dependencies = [
"futures-core",
"futures-sink",
@@ -3003,15 +2806,9 @@
[[package]]
name = "futures-core"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1"
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "098cd1c6dda6ca01650f1a37a794245eb73181d0d4d4e955e2f3c37db7af1815"
->>>>>>> origin/develop
[[package]]
name = "futures-cpupool"
@@ -3030,11 +2827,7 @@
checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9"
dependencies = [
"futures 0.1.31",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"lazy_static",
"log",
"parking_lot 0.9.0",
@@ -3045,15 +2838,9 @@
[[package]]
name = "futures-executor"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79"
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10f6cb7042eda00f0049b1d2080aa4b93442997ee507eb3828e8bd7577f94c9d"
->>>>>>> origin/develop
dependencies = [
"futures-core",
"futures-task",
@@ -3063,21 +2850,15 @@
[[package]]
name = "futures-io"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1"
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "365a1a1fb30ea1c03a830fdb2158f5236833ac81fa0ad12fe35b29cddc35cb04"
->>>>>>> origin/develop
[[package]]
name = "futures-lite"
-version = "1.11.3"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb"
+checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48"
dependencies = [
"fastrand",
"futures-core",
@@ -3090,15 +2871,9 @@
[[package]]
name = "futures-macro"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121"
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b"
->>>>>>> origin/develop
dependencies = [
"autocfg",
"proc-macro-hack",
@@ -3120,7 +2895,6 @@
[[package]]
name = "futures-sink"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282"
@@ -3130,17 +2904,6 @@
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae"
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c5629433c555de3d82861a7a4e3794a4c40040390907cfbfd7143a92a426c23"
-
-[[package]]
-name = "futures-task"
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba7aa51095076f3ba6d9a1f702f74bd05ec65f555d70d2033d55ba8d69f581bc"
->>>>>>> origin/develop
[[package]]
name = "futures-timer"
@@ -3156,18 +2919,11 @@
[[package]]
name = "futures-util"
-<<<<<<< HEAD
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967"
dependencies = [
"autocfg",
-=======
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c144ad54d60f23927f0a6b6d816e4271278b64f005ad65e4e35291d2de9c025"
-dependencies = [
->>>>>>> origin/develop
"futures 0.1.31",
"futures-channel",
"futures-core",
@@ -3200,15 +2956,6 @@
[[package]]
name = "generic-array"
-version = "0.13.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f797e67af32588215eaaab8327027ee8e71b9dd0b2b26996aedf20c030fce309"
-dependencies = [
- "typenum",
-]
-
-[[package]]
-name = "generic-array"
version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
@@ -3230,9 +2977,9 @@
[[package]]
name = "getrandom"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
+checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
dependencies = [
"cfg-if 1.0.0",
"libc",
@@ -3274,9 +3021,9 @@
[[package]]
name = "globset"
-version = "0.4.6"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a"
+checksum = "f0fc1b9fa0e64ffb1aa5b95daa0f0f167734fd528b7c02eabc581d9d843649b1"
dependencies = [
"aho-corasick",
"bstr",
@@ -3376,9 +3123,9 @@
[[package]]
name = "heck"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
+checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
dependencies = [
"unicode-segmentation",
]
@@ -3498,15 +3245,9 @@
[[package]]
name = "httparse"
-<<<<<<< HEAD
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68"
-=======
-version = "1.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589"
->>>>>>> origin/develop
[[package]]
name = "httpdate"
@@ -3575,11 +3316,7 @@
"httparse",
"httpdate",
"itoa",
-<<<<<<< HEAD
"pin-project 1.0.7",
-=======
- "pin-project 1.0.6",
->>>>>>> origin/develop
"socket2 0.3.19",
"tokio 0.2.25",
"tower-service",
@@ -3624,15 +3361,9 @@
[[package]]
name = "idna"
-<<<<<<< HEAD
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
-=======
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21"
->>>>>>> origin/develop
dependencies = [
"matches",
"unicode-bidi",
@@ -3662,16 +3393,12 @@
[[package]]
name = "if-watch"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "144c0ecbda48cc819482c37e460723b634dc060e23922f8ace87d94ff95ea4e5"
+checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179"
dependencies = [
"async-io",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-lite",
"if-addrs",
"ipnet",
@@ -3695,7 +3422,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df170efa359aebdd5cb7fe78edcc67107748e4737bdca8a8fb40d15ea7a877ed"
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
]
[[package]]
@@ -3714,15 +3441,6 @@
checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808"
dependencies = [
"rlp 0.5.0",
-]
-
-[[package]]
-name = "impl-rlp"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808"
-dependencies = [
- "rlp",
]
[[package]]
@@ -3797,11 +3515,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 2.0.2",
]
@@ -3834,9 +3548,9 @@
[[package]]
name = "ipnet"
-version = "2.3.0"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
+checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9"
[[package]]
name = "itertools"
@@ -3849,9 +3563,9 @@
[[package]]
name = "itertools"
-version = "0.10.0"
+version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319"
+checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
dependencies = [
"either",
]
@@ -3873,15 +3587,9 @@
[[package]]
name = "js-sys"
-<<<<<<< HEAD
version = "0.3.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062"
-=======
-version = "0.3.50"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c"
->>>>>>> origin/develop
dependencies = [
"wasm-bindgen",
]
@@ -3910,13 +3618,8 @@
dependencies = [
"failure",
"futures 0.1.31",
-<<<<<<< HEAD
"jsonrpc-core 15.1.0",
"jsonrpc-pubsub 15.1.0",
-=======
- "jsonrpc-core",
- "jsonrpc-pubsub",
->>>>>>> origin/develop
"log",
"serde",
"serde_json",
@@ -3998,11 +3701,7 @@
checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7"
dependencies = [
"hyper 0.12.36",
-<<<<<<< HEAD
"jsonrpc-core 15.1.0",
-=======
- "jsonrpc-core",
->>>>>>> origin/develop
"jsonrpc-server-utils",
"log",
"net2",
@@ -4096,7 +3795,7 @@
"serde",
"serde_json",
"thiserror",
- "url 2.2.1",
+ "url 2.2.2",
]
[[package]]
@@ -4161,7 +3860,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"beefy-primitives",
- "bitvec",
+ "bitvec 0.20.4",
"frame-executive",
"frame-support",
"frame-system",
@@ -4203,7 +3902,7 @@
"pallet-utility",
"pallet-vesting",
"pallet-xcm",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-primitives",
"polkadot-runtime-common",
"polkadot-runtime-parachains",
@@ -4302,15 +4001,9 @@
[[package]]
name = "libc"
-<<<<<<< HEAD
-version = "0.2.94"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
-=======
-version = "0.2.93"
+version = "0.2.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41"
->>>>>>> origin/develop
+checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
[[package]]
name = "libloading"
@@ -4340,23 +4033,13 @@
[[package]]
name = "libp2p"
-<<<<<<< HEAD
-version = "0.35.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adc225a49973cf9ab10d0cdd6a4b8f0cda299df9b760824bbb623f15f8f0c95a"
-dependencies = [
- "atomic",
- "bytes 1.0.1",
- "futures 0.3.15",
-=======
version = "0.37.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08053fbef67cd777049ef7a95ebaca2ece370b4ed7712c3fa404d69a88cb741b"
dependencies = [
"atomic",
"bytes 1.0.1",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"lazy_static",
"libp2p-core",
"libp2p-deflate",
@@ -4382,31 +4065,23 @@
"libp2p-yamux",
"parity-multiaddr",
"parking_lot 0.11.1",
-<<<<<<< HEAD
"pin-project 1.0.7",
-=======
- "pin-project 1.0.6",
->>>>>>> origin/develop
"smallvec 1.6.1",
"wasm-timer",
]
[[package]]
name = "libp2p-core"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71dd51b562e14846e65bad00e5808d0644376e6588668c490d3c48e1dfeb4a9a"
+checksum = "554d3e7e9e65f939d66b75fd6a4c67f258fe250da61b91f46c545fc4a89b51d9"
dependencies = [
"asn1_der",
"bs58",
"ed25519-dalek",
"either",
"fnv",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 3.0.2",
"lazy_static",
"libsecp256k1",
@@ -4415,11 +4090,7 @@
"multistream-select",
"parity-multiaddr",
"parking_lot 0.11.1",
-<<<<<<< HEAD
"pin-project 1.0.7",
-=======
- "pin-project 1.0.6",
->>>>>>> origin/develop
"prost",
"prost-build",
"rand 0.7.3",
@@ -4440,11 +4111,7 @@
checksum = "a2181a641cd15f9b6ba71b1335800f309012a0a97a29ffaabbbf40e9d3d58f08"
dependencies = [
"flate2",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
]
@@ -4454,12 +4121,8 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62e63dab8b5ff35e0c101a3e51e843ba782c07bbb1682f5fd827622e0d02b98b"
dependencies = [
-<<<<<<< HEAD
+ "async-std-resolver",
"futures 0.3.15",
-=======
- "async-std-resolver",
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"log",
"smallvec 1.6.1",
@@ -4474,11 +4137,7 @@
dependencies = [
"cuckoofilter",
"fnv",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4490,26 +4149,16 @@
[[package]]
name = "libp2p-gossipsub"
-<<<<<<< HEAD
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "502dc5fcbfec4aa1c63ef3f7307ffe20e90c1a1387bf23ed0bec087f2dde58a1"
-=======
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7b0c8506a6ec3344b9e706d7c7a6dba826f8ede735cfe13dde12a8c263c4af9"
->>>>>>> origin/develop
dependencies = [
"asynchronous-codec 0.6.0",
"base64 0.13.0",
"byteorder",
"bytes 1.0.1",
"fnv",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"hex_fmt",
"libp2p-core",
"libp2p-swarm",
@@ -4530,11 +4179,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f668f00efd9883e8b7bcc582eaf0164615792608f886f6577da18bcbeea0a46"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4555,11 +4200,7 @@
"bytes 1.0.1",
"either",
"fnv",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4576,30 +4217,22 @@
[[package]]
name = "libp2p-mdns"
-version = "0.30.1"
+version = "0.30.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41e282f974c4bea56db8acca50387f05189406e346318cb30190b0bde662961e"
+checksum = "4efa70c1c3d2d91237f8546e27aeb85e287d62c066a7b4f3ea6a696d43ced714"
dependencies = [
"async-io",
"data-encoding",
"dns-parser",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"if-watch",
"lazy_static",
"libp2p-core",
"libp2p-swarm",
"log",
- "rand 0.8.3",
+ "rand 0.8.4",
"smallvec 1.6.1",
-<<<<<<< HEAD
- "socket2 0.3.19",
-=======
"socket2 0.4.0",
->>>>>>> origin/develop
"void",
]
@@ -4611,11 +4244,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"log",
"nohash-hasher",
@@ -4633,11 +4262,7 @@
dependencies = [
"bytes 1.0.1",
"curve25519-dalek 3.1.0",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"lazy_static",
"libp2p-core",
"log",
@@ -4657,11 +4282,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf4bfaffac63bf3c7ec11ed9d8879d455966ddea7e78ee14737f0b6dce0d1cd1"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4678,11 +4299,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"log",
"prost",
@@ -4697,15 +4314,9 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
"log",
"pin-project 1.0.7",
-=======
- "futures 0.3.14",
- "log",
- "pin-project 1.0.6",
->>>>>>> origin/develop
"rand 0.7.3",
"salsa20",
"sha3 0.9.1",
@@ -4719,12 +4330,12 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"libp2p-core",
"libp2p-swarm",
"log",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"prost",
"prost-build",
"rand 0.7.3",
@@ -4742,11 +4353,7 @@
dependencies = [
"async-trait",
"bytes 1.0.1",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4765,11 +4372,7 @@
checksum = "1e04d8e1eef675029ec728ba14e8d0da7975d84b6679b699b4ae91a1de9c3a92"
dependencies = [
"either",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"log",
"rand 0.7.3",
@@ -4780,15 +4383,9 @@
[[package]]
name = "libp2p-swarm-derive"
-<<<<<<< HEAD
-version = "0.22.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c564ebaa36a64839f51eaddb0243aaaa29ce64affb56129193cc3248b72af273"
-=======
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "365b0a699fea5168676840567582a012ea297b1ca02eee467e58301b9c9c5eed"
->>>>>>> origin/develop
dependencies = [
"quote",
"syn",
@@ -4801,22 +4398,14 @@
checksum = "2b1a27d21c477951799e99d5c105d78868258502ce092988040a808d5a19bbd9"
dependencies = [
"async-io",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 3.0.2",
"if-watch",
"ipnet",
"libc",
"libp2p-core",
"log",
-<<<<<<< HEAD
- "socket2 0.3.19",
-=======
"socket2 0.4.0",
->>>>>>> origin/develop
]
[[package]]
@@ -4826,26 +4415,18 @@
checksum = "ffd6564bb3b7ff203661ccbb69003c2b551e34cef974f2d6c6a28306a12170b5"
dependencies = [
"async-std",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p-core",
"log",
]
[[package]]
name = "libp2p-wasm-ext"
-version = "0.28.1"
+version = "0.28.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cef45d61e43c313531b5e903e4e8415212ff6338e0c54c47da5b9b412b5760de"
+checksum = "e2d413e4cf9b8e5dfbcd2a60d3dc5a3391308bdb463684093d4f67137b7113de"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"js-sys",
"libp2p-core",
"parity-send-wrapper",
@@ -4860,40 +4441,24 @@
checksum = "cace60995ef6f637e4752cccbb2590f6bc358e8741a0d066307636c69a4b3a74"
dependencies = [
"either",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-rustls",
"libp2p-core",
"log",
"quicksink",
"rw-stream-sink",
"soketto",
-<<<<<<< HEAD
"url 2.2.2",
-=======
- "url 2.2.1",
->>>>>>> origin/develop
"webpki-roots",
]
[[package]]
name = "libp2p-yamux"
-<<<<<<< HEAD
-version = "0.30.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4819358c542a86ff95f6ae691efb4b94ddaf477079b01a686f5705b79bfc232a"
-dependencies = [
- "futures 0.3.15",
-=======
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f35da42cfc6d5cb0dcf3ad6881bc68d146cdf38f98655e09e33fbba4d13eabc4"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"libp2p-core",
"parking_lot 0.11.1",
"thiserror",
@@ -4956,11 +4521,11 @@
[[package]]
name = "linregress"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b36162d2e1dcbdeb61223cb788f029f8ac9f2ab19969b89c5a8f4517aad4d940"
+checksum = "b1ff7f341d23e1275eec0656a9a07225fcc86216c4322392868adffe59023d1a"
dependencies = [
- "nalgebra 0.25.4",
+ "nalgebra 0.27.1",
"statrs",
]
@@ -4975,15 +4540,9 @@
[[package]]
name = "lock_api"
-<<<<<<< HEAD
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb"
-=======
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3c91c24eae6777794bb1997ad98bbb87daf92890acab859f7eaa4320333176"
->>>>>>> origin/develop
dependencies = [
"scopeguard",
]
@@ -5054,15 +4613,6 @@
[[package]]
name = "matrixmultiply"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1"
-dependencies = [
- "rawpointer",
-]
-
-[[package]]
-name = "matrixmultiply"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741"
@@ -5084,9 +4634,9 @@
[[package]]
name = "memmap2"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "397d1a6d6d0563c0f5462bbdae662cf6c784edf5e828e40c7257f85d82bf56dd"
+checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4"
dependencies = [
"libc",
]
@@ -5102,9 +4652,9 @@
[[package]]
name = "memoffset"
-version = "0.6.3"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d"
+checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9"
dependencies = [
"autocfg",
]
@@ -5153,7 +4703,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
]
@@ -5163,22 +4713,16 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c023c3f16109e7f33aa451f773fd61070e265b4977d0b6e344a51049296dd7df"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"rand 0.7.3",
"thrift",
]
[[package]]
name = "minicbor"
-<<<<<<< HEAD
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c2b2c73f9640fccab53947e2b3474d5071fcbc8f82cac51ddf6c8041a30a9ea"
-=======
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51aa5bb0ca22415daca596a227b507f880ad1b2318a87fa9325312a5d285ca0d"
->>>>>>> origin/develop
dependencies = [
"minicbor-derive",
]
@@ -5315,11 +4859,11 @@
[[package]]
name = "multihash-derive"
-version = "0.7.1"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85ee3c48cb9d9b275ad967a0e96715badc13c6029adb92f34fa17b9ff28fd81f"
+checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99"
dependencies = [
- "proc-macro-crate 0.1.5",
+ "proc-macro-crate 1.0.0",
"proc-macro-error",
"proc-macro2",
"quote",
@@ -5340,91 +4884,64 @@
checksum = "7d91ec0a2440aaff5f78ec35631a7027d50386c6163aa975f7caa0d5da4b6ff8"
dependencies = [
"bytes 1.0.1",
-<<<<<<< HEAD
"futures 0.3.15",
"log",
"pin-project 1.0.7",
-=======
- "futures 0.3.14",
- "log",
- "pin-project 1.0.6",
->>>>>>> origin/develop
"smallvec 1.6.1",
"unsigned-varint 0.7.0",
]
[[package]]
name = "nalgebra"
-version = "0.19.0"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0abb021006c01b126a936a8dd1351e0720d83995f4fc942d0d426c654f990745"
+checksum = "476d1d59fe02fe54c86356e91650cd892f392782a1cb9fc524ec84f7aa9e1d06"
dependencies = [
- "alga",
- "approx 0.3.2",
- "generic-array 0.13.3",
- "matrixmultiply 0.2.4",
- "num-complex 0.2.4",
- "num-rational 0.2.4",
+ "approx 0.4.0",
+ "matrixmultiply",
+ "num-complex 0.3.1",
+ "num-rational 0.3.2",
"num-traits",
- "rand 0.7.3",
+ "rand 0.8.4",
"rand_distr",
-<<<<<<< HEAD
-=======
+ "simba 0.4.0",
"typenum",
]
[[package]]
name = "nalgebra"
-version = "0.25.4"
+version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c70c9e8c5f213c8e93fc8c112ade4edd3ee62062fb897776c23dcebac7932900"
+checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120"
dependencies = [
- "approx 0.4.0",
- "generic-array 0.14.4",
- "matrixmultiply 0.3.1",
- "num-complex 0.3.1",
- "num-rational 0.3.2",
+ "approx 0.5.0",
+ "matrixmultiply",
+ "nalgebra-macros",
+ "num-complex 0.4.0",
+ "num-rational 0.4.0",
"num-traits",
- "serde",
- "simba",
->>>>>>> origin/develop
+ "simba 0.5.1",
"typenum",
]
[[package]]
-name = "nalgebra"
-version = "0.25.4"
+name = "nalgebra-macros"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c70c9e8c5f213c8e93fc8c112ade4edd3ee62062fb897776c23dcebac7932900"
+checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218"
dependencies = [
- "approx 0.4.0",
- "generic-array 0.14.4",
- "matrixmultiply 0.3.1",
- "num-complex 0.3.1",
- "num-rational 0.3.2",
- "num-traits",
- "serde",
- "simba",
- "typenum",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
-<<<<<<< HEAD
name = "names"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da"
dependencies = [
"rand 0.3.23",
-=======
-name = "nb-connect"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a19900e7eee95eb2b3c2e26d12a874cc80aaf750e31be6fcbe743ead369fa45d"
-dependencies = [
- "libc",
- "socket2 0.4.0",
->>>>>>> origin/develop
]
[[package]]
@@ -5442,13 +4959,6 @@
name = "nft"
version = "3.0.0"
dependencies = [
-<<<<<<< HEAD
- "fc-consensus",
- "fc-db",
- "fc-mapping-sync",
- "fc-rpc",
- "fc-rpc-core",
-=======
"cumulus-client-cli",
"cumulus-client-collator",
"cumulus-client-consensus-aura",
@@ -5457,28 +4967,27 @@
"cumulus-client-service",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
->>>>>>> origin/develop
+ "fc-consensus",
+ "fc-db",
+ "fc-mapping-sync",
+ "fc-rpc",
+ "fc-rpc-core",
"flexi_logger",
"fp-rpc",
"frame-benchmarking",
"frame-benchmarking-cli",
-<<<<<<< HEAD
"futures 0.3.15",
"jsonrpc-core 15.1.0",
"jsonrpc-pubsub 15.1.0",
-=======
- "futures 0.3.14",
- "jsonrpc-core",
->>>>>>> origin/develop
"log",
"nft-data-structs",
+ "nft-rpc",
"nft-runtime",
"pallet-contracts",
"pallet-contracts-rpc",
"pallet-ethereum",
- "pallet-nft",
"pallet-transaction-payment-rpc",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"polkadot-cli",
"polkadot-parachain",
@@ -5514,10 +5023,7 @@
"sp-keystore",
"sp-offchain",
"sp-runtime",
-<<<<<<< HEAD
-=======
"sp-session",
->>>>>>> origin/develop
"sp-timestamp",
"sp-transaction-pool",
"sp-trie",
@@ -5534,19 +5040,61 @@
"frame-support",
"frame-system",
"pallet-contracts",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-runtime",
]
[[package]]
+name = "nft-rpc"
+version = "3.3.1"
+dependencies = [
+ "fc-db",
+ "fc-mapping-sync",
+ "fc-rpc",
+ "fc-rpc-core",
+ "fp-rpc",
+ "futures 0.3.15",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-pubsub 15.1.0",
+ "nft-runtime",
+ "pallet-contracts-rpc",
+ "pallet-ethereum",
+ "pallet-nft",
+ "pallet-transaction-payment-rpc",
+ "pallet-transaction-payment-rpc-runtime-api",
+ "sc-client-api",
+ "sc-consensus-aura",
+ "sc-consensus-epochs",
+ "sc-finality-grandpa",
+ "sc-finality-grandpa-rpc",
+ "sc-keystore",
+ "sc-network",
+ "sc-rpc",
+ "sc-rpc-api",
+ "sc-service",
+ "sc-transaction-graph",
+ "sc-transaction-pool",
+ "sp-api",
+ "sp-block-builder",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-consensus-aura",
+ "sp-core",
+ "sp-offchain",
+ "sp-runtime",
+ "sp-session",
+ "sp-storage",
+ "sp-transaction-pool",
+ "substrate-frame-rpc-system",
+ "tokio 0.2.25",
+]
+
+[[package]]
name = "nft-runtime"
version = "3.0.0"
dependencies = [
-<<<<<<< HEAD
- "fp-rpc",
-=======
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -5554,7 +5102,7 @@
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-utility",
->>>>>>> origin/develop
+ "fp-rpc",
"frame-benchmarking",
"frame-executive",
"frame-support",
@@ -5568,12 +5116,8 @@
"pallet-contracts",
"pallet-contracts-primitives",
"pallet-contracts-rpc-runtime-api",
-<<<<<<< HEAD
"pallet-ethereum",
"pallet-evm",
- "pallet-grandpa",
-=======
->>>>>>> origin/develop
"pallet-inflation",
"pallet-nft",
"pallet-nft-charge-transaction",
@@ -5586,14 +5130,10 @@
"pallet-transaction-payment-rpc-runtime-api",
"pallet-treasury",
"pallet-vesting",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
-=======
"pallet-xcm",
"parachain-info",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
->>>>>>> origin/develop
"serde",
"smallvec 1.6.1",
"sp-api",
@@ -5650,19 +5190,18 @@
[[package]]
name = "num-complex"
-version = "0.2.4"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"
+checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5"
dependencies = [
- "autocfg",
"num-traits",
]
[[package]]
name = "num-complex"
-version = "0.3.1"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5"
+checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085"
dependencies = [
"num-traits",
]
@@ -5701,6 +5240,17 @@
]
[[package]]
+name = "num-rational"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
name = "num-traits"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5731,19 +5281,19 @@
]
[[package]]
-<<<<<<< HEAD
name = "object"
-version = "0.24.0"
+version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
+checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7"
+dependencies = [
+ "memchr",
+]
[[package]]
-=======
->>>>>>> origin/develop
name = "once_cell"
-version = "1.7.2"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3"
+checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
dependencies = [
"parking_lot 0.11.1",
]
@@ -5787,22 +5337,13 @@
[[package]]
name = "pallet-aura"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-support",
"frame-system",
"pallet-session",
"pallet-timestamp",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
- "serde",
-=======
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-consensus-aura",
"sp-runtime",
@@ -5812,25 +5353,14 @@
[[package]]
name = "pallet-authority-discovery"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "frame-support",
- "frame-system",
- "impl-trait-for-tuples 0.2.1",
- "parity-scale-codec 2.1.1",
- "sp-authorship",
- "sp-inherents",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-support",
"frame-system",
"pallet-session",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-authority-discovery",
->>>>>>> origin/develop
"sp-runtime",
"sp-std",
]
@@ -5838,23 +5368,13 @@
[[package]]
name = "pallet-authorship"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-support",
"frame-system",
-<<<<<<< HEAD
- "log",
- "parity-scale-codec 2.1.1",
- "serde",
-=======
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"sp-authorship",
->>>>>>> origin/develop
"sp-runtime",
"sp-std",
]
@@ -5862,33 +5382,19 @@
[[package]]
name = "pallet-babe"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"log",
-<<<<<<< HEAD
- "pallet-contracts-primitives",
- "pallet-contracts-proc-macro",
- "parity-scale-codec 2.1.1",
- "parity-wasm 0.41.0",
- "pwasm-utils 0.16.0",
- "serde",
- "sp-core",
-=======
"pallet-authorship",
"pallet-session",
"pallet-timestamp",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-consensus-babe",
"sp-consensus-vrf",
->>>>>>> origin/develop
"sp-io",
"sp-runtime",
"sp-session",
@@ -5899,47 +5405,18 @@
[[package]]
name = "pallet-balances"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "bitflags",
- "parity-scale-codec 2.1.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-runtime",
"sp-std",
]
[[package]]
-<<<<<<< HEAD
-name = "pallet-contracts-proc-macro"
-version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "pallet-contracts-rpc"
-version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "jsonrpc-core 15.1.0",
- "jsonrpc-core-client 15.1.0",
- "jsonrpc-derive 15.1.0",
- "pallet-contracts-primitives",
- "pallet-contracts-rpc-runtime-api",
- "parity-scale-codec 2.1.1",
-=======
name = "pallet-beefy"
version = "0.1.0"
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=polkadot-v0.9.3#063e18a1f82945d5a304906db92bfbb571bac459"
@@ -5948,8 +5425,7 @@
"frame-support",
"frame-system",
"pallet-session",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -5958,88 +5434,20 @@
[[package]]
name = "pallet-bounties"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "pallet-contracts-primitives",
- "parity-scale-codec 2.1.1",
- "sp-api",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-support",
"frame-system",
"pallet-treasury",
- "parity-scale-codec",
->>>>>>> origin/develop
- "sp-runtime",
- "sp-std",
-]
-
-[[package]]
-<<<<<<< HEAD
-name = "pallet-ethereum"
-version = "2.0.0-dev"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
-dependencies = [
- "ethereum",
- "ethereum-types 0.11.0",
- "evm",
- "fp-consensus",
- "fp-evm",
- "fp-rpc",
- "fp-storage",
- "frame-support",
- "frame-system",
- "libsecp256k1",
- "pallet-balances",
- "pallet-evm",
- "pallet-timestamp",
- "parity-scale-codec 2.1.1",
- "rlp 0.5.0",
- "rustc-hex",
- "serde",
- "sha3 0.8.2",
- "sp-io",
- "sp-runtime",
- "sp-std",
-]
-
-[[package]]
-name = "pallet-evm"
-version = "4.0.0-dev"
-source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions#7b3b742c4e95eb7ae6c5435137670365f17ae1fa"
-dependencies = [
- "evm",
- "evm-gasometer",
- "evm-runtime",
- "fp-evm",
- "frame-support",
- "frame-system",
- "impl-trait-for-tuples 0.2.1",
- "log",
- "pallet-balances",
- "pallet-timestamp",
- "parity-scale-codec 2.1.1",
- "primitive-types 0.9.0",
- "rlp 0.5.0",
- "serde",
- "sha3 0.8.2",
- "sp-core",
- "sp-io",
+ "parity-scale-codec 2.1.3",
"sp-runtime",
"sp-std",
]
[[package]]
-name = "pallet-grandpa"
-version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
name = "pallet-bridge-grandpa"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
->>>>>>> origin/develop
dependencies = [
"bp-header-chain",
"bp-runtime",
@@ -6048,14 +5456,8 @@
"frame-support",
"frame-system",
"log",
-<<<<<<< HEAD
- "pallet-authorship",
- "pallet-session",
- "parity-scale-codec 2.1.1",
-=======
"num-traits",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"serde",
"sp-finality-grandpa",
"sp-runtime",
@@ -6070,16 +5472,8 @@
dependencies = [
"frame-support",
"frame-system",
-<<<<<<< HEAD
- "pallet-balances",
- "pallet-randomness-collective-flip",
- "pallet-timestamp",
- "parity-scale-codec 2.1.1",
- "serde",
-=======
"log",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -6091,39 +5485,16 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
-<<<<<<< HEAD
- "ethereum",
- "ethereum-tx-sign",
- "evm-coder",
- "fp-evm",
- "frame-benchmarking",
- "frame-support",
- "frame-system",
- "hex-literal",
- "pallet-balances",
- "pallet-contracts",
- "pallet-ethereum",
- "pallet-evm",
- "pallet-randomness-collective-flip",
- "pallet-timestamp",
- "pallet-transaction-payment",
- "parity-scale-codec 2.1.1",
- "primitive-types 0.9.0",
- "rlp 0.5.0",
- "serde",
- "sp-api",
-=======
"frame-support",
"frame-system",
"log",
"pallet-contracts-primitives",
"pallet-contracts-proc-macro",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-wasm 0.42.2",
"pwasm-utils 0.17.1",
"serde",
"smallvec 1.6.1",
->>>>>>> origin/develop
"sp-core",
"sp-io",
"sp-runtime",
@@ -6135,21 +5506,12 @@
[[package]]
name = "pallet-contracts-primitives"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "frame-support",
- "frame-system",
- "parity-scale-codec 2.1.1",
- "safe-mix",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"bitflags",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
->>>>>>> origin/develop
"sp-runtime",
"sp-std",
]
@@ -6157,15 +5519,6 @@
[[package]]
name = "pallet-contracts-proc-macro"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "frame-support",
- "frame-system",
- "impl-trait-for-tuples 0.2.1",
- "pallet-timestamp",
- "parity-scale-codec 2.1.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"proc-macro2",
@@ -6178,13 +5531,12 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
"pallet-contracts-primitives",
"pallet-contracts-rpc-runtime-api",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-blockchain",
@@ -6196,21 +5548,11 @@
[[package]]
name = "pallet-contracts-rpc-runtime-api"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "frame-support",
- "frame-system",
- "parity-scale-codec 2.1.1",
- "serde",
- "sp-io",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"pallet-contracts-primitives",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
->>>>>>> origin/develop
"sp-runtime",
"sp-std",
]
@@ -6218,22 +5560,12 @@
[[package]]
name = "pallet-democracy"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
-<<<<<<< HEAD
- "impl-trait-for-tuples 0.2.1",
- "log",
- "parity-scale-codec 2.1.1",
-=======
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"serde",
"sp-io",
"sp-runtime",
@@ -6243,24 +5575,14 @@
[[package]]
name = "pallet-election-provider-multi-phase"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-election-provider-support",
"frame-support",
"frame-system",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
- "serde",
- "smallvec 1.6.1",
-=======
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
->>>>>>> origin/develop
"sp-core",
"sp-io",
"sp-npos-elections",
@@ -6270,19 +5592,6 @@
]
[[package]]
-<<<<<<< HEAD
-name = "pallet-transaction-payment-rpc"
-version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "jsonrpc-core 15.1.0",
- "jsonrpc-core-client 15.1.0",
- "jsonrpc-derive 15.1.0",
- "pallet-transaction-payment-rpc-runtime-api",
- "parity-scale-codec 2.1.1",
- "sp-api",
- "sp-blockchain",
-=======
name = "pallet-elections-phragmen"
version = "4.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
@@ -6290,8 +5599,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-npos-elections",
@@ -6300,23 +5608,69 @@
]
[[package]]
+name = "pallet-ethereum"
+version = "2.0.0-dev"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
+dependencies = [
+ "ethereum",
+ "ethereum-types 0.11.0",
+ "evm",
+ "fp-consensus",
+ "fp-evm",
+ "fp-rpc",
+ "fp-storage",
+ "frame-support",
+ "frame-system",
+ "libsecp256k1",
+ "pallet-balances",
+ "pallet-evm",
+ "pallet-timestamp",
+ "parity-scale-codec 2.1.3",
+ "rlp 0.5.0",
+ "rustc-hex",
+ "serde",
+ "sha3 0.8.2",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-evm"
+version = "4.0.0-dev"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
+dependencies = [
+ "evm",
+ "evm-gasometer",
+ "evm-runtime",
+ "fp-evm",
+ "frame-support",
+ "frame-system",
+ "impl-trait-for-tuples 0.2.1",
+ "log",
+ "pallet-balances",
+ "pallet-timestamp",
+ "parity-scale-codec 2.1.3",
+ "primitive-types 0.9.0",
+ "rlp 0.5.0",
+ "serde",
+ "sha3 0.8.2",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
name = "pallet-gilt"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "pallet-transaction-payment",
- "parity-scale-codec 2.1.1",
- "sp-api",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
->>>>>>> origin/develop
"sp-runtime",
"sp-std",
]
@@ -6324,29 +5678,18 @@
[[package]]
name = "pallet-grandpa"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
-<<<<<<< HEAD
- "impl-trait-for-tuples 0.2.1",
- "pallet-balances",
- "parity-scale-codec 2.1.1",
- "serde",
-=======
"log",
"pallet-authorship",
"pallet-session",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-core",
"sp-finality-grandpa",
->>>>>>> origin/develop
"sp-runtime",
"sp-session",
"sp-staking",
@@ -6356,107 +5699,44 @@
[[package]]
name = "pallet-identity"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"enumflags2",
"frame-benchmarking",
"frame-support",
"frame-system",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
- "serde",
-=======
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
->>>>>>> origin/develop
"sp-runtime",
"sp-std",
]
[[package]]
-<<<<<<< HEAD
-name = "parity-db"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "495197c078e54b8735181aa35c00a327f7f3a3cc00a1ee8c95926dd010f0ec6b"
-dependencies = [
- "blake2-rfc",
- "crc32fast",
- "fs2",
- "hex",
- "libc",
-=======
name = "pallet-im-online"
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-support",
"frame-system",
->>>>>>> origin/develop
"log",
"pallet-authorship",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-core",
"sp-io",
"sp-runtime",
"sp-staking",
"sp-std",
-]
-
-[[package]]
-<<<<<<< HEAD
-name = "parity-multiaddr"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58341485071825827b7f03cf7efd1cb21e6a709bea778fb50227fd45d2f361b4"
-dependencies = [
- "arrayref",
- "bs58",
- "byteorder",
- "data-encoding",
- "multihash",
- "percent-encoding 2.1.0",
- "serde",
- "static_assertions",
- "unsigned-varint 0.7.0",
- "url 2.2.2",
-]
-
-[[package]]
-name = "parity-scale-codec"
-version = "1.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4b26b16c7687c3075982af47719e481815df30bc544f7a6690763a25ca16e9d"
-dependencies = [
- "arrayvec 0.5.2",
- "bitvec 0.17.4",
- "byte-slice-cast 0.3.5",
- "serde",
]
[[package]]
-name = "parity-scale-codec"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0f518afaa5a47d0d6386229b0a6e01e86427291d643aa4cabb4992219f504f8"
-dependencies = [
- "arrayvec 0.7.0",
- "bitvec 0.20.4",
- "byte-slice-cast 1.0.0",
- "parity-scale-codec-derive",
-=======
name = "pallet-indices"
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-keyring",
@@ -6474,8 +5754,7 @@
"pallet-balances",
"pallet-randomness-collective-flip",
"pallet-timestamp",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -6484,17 +5763,6 @@
]
[[package]]
-<<<<<<< HEAD
-name = "parity-scale-codec-derive"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f44c5f94427bd0b5076e8f7e15ca3f60a4d8ac0077e4793884e6fdfd8915344e"
-dependencies = [
- "proc-macro-crate 0.1.5",
- "proc-macro2",
- "quote",
- "syn",
-=======
name = "pallet-membership"
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
@@ -6503,11 +5771,10 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
->>>>>>> origin/develop
]
[[package]]
@@ -6515,30 +5782,16 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
-<<<<<<< HEAD
- "bytes 0.4.12",
- "futures 0.1.31",
- "libc",
- "log",
- "mio-named-pipes",
- "miow 0.3.7",
- "rand 0.7.3",
- "tokio 0.1.22",
- "tokio-named-pipes",
- "tokio-uds",
- "winapi 0.3.9",
-=======
"ckb-merkle-mountain-range",
"frame-benchmarking",
"frame-support",
"frame-system",
"pallet-mmr-primitives",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
"sp-std",
->>>>>>> origin/develop
]
[[package]]
@@ -6546,26 +5799,15 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
-<<<<<<< HEAD
- "cfg-if 1.0.0",
- "hashbrown",
- "impl-trait-for-tuples 0.2.1",
- "parity-util-mem-derive",
- "parking_lot 0.11.1",
- "primitive-types 0.9.0",
- "smallvec 1.6.1",
- "winapi 0.3.9",
-=======
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-core",
"sp-runtime",
"sp-std",
->>>>>>> origin/develop
]
[[package]]
@@ -6573,11 +5815,11 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
"pallet-mmr-primitives",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-blockchain",
@@ -6593,7 +5835,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -6604,34 +5846,31 @@
name = "pallet-nft"
version = "3.0.0"
dependencies = [
-<<<<<<< HEAD
- "byteorder",
- "bytes 0.4.12",
- "httparse",
- "log",
- "mio",
- "mio-extras",
- "rand 0.7.3",
- "sha-1 0.8.2",
- "slab",
- "url 2.2.2",
-=======
+ "ethereum",
+ "ethereum-tx-sign",
+ "evm-coder",
+ "fp-evm",
"frame-benchmarking",
"frame-support",
"frame-system",
+ "hex-literal",
"nft-data-structs",
"pallet-balances",
"pallet-contracts",
+ "pallet-ethereum",
+ "pallet-evm",
"pallet-randomness-collective-flip",
"pallet-timestamp",
"pallet-transaction-payment",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
+ "primitive-types 0.9.0",
+ "rlp 0.5.0",
"serde",
+ "sp-api",
"sp-core",
"sp-io",
"sp-runtime",
"sp-std",
->>>>>>> origin/develop
]
[[package]]
@@ -6649,7 +5888,7 @@
"pallet-randomness-collective-flip",
"pallet-timestamp",
"pallet-transaction-payment",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -6671,7 +5910,7 @@
"pallet-randomness-collective-flip",
"pallet-timestamp",
"pallet-transaction-payment",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -6684,18 +5923,12 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
-<<<<<<< HEAD
- "instant",
- "lock_api 0.4.4",
- "parking_lot_core 0.8.3",
-=======
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
->>>>>>> origin/develop
]
[[package]]
@@ -6707,7 +5940,7 @@
"frame-system",
"log",
"pallet-balances",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-staking",
@@ -6721,7 +5954,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -6733,24 +5966,9 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
-<<<<<<< HEAD
- "cfg-if 1.0.0",
- "instant",
- "libc",
- "redox_syscall 0.2.8",
- "smallvec 1.6.1",
- "winapi 0.3.9",
-]
-
-[[package]]
-name = "paste"
-version = "1.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58"
-=======
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"safe-mix",
"sp-runtime",
"sp-std",
@@ -6764,7 +5982,7 @@
"enumflags2",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -6782,7 +6000,7 @@
"pallet-contracts",
"pallet-nft",
"pallet-nft-transaction-payment",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -6790,7 +6008,6 @@
"sp-std",
"substrate-test-utils",
]
->>>>>>> origin/develop
[[package]]
name = "pallet-scheduler"
@@ -6801,7 +6018,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -6814,9 +6031,9 @@
dependencies = [
"frame-support",
"frame-system",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"pallet-timestamp",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -6833,7 +6050,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"rand_chacha 0.2.2",
"sp-runtime",
"sp-std",
@@ -6850,7 +6067,7 @@
"log",
"pallet-authorship",
"pallet-session",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"paste",
"serde",
"sp-application-crypto",
@@ -6888,7 +6105,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -6902,9 +6119,9 @@
"frame-benchmarking",
"frame-support",
"frame-system",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-inherents",
"sp-io",
"sp-runtime",
@@ -6920,7 +6137,7 @@
"frame-support",
"frame-system",
"pallet-treasury",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -6933,7 +6150,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"smallvec 1.6.1",
"sp-core",
@@ -6947,49 +6164,25 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
"pallet-transaction-payment-rpc-runtime-api",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-blockchain",
"sp-core",
"sp-rpc",
"sp-runtime",
-]
-
-[[package]]
-<<<<<<< HEAD
-name = "pin-project"
-version = "0.4.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f"
-dependencies = [
- "pin-project-internal 0.4.28",
-]
-
-[[package]]
-name = "pin-project"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4"
-dependencies = [
- "pin-project-internal 1.0.7",
]
[[package]]
-name = "pin-project-internal"
-version = "0.4.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e"
-=======
name = "pallet-transaction-payment-rpc-runtime-api"
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"pallet-transaction-payment",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-runtime",
]
@@ -7001,9 +6194,9 @@
dependencies = [
"frame-support",
"frame-system",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"pallet-balances",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -7013,11 +6206,10 @@
name = "pallet-utility"
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -7025,45 +6217,26 @@
]
[[package]]
-<<<<<<< HEAD
-name = "pin-project-internal"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f"
-=======
name = "pallet-vesting"
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"enumflags2",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-runtime",
"sp-std",
]
[[package]]
-<<<<<<< HEAD
-name = "pin-project-lite"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777"
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"
-=======
name = "pallet-xcm"
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -7079,15 +6252,15 @@
"cumulus-primitives-core",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
]
[[package]]
name = "parity-db"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "495197c078e54b8735181aa35c00a327f7f3a3cc00a1ee8c95926dd010f0ec6b"
+checksum = "2e337f62db341435f0da05b8f6b97e984ef4ea5800510cd07c2d624688c40b47"
dependencies = [
"blake2-rfc",
"crc32fast",
@@ -7097,7 +6270,7 @@
"log",
"memmap2",
"parking_lot 0.11.1",
- "rand 0.8.3",
+ "rand 0.8.4",
]
[[package]]
@@ -7115,30 +6288,41 @@
"serde",
"static_assertions",
"unsigned-varint 0.7.0",
- "url 2.2.1",
+ "url 2.2.2",
]
->>>>>>> origin/develop
[[package]]
name = "parity-scale-codec"
-version = "2.1.1"
+version = "1.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0f518afaa5a47d0d6386229b0a6e01e86427291d643aa4cabb4992219f504f8"
+checksum = "a4b26b16c7687c3075982af47719e481815df30bc544f7a6690763a25ca16e9d"
dependencies = [
- "arrayvec 0.7.0",
- "bitvec",
- "byte-slice-cast",
+ "arrayvec 0.5.2",
+ "bitvec 0.17.4",
+ "byte-slice-cast 0.3.5",
+ "serde",
+]
+
+[[package]]
+name = "parity-scale-codec"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b310f220c335f9df1b3d2e9fbe3890bbfeef5030dad771620f48c5c229877cd3"
+dependencies = [
+ "arrayvec 0.7.1",
+ "bitvec 0.20.4",
+ "byte-slice-cast 1.0.0",
"parity-scale-codec-derive",
"serde",
]
[[package]]
name = "parity-scale-codec-derive"
-version = "2.1.0"
+version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f44c5f94427bd0b5076e8f7e15ca3f60a4d8ac0077e4793884e6fdfd8915344e"
+checksum = "81038e13ca2c32587201d544ea2e6b6c47120f1e4eae04478f9f60b6bcb89145"
dependencies = [
- "proc-macro-crate 0.1.5",
+ "proc-macro-crate 1.0.0",
"proc-macro2",
"quote",
"syn",
@@ -7176,13 +6360,13 @@
checksum = "664a8c6b8e62d8f9f2f937e391982eb433ab285b4cd9545b342441e04a906e42"
dependencies = [
"cfg-if 1.0.0",
- "ethereum-types",
+ "ethereum-types 0.11.0",
"hashbrown",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"lru",
"parity-util-mem-derive",
"parking_lot 0.11.1",
- "primitive-types",
+ "primitive-types 0.9.0",
"smallvec 1.6.1",
"winapi 0.3.9",
]
@@ -7234,7 +6418,7 @@
"rand 0.7.3",
"sha-1 0.8.2",
"slab",
- "url 2.2.1",
+ "url 2.2.2",
]
[[package]]
@@ -7271,7 +6455,7 @@
checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
dependencies = [
"instant",
- "lock_api 0.4.3",
+ "lock_api 0.4.4",
"parking_lot_core 0.8.3",
]
@@ -7313,7 +6497,7 @@
"cfg-if 1.0.0",
"instant",
"libc",
- "redox_syscall 0.2.6",
+ "redox_syscall 0.2.9",
"smallvec 1.6.1",
"winapi 0.3.9",
]
@@ -7431,11 +6615,11 @@
[[package]]
name = "pin-project"
-version = "1.0.6"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc174859768806e91ae575187ada95c91a29e96a98dc5d2cd9a1fed039501ba6"
+checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4"
dependencies = [
- "pin-project-internal 1.0.6",
+ "pin-project-internal 1.0.7",
]
[[package]]
@@ -7451,9 +6635,9 @@
[[package]]
name = "pin-project-internal"
-version = "1.0.6"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a490329918e856ed1b083f244e3bfe2d8c4f336407e4ea9e1a9f479ff09049e5"
+checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f"
dependencies = [
"proc-macro2",
"quote",
@@ -7495,7 +6679,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7509,7 +6693,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -7522,9 +6706,9 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"lru",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-erasure-coding",
"polkadot-node-core-runtime-api",
"polkadot-node-network-protocol",
@@ -7532,7 +6716,7 @@
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
- "rand 0.8.3",
+ "rand 0.8.4",
"sp-application-crypto",
"sp-core",
"sp-keystore",
@@ -7545,16 +6729,16 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"lru",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
- "rand 0.8.3",
+ "rand 0.8.4",
"thiserror",
"tracing",
]
@@ -7565,7 +6749,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"frame-benchmarking-cli",
- "futures 0.3.14",
+ "futures 0.3.15",
"log",
"polkadot-node-core-pvf",
"polkadot-service",
@@ -7585,7 +6769,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"always-assert",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -7604,7 +6788,7 @@
version = "0.9.3"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"sp-core",
"sp-runtime",
@@ -7616,7 +6800,7 @@
version = "0.9.3"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-node-primitives",
"polkadot-primitives",
"reed-solomon-novelpoly",
@@ -7630,7 +6814,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -7646,8 +6830,8 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"async-trait",
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
@@ -7665,8 +6849,8 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"polkadot-erasure-coding",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7683,13 +6867,13 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "bitvec",
+ "bitvec 0.20.4",
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"kvdb",
"merlin",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-node-jaeger",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7712,11 +6896,11 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "bitvec",
- "futures 0.3.14",
+ "bitvec 0.20.4",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"kvdb",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-erasure-coding",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7732,8 +6916,8 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "bitvec",
- "futures 0.3.14",
+ "bitvec 0.20.4",
+ "futures 0.3.15",
"polkadot-erasure-coding",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7750,7 +6934,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7765,7 +6949,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -7781,8 +6965,8 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"async-trait",
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"polkadot-node-core-pvf",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7798,7 +6982,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7812,7 +6996,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"async-trait",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"polkadot-node-subsystem",
"polkadot-overseer",
@@ -7829,8 +7013,8 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "bitvec",
- "futures 0.3.14",
+ "bitvec 0.20.4",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -7848,14 +7032,14 @@
"assert_matches",
"async-process",
"async-std",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"libc",
- "parity-scale-codec",
- "pin-project 1.0.6",
+ "parity-scale-codec 2.1.3",
+ "pin-project 1.0.7",
"polkadot-core-primitives",
"polkadot-parachain",
- "rand 0.8.3",
+ "rand 0.8.4",
"sc-executor",
"sc-executor-common",
"sc-executor-wasmtime",
@@ -7872,7 +7056,7 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"memory-lru",
"parity-util-mem",
"polkadot-node-subsystem",
@@ -7894,7 +7078,7 @@
"lazy_static",
"log",
"mick-jaeger",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"polkadot-node-primitives",
"polkadot-primitives",
@@ -7908,8 +7092,8 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"polkadot-node-jaeger",
"polkadot-node-primitives",
"polkadot-primitives",
@@ -7923,8 +7107,8 @@
version = "0.1.0"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "futures 0.3.14",
- "parity-scale-codec",
+ "futures 0.3.15",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"polkadot-primitives",
"polkadot-statement-table",
@@ -7948,14 +7132,14 @@
"async-std",
"async-trait",
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"lazy_static",
"log",
"mick-jaeger",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"polkadot-node-jaeger",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -7976,18 +7160,18 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"async-trait",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"lru",
"metered-channel",
- "parity-scale-codec",
- "pin-project 1.0.6",
+ "parity-scale-codec 2.1.3",
+ "pin-project 1.0.7",
"polkadot-node-jaeger",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-primitives",
- "rand 0.8.3",
+ "rand 0.8.4",
"sc-network",
"sp-application-crypto",
"sp-core",
@@ -8004,7 +7188,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"async-trait",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -8022,7 +7206,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"derive_more",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"polkadot-core-primitives",
"serde",
@@ -8036,10 +7220,10 @@
version = "0.9.3"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "bitvec",
+ "bitvec 0.20.4",
"frame-system",
"hex-literal",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"polkadot-core-primitives",
"polkadot-parachain",
@@ -8089,10 +7273,10 @@
dependencies = [
"beefy-gadget",
"beefy-gadget-rpc",
- "jsonrpc-core",
+ "jsonrpc-core 15.1.0",
"pallet-mmr-rpc",
"pallet-transaction-payment-rpc",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-primitives",
"sc-chain-spec",
"sc-client-api",
@@ -8121,7 +7305,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"beefy-primitives",
- "bitvec",
+ "bitvec 0.20.4",
"frame-executive",
"frame-support",
"frame-system",
@@ -8159,7 +7343,7 @@
"pallet-treasury",
"pallet-utility",
"pallet-vesting",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-primitives",
"polkadot-runtime-common",
"rustc-hex",
@@ -8191,10 +7375,10 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"beefy-primitives",
- "bitvec",
+ "bitvec 0.20.4",
"frame-support",
"frame-system",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"libsecp256k1",
"log",
"pallet-authorship",
@@ -8208,7 +7392,7 @@
"pallet-transaction-payment",
"pallet-treasury",
"pallet-vesting",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-primitives",
"polkadot-runtime-parachains",
"rustc-hex",
@@ -8232,7 +7416,7 @@
version = "0.9.3"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "bitvec",
+ "bitvec 0.20.4",
"derive_more",
"frame-support",
"frame-system",
@@ -8245,10 +7429,10 @@
"pallet-staking",
"pallet-timestamp",
"pallet-vesting",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-primitives",
- "rand 0.8.3",
- "rand_chacha 0.3.0",
+ "rand 0.8.4",
+ "rand_chacha 0.3.1",
"rustc-hex",
"serde",
"sp-api",
@@ -8273,7 +7457,7 @@
"beefy-primitives",
"frame-benchmarking",
"frame-system-rpc-runtime-api",
- "futures 0.3.14",
+ "futures 0.3.15",
"hex-literal",
"kusama-runtime",
"kvdb",
@@ -8362,9 +7546,9 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"arrayvec 0.5.2",
- "futures 0.3.14",
+ "futures 0.3.15",
"indexmap",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -8382,7 +7566,7 @@
version = "0.9.3"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-primitives",
"sp-core",
]
@@ -8393,7 +7577,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"beefy-primitives",
- "bitvec",
+ "bitvec 0.20.4",
"frame-election-provider-support",
"frame-executive",
"frame-support",
@@ -8418,7 +7602,7 @@
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-vesting",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"polkadot-primitives",
"polkadot-runtime-common",
@@ -8452,7 +7636,7 @@
"frame-benchmarking",
"frame-system",
"futures 0.1.31",
- "futures 0.3.14",
+ "futures 0.3.15",
"hex",
"pallet-balances",
"pallet-staking",
@@ -8467,7 +7651,7 @@
"polkadot-runtime-parachains",
"polkadot-service",
"polkadot-test-runtime",
- "rand 0.8.3",
+ "rand 0.8.4",
"sc-authority-discovery",
"sc-chain-spec",
"sc-cli",
@@ -8498,14 +7682,14 @@
[[package]]
name = "polling"
-version = "2.0.3"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fc12d774e799ee9ebae13f4076ca003b40d18a11ac0f3641e6f899618580b7b"
+checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25"
dependencies = [
"cfg-if 1.0.0",
"libc",
"log",
- "wepoll-sys",
+ "wepoll-ffi",
"winapi 0.3.9",
]
@@ -8555,15 +7739,9 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace"
dependencies = [
-<<<<<<< HEAD
"fixed-hash 0.7.0",
"impl-codec 0.5.0",
"impl-rlp 0.3.0",
-=======
- "fixed-hash",
- "impl-codec",
- "impl-rlp",
->>>>>>> origin/develop
"impl-serde",
"uint 0.9.0",
]
@@ -8625,9 +7803,9 @@
[[package]]
name = "proc-macro2"
-version = "1.0.26"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
+checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
dependencies = [
"unicode-xid",
]
@@ -8671,11 +7849,7 @@
"prost",
"prost-types",
"tempfile",
-<<<<<<< HEAD
"which",
-=======
- "which 4.1.0",
->>>>>>> origin/develop
]
[[package]]
@@ -8703,9 +7877,9 @@
[[package]]
name = "psm"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3abf49e5417290756acfd26501536358560c4a5cc4a0934d390939acb3e7083a"
+checksum = "21ff0279b4a85e576b97e4a21d13e437ebcd56612706cde5d3f0d5c9399490c0"
dependencies = [
"cc",
]
@@ -8815,14 +7989,14 @@
[[package]]
name = "rand"
-version = "0.8.3"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
+checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
dependencies = [
"libc",
- "rand_chacha 0.3.0",
- "rand_core 0.6.2",
- "rand_hc 0.3.0",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.3",
+ "rand_hc 0.3.1",
]
[[package]]
@@ -8837,12 +8011,12 @@
[[package]]
name = "rand_chacha"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
- "rand_core 0.6.2",
+ "rand_core 0.6.3",
]
[[package]]
@@ -8871,20 +8045,21 @@
[[package]]
name = "rand_core"
-version = "0.6.2"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
+checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
- "getrandom 0.2.2",
+ "getrandom 0.2.3",
]
[[package]]
name = "rand_distr"
-version = "0.2.2"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2"
+checksum = "051b398806e42b9cd04ad9ec8f81e355d0a382c543ac6672c62f5a5b452ef142"
dependencies = [
- "rand 0.7.3",
+ "num-traits",
+ "rand 0.8.4",
]
[[package]]
@@ -8898,11 +8073,11 @@
[[package]]
name = "rand_hc"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
+checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
dependencies = [
- "rand_core 0.6.2",
+ "rand_core 0.6.3",
]
[[package]]
@@ -8922,9 +8097,9 @@
[[package]]
name = "rayon"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
+checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90"
dependencies = [
"autocfg",
"crossbeam-deque 0.8.0",
@@ -8934,17 +8109,13 @@
[[package]]
name = "rayon-core"
-version = "1.9.0"
+version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
+checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e"
dependencies = [
"crossbeam-channel",
"crossbeam-deque 0.8.0",
-<<<<<<< HEAD
- "crossbeam-utils 0.8.4",
-=======
- "crossbeam-utils 0.8.3",
->>>>>>> origin/develop
+ "crossbeam-utils 0.8.5",
"lazy_static",
"num_cpus",
]
@@ -8963,24 +8134,12 @@
version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
-<<<<<<< HEAD
-=======
[[package]]
name = "redox_syscall"
-version = "0.2.6"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8270314b5ccceb518e7e578952f0b72b88222d02e8f77f5ecf7abbb673539041"
-dependencies = [
- "bitflags",
-]
->>>>>>> origin/develop
-
-[[package]]
-name = "redox_syscall"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
+checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee"
dependencies = [
"bitflags",
]
@@ -8991,11 +8150,8 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
- "getrandom 0.2.2",
-<<<<<<< HEAD
- "redox_syscall 0.2.8",
-=======
- "redox_syscall 0.2.6",
+ "getrandom 0.2.3",
+ "redox_syscall 0.2.9",
]
[[package]]
@@ -9006,10 +8162,9 @@
dependencies = [
"derive_more",
"fs-err",
- "itertools 0.10.0",
+ "itertools 0.10.1",
"static_init",
"thiserror",
->>>>>>> origin/develop
]
[[package]]
@@ -9046,15 +8201,9 @@
[[package]]
name = "regex"
-<<<<<<< HEAD
version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
-=======
-version = "1.4.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19"
->>>>>>> origin/develop
dependencies = [
"aho-corasick",
"memchr",
@@ -9063,25 +8212,18 @@
[[package]]
name = "regex-automata"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
dependencies = [
- "byteorder",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
-<<<<<<< HEAD
version = "0.6.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
-=======
-version = "0.6.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548"
->>>>>>> origin/develop
[[package]]
name = "region"
@@ -9100,12 +8242,12 @@
version = "0.9.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "env_logger 0.8.3",
+ "env_logger 0.8.4",
"hex-literal",
"jsonrpsee-http-client",
"jsonrpsee-proc-macros",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -9153,7 +8295,6 @@
[[package]]
name = "rlp"
-<<<<<<< HEAD
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1190dcc8c3a512f1eef5d09bb8c84c7f39e1054e174d1795482e18f5272f2e73"
@@ -9163,8 +8304,6 @@
[[package]]
name = "rlp"
-=======
->>>>>>> origin/develop
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e54369147e3e7796c9b885c7304db87ca3d09a0a98f72843d532868675bbfba8"
@@ -9174,7 +8313,6 @@
]
[[package]]
-<<<<<<< HEAD
name = "rlp-derive"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9186,8 +8324,6 @@
]
[[package]]
-=======
->>>>>>> origin/develop
name = "rocksdb"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9235,7 +8371,7 @@
"pallet-transaction-payment-rpc-runtime-api",
"pallet-utility",
"pallet-xcm",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"polkadot-primitives",
"polkadot-runtime-common",
@@ -9274,21 +8410,6 @@
]
[[package]]
-<<<<<<< HEAD
-=======
-name = "rust-argon2"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
-dependencies = [
- "base64 0.13.0",
- "blake2b_simd",
- "constant_time_eq",
- "crossbeam-utils 0.8.3",
-]
-
-[[package]]
->>>>>>> origin/develop
name = "rustc-demangle"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9369,11 +8490,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"pin-project 0.4.28",
"static_assertions",
]
@@ -9419,12 +8536,12 @@
"async-trait",
"derive_more",
"either",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"ip_network",
"libp2p",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"prost",
"prost-build",
"rand 0.7.3",
@@ -9443,18 +8560,12 @@
[[package]]
name = "sc-basic-authorship"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-timer 3.0.2",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sc-block-builder",
"sc-client-api",
"sc-proposer-metrics",
@@ -9472,13 +8583,9 @@
[[package]]
name = "sc-block-builder"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sp-api",
"sp-block-builder",
@@ -9492,14 +8599,10 @@
[[package]]
name = "sc-chain-spec"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"impl-trait-for-tuples 0.2.1",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sc-chain-spec-derive",
"sc-consensus-babe",
"sc-consensus-epochs",
@@ -9517,11 +8620,7 @@
[[package]]
name = "sc-chain-spec-derive"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"proc-macro-crate 1.0.0",
"proc-macro2",
@@ -9532,24 +8631,16 @@
[[package]]
name = "sc-cli"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"chrono",
"fdlimit",
"futures 0.3.15",
-=======
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
-dependencies = [
- "chrono",
- "fdlimit",
- "futures 0.3.14",
->>>>>>> origin/develop
"hex",
"libp2p",
"log",
"names",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"rand 0.7.3",
"regex",
"rpassword",
@@ -9578,24 +8669,16 @@
[[package]]
name = "sc-client-api"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "derive_more",
- "fnv",
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"derive_more",
"fnv",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"hash-db",
"kvdb",
"lazy_static",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sc-executor",
"sp-api",
@@ -9620,11 +8703,7 @@
[[package]]
name = "sc-client-db"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"blake2-rfc",
"hash-db",
@@ -9634,7 +8713,7 @@
"linked-hash-map",
"log",
"parity-db",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
"sc-client-api",
@@ -9654,11 +8733,7 @@
[[package]]
name = "sc-consensus"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"parking_lot 0.11.1",
"sc-client-api",
@@ -9670,26 +8745,14 @@
[[package]]
name = "sc-consensus-aura"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"async-trait",
"derive_more",
-<<<<<<< HEAD
"futures 0.3.15",
"futures-timer 3.0.2",
"log",
- "parity-scale-codec 2.1.1",
- "parking_lot 0.11.1",
-=======
- "futures 0.3.14",
- "futures-timer 3.0.2",
- "log",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sc-block-builder",
"sc-client-api",
"sc-consensus-slots",
@@ -9713,27 +8776,19 @@
[[package]]
name = "sc-consensus-babe"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"async-trait",
"derive_more",
"fork-tree",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 3.0.2",
"log",
"merlin",
"num-bigint",
"num-rational 0.2.4",
"num-traits",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"pdqselect",
"rand 0.7.3",
@@ -9770,10 +8825,10 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"derive_more",
- "futures 0.3.14",
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
+ "futures 0.3.15",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
"sc-consensus-babe",
"sc-consensus-epochs",
"sc-rpc-api",
@@ -9791,18 +8846,10 @@
[[package]]
name = "sc-consensus-epochs"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "fork-tree",
- "parity-scale-codec 2.1.1",
- "parking_lot 0.11.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"fork-tree",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-consensus",
"sp-blockchain",
@@ -9812,25 +8859,14 @@
[[package]]
name = "sc-consensus-slots"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-timer 3.0.2",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"log",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
- "parking_lot 0.11.1",
-=======
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-telemetry",
"sp-api",
@@ -9851,11 +8887,7 @@
[[package]]
name = "sc-consensus-uncles"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"sc-client-api",
"sp-authorship",
@@ -9866,17 +8898,13 @@
[[package]]
name = "sc-executor"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"derive_more",
"lazy_static",
"libsecp256k1",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-wasm 0.41.0",
"parking_lot 0.11.1",
"sc-executor-common",
@@ -9899,14 +8927,10 @@
[[package]]
name = "sc-executor-common"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"derive_more",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-wasm 0.41.0",
"pwasm-utils 0.14.0",
"sp-allocator",
@@ -9921,14 +8945,10 @@
[[package]]
name = "sc-executor-wasmi"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sc-executor-common",
"sp-allocator",
"sp-core",
@@ -9940,14 +8960,10 @@
[[package]]
name = "sc-executor-wasmtime"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-wasm 0.41.0",
"pwasm-utils 0.14.0",
"sc-executor-common",
@@ -9962,33 +8978,20 @@
[[package]]
name = "sc-finality-grandpa"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"async-trait",
"derive_more",
"dyn-clone",
"finality-grandpa",
"fork-tree",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 3.0.2",
"linked-hash-map",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
-<<<<<<< HEAD
"pin-project 1.0.7",
- "rand 0.7.3",
- "sc-block-builder",
-=======
- "pin-project 1.0.6",
"rand 0.7.3",
"sc-block-builder",
"sc-client-api",
@@ -10019,13 +9022,13 @@
dependencies = [
"derive_more",
"finality-grandpa",
- "futures 0.3.14",
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
- "jsonrpc-pubsub",
+ "futures 0.3.15",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
+ "jsonrpc-pubsub 15.1.0",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-finality-grandpa",
"sc-rpc",
@@ -10042,13 +9045,12 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"log",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"prost",
->>>>>>> origin/develop
"sc-client-api",
"sc-finality-grandpa",
"sc-network",
@@ -10061,17 +9063,10 @@
[[package]]
name = "sc-informant"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "ansi_term 0.12.1",
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"ansi_term 0.12.1",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"log",
"parity-util-mem",
"sc-client-api",
@@ -10086,19 +9081,11 @@
[[package]]
name = "sc-keystore"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "async-trait",
- "derive_more",
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-util",
"hex",
"merlin",
@@ -10114,15 +9101,11 @@
[[package]]
name = "sc-light"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"hash-db",
"lazy_static",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sc-client-api",
"sc-executor",
@@ -10137,11 +9120,7 @@
[[package]]
name = "sc-network"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"async-std",
"async-trait",
@@ -10155,11 +9134,7 @@
"erased-serde",
"fnv",
"fork-tree",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 3.0.2",
"hex",
"ip_network",
@@ -10169,13 +9144,9 @@
"log",
"lru",
"nohash-hasher",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
-<<<<<<< HEAD
"pin-project 1.0.7",
-=======
- "pin-project 1.0.6",
->>>>>>> origin/develop
"prost",
"prost-build",
"rand 0.7.3",
@@ -10202,15 +9173,9 @@
[[package]]
name = "sc-network-gossip"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-timer 3.0.2",
"libp2p",
"log",
@@ -10225,26 +9190,18 @@
[[package]]
name = "sc-offchain"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "bytes 0.5.6",
- "fnv",
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"bytes 0.5.6",
"fnv",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-timer 3.0.2",
"hex",
"hyper 0.13.10",
"hyper-rustls",
"log",
"num_cpus",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"rand 0.7.3",
"sc-client-api",
@@ -10261,15 +9218,9 @@
[[package]]
name = "sc-peerset"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"futures 0.3.15",
-=======
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
-dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
"libp2p",
"log",
"serde_json",
@@ -10280,11 +9231,7 @@
[[package]]
name = "sc-proposer-metrics"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"log",
"substrate-prometheus-endpoint",
@@ -10293,20 +9240,14 @@
[[package]]
name = "sc-rpc"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"hash-db",
"jsonrpc-core 15.1.0",
"jsonrpc-pubsub 15.1.0",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sc-block-builder",
"sc-client-api",
@@ -10334,8 +9275,7 @@
[[package]]
name = "sc-rpc-api"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"derive_more",
"futures 0.3.15",
@@ -10343,18 +9283,8 @@
"jsonrpc-core-client 15.1.0",
"jsonrpc-derive 15.1.0",
"jsonrpc-pubsub 15.1.0",
-=======
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
-dependencies = [
- "derive_more",
- "futures 0.3.14",
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
- "jsonrpc-pubsub",
->>>>>>> origin/develop
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"serde",
"serde_json",
@@ -10370,17 +9300,10 @@
[[package]]
name = "sc-rpc-server"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.1.31",
- "jsonrpc-core 15.1.0",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"futures 0.1.31",
- "jsonrpc-core",
->>>>>>> origin/develop
+ "jsonrpc-core 15.1.0",
"jsonrpc-http-server",
"jsonrpc-ipc-server",
"jsonrpc-pubsub 15.1.0",
@@ -10395,35 +9318,23 @@
[[package]]
name = "sc-service"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"async-trait",
"directories",
"exit-future",
"futures 0.1.31",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"futures-timer 3.0.2",
"hash-db",
"jsonrpc-core 15.1.0",
"jsonrpc-pubsub 15.1.0",
"lazy_static",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
-<<<<<<< HEAD
"pin-project 1.0.7",
-=======
- "pin-project 1.0.6",
->>>>>>> origin/develop
"rand 0.7.3",
"sc-block-builder",
"sc-chain-spec",
@@ -10471,14 +9382,10 @@
[[package]]
name = "sc-state-db"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parity-util-mem-derive",
"parking_lot 0.11.1",
@@ -10492,9 +9399,9 @@
version = "0.9.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
"sc-chain-spec",
"sc-client-api",
"sc-consensus-babe",
@@ -10510,8 +9417,7 @@
[[package]]
name = "sc-telemetry"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"chrono",
"futures 0.3.15",
@@ -10519,16 +9425,6 @@
"log",
"parking_lot 0.11.1",
"pin-project 1.0.7",
-=======
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
-dependencies = [
- "chrono",
- "futures 0.3.14",
- "libp2p",
- "log",
- "parking_lot 0.11.1",
- "pin-project 1.0.6",
->>>>>>> origin/develop
"rand 0.7.3",
"serde",
"serde_json",
@@ -10541,11 +9437,7 @@
[[package]]
name = "sc-tracing"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"ansi_term 0.12.1",
"atty",
@@ -10556,12 +9448,9 @@
"parking_lot 0.11.1",
"regex",
"rustc-hash",
-<<<<<<< HEAD
-=======
"sc-client-api",
"sc-rpc-server",
"sc-telemetry",
->>>>>>> origin/develop
"sc-tracing-proc-macro",
"serde",
"serde_json",
@@ -10585,11 +9474,7 @@
[[package]]
name = "sc-tracing-proc-macro"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"proc-macro-crate 1.0.0",
"proc-macro2",
@@ -10600,17 +9485,10 @@
[[package]]
name = "sc-transaction-graph"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "derive_more",
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"derive_more",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"linked-hash-map",
"log",
"parity-util-mem",
@@ -10629,19 +9507,13 @@
[[package]]
name = "sc-transaction-pool"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-diagnose",
"intervalier",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
"sc-client-api",
@@ -10824,30 +9696,18 @@
[[package]]
name = "serde"
-<<<<<<< HEAD
version = "1.0.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
-=======
-version = "1.0.125"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171"
->>>>>>> origin/develop
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-<<<<<<< HEAD
version = "1.0.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
-=======
-version = "1.0.125"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d"
->>>>>>> origin/develop
dependencies = [
"proc-macro2",
"quote",
@@ -10879,15 +9739,9 @@
[[package]]
name = "sha-1"
-<<<<<<< HEAD
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16"
-=======
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfebf75d25bd900fd1e7d11501efab59bc846dbc76196839663e6637bba9f25f"
->>>>>>> origin/develop
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
@@ -10963,9 +9817,9 @@
[[package]]
name = "signal-hook"
-version = "0.3.8"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef33d6d0cd06e0840fba9985aab098c147e67e05cee14d412d3345ed14ff30ac"
+checksum = "470c5a6397076fae0094aaf06a08e6ba6f37acb77d3b1b91ea92b4d6c8650c39"
dependencies = [
"libc",
"signal-hook-registry",
@@ -10973,9 +9827,9 @@
[[package]]
name = "signal-hook-registry"
-version = "1.3.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6"
+checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
dependencies = [
"libc",
]
@@ -10999,6 +9853,18 @@
]
[[package]]
+name = "simba"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c"
+dependencies = [
+ "approx 0.5.0",
+ "num-complex 0.4.0",
+ "num-traits",
+ "paste",
+]
+
+[[package]]
name = "slab"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11019,7 +9885,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"enumn",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"paste",
"sp-runtime",
"sp-std",
@@ -11097,29 +9963,17 @@
"base64 0.12.3",
"bytes 0.5.6",
"flate2",
-<<<<<<< HEAD
"futures 0.3.15",
"httparse",
"log",
"rand 0.7.3",
"sha-1 0.9.6",
-=======
- "futures 0.3.14",
- "httparse",
- "log",
- "rand 0.7.3",
- "sha-1 0.9.4",
->>>>>>> origin/develop
]
[[package]]
name = "sp-allocator"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"log",
"sp-core",
@@ -11131,19 +9985,11 @@
[[package]]
name = "sp-api"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "hash-db",
- "log",
- "parity-scale-codec 2.1.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"hash-db",
"log",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-api-proc-macro",
"sp-core",
"sp-runtime",
@@ -11156,11 +10002,7 @@
[[package]]
name = "sp-api-proc-macro"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"blake2-rfc",
"proc-macro-crate 1.0.0",
@@ -11172,13 +10014,9 @@
[[package]]
name = "sp-application-crypto"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -11188,15 +10026,11 @@
[[package]]
name = "sp-arithmetic"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"integer-sqrt",
"num-traits",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-debug-derive",
"sp-std",
@@ -11208,7 +10042,7 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-application-crypto",
"sp-runtime",
@@ -11218,16 +10052,10 @@
[[package]]
name = "sp-authorship"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "parity-scale-codec 2.1.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-inherents",
"sp-runtime",
"sp-std",
@@ -11236,13 +10064,9 @@
[[package]]
name = "sp-block-builder"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-inherents",
"sp-runtime",
@@ -11252,18 +10076,12 @@
[[package]]
name = "sp-blockchain"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"log",
"lru",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sp-api",
"sp-consensus",
@@ -11276,11 +10094,7 @@
[[package]]
name = "sp-chain-spec"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"serde",
"serde_json",
@@ -11289,20 +10103,14 @@
[[package]]
name = "sp-consensus"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-timer 3.0.2",
"libp2p",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"serde",
"sp-api",
@@ -11322,16 +10130,10 @@
[[package]]
name = "sp-consensus-aura"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "parity-scale-codec 2.1.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-application-crypto",
"sp-consensus",
@@ -11345,19 +10147,11 @@
[[package]]
name = "sp-consensus-babe"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"async-trait",
"merlin",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
-=======
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-application-crypto",
@@ -11375,13 +10169,9 @@
[[package]]
name = "sp-consensus-slots"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
"sp-runtime",
]
@@ -11389,13 +10179,9 @@
[[package]]
name = "sp-consensus-vrf"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"schnorrkel",
"sp-core",
"sp-runtime",
@@ -11405,22 +10191,14 @@
[[package]]
name = "sp-core"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"base58",
"blake2-rfc",
"byteorder",
"dyn-clonable",
"ed25519-dalek",
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"hash-db",
"hash256-std-hasher",
"hex",
@@ -11430,7 +10208,7 @@
"log",
"merlin",
"num-traits",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
"primitive-types 0.9.0",
@@ -11457,11 +10235,7 @@
[[package]]
name = "sp-database"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"kvdb",
"parking_lot 0.11.1",
@@ -11470,11 +10244,7 @@
[[package]]
name = "sp-debug-derive"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"proc-macro2",
"quote",
@@ -11484,14 +10254,10 @@
[[package]]
name = "sp-externalities"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"environmental",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-std",
"sp-storage",
]
@@ -11499,15 +10265,11 @@
[[package]]
name = "sp-finality-grandpa"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"finality-grandpa",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-application-crypto",
@@ -11520,18 +10282,11 @@
[[package]]
name = "sp-inherents"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "parity-scale-codec 2.1.1",
- "parking_lot 0.11.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "impl-trait-for-tuples",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-runtime",
"sp-std",
@@ -11541,19 +10296,13 @@
[[package]]
name = "sp-io"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"futures 0.3.15",
-=======
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
-dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
"hash-db",
"libsecp256k1",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sp-core",
"sp-externalities",
@@ -11572,11 +10321,7 @@
[[package]]
name = "sp-keyring"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"lazy_static",
"sp-core",
@@ -11587,21 +10332,13 @@
[[package]]
name = "sp-keystore"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "async-trait",
- "derive_more",
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"merlin",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"schnorrkel",
"serde",
@@ -11623,7 +10360,7 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-arithmetic",
"sp-core",
@@ -11645,11 +10382,7 @@
[[package]]
name = "sp-offchain"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"sp-api",
"sp-core",
@@ -11659,11 +10392,7 @@
[[package]]
name = "sp-panic-handler"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"backtrace",
]
@@ -11671,11 +10400,7 @@
[[package]]
name = "sp-rpc"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"rustc-hash",
"serde",
@@ -11686,17 +10411,13 @@
[[package]]
name = "sp-runtime"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"either",
"hash256-std-hasher",
"impl-trait-for-tuples 0.2.1",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"paste",
"rand 0.7.3",
@@ -11711,14 +10432,10 @@
[[package]]
name = "sp-runtime-interface"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"impl-trait-for-tuples 0.2.1",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"primitive-types 0.9.0",
"sp-externalities",
"sp-runtime-interface-proc-macro",
@@ -11732,11 +10449,7 @@
[[package]]
name = "sp-runtime-interface-proc-macro"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"Inflector",
"proc-macro-crate 1.0.0",
@@ -11748,13 +10461,9 @@
[[package]]
name = "sp-sandbox"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-std",
@@ -11765,11 +10474,7 @@
[[package]]
name = "sp-serializer"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"serde",
"serde_json",
@@ -11778,13 +10483,9 @@
[[package]]
name = "sp-session"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-core",
"sp-runtime",
@@ -11795,13 +10496,9 @@
[[package]]
name = "sp-staking"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-runtime",
"sp-std",
]
@@ -11809,16 +10506,12 @@
[[package]]
name = "sp-state-machine"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"hash-db",
"log",
"num-traits",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"rand 0.7.3",
"smallvec 1.6.1",
@@ -11836,23 +10529,15 @@
[[package]]
name = "sp-std"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
[[package]]
name = "sp-storage"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"impl-serde",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"ref-cast",
"serde",
"sp-debug-derive",
@@ -11862,11 +10547,7 @@
[[package]]
name = "sp-tasks"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"log",
"sp-core",
@@ -11879,18 +10560,12 @@
[[package]]
name = "sp-timestamp"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "parity-scale-codec 2.1.1",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
"futures-timer 3.0.2",
"log",
- "parity-scale-codec",
->>>>>>> origin/develop
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-inherents",
"sp-runtime",
@@ -11902,23 +10577,15 @@
[[package]]
name = "sp-tracing"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"erased-serde",
"log",
-<<<<<<< HEAD
- "parity-scale-codec 2.1.1",
-=======
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"serde",
"serde_json",
"slog",
->>>>>>> origin/develop
"sp-std",
"tracing",
"tracing-core",
@@ -11928,19 +10595,12 @@
[[package]]
name = "sp-transaction-pool"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "derive_more",
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"derive_more",
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-blockchain",
@@ -11951,15 +10611,11 @@
[[package]]
name = "sp-trie"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"hash-db",
"memory-db",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-std",
"trie-db",
@@ -11969,15 +10625,9 @@
[[package]]
name = "sp-utils"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-dependencies = [
- "futures 0.3.15",
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"futures-core",
"futures-timer 3.0.2",
"lazy_static",
@@ -11987,14 +10637,10 @@
[[package]]
name = "sp-version"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"impl-serde",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -12006,7 +10652,7 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"proc-macro-crate 1.0.0",
"proc-macro2",
"quote",
@@ -12016,14 +10662,10 @@
[[package]]
name = "sp-wasm-interface"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"impl-trait-for-tuples 0.2.1",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sp-std",
"wasmi",
]
@@ -12073,12 +10715,15 @@
[[package]]
name = "statrs"
-version = "0.13.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e34b58a8f9b7462b6922e0b4e3c83d1b3c2075f7f996a56d6c66afa81590064"
+checksum = "1e0c1f144861fbfd2a8cc82d564ccbf7fb3b7834d4fa128b84e9c2a73371aead"
dependencies = [
- "nalgebra 0.19.0",
- "rand 0.7.3",
+ "approx 0.4.0",
+ "lazy_static",
+ "nalgebra 0.26.2",
+ "num-traits",
+ "rand 0.8.4",
]
[[package]]
@@ -12193,25 +10838,15 @@
[[package]]
name = "substrate-frame-rpc-system"
version = "3.0.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-system-rpc-runtime-api",
"futures 0.3.15",
"jsonrpc-core 15.1.0",
"jsonrpc-core-client 15.1.0",
"jsonrpc-derive 15.1.0",
-=======
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
-dependencies = [
- "frame-system-rpc-runtime-api",
- "futures 0.3.14",
- "jsonrpc-core",
- "jsonrpc-core-client",
- "jsonrpc-derive",
->>>>>>> origin/develop
"log",
- "parity-scale-codec 2.1.1",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-rpc-api",
"serde",
@@ -12226,11 +10861,7 @@
[[package]]
name = "substrate-prometheus-endpoint"
version = "0.9.0"
-<<<<<<< HEAD
-source = "git+https://github.com/paritytech/substrate.git?branch=frontier#39b31316815ec6d709e7ad7c1a31c436d14c53e6"
-=======
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
->>>>>>> origin/develop
dependencies = [
"async-std",
"derive_more",
@@ -12248,10 +10879,10 @@
dependencies = [
"async-trait",
"futures 0.1.31",
- "futures 0.3.14",
+ "futures 0.3.15",
"hash-db",
"hex",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-client-db",
"sc-consensus",
@@ -12275,7 +10906,7 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"substrate-test-utils-derive",
"tokio 0.2.25",
]
@@ -12336,15 +10967,9 @@
[[package]]
name = "syn"
-<<<<<<< HEAD
-version = "1.0.72"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
-=======
-version = "1.0.69"
+version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48fe99c6bd8b1cc636890bcc071842de909d902c81ac7dab53ba33c421ab8ffb"
->>>>>>> origin/develop
+checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
dependencies = [
"proc-macro2",
"quote",
@@ -12389,12 +11014,8 @@
dependencies = [
"cfg-if 1.0.0",
"libc",
- "rand 0.8.3",
-<<<<<<< HEAD
- "redox_syscall 0.2.8",
-=======
- "redox_syscall 0.2.6",
->>>>>>> origin/develop
+ "rand 0.8.4",
+ "redox_syscall 0.2.9",
"remove_dir_all",
"winapi 0.3.9",
]
@@ -12419,18 +11040,18 @@
[[package]]
name = "thiserror"
-version = "1.0.24"
+version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
+checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.24"
+version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
+checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d"
dependencies = [
"proc-macro2",
"quote",
@@ -12813,15 +11434,9 @@
[[package]]
name = "tracing"
-<<<<<<< HEAD
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
-=======
-version = "0.1.25"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f"
->>>>>>> origin/develop
dependencies = [
"cfg-if 1.0.0",
"log",
@@ -12856,11 +11471,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
dependencies = [
-<<<<<<< HEAD
"pin-project 1.0.7",
-=======
- "pin-project 1.0.6",
->>>>>>> origin/develop
"tracing",
]
@@ -12887,15 +11498,9 @@
[[package]]
name = "tracing-subscriber"
-<<<<<<< HEAD
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa5553bf0883ba7c9cbe493b085c29926bd41b66afc31ff72cf17ff4fb60dcd5"
-=======
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "705096c6f83bf68ea5d357a6aa01829ddbdac531b357b45abeca842938085baa"
->>>>>>> origin/develop
dependencies = [
"ansi_term 0.12.1",
"chrono",
@@ -12915,9 +11520,9 @@
[[package]]
name = "trie-db"
-version = "0.22.3"
+version = "0.22.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec051edf7f0fc9499a2cb0947652cab2148b9d7f61cee7605e312e9f970dacaf"
+checksum = "cd81fe0c8bc2b528a51c9d2c31dae4483367a26a723a3c9a4a8120311d7774e3"
dependencies = [
"hash-db",
"hashbrown",
@@ -12936,7 +11541,6 @@
]
[[package]]
-<<<<<<< HEAD
name = "triehash"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -12944,11 +11548,13 @@
dependencies = [
"hash-db",
"rlp 0.5.0",
-=======
+]
+
+[[package]]
name = "trust-dns-proto"
-version = "0.20.1"
+version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d57e219ba600dd96c2f6d82eb79645068e14edbc5c7e27514af40436b88150c"
+checksum = "ad0d7f5db438199a6e2609debe3f69f808d074e0a2888ee0bccb45fe234d03f4"
dependencies = [
"async-trait",
"cfg-if 1.0.0",
@@ -12957,22 +11563,22 @@
"futures-channel",
"futures-io",
"futures-util",
- "idna 0.2.2",
+ "idna 0.2.3",
"ipnet",
"lazy_static",
"log",
- "rand 0.8.3",
+ "rand 0.8.4",
"smallvec 1.6.1",
"thiserror",
"tinyvec",
- "url 2.2.1",
+ "url 2.2.2",
]
[[package]]
name = "trust-dns-resolver"
-version = "0.20.1"
+version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0437eea3a6da51acc1e946545ff53d5b8fb2611ff1c3bed58522dde100536ae"
+checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770"
dependencies = [
"cfg-if 1.0.0",
"futures-util",
@@ -12985,7 +11591,6 @@
"smallvec 1.6.1",
"thiserror",
"trust-dns-proto",
->>>>>>> origin/develop
]
[[package]]
@@ -13001,7 +11606,7 @@
dependencies = [
"frame-try-runtime",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"remote-externalities",
"sc-cli",
"sc-client-api",
@@ -13023,7 +11628,7 @@
checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
dependencies = [
"cfg-if 0.1.10",
- "rand 0.3.23",
+ "rand 0.7.3",
"static_assertions",
]
@@ -13083,9 +11688,9 @@
[[package]]
name = "unicode-normalization"
-version = "0.1.17"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
+checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
dependencies = [
"tinyvec",
]
@@ -13167,21 +11772,12 @@
[[package]]
name = "url"
-<<<<<<< HEAD
version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
dependencies = [
"form_urlencoded",
"idna 0.2.3",
-=======
-version = "2.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b"
-dependencies = [
- "form_urlencoded",
- "idna 0.2.2",
->>>>>>> origin/develop
"matches",
"percent-encoding 2.1.0",
]
@@ -13198,21 +11794,9 @@
[[package]]
name = "vcpkg"
-<<<<<<< HEAD
-version = "0.2.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d"
-=======
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
-
-[[package]]
-name = "vec-arena"
-version = "1.1.0"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34b2f665b594b07095e3ac3f718e13c2197143416fae4c5706cffb7b1af8d7f1"
->>>>>>> origin/develop
+checksum = "70455df2fdf4e9bf580a92e443f1eb0303c390d682e2ea817312c9e81f8c3399"
[[package]]
name = "vec_map"
@@ -13284,15 +11868,9 @@
[[package]]
name = "wasm-bindgen"
-<<<<<<< HEAD
version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd"
-=======
-version = "0.2.73"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9"
->>>>>>> origin/develop
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen-macro",
@@ -13300,15 +11878,9 @@
[[package]]
name = "wasm-bindgen-backend"
-<<<<<<< HEAD
version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900"
-=======
-version = "0.2.73"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae"
->>>>>>> origin/develop
dependencies = [
"bumpalo",
"lazy_static",
@@ -13321,15 +11893,9 @@
[[package]]
name = "wasm-bindgen-futures"
-<<<<<<< HEAD
version = "0.4.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1"
-=======
-version = "0.4.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81b8b767af23de6ac18bf2168b690bed2902743ddf0fb39252e36f9e2bfc63ea"
->>>>>>> origin/develop
dependencies = [
"cfg-if 1.0.0",
"js-sys",
@@ -13339,15 +11905,9 @@
[[package]]
name = "wasm-bindgen-macro"
-<<<<<<< HEAD
version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4"
-=======
-version = "0.2.73"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f"
->>>>>>> origin/develop
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -13355,15 +11915,9 @@
[[package]]
name = "wasm-bindgen-macro-support"
-<<<<<<< HEAD
version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97"
-=======
-version = "0.2.73"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c"
->>>>>>> origin/develop
dependencies = [
"proc-macro2",
"quote",
@@ -13374,15 +11928,9 @@
[[package]]
name = "wasm-bindgen-shared"
-<<<<<<< HEAD
version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f"
-=======
-version = "0.2.73"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489"
->>>>>>> origin/develop
[[package]]
name = "wasm-gc-api"
@@ -13401,11 +11949,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
dependencies = [
-<<<<<<< HEAD
"futures 0.3.15",
-=======
- "futures 0.3.14",
->>>>>>> origin/develop
"js-sys",
"parking_lot 0.11.1",
"pin-utils",
@@ -13527,7 +12071,7 @@
"anyhow",
"gimli 0.23.0",
"more-asserts",
- "object",
+ "object 0.23.0",
"target-lexicon",
"thiserror",
"wasmparser",
@@ -13582,7 +12126,7 @@
"gimli 0.23.0",
"log",
"more-asserts",
- "object",
+ "object 0.23.0",
"rayon",
"region",
"serde",
@@ -13606,7 +12150,7 @@
dependencies = [
"anyhow",
"more-asserts",
- "object",
+ "object 0.23.0",
"target-lexicon",
"wasmtime-debug",
"wasmtime-environ",
@@ -13623,7 +12167,7 @@
"gimli 0.23.0",
"lazy_static",
"libc",
- "object",
+ "object 0.23.0",
"scroll",
"serde",
"target-lexicon",
@@ -13644,7 +12188,7 @@
"lazy_static",
"libc",
"log",
- "memoffset 0.6.3",
+ "memoffset 0.6.4",
"more-asserts",
"psm",
"region",
@@ -13655,33 +12199,27 @@
[[package]]
name = "wast"
-version = "35.0.2"
+version = "36.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68"
+checksum = "8b5d7ba374a364571da1cb0a379a3dc302582a2d9937a183bfe35b68ad5bb9c4"
dependencies = [
"leb128",
]
[[package]]
name = "wat"
-version = "1.0.37"
+version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ec280a739b69173e0ffd12c1658507996836ba4e992ed9bc1e5385a0bd72a02"
+checksum = "16383df7f0e3901484c2dda6294ed6895caa3627ce4f6584141dcf30a33a23e6"
dependencies = [
"wast",
]
[[package]]
name = "web-sys"
-<<<<<<< HEAD
version = "0.3.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582"
-=======
-version = "0.3.50"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be"
->>>>>>> origin/develop
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -13707,10 +12245,10 @@
]
[[package]]
-name = "wepoll-sys"
-version = "3.0.1"
+name = "wepoll-ffi"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff"
+checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
dependencies = [
"cc",
]
@@ -13721,7 +12259,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"beefy-primitives",
- "bitvec",
+ "bitvec 0.20.4",
"frame-executive",
"frame-support",
"frame-system",
@@ -13761,7 +12299,7 @@
"pallet-utility",
"pallet-vesting",
"pallet-xcm",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"polkadot-primitives",
"polkadot-runtime-common",
@@ -13794,18 +12332,6 @@
[[package]]
name = "which"
-<<<<<<< HEAD
-=======
-version = "3.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "which"
->>>>>>> origin/develop
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe"
@@ -13905,8 +12431,8 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"derivative",
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
]
[[package]]
@@ -13916,9 +12442,9 @@
dependencies = [
"frame-support",
"frame-system",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"pallet-transaction-payment",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"sp-arithmetic",
"sp-io",
@@ -13934,9 +12460,9 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.3#aa386760948574af4078c59decf558d16efe15e2"
dependencies = [
"frame-support",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
"sp-core",
"sp-io",
@@ -13947,23 +12473,15 @@
[[package]]
name = "yamux"
-<<<<<<< HEAD
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cc7bd8c983209ed5d527f44b01c41b7dc146fd960c61cf9e1d25399841dc271"
-dependencies = [
- "futures 0.3.15",
-=======
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107"
dependencies = [
- "futures 0.3.14",
->>>>>>> origin/develop
+ "futures 0.3.15",
"log",
"nohash-hasher",
"parking_lot 0.11.1",
- "rand 0.8.3",
+ "rand 0.8.4",
"static_assertions",
]
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,13 +1,12 @@
[workspace]
resolver = "2"
members = [
- 'node',
+ 'node/*',
'pallets/*',
'primitives',
'runtime',
'crates/evm-coder',
'crates/evm-coder-macros',
]
-resolver = "2"
[profile.release]
panic = 'unwind'
node/Cargo.tomldiffbeforeafterboth--- a/node/Cargo.toml
+++ /dev/null
@@ -1,329 +0,0 @@
-################################################################################
-# Build Dependencies
-
-[build-dependencies.substrate-build-script-utils]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-################################################################################
-# Substrate Dependecies
-
-[dependencies.codec]
-default-features = false
-features = ['derive']
-package = 'parity-scale-codec'
-version = '2.0.0'
-
-[dependencies.frame-benchmarking]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.frame-benchmarking-cli]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.pallet-transaction-payment-rpc]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.substrate-prometheus-endpoint]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-basic-authorship]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-chain-spec]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sc-cli]
-features = ['wasmtime']
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-client-api]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sc-consensus]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-consensus-aura]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-executor]
-features = ['wasmtime']
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-finality-grandpa]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-keystore]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sc-rpc]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sc-rpc-api]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-service]
-features = ['wasmtime']
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sc-telemetry]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sc-transaction-pool]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sc-tracing]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-block-builder]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-api]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-blockchain]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-consensus]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sp-consensus-aura]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sp-core]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-finality-grandpa]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-inherents]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-keystore]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.sp-offchain]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-runtime]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-session]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-timestamp]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-transaction-pool]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.sp-trie]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.substrate-frame-rpc-system]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.pallet-contracts]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-[dependencies.pallet-contracts-rpc]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '3.0.0'
-
-
-[dependencies.sc-network]
-git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
-version = '0.9.0'
-
-[dependencies.serde]
-features = ['derive']
-version = '1.0.119'
-
-[dependencies.serde_json]
-version = '1.0.41'
-
-
-################################################################################
-# Cumulus dependencies
-
-[dependencies.cumulus-client-consensus-aura]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-[dependencies.cumulus-client-consensus-common]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-[dependencies.cumulus-client-collator]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-[dependencies.cumulus-client-cli]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-[dependencies.cumulus-client-network]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-[dependencies.cumulus-primitives-core]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-[dependencies.cumulus-primitives-parachain-inherent]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-[dependencies.cumulus-client-service]
-git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
-
-
-################################################################################
-# Polkadot dependencies
-[dependencies.polkadot-primitives]
-git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
-
-[dependencies.polkadot-service]
-git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
-
-[dependencies.polkadot-cli]
-git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
-
-[dependencies.polkadot-test-service]
-git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
-
-[dependencies.polkadot-parachain]
-git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
-
-
-################################################################################
-# Local dependencies
-
-[dependencies.nft-runtime]
-path = '../runtime'
-version = '3.0.0'
-
-[dependencies.nft-data-structs]
-path="../primitives"
-default-features = false
-
-################################################################################
-# Package
-
-[package]
-authors = ['Unique Network <support@uniquenetwork.io>']
-build = 'build.rs'
-description = 'Substrate node nft'
-edition = '2018'
-homepage = 'https://unique.network'
-license = 'All Rights Reserved'
-name = 'nft'
-repository = 'https://github.com/usetech-llc/nft_private/'
-version = '3.0.0'
-
-[[bin]]
-name = 'nft'
-
-[package.metadata.docs.rs]
-targets = ['x86_64-unknown-linux-gnu']
-
-[dependencies]
-futures = '0.3.4'
-log = '0.4.8'
-flexi_logger = "0.15.7"
-parking_lot = '0.10.0'
-structopt = '0.3.8'
-jsonrpc-core = '15.0.0'
-jsonrpc-pubsub = "15.0.0"
-
-fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-fc-consensus = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-fc-rpc = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-fc-db = { version = "1.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-fp-rpc = { version = "2.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-pallet-ethereum = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-
-[features]
-default = []
-runtime-benchmarks = ['nft-runtime/runtime-benchmarks']
node/build.rsdiffbeforeafterboth--- a/node/build.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
-
-fn main() {
- generate_cargo_keys();
-
- rerun_if_git_head_changed();
-}
node/cli/Cargo.tomldiffbeforeafterboth--- /dev/null
+++ b/node/cli/Cargo.toml
@@ -0,0 +1,331 @@
+################################################################################
+# Build Dependencies
+
+[build-dependencies.substrate-build-script-utils]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+################################################################################
+# Substrate Dependecies
+
+[dependencies.codec]
+default-features = false
+features = ['derive']
+package = 'parity-scale-codec'
+version = '2.0.0'
+
+[dependencies.frame-benchmarking]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.frame-benchmarking-cli]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.pallet-transaction-payment-rpc]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.substrate-prometheus-endpoint]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-basic-authorship]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-chain-spec]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sc-cli]
+features = ['wasmtime']
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-client-api]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sc-consensus]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-consensus-aura]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-executor]
+features = ['wasmtime']
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-finality-grandpa]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-keystore]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sc-rpc]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sc-rpc-api]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-service]
+features = ['wasmtime']
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sc-telemetry]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sc-transaction-pool]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sc-tracing]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-block-builder]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-api]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-blockchain]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-consensus]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sp-consensus-aura]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sp-core]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-finality-grandpa]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-inherents]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-keystore]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.sp-offchain]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-runtime]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-session]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-timestamp]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-transaction-pool]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.sp-trie]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.substrate-frame-rpc-system]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.pallet-contracts]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+[dependencies.pallet-contracts-rpc]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '3.0.0'
+
+
+[dependencies.sc-network]
+git = 'https://github.com/paritytech/substrate.git'
+branch = 'polkadot-v0.9.3'
+version = '0.9.0'
+
+[dependencies.serde]
+features = ['derive']
+version = '1.0.119'
+
+[dependencies.serde_json]
+version = '1.0.41'
+
+
+################################################################################
+# Cumulus dependencies
+
+[dependencies.cumulus-client-consensus-aura]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+[dependencies.cumulus-client-consensus-common]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+[dependencies.cumulus-client-collator]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+[dependencies.cumulus-client-cli]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+[dependencies.cumulus-client-network]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+[dependencies.cumulus-primitives-core]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+[dependencies.cumulus-primitives-parachain-inherent]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+[dependencies.cumulus-client-service]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.3'
+
+
+################################################################################
+# Polkadot dependencies
+[dependencies.polkadot-primitives]
+git = "https://github.com/paritytech/polkadot"
+branch = 'release-v0.9.3'
+
+[dependencies.polkadot-service]
+git = "https://github.com/paritytech/polkadot"
+branch = 'release-v0.9.3'
+
+[dependencies.polkadot-cli]
+git = "https://github.com/paritytech/polkadot"
+branch = 'release-v0.9.3'
+
+[dependencies.polkadot-test-service]
+git = "https://github.com/paritytech/polkadot"
+branch = 'release-v0.9.3'
+
+[dependencies.polkadot-parachain]
+git = "https://github.com/paritytech/polkadot"
+branch = 'release-v0.9.3'
+
+
+################################################################################
+# Local dependencies
+
+[dependencies.nft-runtime]
+path = '../../runtime'
+version = '3.0.0'
+
+[dependencies.nft-data-structs]
+path="../../primitives"
+default-features = false
+
+################################################################################
+# Package
+
+[package]
+authors = ['Unique Network <support@uniquenetwork.io>']
+build = 'build.rs'
+description = 'Substrate node nft'
+edition = '2018'
+homepage = 'https://unique.network'
+license = 'All Rights Reserved'
+name = 'nft'
+repository = 'https://github.com/usetech-llc/nft_private/'
+version = '3.0.0'
+
+[[bin]]
+name = 'nft'
+
+[package.metadata.docs.rs]
+targets = ['x86_64-unknown-linux-gnu']
+
+[dependencies]
+futures = '0.3.4'
+log = '0.4.8'
+flexi_logger = "0.15.7"
+parking_lot = '0.10.0'
+structopt = '0.3.8'
+jsonrpc-core = '15.0.0'
+jsonrpc-pubsub = "15.0.0"
+
+fc-rpc-core = { version = "1.1.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-consensus = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-mapping-sync = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-rpc = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-db = { version = "1.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fp-rpc = { version = "2.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-ethereum = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+
+nft-rpc = { path = "../rpc" }
+
+[features]
+default = []
+runtime-benchmarks = ['nft-runtime/runtime-benchmarks']
node/cli/build.rsdiffbeforeafterboth--- /dev/null
+++ b/node/cli/build.rs
@@ -0,0 +1,12 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
+
+fn main() {
+ generate_cargo_keys();
+
+ rerun_if_git_head_changed();
+}
node/cli/src/chain_spec.rsdiffbeforeafterboth--- /dev/null
+++ b/node/cli/src/chain_spec.rs
@@ -0,0 +1,224 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+use cumulus_primitives_core::ParaId;
+use nft_runtime::*;
+use nft_data_structs::*;
+use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
+use sc_service::ChainType;
+use sp_core::{sr25519, Pair, Public};
+use sp_runtime::traits::{IdentifyAccount, Verify};
+use std::collections::BTreeMap;
+
+use serde::{Deserialize, Serialize};
+use serde_json::map::Map;
+
+/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
+pub type ChainSpec = sc_service::GenericChainSpec<nft_runtime::GenesisConfig, Extensions>;
+
+/// Helper function to generate a crypto pair from seed
+pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
+ TPublic::Pair::from_string(&format!("//{}", seed), None)
+ .expect("static values are valid; qed")
+ .public()
+}
+
+/// The extensions for the [`ChainSpec`].
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
+#[serde(deny_unknown_fields)]
+pub struct Extensions {
+ /// The relay chain of the Parachain.
+ pub relay_chain: String,
+ /// The id of the Parachain.
+ pub para_id: u32,
+}
+
+impl Extensions {
+ /// Try to get the extension from the given `ChainSpec`.
+ pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {
+ sc_chain_spec::get_extension(chain_spec.extensions())
+ }
+}
+
+type AccountPublic = <Signature as Verify>::Signer;
+
+/// Helper function to generate an account ID from seed
+pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId
+where
+ AccountPublic: From<<TPublic::Pair as Pair>::Public>,
+{
+ AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
+}
+
+pub fn development_config(id: ParaId) -> ChainSpec {
+ let mut properties = Map::new();
+ properties.insert("tokenSymbol".into(), "testUNQ".into());
+ properties.insert("tokenDecimals".into(), 15.into());
+ properties.insert("ss58Format".into(), 42.into()); // Generic Substrate wildcard (SS58 checksum preimage)
+
+ ChainSpec::from_genesis(
+ // Name
+ "Development",
+ // ID
+ "dev",
+ ChainType::Local,
+ move || testnet_genesis(
+ // Sudo account
+ get_account_id_from_seed::<sr25519::Public>("Alice"),
+ vec![
+ get_from_seed::<AuraId>("Alice"),
+ get_from_seed::<AuraId>("Bob"),
+ ],
+ // Pre-funded accounts
+ vec![
+ get_account_id_from_seed::<sr25519::Public>("Alice"),
+ get_account_id_from_seed::<sr25519::Public>("Bob"),
+ ],
+ id,
+ ),
+ // Bootnodes
+ vec![],
+ // Telemetry
+ None,
+ // Protocol ID
+ None,
+ // Properties
+ Some(properties),
+ // Extensions
+ Extensions {
+ relay_chain: "rococo-dev".into(),
+ para_id: id.into(),
+ },
+ )
+}
+
+pub fn local_testnet_config(id: ParaId) -> ChainSpec {
+ ChainSpec::from_genesis(
+ // Name
+ "Local Testnet",
+ // ID
+ "local_testnet",
+ ChainType::Local,
+ move || testnet_genesis(
+ // Sudo account
+ get_account_id_from_seed::<sr25519::Public>("Alice"),
+ vec![
+ get_from_seed::<AuraId>("Alice"),
+ get_from_seed::<AuraId>("Bob"),
+ ],
+ // Pre-funded accounts
+ vec![
+ get_account_id_from_seed::<sr25519::Public>("Alice"),
+ get_account_id_from_seed::<sr25519::Public>("Bob"),
+ get_account_id_from_seed::<sr25519::Public>("Charlie"),
+ get_account_id_from_seed::<sr25519::Public>("Dave"),
+ get_account_id_from_seed::<sr25519::Public>("Eve"),
+ get_account_id_from_seed::<sr25519::Public>("Ferdie"),
+ get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
+ ],
+ id,
+ ),
+ // Bootnodes
+ vec![],
+ // Telemetry
+ None,
+ // Protocol ID
+ None,
+ // Properties
+ None,
+ // Extensions
+ Extensions {
+ relay_chain: "rococo-local".into(),
+ para_id: id.into(),
+ },
+ )
+}
+
+fn testnet_genesis(
+ root_key: AccountId,
+ initial_authorities: Vec<AuraId>,
+ endowed_accounts: Vec<AccountId>,
+ id: ParaId,
+) -> GenesisConfig {
+
+ let vested_accounts = vec![
+ get_account_id_from_seed::<sr25519::Public>("Bob"),
+ ];
+
+ GenesisConfig {
+ system: nft_runtime::SystemConfig {
+ code: nft_runtime::WASM_BINARY
+ .expect("WASM binary was not build, please build it!")
+ .to_vec(),
+ changes_trie_config: Default::default(),
+ },
+ pallet_balances: BalancesConfig {
+ balances: endowed_accounts
+ .iter()
+ .cloned()
+ .map(|k| (k, 1 << 70))
+ .collect(),
+ },
+ pallet_treasury: Default::default(),
+ pallet_sudo: SudoConfig { key: root_key },
+ pallet_vesting: VestingConfig {
+ vesting: vested_accounts
+ .iter()
+ .cloned()
+ .map(|k| (k, 1000, 100, 1 << 98))
+ .collect(),
+ },
+ pallet_nft: NftConfig {
+ collection_id: vec![(
+ 1,
+ Collection {
+ owner: get_account_id_from_seed::<sr25519::Public>("Alice"),
+ mode: CollectionMode::NFT,
+ access: AccessMode::Normal,
+ decimal_points: 0,
+ name: vec![],
+ description: vec![],
+ token_prefix: vec![],
+ mint_mode: false,
+ offchain_schema: vec![],
+ schema_version: SchemaVersion::default(),
+ sponsorship: SponsorshipState::Confirmed(get_account_id_from_seed::<sr25519::Public>("Alice")),
+ const_on_chain_schema: vec![],
+ variable_on_chain_schema: vec![],
+ limits: CollectionLimits::default()
+ },
+ )],
+ nft_item_id: vec![],
+ fungible_item_id: vec![],
+ refungible_item_id: vec![],
+ chain_limit: ChainLimits {
+ collection_numbers_limit: 100000,
+ account_token_ownership_limit: 1000000,
+ collections_admins_limit: 5,
+ custom_data_limit: 2048,
+ nft_sponsor_transfer_timeout: 15,
+ fungible_sponsor_transfer_timeout: 15,
+ refungible_sponsor_transfer_timeout: 15,
+ offchain_schema_limit: 1024,
+ variable_on_chain_schema_limit: 1024,
+ const_on_chain_schema_limit: 1024,
+ },
+ },
+ parachain_info: nft_runtime::ParachainInfoConfig { parachain_id: id },
+ pallet_aura: nft_runtime::AuraConfig {
+ authorities: initial_authorities,
+ },
+ cumulus_pallet_aura_ext: Default::default(),
+ pallet_evm: EVMConfig {
+ accounts: BTreeMap::new(),
+ },
+ pallet_ethereum: EthereumConfig {},
+ }
+}
node/cli/src/cli.rsdiffbeforeafterboth--- /dev/null
+++ b/node/cli/src/cli.rs
@@ -0,0 +1,130 @@
+use crate::chain_spec;
+use cumulus_client_cli;
+use sc_cli;
+use std::path::PathBuf;
+use structopt::StructOpt;
+
+/// Sub-commands supported by the collator.
+#[derive(Debug, StructOpt)]
+pub enum Subcommand {
+ /// Export the genesis state of the parachain.
+ #[structopt(name = "export-genesis-state")]
+ ExportGenesisState(ExportGenesisStateCommand),
+
+ /// Export the genesis wasm of the parachain.
+ #[structopt(name = "export-genesis-wasm")]
+ ExportGenesisWasm(ExportGenesisWasmCommand),
+
+ /// Build a chain specification.
+ BuildSpec(sc_cli::BuildSpecCmd),
+
+ /// Validate blocks.
+ CheckBlock(sc_cli::CheckBlockCmd),
+
+ /// Export blocks.
+ ExportBlocks(sc_cli::ExportBlocksCmd),
+
+ /// Export the state of a given block into a chain spec.
+ ExportState(sc_cli::ExportStateCmd),
+
+ /// Import blocks.
+ ImportBlocks(sc_cli::ImportBlocksCmd),
+
+ /// Remove the whole chain.
+ PurgeChain(cumulus_client_cli::PurgeChainCmd),
+
+ /// Revert the chain to a previous state.
+ Revert(sc_cli::RevertCmd),
+
+ /// The custom benchmark subcommmand benchmarking runtime pallets.
+ #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
+ Benchmark(frame_benchmarking_cli::BenchmarkCmd),
+}
+
+/// Command for exporting the genesis state of the parachain
+#[derive(Debug, StructOpt)]
+pub struct ExportGenesisStateCommand {
+ /// Output file name or stdout if unspecified.
+ #[structopt(parse(from_os_str))]
+ pub output: Option<PathBuf>,
+
+ /// Id of the parachain this state is for.
+ ///
+ /// Default: 100
+ #[structopt(long, conflicts_with = "chain")]
+ pub parachain_id: Option<u32>,
+
+ /// Write output in binary. Default is to write in hex.
+ #[structopt(short, long)]
+ pub raw: bool,
+
+ /// The name of the chain for that the genesis state should be exported.
+ #[structopt(long, conflicts_with = "parachain-id")]
+ pub chain: Option<String>,
+}
+
+/// Command for exporting the genesis wasm file.
+#[derive(Debug, StructOpt)]
+pub struct ExportGenesisWasmCommand {
+ /// Output file name or stdout if unspecified.
+ #[structopt(parse(from_os_str))]
+ pub output: Option<PathBuf>,
+
+ /// Write output in binary. Default is to write in hex.
+ #[structopt(short, long)]
+ pub raw: bool,
+
+ /// The name of the chain for that the genesis wasm file should be exported.
+ #[structopt(long)]
+ pub chain: Option<String>,
+}
+
+#[derive(Debug, StructOpt)]
+#[structopt(settings = &[
+ structopt::clap::AppSettings::GlobalVersion,
+ structopt::clap::AppSettings::ArgsNegateSubcommands,
+ structopt::clap::AppSettings::SubcommandsNegateReqs,
+])]
+pub struct Cli {
+ #[structopt(subcommand)]
+ pub subcommand: Option<Subcommand>,
+
+ #[structopt(flatten)]
+ pub run: cumulus_client_cli::RunCmd,
+
+ /// Relaychain arguments
+ #[structopt(raw = true)]
+ pub relaychain_args: Vec<String>,
+}
+
+#[derive(Debug)]
+pub struct RelayChainCli {
+ /// The actual relay chain cli object.
+ pub base: polkadot_cli::RunCmd,
+
+ /// Optional chain id that should be passed to the relay chain.
+ pub chain_id: Option<String>,
+
+ /// The base path that should be used by the relay chain.
+ pub base_path: Option<PathBuf>,
+}
+
+impl RelayChainCli {
+ /// Parse the relay chain CLI parameters using the para chain `Configuration`.
+ pub fn new<'a>(
+ para_config: &sc_service::Configuration,
+ relay_chain_args: impl Iterator<Item = &'a String>,
+ ) -> Self {
+ let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec);
+ let chain_id = extension.map(|e| e.relay_chain.clone());
+ let base_path = para_config
+ .base_path
+ .as_ref()
+ .map(|x| x.path().join("polkadot"));
+ Self {
+ base_path,
+ chain_id,
+ base: polkadot_cli::RunCmd::from_iter(relay_chain_args),
+ }
+ }
+}
node/cli/src/command.rsdiffbeforeafterboth--- /dev/null
+++ b/node/cli/src/command.rs
@@ -0,0 +1,446 @@
+// This file is part of Substrate.
+
+// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+use crate::{
+ chain_spec,
+ cli::{Cli, RelayChainCli, Subcommand},
+ service::{new_partial, ParachainRuntimeExecutor}
+};
+use codec::Encode;
+use cumulus_primitives_core::ParaId;
+use cumulus_client_service::genesis::generate_genesis_block;
+use log::info;
+use nft_runtime::Block;
+use polkadot_parachain::primitives::AccountIdConversion;
+use sc_cli::{
+ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
+ NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli,
+};
+use sc_service::{
+ config::{BasePath, PrometheusConfig}
+};
+use sp_core::hexdisplay::HexDisplay;
+use sp_runtime::traits::Block as BlockT;
+use std::{io::Write, net::SocketAddr};
+
+fn load_spec(
+ id: &str,
+ para_id: ParaId,
+) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
+ Ok(match id {
+ "dev" => Box::new(chain_spec::development_config(para_id)),
+ "" | "local" => Box::new(chain_spec::local_testnet_config(para_id)),
+ path => Box::new(chain_spec::ChainSpec::from_json_file(
+ std::path::PathBuf::from(path),
+ )?),
+ })
+}
+
+impl SubstrateCli for Cli {
+ fn impl_name() -> String {
+ "Parachain Collator Template".into()
+ }
+
+ fn impl_version() -> String {
+ env!("SUBSTRATE_CLI_IMPL_VERSION").into()
+ }
+
+ fn description() -> String {
+ format!(
+ "Parachain Collator Template\n\nThe command-line arguments provided first will be \
+ passed to the parachain node, while the arguments provided after -- will be passed \
+ to the relaychain node.\n\n\
+ {} [parachain-args] -- [relaychain-args]",
+ Self::executable_name()
+ )
+ }
+
+ fn author() -> String {
+ env!("CARGO_PKG_AUTHORS").into()
+ }
+
+ fn support_url() -> String {
+ "https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()
+ }
+
+ fn copyright_start_year() -> i32 {
+ 2017
+ }
+
+ fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
+ load_spec(id, self.run.parachain_id.unwrap_or(200).into())
+ }
+
+ fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
+ &nft_runtime::VERSION
+ }
+}
+
+impl SubstrateCli for RelayChainCli {
+ fn impl_name() -> String {
+ "Parachain Collator Template".into()
+ }
+
+ fn impl_version() -> String {
+ env!("SUBSTRATE_CLI_IMPL_VERSION").into()
+ }
+
+ fn description() -> String {
+ "Parachain Collator Template\n\nThe command-line arguments provided first will be \
+ passed to the parachain node, while the arguments provided after -- will be passed \
+ to the relaychain node.\n\n\
+ parachain-collator [parachain-args] -- [relaychain-args]"
+ .into()
+ }
+
+ fn author() -> String {
+ env!("CARGO_PKG_AUTHORS").into()
+ }
+
+ fn support_url() -> String {
+ "https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()
+ }
+
+ fn copyright_start_year() -> i32 {
+ 2017
+ }
+
+ fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
+ polkadot_cli::Cli::from_iter([RelayChainCli::executable_name().to_string()].iter())
+ .load_spec(id)
+ }
+
+ fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
+ polkadot_cli::Cli::native_runtime_version(chain_spec)
+ }
+}
+
+fn extract_genesis_wasm(chain_spec: &Box<dyn sc_service::ChainSpec>) -> Result<Vec<u8>> {
+ let mut storage = chain_spec.build_storage()?;
+
+ storage
+ .top
+ .remove(sp_core::storage::well_known_keys::CODE)
+ .ok_or_else(|| "Could not find wasm file in genesis state!".into())
+}
+
+macro_rules! construct_async_run {
+ (|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{
+ let runner = $cli.create_runner($cmd)?;
+ runner.async_run(|$config| {
+ let $components = new_partial::<
+ _
+ >(
+ &$config,
+ crate::service::parachain_build_import_queue,
+ )?;
+ let task_manager = $components.task_manager;
+ { $( $code )* }.map(|v| (v, task_manager))
+ })
+ }}
+}
+
+/// Parse command line arguments into service configuration.
+pub fn run() -> Result<()> {
+ let cli = Cli::from_args();
+
+ match &cli.subcommand {
+ Some(Subcommand::BuildSpec(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+ runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
+ }
+ Some(Subcommand::CheckBlock(cmd)) => {
+ construct_async_run!(|components, cli, cmd, config| {
+ Ok(cmd.run(components.client, components.import_queue))
+ })
+ }
+ Some(Subcommand::ExportBlocks(cmd)) => {
+ construct_async_run!(|components, cli, cmd, config| {
+ Ok(cmd.run(components.client, config.database))
+ })
+ }
+ Some(Subcommand::ExportState(cmd)) => {
+ construct_async_run!(|components, cli, cmd, config| {
+ Ok(cmd.run(components.client, config.chain_spec))
+ })
+ }
+ Some(Subcommand::ImportBlocks(cmd)) => {
+ construct_async_run!(|components, cli, cmd, config| {
+ Ok(cmd.run(components.client, components.import_queue))
+ })
+ }
+ Some(Subcommand::PurgeChain(cmd)) => {
+ let runner = cli.create_runner(cmd)?;
+
+ runner.sync_run(|config| {
+ let polkadot_cli = RelayChainCli::new(
+ &config,
+ [RelayChainCli::executable_name().to_string()]
+ .iter()
+ .chain(cli.relaychain_args.iter()),
+ );
+
+ let polkadot_config = SubstrateCli::create_configuration(
+ &polkadot_cli,
+ &polkadot_cli,
+ config.task_executor.clone(),
+ )
+ .map_err(|err| format!("Relay chain argument error: {}", err))?;
+
+ cmd.run(config, polkadot_config)
+ })
+ }
+ Some(Subcommand::Revert(cmd)) => construct_async_run!(|components, cli, cmd, config| {
+ Ok(cmd.run(components.client, components.backend))
+ }),
+ Some(Subcommand::ExportGenesisState(params)) => {
+ let mut builder = sc_cli::LoggerBuilder::new("");
+ builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
+ let _ = builder.init();
+
+ let block: Block = generate_genesis_block(&load_spec(
+ ¶ms.chain.clone().unwrap_or_default(),
+ params.parachain_id.unwrap_or(200).into(),
+ )?)?;
+ let raw_header = block.header().encode();
+ let output_buf = if params.raw {
+ raw_header
+ } else {
+ format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes()
+ };
+
+ if let Some(output) = ¶ms.output {
+ std::fs::write(output, output_buf)?;
+ } else {
+ std::io::stdout().write_all(&output_buf)?;
+ }
+
+ Ok(())
+ }
+ Some(Subcommand::ExportGenesisWasm(params)) => {
+ let mut builder = sc_cli::LoggerBuilder::new("");
+ builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
+ let _ = builder.init();
+
+ let raw_wasm_blob =
+ extract_genesis_wasm(&cli.load_spec(¶ms.chain.clone().unwrap_or_default())?)?;
+ let output_buf = if params.raw {
+ raw_wasm_blob
+ } else {
+ format!("0x{:?}", HexDisplay::from(&raw_wasm_blob)).into_bytes()
+ };
+
+ if let Some(output) = ¶ms.output {
+ std::fs::write(output, output_buf)?;
+ } else {
+ std::io::stdout().write_all(&output_buf)?;
+ }
+
+ Ok(())
+ },
+ Some(Subcommand::Benchmark(cmd)) => {
+ if cfg!(feature = "runtime-benchmarks") {
+ let runner = cli.create_runner(cmd)?;
+
+ runner.sync_run(|config| cmd.run::<Block, ParachainRuntimeExecutor>(config))
+ } else {
+ Err("Benchmarking wasn't enabled when building the node. \
+ You can enable it with `--features runtime-benchmarks`.".into())
+ }
+ },
+ None => {
+ let runner = cli.create_runner(&cli.run.normalize())?;
+
+ runner.run_node_until_exit(|config| async move {
+ // TODO
+ let key = sp_core::Pair::generate().0;
+
+ let para_id =
+ chain_spec::Extensions::try_get(&*config.chain_spec).map(|e| e.para_id);
+
+ let polkadot_cli = RelayChainCli::new(
+ &config,
+ [RelayChainCli::executable_name().to_string()]
+ .iter()
+ .chain(cli.relaychain_args.iter()),
+ );
+
+ let id = ParaId::from(cli.run.parachain_id.or(para_id).unwrap_or(200));
+
+ let parachain_account =
+ AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&id);
+
+ let block: Block =
+ generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
+ let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));
+
+ let task_executor = config.task_executor.clone();
+ let polkadot_config = SubstrateCli::create_configuration(
+ &polkadot_cli,
+ &polkadot_cli,
+ task_executor,
+ )
+ .map_err(|err| format!("Relay chain argument error: {}", err))?;
+
+ info!("Parachain id: {:?}", id);
+ info!("Parachain Account: {}", parachain_account);
+ info!("Parachain genesis state: {}", genesis_state);
+ info!(
+ "Is collating: {}",
+ if config.role.is_authority() {
+ "yes"
+ } else {
+ "no"
+ }
+ );
+
+ crate::service::start_node(config, key, polkadot_config, id)
+ .await
+ .map(|r| r.0)
+ .map_err(Into::into)
+ })
+ }
+ }
+}
+
+impl DefaultConfigurationValues for RelayChainCli {
+ fn p2p_listen_port() -> u16 {
+ 30334
+ }
+
+ fn rpc_ws_listen_port() -> u16 {
+ 9945
+ }
+
+ fn rpc_http_listen_port() -> u16 {
+ 9934
+ }
+
+ fn prometheus_listen_port() -> u16 {
+ 9616
+ }
+}
+
+impl CliConfiguration<Self> for RelayChainCli {
+ fn shared_params(&self) -> &SharedParams {
+ self.base.base.shared_params()
+ }
+
+ fn import_params(&self) -> Option<&ImportParams> {
+ self.base.base.import_params()
+ }
+
+ fn network_params(&self) -> Option<&NetworkParams> {
+ self.base.base.network_params()
+ }
+
+ fn keystore_params(&self) -> Option<&KeystoreParams> {
+ self.base.base.keystore_params()
+ }
+
+ fn base_path(&self) -> Result<Option<BasePath>> {
+ Ok(self
+ .shared_params()
+ .base_path()
+ .or_else(|| self.base_path.clone().map(Into::into)))
+ }
+
+ fn rpc_http(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
+ self.base.base.rpc_http(default_listen_port)
+ }
+
+ fn rpc_ipc(&self) -> Result<Option<String>> {
+ self.base.base.rpc_ipc()
+ }
+
+ fn rpc_ws(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
+ self.base.base.rpc_ws(default_listen_port)
+ }
+
+ fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {
+ self.base.base.prometheus_config(default_listen_port)
+ }
+
+ fn init<C: SubstrateCli>(&self) -> Result<()> {
+ unreachable!("PolkadotCli is never initialized; qed");
+ }
+
+ fn chain_id(&self, is_dev: bool) -> Result<String> {
+ let chain_id = self.base.base.chain_id(is_dev)?;
+
+ Ok(if chain_id.is_empty() {
+ self.chain_id.clone().unwrap_or_default()
+ } else {
+ chain_id
+ })
+ }
+
+ fn role(&self, is_dev: bool) -> Result<sc_service::Role> {
+ self.base.base.role(is_dev)
+ }
+
+ fn transaction_pool(&self) -> Result<sc_service::config::TransactionPoolOptions> {
+ self.base.base.transaction_pool()
+ }
+
+ fn state_cache_child_ratio(&self) -> Result<Option<usize>> {
+ self.base.base.state_cache_child_ratio()
+ }
+
+ fn rpc_methods(&self) -> Result<sc_service::config::RpcMethods> {
+ self.base.base.rpc_methods()
+ }
+
+ fn rpc_ws_max_connections(&self) -> Result<Option<usize>> {
+ self.base.base.rpc_ws_max_connections()
+ }
+
+ fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>> {
+ self.base.base.rpc_cors(is_dev)
+ }
+
+ fn telemetry_external_transport(&self) -> Result<Option<sc_service::config::ExtTransport>> {
+ self.base.base.telemetry_external_transport()
+ }
+
+ fn default_heap_pages(&self) -> Result<Option<u64>> {
+ self.base.base.default_heap_pages()
+ }
+
+ fn force_authoring(&self) -> Result<bool> {
+ self.base.base.force_authoring()
+ }
+
+ fn disable_grandpa(&self) -> Result<bool> {
+ self.base.base.disable_grandpa()
+ }
+
+ fn max_runtime_instances(&self) -> Result<Option<usize>> {
+ self.base.base.max_runtime_instances()
+ }
+
+ fn announce_block(&self) -> Result<bool> {
+ self.base.base.announce_block()
+ }
+
+ fn telemetry_endpoints(
+ &self,
+ chain_spec: &Box<dyn ChainSpec>,
+ ) -> Result<Option<sc_telemetry::TelemetryEndpoints>> {
+ self.base.base.telemetry_endpoints(chain_spec)
+ }
+}
\ No newline at end of file
node/cli/src/lib.rsdiffbeforeafterboth--- /dev/null
+++ b/node/cli/src/lib.rs
@@ -0,0 +1,2 @@
+pub mod chain_spec;
+pub mod service;
node/cli/src/main.rsdiffbeforeafterboth--- /dev/null
+++ b/node/cli/src/main.rs
@@ -0,0 +1,14 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+mod chain_spec;
+#[macro_use]
+mod service;
+mod cli;
+mod command;
+
+fn main() -> sc_cli::Result<()> {
+ command::run()
+}
node/cli/src/service.rsdiffbeforeafterboth--- /dev/null
+++ b/node/cli/src/service.rs
@@ -0,0 +1,496 @@
+//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
+
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
+// std
+use std::sync::Arc;
+use std::sync::Mutex;
+use std::collections::BTreeMap;
+use std::collections::HashMap;
+
+// Local Runtime Types
+use nft_runtime::RuntimeApi;
+
+// Cumulus Imports
+use cumulus_client_consensus_aura::{
+ build_aura_consensus, BuildAuraConsensusParams, SlotProportion,
+};
+use cumulus_client_consensus_common::ParachainConsensus;
+use cumulus_client_network::build_block_announce_validator;
+use cumulus_client_service::{
+ prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
+};
+use cumulus_primitives_core::ParaId;
+
+// Polkadot Imports
+use polkadot_primitives::v1::CollatorPair;
+
+// Substrate Imports
+use sc_client_api::ExecutorProvider;
+pub use sc_executor::NativeExecutor;
+use sc_executor::native_executor_instance;
+use sc_network::NetworkService;
+use sc_service::{BasePath, Configuration, PartialComponents, Role, TaskManager};
+use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
+use sp_consensus::SlotData;
+use sp_keystore::SyncCryptoStorePtr;
+use sp_runtime::traits::BlakeTwo256;
+use substrate_prometheus_endpoint::Registry;
+
+// Frontier Imports
+use fc_rpc_core::types::FilterPool;
+use fc_rpc_core::types::PendingTransactions;
+
+// Runtime type overrides
+type BlockNumber = u32;
+type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
+pub type Block = sp_runtime::generic::Block<Header, sp_runtime::OpaqueExtrinsic>;
+type Hash = sp_core::H256;
+
+// Native executor instance.
+native_executor_instance!(
+ pub ParachainRuntimeExecutor,
+ nft_runtime::api::dispatch,
+ nft_runtime::native_version,
+ frame_benchmarking::benchmarking::HostFunctions,
+);
+
+pub fn open_frontier_backend(config: &Configuration) -> Result<Arc<fc_db::Backend<Block>>, String> {
+ let config_dir = config.base_path.as_ref()
+ .map(|base_path| base_path.config_dir(config.chain_spec.id()))
+ .unwrap_or_else(|| {
+ BasePath::from_project("", "", "nft")
+ .config_dir(config.chain_spec.id())
+ });
+ let database_dir = config_dir.join("frontier").join("db");
+
+ Ok(Arc::new(fc_db::Backend::<Block>::new(&fc_db::DatabaseSettings {
+ source: fc_db::DatabaseSettingsSrc::RocksDb {
+ path: database_dir,
+ cache_size: 0,
+ }
+ })?))
+}
+
+type Executor = ParachainRuntimeExecutor;
+
+type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>;
+type FullBackend = sc_service::TFullBackend<Block>;
+type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
+
+/// Starts a `ServiceBuilder` for a full service.
+///
+/// Use this macro if you don't actually need the full service, but just the builder in order to
+/// be able to perform chain operations.
+pub fn new_partial<BIQ>(
+ config: &Configuration,
+ build_import_queue: BIQ,
+) -> Result<
+ PartialComponents<
+ FullClient,
+ FullBackend,
+ FullSelectChain,
+ sp_consensus::DefaultImportQueue<Block, FullClient>,
+ sc_transaction_pool::FullPool<Block, FullClient>,
+ (Option<Telemetry>, PendingTransactions, Option<FilterPool>, Arc<fc_db::Backend<Block>>, Option<TelemetryWorkerHandle>),
+ >,
+ sc_service::Error,
+>
+where
+ sc_client_api::StateBackendFor<FullBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
+ Executor: sc_executor::NativeExecutionDispatch + 'static,
+ BIQ: FnOnce(
+ Arc<FullClient>,
+ &Configuration,
+ Option<TelemetryHandle>,
+ &TaskManager,
+ ) -> Result<
+ sp_consensus::DefaultImportQueue<Block, FullClient>,
+ sc_service::Error,
+ >,
+{
+ let telemetry = config
+ .telemetry_endpoints
+ .clone()
+ .filter(|x| !x.is_empty())
+ .map(|endpoints| -> Result<_, sc_telemetry::Error> {
+ let worker = TelemetryWorker::new(16)?;
+ let telemetry = worker.handle().new_telemetry(endpoints);
+ Ok((worker, telemetry))
+ })
+ .transpose()?;
+
+ let telemetry = config.telemetry_endpoints.clone()
+ .filter(|x| !x.is_empty())
+ .map(|endpoints| -> Result<_, sc_telemetry::Error> {
+ let worker = TelemetryWorker::new(16)?;
+ let telemetry = worker.handle().new_telemetry(endpoints);
+ Ok((worker, telemetry))
+ })
+ .transpose()?;
+
+ let (client, backend, keystore_container, task_manager) =
+ sc_service::new_full_parts::<Block, RuntimeApi, Executor>(
+ &config,
+ telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
+ )?;
+ let client = Arc::new(client);
+
+ let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());
+
+ let telemetry = telemetry.map(|(worker, telemetry)| {
+ task_manager.spawn_handle().spawn("telemetry", worker.run());
+ telemetry
+ });
+
+ let select_chain = sc_consensus::LongestChain::new(backend.clone());
+
+ let transaction_pool = sc_transaction_pool::BasicPool::new_full(
+ config.transaction_pool.clone(),
+ config.role.is_authority().into(),
+ config.prometheus_registry(),
+ task_manager.spawn_handle(),
+ client.clone(),
+ );
+
+ let pending_transactions: PendingTransactions = Some(Arc::new(Mutex::new(HashMap::new())));
+
+ let filter_pool: Option<FilterPool>
+ = Some(Arc::new(Mutex::new(BTreeMap::new())));
+
+ let frontier_backend = open_frontier_backend(config)?;
+
+ let import_queue = build_import_queue(
+ client.clone(),
+ config,
+ telemetry.as_ref().map(|telemetry| telemetry.handle()),
+ &task_manager,
+ )?;
+
+ let params = PartialComponents {
+ backend,
+ client,
+ import_queue,
+ keystore_container,
+ task_manager,
+ transaction_pool,
+ select_chain,
+ other: (telemetry, pending_transactions, filter_pool, frontier_backend, telemetry_worker_handle),
+ };
+
+ Ok(params)
+}
+
+/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.
+///
+/// This is the actual implementation that is abstract over the executor and the runtime api.
+#[sc_tracing::logging::prefix_logs_with("Parachain")]
+async fn start_node_impl<BIQ, BIC>(
+ parachain_config: Configuration,
+ collator_key: CollatorPair,
+ polkadot_config: Configuration,
+ id: ParaId,
+ build_import_queue: BIQ,
+ build_consensus: BIC,
+) -> sc_service::error::Result<(TaskManager, Arc<FullClient>)>
+where
+ sc_client_api::StateBackendFor<FullBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
+ Executor: sc_executor::NativeExecutionDispatch + 'static,
+ BIQ: FnOnce(
+ Arc<FullClient>,
+ &Configuration,
+ Option<TelemetryHandle>,
+ &TaskManager,
+ ) -> Result<
+ sp_consensus::DefaultImportQueue<Block, FullClient>,
+ sc_service::Error,
+ >,
+ BIC: FnOnce(
+ Arc<FullClient>,
+ Option<&Registry>,
+ Option<TelemetryHandle>,
+ &TaskManager,
+ &polkadot_service::NewFull<polkadot_service::Client>,
+ Arc<sc_transaction_pool::FullPool<Block, FullClient>>,
+ Arc<NetworkService<Block, Hash>>,
+ SyncCryptoStorePtr,
+ bool,
+ ) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
+{
+ if matches!(parachain_config.role, Role::Light) {
+ return Err("Light client not supported!".into());
+ }
+
+ let parachain_config = prepare_node_config(parachain_config);
+
+ let params = new_partial::<BIQ>(¶chain_config, build_import_queue)?;
+ let (mut telemetry, pending_transactions, filter_pool, frontier_backend, telemetry_worker_handle) = params.other;
+
+ let relay_chain_full_node = cumulus_client_service::build_polkadot_full_node(
+ polkadot_config,
+ collator_key.clone(),
+ telemetry_worker_handle,
+ )
+ .map_err(|e| match e {
+ polkadot_service::Error::Sub(x) => x,
+ s => format!("{}", s).into(),
+ })?;
+
+ let client = params.client.clone();
+ let backend = params.backend.clone();
+ let block_announce_validator = build_block_announce_validator(
+ relay_chain_full_node.client.clone(),
+ id,
+ Box::new(relay_chain_full_node.network.clone()),
+ relay_chain_full_node.backend.clone(),
+ );
+
+ let force_authoring = parachain_config.force_authoring;
+ let validator = parachain_config.role.is_authority();
+ let prometheus_registry = parachain_config.prometheus_registry().cloned();
+ let transaction_pool = params.transaction_pool.clone();
+ let mut task_manager = params.task_manager;
+ let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
+ let (network, network_status_sinks, system_rpc_tx, start_network) =
+ sc_service::build_network(sc_service::BuildNetworkParams {
+ config: ¶chain_config,
+ client: client.clone(),
+ transaction_pool: transaction_pool.clone(),
+ spawn_handle: task_manager.spawn_handle(),
+ import_queue: import_queue.clone(),
+ on_demand: None,
+ block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),
+ })?;
+
+ let subscription_executor = sc_rpc::SubscriptionTaskExecutor::new(task_manager.spawn_handle());
+ let rpc_client = client.clone();
+ let rpc_pool = transaction_pool.clone();
+ let select_chain = params.select_chain.clone();
+ let is_authority = parachain_config.role.clone().is_authority();
+ let rpc_network = network.clone();
+ let rpc_extensions_builder = Box::new(move |deny_unsafe, _| {
+ let full_deps = nft_rpc::FullDeps {
+ backend: frontier_backend.clone(),
+ deny_unsafe,
+ client: rpc_client.clone(),
+ pool: rpc_pool.clone(),
+ // TODO: Unhardcode
+ enable_dev_signer: false,
+ filter_pool: filter_pool.clone(),
+ network: rpc_network.clone(),
+ pending_transactions: pending_transactions.clone(),
+ select_chain: select_chain.clone(),
+ is_authority: is_authority.clone(),
+ // TODO: Unhardcode
+ max_past_logs: 10000,
+ };
+
+ nft_rpc::create_full::<_, _, _, RuntimeApi, _>(full_deps, subscription_executor.clone())
+ });
+
+ sc_service::spawn_tasks(sc_service::SpawnTasksParams {
+ on_demand: None,
+ remote_blockchain: None,
+ rpc_extensions_builder,
+ client: client.clone(),
+ transaction_pool: transaction_pool.clone(),
+ task_manager: &mut task_manager,
+ config: parachain_config,
+ keystore: params.keystore_container.sync_keystore(),
+ backend: backend.clone(),
+ network: network.clone(),
+ network_status_sinks,
+ system_rpc_tx,
+ telemetry: telemetry.as_mut(),
+ })?;
+
+ let announce_block = {
+ let network = network.clone();
+ Arc::new(move |hash, data| network.announce_block(hash, data))
+ };
+
+ if validator {
+ let parachain_consensus = build_consensus(
+ client.clone(),
+ prometheus_registry.as_ref(),
+ telemetry.as_ref().map(|t| t.handle()),
+ &task_manager,
+ &relay_chain_full_node,
+ transaction_pool,
+ network,
+ params.keystore_container.sync_keystore(),
+ force_authoring,
+ )?;
+
+ let spawner = task_manager.spawn_handle();
+
+ let params = StartCollatorParams {
+ para_id: id,
+ block_status: client.clone(),
+ announce_block,
+ client: client.clone(),
+ task_manager: &mut task_manager,
+ collator_key,
+ relay_chain_full_node,
+ spawner,
+ parachain_consensus,
+ import_queue,
+ };
+
+ start_collator(params).await?;
+ } else {
+ let params = StartFullNodeParams {
+ client: client.clone(),
+ announce_block,
+ task_manager: &mut task_manager,
+ para_id: id,
+ relay_chain_full_node,
+ };
+
+ start_full_node(params)?;
+ }
+
+ start_network.start_network();
+
+ Ok((task_manager, client))
+}
+
+/// Build the import queue for the the parachain runtime.
+pub fn parachain_build_import_queue(
+ client: Arc<FullClient>,
+ config: &Configuration,
+ telemetry: Option<TelemetryHandle>,
+ task_manager: &TaskManager,
+) -> Result<
+ sp_consensus::DefaultImportQueue<
+ Block,
+ FullClient,
+ >,
+ sc_service::Error,
+> {
+ let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
+
+
+ cumulus_client_consensus_aura::import_queue::<
+ sp_consensus_aura::sr25519::AuthorityPair,
+ _,
+ _,
+ _,
+ _,
+ _,
+ _,
+ >(cumulus_client_consensus_aura::ImportQueueParams {
+ block_import: client.clone(),
+ client: client.clone(),
+ create_inherent_data_providers: move |_, _| async move {
+ let time = sp_timestamp::InherentDataProvider::from_system_time();
+
+ let slot =
+ sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
+ *time,
+ slot_duration.slot_duration(),
+ );
+
+ Ok((time, slot))
+ },
+ registry: config.prometheus_registry().clone(),
+ can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
+ spawner: &task_manager.spawn_essential_handle(),
+ telemetry,
+ })
+ .map_err(Into::into)
+}
+
+/// Start a normal parachain node.
+pub async fn start_node(
+ parachain_config: Configuration,
+ collator_key: CollatorPair,
+ polkadot_config: Configuration,
+ id: ParaId,
+) -> sc_service::error::Result<(TaskManager, Arc<FullClient>)> {
+ start_node_impl::<_, _>(
+ parachain_config,
+ collator_key,
+ polkadot_config,
+ id,
+ parachain_build_import_queue,
+ |client,
+ prometheus_registry,
+ telemetry,
+ task_manager,
+ relay_chain_node,
+ transaction_pool,
+ sync_oracle,
+ keystore,
+ force_authoring| {
+ let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
+
+ let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
+ task_manager.spawn_handle(),
+ client.clone(),
+ transaction_pool,
+ prometheus_registry.clone(),
+ telemetry.clone(),
+ );
+
+ let relay_chain_backend = relay_chain_node.backend.clone();
+ let relay_chain_client = relay_chain_node.client.clone();
+ Ok(build_aura_consensus::<
+ sp_consensus_aura::sr25519::AuthorityPair,
+ _,
+ _,
+ _,
+ _,
+ _,
+ _,
+ _,
+ _,
+ _,
+ >(BuildAuraConsensusParams {
+ proposer_factory,
+ create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
+ let parachain_inherent =
+ cumulus_primitives_parachain_inherent::ParachainInherentData::create_at_with_client(
+ relay_parent,
+ &relay_chain_client,
+ &*relay_chain_backend,
+ &validation_data,
+ id,
+ );
+ async move {
+ let time = sp_timestamp::InherentDataProvider::from_system_time();
+
+ let slot =
+ sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
+ *time,
+ slot_duration.slot_duration(),
+ );
+
+ let parachain_inherent = parachain_inherent.ok_or_else(|| {
+ Box::<dyn std::error::Error + Send + Sync>::from(
+ "Failed to create parachain inherent",
+ )
+ })?;
+ Ok((time, slot, parachain_inherent))
+ }
+ },
+ block_import: client.clone(),
+ relay_chain_client: relay_chain_node.client.clone(),
+ relay_chain_backend: relay_chain_node.backend.clone(),
+ para_client: client.clone(),
+ backoff_authoring_blocks: Option::<()>::None,
+ sync_oracle,
+ keystore,
+ force_authoring,
+ slot_duration,
+ // We got around 500ms for proposing
+ block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
+ telemetry,
+ }))
+ },
+ )
+ .await
+}
\ No newline at end of file
node/rpc/Cargo.tomldiffbeforeafterboth--- /dev/null
+++ b/node/rpc/Cargo.toml
@@ -0,0 +1,56 @@
+[package]
+name = "nft-rpc"
+version = "3.3.1"
+authors = ['Unique Network <support@uniquenetwork.io>']
+license = 'All Rights Reserved'
+edition = "2018"
+description = "Unique chain rpc"
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
+
+[dependencies]
+futures = { version = "0.3.1", features = ["compat"] }
+jsonrpc-core = "15.0.0"
+jsonrpc-pubsub = "15.0.0"
+pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+pallet-transaction-payment-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+pallet-transaction-payment-rpc-runtime-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-client-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-consensus-aura = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-consensus-epochs = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-finality-grandpa = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-finality-grandpa-rpc = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-keystore = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-network = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-rpc-api = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-service = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-block-builder = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-blockchain = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-consensus = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-consensus-aura = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-core = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-offchain = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-runtime = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-storage = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-session = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-transaction-pool = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-transaction-pool = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sc-transaction-graph = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+substrate-frame-rpc-system = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+tokio = { version = "0.2.13", features = ["macros", "sync"] }
+
+pallet-ethereum = { git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-rpc = { default-features = false, git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fp-rpc = { default-features = false, git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-rpc-core = { default-features = false, git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-db = { default-features = false, git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fc-mapping-sync = { default-features = false, git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+
+pallet-nft = { path = "../../pallets/nft" }
+nft-runtime = { path = "../../runtime" }
+
+[features]
+std = []
\ No newline at end of file
node/rpc/src/lib.rsdiffbeforeafterboth--- /dev/null
+++ b/node/rpc/src/lib.rs
@@ -0,0 +1,256 @@
+use nft_runtime::{Hash, AccountId, Index, opaque::Block, BlockNumber, Balance};
+use fc_rpc::{OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, StorageOverride};
+use fc_rpc_core::types::{FilterPool, PendingTransactions};
+use jsonrpc_pubsub::manager::SubscriptionManager;
+use pallet_ethereum::EthereumStorageSchema;
+use sc_client_api::{
+ backend::{AuxStore, StorageProvider},
+ client::BlockchainEvents,
+};
+use pallet_nft::NftApi;
+use sc_finality_grandpa::{
+ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
+};
+use sc_network::NetworkService;
+use sc_rpc::SubscriptionTaskExecutor;
+pub use sc_rpc_api::DenyUnsafe;
+use sp_api::ProvideRuntimeApi;
+use sp_block_builder::BlockBuilder;
+use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
+use sp_consensus::SelectChain;
+use sp_transaction_pool::TransactionPool;
+use std::{collections::BTreeMap, marker::PhantomData, sync::Arc};
+
+/// Public io handler for exporting into other modules
+pub type IoHandler = jsonrpc_core::IoHandler<sc_rpc::Metadata>;
+
+/// Light client extra dependencies.
+pub struct LightDeps<C, F, P> {
+ /// The client instance to use.
+ pub client: Arc<C>,
+ /// Transaction pool instance.
+ pub pool: Arc<P>,
+ /// Remote access to the blockchain (async).
+ pub remote_blockchain: Arc<dyn sc_client_api::light::RemoteBlockchain<Block>>,
+ /// Fetcher instance.
+ pub fetcher: Arc<F>,
+}
+
+/// Extra dependencies for GRANDPA
+pub struct GrandpaDeps<B> {
+ /// Voting round info.
+ pub shared_voter_state: SharedVoterState,
+ /// Authority set info.
+ pub shared_authority_set: SharedAuthoritySet<Hash, BlockNumber>,
+ /// Receives notifications about justification events from Grandpa.
+ pub justification_stream: GrandpaJustificationStream<Block>,
+ /// Executor to drive the subscription manager in the Grandpa RPC handler.
+ pub subscription_executor: SubscriptionTaskExecutor,
+ /// Finality proof provider.
+ pub finality_provider: Arc<FinalityProofProvider<B, Block>>,
+}
+
+/// Full client dependencies.
+pub struct FullDeps<C, P, SC> {
+ /// The client instance to use.
+ pub client: Arc<C>,
+ /// Transaction pool instance.
+ pub pool: Arc<P>,
+ /// The SelectChain Strategy
+ pub select_chain: SC,
+ /// The Node authority flag
+ pub is_authority: bool,
+ /// Whether to enable dev signer
+ pub enable_dev_signer: bool,
+ /// Network service
+ pub network: Arc<NetworkService<Block, Hash>>,
+ /// Whether to deny unsafe calls
+ pub deny_unsafe: DenyUnsafe,
+ /// Ethereum pending transactions.
+ pub pending_transactions: PendingTransactions,
+ /// EthFilterApi pool.
+ pub filter_pool: Option<FilterPool>,
+ /// Backend.
+ pub backend: Arc<fc_db::Backend<Block>>,
+ /// Maximum number of logs in a query.
+ pub max_past_logs: u32,
+}
+
+struct AccountCodes<C, B> {
+ client: Arc<C>,
+ _marker: PhantomData<B>,
+}
+
+impl<C, Block> AccountCodes<C, Block>
+where
+ Block: sp_api::BlockT,
+ C: ProvideRuntimeApi<Block>,
+{
+ fn new(client: Arc<C>) -> Self {
+ Self {
+ client,
+ _marker: PhantomData,
+ }
+ }
+}
+
+impl<C, Block> fc_rpc::AccountCodeProvider<Block> for AccountCodes<C, Block>
+where
+ Block: sp_api::BlockT,
+ C: ProvideRuntimeApi<Block>,
+ C::Api: pallet_nft::NftApi<Block>,
+{
+ fn code(&self, block: &sp_api::BlockId<Block>, account: sp_core::H160) -> Option<Vec<u8>> {
+ self.client
+ .runtime_api()
+ .eth_contract_code(block, account)
+ .ok()
+ .flatten()
+ }
+}
+
+/// Instantiate all Full RPC extensions.
+pub fn create_full<C, P, SC, A, B>(
+ deps: FullDeps<C, P, SC>,
+ subscription_task_executor: SubscriptionTaskExecutor,
+) -> jsonrpc_core::IoHandler<sc_rpc_api::Metadata>
+where
+ C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,
+ C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
+ C: Send + Sync + 'static,
+ C: BlockchainEvents<Block>,
+ C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,
+ C::Api: BlockBuilder<Block>,
+ C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
+ C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
+ C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
+ C::Api: pallet_nft::NftApi<Block>,
+ P: TransactionPool<Block = Block> + 'static,
+ SC: SelectChain<Block> + 'static,
+ B: sc_client_api::Backend<Block> + Send + Sync + 'static,
+ B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,
+{
+ use fc_rpc::{
+ EthApi, EthApiServer, EthDevSigner, EthFilterApi, EthFilterApiServer, EthPubSubApi,
+ EthPubSubApiServer, EthSigner, HexEncodedIdProvider, NetApi, NetApiServer, Web3Api,
+ Web3ApiServer,
+ };
+ use pallet_contracts_rpc::{Contracts, ContractsApi};
+ use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
+ use substrate_frame_rpc_system::{FullSystem, SystemApi};
+
+ let mut io = jsonrpc_core::IoHandler::default();
+ let FullDeps {
+ client,
+ pool,
+ select_chain: _,
+ enable_dev_signer,
+ is_authority,
+ network,
+ deny_unsafe,
+ pending_transactions,
+ filter_pool,
+ backend,
+ max_past_logs,
+ } = deps;
+
+ io.extend_with(SystemApi::to_delegate(FullSystem::new(
+ client.clone(),
+ pool.clone(),
+ deny_unsafe,
+ )));
+
+ io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(
+ client.clone(),
+ )));
+
+ io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));
+
+ let mut signers = Vec::new();
+ if enable_dev_signer {
+ signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);
+ }
+ let mut overrides_map = BTreeMap::new();
+ overrides_map.insert(
+ EthereumStorageSchema::V1,
+ Box::new(SchemaV1Override::new_with_code_provider(
+ client.clone(),
+ Arc::new(AccountCodes::<C, Block>::new(client.clone())),
+ )) as Box<dyn StorageOverride<_> + Send + Sync>,
+ );
+
+ let overrides = Arc::new(OverrideHandle {
+ schemas: overrides_map,
+ fallback: Box::new(RuntimeApiStorageOverride::new(client.clone())),
+ });
+
+ io.extend_with(EthApiServer::to_delegate(EthApi::new(
+ client.clone(),
+ pool.clone(),
+ nft_runtime::TransactionConverter,
+ network.clone(),
+ pending_transactions.clone(),
+ signers,
+ overrides.clone(),
+ backend,
+ is_authority,
+ max_past_logs,
+ )));
+
+ if let Some(filter_pool) = filter_pool {
+ io.extend_with(EthFilterApiServer::to_delegate(EthFilterApi::new(
+ client.clone(),
+ filter_pool.clone(),
+ 500 as usize, // max stored filters
+ overrides.clone(),
+ max_past_logs,
+ )));
+ }
+
+ io.extend_with(NetApiServer::to_delegate(NetApi::new(
+ client.clone(),
+ network.clone(),
+ // Whether to format the `peer_count` response as Hex (default) or not.
+ true,
+ )));
+
+ io.extend_with(Web3ApiServer::to_delegate(Web3Api::new(client.clone())));
+
+ io.extend_with(EthPubSubApiServer::to_delegate(EthPubSubApi::new(
+ pool.clone(),
+ client.clone(),
+ network.clone(),
+ SubscriptionManager::<HexEncodedIdProvider>::with_id_provider(
+ HexEncodedIdProvider::default(),
+ Arc::new(subscription_task_executor),
+ ),
+ overrides,
+ )));
+
+ io
+}
+
+/// Instantiate all Light RPC extensions.
+pub fn create_light<C, P, M, F>(deps: LightDeps<C, F, P>) -> jsonrpc_core::IoHandler<M>
+where
+ C: sp_blockchain::HeaderBackend<Block>,
+ C: Send + Sync + 'static,
+ F: sc_client_api::light::Fetcher<Block> + 'static,
+ P: TransactionPool + 'static,
+ M: jsonrpc_core::Metadata + Default,
+{
+ use substrate_frame_rpc_system::{LightSystem, SystemApi};
+
+ let LightDeps {
+ client,
+ pool,
+ remote_blockchain,
+ fetcher,
+ } = deps;
+ let mut io = jsonrpc_core::IoHandler::default();
+ io.extend_with(SystemApi::<Hash, AccountId, Index>::to_delegate(
+ LightSystem::new(client, remote_blockchain, fetcher, pool),
+ ));
+
+ io
+}
node/src/chain_spec.rsdiffbeforeafterboth--- a/node/src/chain_spec.rs
+++ /dev/null
@@ -1,223 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-use cumulus_primitives_core::ParaId;
-use nft_runtime::*;
-use nft_data_structs::*;
-use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
-use sc_service::ChainType;
-use sp_core::{sr25519, Pair, Public};
-use sp_runtime::traits::{IdentifyAccount, Verify};
-
-use serde::{Deserialize, Serialize};
-use serde_json::map::Map;
-
-/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
-pub type ChainSpec = sc_service::GenericChainSpec<nft_runtime::GenesisConfig, Extensions>;
-
-/// Helper function to generate a crypto pair from seed
-pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
- TPublic::Pair::from_string(&format!("//{}", seed), None)
- .expect("static values are valid; qed")
- .public()
-}
-
-/// The extensions for the [`ChainSpec`].
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
-#[serde(deny_unknown_fields)]
-pub struct Extensions {
- /// The relay chain of the Parachain.
- pub relay_chain: String,
- /// The id of the Parachain.
- pub para_id: u32,
-}
-
-impl Extensions {
- /// Try to get the extension from the given `ChainSpec`.
- pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {
- sc_chain_spec::get_extension(chain_spec.extensions())
- }
-}
-
-type AccountPublic = <Signature as Verify>::Signer;
-
-/// Helper function to generate an account ID from seed
-pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId
-where
- AccountPublic: From<<TPublic::Pair as Pair>::Public>,
-{
- AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
-}
-
-pub fn development_config(id: ParaId) -> ChainSpec {
- let mut properties = Map::new();
- properties.insert("tokenSymbol".into(), "testUNQ".into());
- properties.insert("tokenDecimals".into(), 15.into());
- properties.insert("ss58Format".into(), 42.into()); // Generic Substrate wildcard (SS58 checksum preimage)
-
- ChainSpec::from_genesis(
- // Name
- "Development",
- // ID
- "dev",
- ChainType::Local,
- move || testnet_genesis(
- // Sudo account
- get_account_id_from_seed::<sr25519::Public>("Alice"),
- vec![
- get_from_seed::<AuraId>("Alice"),
- get_from_seed::<AuraId>("Bob"),
- ],
- // Pre-funded accounts
- vec![
- get_account_id_from_seed::<sr25519::Public>("Alice"),
- get_account_id_from_seed::<sr25519::Public>("Bob"),
- ],
- id,
- ),
- // Bootnodes
- vec![],
- // Telemetry
- None,
- // Protocol ID
- None,
- // Properties
- Some(properties),
- // Extensions
- Extensions {
- relay_chain: "rococo-dev".into(),
- para_id: id.into(),
- },
- )
-}
-
-pub fn local_testnet_config(id: ParaId) -> ChainSpec {
- ChainSpec::from_genesis(
- // Name
- "Local Testnet",
- // ID
- "local_testnet",
- ChainType::Local,
- move || testnet_genesis(
- // Sudo account
- get_account_id_from_seed::<sr25519::Public>("Alice"),
- vec![
- get_from_seed::<AuraId>("Alice"),
- get_from_seed::<AuraId>("Bob"),
- ],
- // Pre-funded accounts
- vec![
- get_account_id_from_seed::<sr25519::Public>("Alice"),
- get_account_id_from_seed::<sr25519::Public>("Bob"),
- get_account_id_from_seed::<sr25519::Public>("Charlie"),
- get_account_id_from_seed::<sr25519::Public>("Dave"),
- get_account_id_from_seed::<sr25519::Public>("Eve"),
- get_account_id_from_seed::<sr25519::Public>("Ferdie"),
- get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
- get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
- get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
- get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
- get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
- get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
- ],
- id,
- ),
- // Bootnodes
- vec![],
- // Telemetry
- None,
- // Protocol ID
- None,
- // Properties
- None,
- // Extensions
- Extensions {
- relay_chain: "rococo-local".into(),
- para_id: id.into(),
- },
- )
-}
-
-fn testnet_genesis(
- root_key: AccountId,
- initial_authorities: Vec<AuraId>,
- endowed_accounts: Vec<AccountId>,
- id: ParaId,
-) -> GenesisConfig {
-
- let vested_accounts = vec![
- get_account_id_from_seed::<sr25519::Public>("Bob"),
- ];
-
- GenesisConfig {
- system: nft_runtime::SystemConfig {
- code: nft_runtime::WASM_BINARY
- .expect("WASM binary was not build, please build it!")
- .to_vec(),
- changes_trie_config: Default::default(),
- },
- pallet_balances: BalancesConfig {
- balances: endowed_accounts
- .iter()
- .cloned()
- .map(|k| (k, 1 << 70))
- .collect(),
- },
- pallet_treasury: Default::default(),
- pallet_sudo: SudoConfig { key: root_key },
- pallet_vesting: VestingConfig {
- vesting: vested_accounts
- .iter()
- .cloned()
- .map(|k| (k, 1000, 100, 1 << 98))
- .collect(),
- },
- pallet_nft: NftConfig {
- collection_id: vec![(
- 1,
- Collection {
- owner: get_account_id_from_seed::<sr25519::Public>("Alice"),
- mode: CollectionMode::NFT,
- access: AccessMode::Normal,
- decimal_points: 0,
- name: vec![],
- description: vec![],
- token_prefix: vec![],
- mint_mode: false,
- offchain_schema: vec![],
- schema_version: SchemaVersion::default(),
- sponsorship: SponsorshipState::Confirmed(get_account_id_from_seed::<sr25519::Public>("Alice")),
- const_on_chain_schema: vec![],
- variable_on_chain_schema: vec![],
- limits: CollectionLimits::default()
- },
- )],
- nft_item_id: vec![],
- fungible_item_id: vec![],
- refungible_item_id: vec![],
- chain_limit: ChainLimits {
- collection_numbers_limit: 100000,
- account_token_ownership_limit: 1000000,
- collections_admins_limit: 5,
- custom_data_limit: 2048,
- nft_sponsor_transfer_timeout: 15,
- fungible_sponsor_transfer_timeout: 15,
- refungible_sponsor_transfer_timeout: 15,
- offchain_schema_limit: 1024,
- variable_on_chain_schema_limit: 1024,
- const_on_chain_schema_limit: 1024,
- },
- },
- parachain_info: nft_runtime::ParachainInfoConfig { parachain_id: id },
- pallet_aura: nft_runtime::AuraConfig {
- authorities: initial_authorities,
- },
- cumulus_pallet_aura_ext: Default::default(),
- pallet_evm: EVMConfig {
- accounts: BTreeMap::new(),
- },
- pallet_ethereum: EthereumConfig {},
- }
-}
node/src/cli.rsdiffbeforeafterboth--- a/node/src/cli.rs
+++ /dev/null
@@ -1,130 +0,0 @@
-use crate::chain_spec;
-use cumulus_client_cli;
-use sc_cli;
-use std::path::PathBuf;
-use structopt::StructOpt;
-
-/// Sub-commands supported by the collator.
-#[derive(Debug, StructOpt)]
-pub enum Subcommand {
- /// Export the genesis state of the parachain.
- #[structopt(name = "export-genesis-state")]
- ExportGenesisState(ExportGenesisStateCommand),
-
- /// Export the genesis wasm of the parachain.
- #[structopt(name = "export-genesis-wasm")]
- ExportGenesisWasm(ExportGenesisWasmCommand),
-
- /// Build a chain specification.
- BuildSpec(sc_cli::BuildSpecCmd),
-
- /// Validate blocks.
- CheckBlock(sc_cli::CheckBlockCmd),
-
- /// Export blocks.
- ExportBlocks(sc_cli::ExportBlocksCmd),
-
- /// Export the state of a given block into a chain spec.
- ExportState(sc_cli::ExportStateCmd),
-
- /// Import blocks.
- ImportBlocks(sc_cli::ImportBlocksCmd),
-
- /// Remove the whole chain.
- PurgeChain(cumulus_client_cli::PurgeChainCmd),
-
- /// Revert the chain to a previous state.
- Revert(sc_cli::RevertCmd),
-
- /// The custom benchmark subcommmand benchmarking runtime pallets.
- #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
- Benchmark(frame_benchmarking_cli::BenchmarkCmd),
-}
-
-/// Command for exporting the genesis state of the parachain
-#[derive(Debug, StructOpt)]
-pub struct ExportGenesisStateCommand {
- /// Output file name or stdout if unspecified.
- #[structopt(parse(from_os_str))]
- pub output: Option<PathBuf>,
-
- /// Id of the parachain this state is for.
- ///
- /// Default: 100
- #[structopt(long, conflicts_with = "chain")]
- pub parachain_id: Option<u32>,
-
- /// Write output in binary. Default is to write in hex.
- #[structopt(short, long)]
- pub raw: bool,
-
- /// The name of the chain for that the genesis state should be exported.
- #[structopt(long, conflicts_with = "parachain-id")]
- pub chain: Option<String>,
-}
-
-/// Command for exporting the genesis wasm file.
-#[derive(Debug, StructOpt)]
-pub struct ExportGenesisWasmCommand {
- /// Output file name or stdout if unspecified.
- #[structopt(parse(from_os_str))]
- pub output: Option<PathBuf>,
-
- /// Write output in binary. Default is to write in hex.
- #[structopt(short, long)]
- pub raw: bool,
-
- /// The name of the chain for that the genesis wasm file should be exported.
- #[structopt(long)]
- pub chain: Option<String>,
-}
-
-#[derive(Debug, StructOpt)]
-#[structopt(settings = &[
- structopt::clap::AppSettings::GlobalVersion,
- structopt::clap::AppSettings::ArgsNegateSubcommands,
- structopt::clap::AppSettings::SubcommandsNegateReqs,
-])]
-pub struct Cli {
- #[structopt(subcommand)]
- pub subcommand: Option<Subcommand>,
-
- #[structopt(flatten)]
- pub run: cumulus_client_cli::RunCmd,
-
- /// Relaychain arguments
- #[structopt(raw = true)]
- pub relaychain_args: Vec<String>,
-}
-
-#[derive(Debug)]
-pub struct RelayChainCli {
- /// The actual relay chain cli object.
- pub base: polkadot_cli::RunCmd,
-
- /// Optional chain id that should be passed to the relay chain.
- pub chain_id: Option<String>,
-
- /// The base path that should be used by the relay chain.
- pub base_path: Option<PathBuf>,
-}
-
-impl RelayChainCli {
- /// Parse the relay chain CLI parameters using the para chain `Configuration`.
- pub fn new<'a>(
- para_config: &sc_service::Configuration,
- relay_chain_args: impl Iterator<Item = &'a String>,
- ) -> Self {
- let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec);
- let chain_id = extension.map(|e| e.relay_chain.clone());
- let base_path = para_config
- .base_path
- .as_ref()
- .map(|x| x.path().join("polkadot"));
- Self {
- base_path,
- chain_id,
- base: polkadot_cli::RunCmd::from_iter(relay_chain_args),
- }
- }
-}
node/src/command.rsdiffbeforeafterboth--- a/node/src/command.rs
+++ /dev/null
@@ -1,448 +0,0 @@
-// This file is part of Substrate.
-
-// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
-// SPDX-License-Identifier: Apache-2.0
-
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-use crate::{
- chain_spec,
- cli::{Cli, RelayChainCli, Subcommand},
- service::{new_partial, ParachainRuntimeExecutor}
-};
-use codec::Encode;
-use cumulus_primitives_core::ParaId;
-use cumulus_client_service::genesis::generate_genesis_block;
-use log::info;
-use nft_runtime::{RuntimeApi, Block};
-use polkadot_parachain::primitives::AccountIdConversion;
-use sc_cli::{
- ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
- NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli,
-};
-use sc_service::{
- config::{BasePath, PrometheusConfig}
-};
-use sp_core::hexdisplay::HexDisplay;
-use sp_runtime::traits::Block as BlockT;
-use std::{io::Write, net::SocketAddr};
-
-fn load_spec(
- id: &str,
- para_id: ParaId,
-) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
- Ok(match id {
- "dev" => Box::new(chain_spec::development_config(para_id)),
- "" | "local" => Box::new(chain_spec::local_testnet_config(para_id)),
- path => Box::new(chain_spec::ChainSpec::from_json_file(
- std::path::PathBuf::from(path),
- )?),
- })
-}
-
-impl SubstrateCli for Cli {
- fn impl_name() -> String {
- "Parachain Collator Template".into()
- }
-
- fn impl_version() -> String {
- env!("SUBSTRATE_CLI_IMPL_VERSION").into()
- }
-
- fn description() -> String {
- format!(
- "Parachain Collator Template\n\nThe command-line arguments provided first will be \
- passed to the parachain node, while the arguments provided after -- will be passed \
- to the relaychain node.\n\n\
- {} [parachain-args] -- [relaychain-args]",
- Self::executable_name()
- )
- }
-
- fn author() -> String {
- env!("CARGO_PKG_AUTHORS").into()
- }
-
- fn support_url() -> String {
- "https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()
- }
-
- fn copyright_start_year() -> i32 {
- 2017
- }
-
- fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
- load_spec(id, self.run.parachain_id.unwrap_or(200).into())
- }
-
- fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
- &nft_runtime::VERSION
- }
-}
-
-impl SubstrateCli for RelayChainCli {
- fn impl_name() -> String {
- "Parachain Collator Template".into()
- }
-
- fn impl_version() -> String {
- env!("SUBSTRATE_CLI_IMPL_VERSION").into()
- }
-
- fn description() -> String {
- "Parachain Collator Template\n\nThe command-line arguments provided first will be \
- passed to the parachain node, while the arguments provided after -- will be passed \
- to the relaychain node.\n\n\
- parachain-collator [parachain-args] -- [relaychain-args]"
- .into()
- }
-
- fn author() -> String {
- env!("CARGO_PKG_AUTHORS").into()
- }
-
- fn support_url() -> String {
- "https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()
- }
-
- fn copyright_start_year() -> i32 {
- 2017
- }
-
- fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
- polkadot_cli::Cli::from_iter([RelayChainCli::executable_name().to_string()].iter())
- .load_spec(id)
- }
-
- fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
- polkadot_cli::Cli::native_runtime_version(chain_spec)
- }
-}
-
-fn extract_genesis_wasm(chain_spec: &Box<dyn sc_service::ChainSpec>) -> Result<Vec<u8>> {
- let mut storage = chain_spec.build_storage()?;
-
- storage
- .top
- .remove(sp_core::storage::well_known_keys::CODE)
- .ok_or_else(|| "Could not find wasm file in genesis state!".into())
-}
-
-macro_rules! construct_async_run {
- (|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{
- let runner = $cli.create_runner($cmd)?;
- runner.async_run(|$config| {
- let $components = new_partial::<
- RuntimeApi,
- ParachainRuntimeExecutor,
- _
- >(
- &$config,
- crate::service::parachain_build_import_queue,
- )?;
- let task_manager = $components.task_manager;
- { $( $code )* }.map(|v| (v, task_manager))
- })
- }}
-}
-
-/// Parse command line arguments into service configuration.
-pub fn run() -> Result<()> {
- let cli = Cli::from_args();
-
- match &cli.subcommand {
- Some(Subcommand::BuildSpec(cmd)) => {
- let runner = cli.create_runner(cmd)?;
- runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
- }
- Some(Subcommand::CheckBlock(cmd)) => {
- construct_async_run!(|components, cli, cmd, config| {
- Ok(cmd.run(components.client, components.import_queue))
- })
- }
- Some(Subcommand::ExportBlocks(cmd)) => {
- construct_async_run!(|components, cli, cmd, config| {
- Ok(cmd.run(components.client, config.database))
- })
- }
- Some(Subcommand::ExportState(cmd)) => {
- construct_async_run!(|components, cli, cmd, config| {
- Ok(cmd.run(components.client, config.chain_spec))
- })
- }
- Some(Subcommand::ImportBlocks(cmd)) => {
- construct_async_run!(|components, cli, cmd, config| {
- Ok(cmd.run(components.client, components.import_queue))
- })
- }
- Some(Subcommand::PurgeChain(cmd)) => {
- let runner = cli.create_runner(cmd)?;
-
- runner.sync_run(|config| {
- let polkadot_cli = RelayChainCli::new(
- &config,
- [RelayChainCli::executable_name().to_string()]
- .iter()
- .chain(cli.relaychain_args.iter()),
- );
-
- let polkadot_config = SubstrateCli::create_configuration(
- &polkadot_cli,
- &polkadot_cli,
- config.task_executor.clone(),
- )
- .map_err(|err| format!("Relay chain argument error: {}", err))?;
-
- cmd.run(config, polkadot_config)
- })
- }
- Some(Subcommand::Revert(cmd)) => construct_async_run!(|components, cli, cmd, config| {
- Ok(cmd.run(components.client, components.backend))
- }),
- Some(Subcommand::ExportGenesisState(params)) => {
- let mut builder = sc_cli::LoggerBuilder::new("");
- builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
- let _ = builder.init();
-
- let block: Block = generate_genesis_block(&load_spec(
- ¶ms.chain.clone().unwrap_or_default(),
- params.parachain_id.unwrap_or(200).into(),
- )?)?;
- let raw_header = block.header().encode();
- let output_buf = if params.raw {
- raw_header
- } else {
- format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes()
- };
-
- if let Some(output) = ¶ms.output {
- std::fs::write(output, output_buf)?;
- } else {
- std::io::stdout().write_all(&output_buf)?;
- }
-
- Ok(())
- }
- Some(Subcommand::ExportGenesisWasm(params)) => {
- let mut builder = sc_cli::LoggerBuilder::new("");
- builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
- let _ = builder.init();
-
- let raw_wasm_blob =
- extract_genesis_wasm(&cli.load_spec(¶ms.chain.clone().unwrap_or_default())?)?;
- let output_buf = if params.raw {
- raw_wasm_blob
- } else {
- format!("0x{:?}", HexDisplay::from(&raw_wasm_blob)).into_bytes()
- };
-
- if let Some(output) = ¶ms.output {
- std::fs::write(output, output_buf)?;
- } else {
- std::io::stdout().write_all(&output_buf)?;
- }
-
- Ok(())
- },
- Some(Subcommand::Benchmark(cmd)) => {
- if cfg!(feature = "runtime-benchmarks") {
- let runner = cli.create_runner(cmd)?;
-
- runner.sync_run(|config| cmd.run::<Block, ParachainRuntimeExecutor>(config))
- } else {
- Err("Benchmarking wasn't enabled when building the node. \
- You can enable it with `--features runtime-benchmarks`.".into())
- }
- },
- None => {
- let runner = cli.create_runner(&cli.run.normalize())?;
-
- runner.run_node_until_exit(|config| async move {
- // TODO
- let key = sp_core::Pair::generate().0;
-
- let para_id =
- chain_spec::Extensions::try_get(&*config.chain_spec).map(|e| e.para_id);
-
- let polkadot_cli = RelayChainCli::new(
- &config,
- [RelayChainCli::executable_name().to_string()]
- .iter()
- .chain(cli.relaychain_args.iter()),
- );
-
- let id = ParaId::from(cli.run.parachain_id.or(para_id).unwrap_or(200));
-
- let parachain_account =
- AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&id);
-
- let block: Block =
- generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;
- let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));
-
- let task_executor = config.task_executor.clone();
- let polkadot_config = SubstrateCli::create_configuration(
- &polkadot_cli,
- &polkadot_cli,
- task_executor,
- )
- .map_err(|err| format!("Relay chain argument error: {}", err))?;
-
- info!("Parachain id: {:?}", id);
- info!("Parachain Account: {}", parachain_account);
- info!("Parachain genesis state: {}", genesis_state);
- info!(
- "Is collating: {}",
- if config.role.is_authority() {
- "yes"
- } else {
- "no"
- }
- );
-
- crate::service::start_node(config, key, polkadot_config, id)
- .await
- .map(|r| r.0)
- .map_err(Into::into)
- })
- }
- }
-}
-
-impl DefaultConfigurationValues for RelayChainCli {
- fn p2p_listen_port() -> u16 {
- 30334
- }
-
- fn rpc_ws_listen_port() -> u16 {
- 9945
- }
-
- fn rpc_http_listen_port() -> u16 {
- 9934
- }
-
- fn prometheus_listen_port() -> u16 {
- 9616
- }
-}
-
-impl CliConfiguration<Self> for RelayChainCli {
- fn shared_params(&self) -> &SharedParams {
- self.base.base.shared_params()
- }
-
- fn import_params(&self) -> Option<&ImportParams> {
- self.base.base.import_params()
- }
-
- fn network_params(&self) -> Option<&NetworkParams> {
- self.base.base.network_params()
- }
-
- fn keystore_params(&self) -> Option<&KeystoreParams> {
- self.base.base.keystore_params()
- }
-
- fn base_path(&self) -> Result<Option<BasePath>> {
- Ok(self
- .shared_params()
- .base_path()
- .or_else(|| self.base_path.clone().map(Into::into)))
- }
-
- fn rpc_http(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
- self.base.base.rpc_http(default_listen_port)
- }
-
- fn rpc_ipc(&self) -> Result<Option<String>> {
- self.base.base.rpc_ipc()
- }
-
- fn rpc_ws(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {
- self.base.base.rpc_ws(default_listen_port)
- }
-
- fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {
- self.base.base.prometheus_config(default_listen_port)
- }
-
- fn init<C: SubstrateCli>(&self) -> Result<()> {
- unreachable!("PolkadotCli is never initialized; qed");
- }
-
- fn chain_id(&self, is_dev: bool) -> Result<String> {
- let chain_id = self.base.base.chain_id(is_dev)?;
-
- Ok(if chain_id.is_empty() {
- self.chain_id.clone().unwrap_or_default()
- } else {
- chain_id
- })
- }
-
- fn role(&self, is_dev: bool) -> Result<sc_service::Role> {
- self.base.base.role(is_dev)
- }
-
- fn transaction_pool(&self) -> Result<sc_service::config::TransactionPoolOptions> {
- self.base.base.transaction_pool()
- }
-
- fn state_cache_child_ratio(&self) -> Result<Option<usize>> {
- self.base.base.state_cache_child_ratio()
- }
-
- fn rpc_methods(&self) -> Result<sc_service::config::RpcMethods> {
- self.base.base.rpc_methods()
- }
-
- fn rpc_ws_max_connections(&self) -> Result<Option<usize>> {
- self.base.base.rpc_ws_max_connections()
- }
-
- fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>> {
- self.base.base.rpc_cors(is_dev)
- }
-
- fn telemetry_external_transport(&self) -> Result<Option<sc_service::config::ExtTransport>> {
- self.base.base.telemetry_external_transport()
- }
-
- fn default_heap_pages(&self) -> Result<Option<u64>> {
- self.base.base.default_heap_pages()
- }
-
- fn force_authoring(&self) -> Result<bool> {
- self.base.base.force_authoring()
- }
-
- fn disable_grandpa(&self) -> Result<bool> {
- self.base.base.disable_grandpa()
- }
-
- fn max_runtime_instances(&self) -> Result<Option<usize>> {
- self.base.base.max_runtime_instances()
- }
-
- fn announce_block(&self) -> Result<bool> {
- self.base.base.announce_block()
- }
-
- fn telemetry_endpoints(
- &self,
- chain_spec: &Box<dyn ChainSpec>,
- ) -> Result<Option<sc_telemetry::TelemetryEndpoints>> {
- self.base.base.telemetry_endpoints(chain_spec)
- }
-}
\ No newline at end of file
node/src/lib.rsdiffbeforeafterboth--- a/node/src/lib.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub mod chain_spec;
-pub mod service;
node/src/main.rsdiffbeforeafterboth--- a/node/src/main.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-mod chain_spec;
-#[macro_use]
-mod service;
-mod cli;
-mod command;
-
-fn main() -> sc_cli::Result<()> {
- command::run()
-}
node/src/service.rsdiffbeforeafterboth--- a/node/src/service.rs
+++ /dev/null
@@ -1,467 +0,0 @@
-//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
-
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-// std
-use std::sync::Arc;
-
-// Local Runtime Types
-use nft_runtime::RuntimeApi;
-
-// Cumulus Imports
-use cumulus_client_consensus_aura::{
- build_aura_consensus, BuildAuraConsensusParams, SlotProportion,
-};
-use cumulus_client_consensus_common::ParachainConsensus;
-use cumulus_client_network::build_block_announce_validator;
-use cumulus_client_service::{
- prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
-};
-use cumulus_primitives_core::ParaId;
-
-// Polkadot Imports
-use polkadot_primitives::v1::CollatorPair;
-
-// Substrate Imports
-use sc_client_api::ExecutorProvider;
-pub use sc_executor::NativeExecutor;
-use sc_executor::native_executor_instance;
-use sc_network::NetworkService;
-use sc_service::{Configuration, PartialComponents, Role, TFullBackend, TFullClient, TaskManager};
-use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
-use sp_api::ConstructRuntimeApi;
-use sp_consensus::SlotData;
-use sp_keystore::SyncCryptoStorePtr;
-use sp_runtime::traits::BlakeTwo256;
-use substrate_prometheus_endpoint::Registry;
-
-// Runtime type overrides
-type BlockNumber = u32;
-type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
-pub type Block = sp_runtime::generic::Block<Header, sp_runtime::OpaqueExtrinsic>;
-type Hash = sp_core::H256;
-
-// Native executor instance.
-native_executor_instance!(
- pub ParachainRuntimeExecutor,
- nft_runtime::api::dispatch,
- nft_runtime::native_version,
- frame_benchmarking::benchmarking::HostFunctions,
-);
-
-/// Starts a `ServiceBuilder` for a full service.
-///
-/// Use this macro if you don't actually need the full service, but just the builder in order to
-/// be able to perform chain operations.
-pub fn new_partial<RuntimeApi, Executor, BIQ>(
- config: &Configuration,
- build_import_queue: BIQ,
-) -> Result<
- PartialComponents<
- TFullClient<Block, RuntimeApi, Executor>,
- TFullBackend<Block>,
- (),
- sp_consensus::DefaultImportQueue<Block, TFullClient<Block, RuntimeApi, Executor>>,
- sc_transaction_pool::FullPool<Block, TFullClient<Block, RuntimeApi, Executor>>,
- (Option<Telemetry>, Option<TelemetryWorkerHandle>),
- >,
- sc_service::Error,
->
-where
- RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, Executor>>
- + Send
- + Sync
- + 'static,
- RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
- + sp_api::Metadata<Block>
- + sp_session::SessionKeys<Block>
- + sp_api::ApiExt<
- Block,
- StateBackend = sc_client_api::StateBackendFor<TFullBackend<Block>, Block>,
- > + sp_offchain::OffchainWorkerApi<Block>
- + sp_block_builder::BlockBuilder<Block>,
- sc_client_api::StateBackendFor<TFullBackend<Block>, Block>: sp_api::StateBackend<BlakeTwo256>,
- Executor: sc_executor::NativeExecutionDispatch + 'static,
- BIQ: FnOnce(
- Arc<TFullClient<Block, RuntimeApi, Executor>>,
- &Configuration,
- Option<TelemetryHandle>,
- &TaskManager,
- ) -> Result<
- sp_consensus::DefaultImportQueue<Block, TFullClient<Block, RuntimeApi, Executor>>,
- sc_service::Error,
- >,
-{
- let telemetry = config
- .telemetry_endpoints
- .clone()
- .filter(|x| !x.is_empty())
- .map(|endpoints| -> Result<_, sc_telemetry::Error> {
- let worker = TelemetryWorker::new(16)?;
- let telemetry = worker.handle().new_telemetry(endpoints);
- Ok((worker, telemetry))
- })
- .transpose()?;
-
- let telemetry = config.telemetry_endpoints.clone()
- .filter(|x| !x.is_empty())
- .map(|endpoints| -> Result<_, sc_telemetry::Error> {
- let worker = TelemetryWorker::new(16)?;
- let telemetry = worker.handle().new_telemetry(endpoints);
- Ok((worker, telemetry))
- })
- .transpose()?;
-
- let (client, backend, keystore_container, task_manager) =
- sc_service::new_full_parts::<Block, RuntimeApi, Executor>(
- &config,
- telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
- )?;
- let client = Arc::new(client);
-
- let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());
-
- let telemetry = telemetry.map(|(worker, telemetry)| {
- task_manager.spawn_handle().spawn("telemetry", worker.run());
- telemetry
- });
-
- let transaction_pool = sc_transaction_pool::BasicPool::new_full(
- config.transaction_pool.clone(),
- config.role.is_authority().into(),
- config.prometheus_registry(),
- task_manager.spawn_handle(),
- client.clone(),
- );
-
- let import_queue = build_import_queue(
- client.clone(),
- config,
- telemetry.as_ref().map(|telemetry| telemetry.handle()),
- &task_manager,
- )?;
-
- let params = PartialComponents {
- backend,
- client,
- import_queue,
- keystore_container,
- task_manager,
- transaction_pool,
- select_chain: (),
- other: (telemetry, telemetry_worker_handle),
- };
-
- Ok(params)
-}
-
-/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.
-///
-/// This is the actual implementation that is abstract over the executor and the runtime api.
-#[sc_tracing::logging::prefix_logs_with("Parachain")]
-async fn start_node_impl<RuntimeApi, Executor, RB, BIQ, BIC>(
- parachain_config: Configuration,
- collator_key: CollatorPair,
- polkadot_config: Configuration,
- id: ParaId,
- rpc_ext_builder: RB,
- build_import_queue: BIQ,
- build_consensus: BIC,
-) -> sc_service::error::Result<(TaskManager, Arc<TFullClient<Block, RuntimeApi, Executor>>)>
-where
- RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, Executor>>
- + Send
- + Sync
- + 'static,
- RuntimeApi::RuntimeApi: sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>
- + sp_api::Metadata<Block>
- + sp_session::SessionKeys<Block>
- + sp_api::ApiExt<
- Block,
- StateBackend = sc_client_api::StateBackendFor<TFullBackend<Block>, Block>,
- > + sp_offchain::OffchainWorkerApi<Block>
- + sp_block_builder::BlockBuilder<Block>
- + cumulus_primitives_core::CollectCollationInfo<Block>,
- sc_client_api::StateBackendFor<TFullBackend<Block>, Block>: sp_api::StateBackend<BlakeTwo256>,
- Executor: sc_executor::NativeExecutionDispatch + 'static,
- RB: Fn(
- Arc<TFullClient<Block, RuntimeApi, Executor>>,
- ) -> jsonrpc_core::IoHandler<sc_rpc::Metadata>
- + Send
- + 'static,
- BIQ: FnOnce(
- Arc<TFullClient<Block, RuntimeApi, Executor>>,
- &Configuration,
- Option<TelemetryHandle>,
- &TaskManager,
- ) -> Result<
- sp_consensus::DefaultImportQueue<Block, TFullClient<Block, RuntimeApi, Executor>>,
- sc_service::Error,
- >,
- BIC: FnOnce(
- Arc<TFullClient<Block, RuntimeApi, Executor>>,
- Option<&Registry>,
- Option<TelemetryHandle>,
- &TaskManager,
- &polkadot_service::NewFull<polkadot_service::Client>,
- Arc<sc_transaction_pool::FullPool<Block, TFullClient<Block, RuntimeApi, Executor>>>,
- Arc<NetworkService<Block, Hash>>,
- SyncCryptoStorePtr,
- bool,
- ) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
-{
- if matches!(parachain_config.role, Role::Light) {
- return Err("Light client not supported!".into());
- }
-
- let parachain_config = prepare_node_config(parachain_config);
-
- let params = new_partial::<RuntimeApi, Executor, BIQ>(¶chain_config, build_import_queue)?;
- let (mut telemetry, telemetry_worker_handle) = params.other;
-
- let relay_chain_full_node = cumulus_client_service::build_polkadot_full_node(
- polkadot_config,
- collator_key.clone(),
- telemetry_worker_handle,
- )
- .map_err(|e| match e {
- polkadot_service::Error::Sub(x) => x,
- s => format!("{}", s).into(),
- })?;
-
- let client = params.client.clone();
- let backend = params.backend.clone();
- let block_announce_validator = build_block_announce_validator(
- relay_chain_full_node.client.clone(),
- id,
- Box::new(relay_chain_full_node.network.clone()),
- relay_chain_full_node.backend.clone(),
- );
-
- let force_authoring = parachain_config.force_authoring;
- let validator = parachain_config.role.is_authority();
- let prometheus_registry = parachain_config.prometheus_registry().cloned();
- let transaction_pool = params.transaction_pool.clone();
- let mut task_manager = params.task_manager;
- let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
- let (network, network_status_sinks, system_rpc_tx, start_network) =
- sc_service::build_network(sc_service::BuildNetworkParams {
- config: ¶chain_config,
- client: client.clone(),
- transaction_pool: transaction_pool.clone(),
- spawn_handle: task_manager.spawn_handle(),
- import_queue: import_queue.clone(),
- on_demand: None,
- block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),
- })?;
-
- let rpc_client = client.clone();
- let rpc_extensions_builder = Box::new(move |_, _| rpc_ext_builder(rpc_client.clone()));
-
- sc_service::spawn_tasks(sc_service::SpawnTasksParams {
- on_demand: None,
- remote_blockchain: None,
- rpc_extensions_builder,
- client: client.clone(),
- transaction_pool: transaction_pool.clone(),
- task_manager: &mut task_manager,
- config: parachain_config,
- keystore: params.keystore_container.sync_keystore(),
- backend: backend.clone(),
- network: network.clone(),
- network_status_sinks,
- system_rpc_tx,
- telemetry: telemetry.as_mut(),
- })?;
-
- let announce_block = {
- let network = network.clone();
- Arc::new(move |hash, data| network.announce_block(hash, data))
- };
-
- if validator {
- let parachain_consensus = build_consensus(
- client.clone(),
- prometheus_registry.as_ref(),
- telemetry.as_ref().map(|t| t.handle()),
- &task_manager,
- &relay_chain_full_node,
- transaction_pool,
- network,
- params.keystore_container.sync_keystore(),
- force_authoring,
- )?;
-
- let spawner = task_manager.spawn_handle();
-
- let params = StartCollatorParams {
- para_id: id,
- block_status: client.clone(),
- announce_block,
- client: client.clone(),
- task_manager: &mut task_manager,
- collator_key,
- relay_chain_full_node,
- spawner,
- parachain_consensus,
- import_queue,
- };
-
- start_collator(params).await?;
- } else {
- let params = StartFullNodeParams {
- client: client.clone(),
- announce_block,
- task_manager: &mut task_manager,
- para_id: id,
- relay_chain_full_node,
- };
-
- start_full_node(params)?;
- }
-
- start_network.start_network();
-
- Ok((task_manager, client))
-}
-
-/// Build the import queue for the the parachain runtime.
-pub fn parachain_build_import_queue(
- client: Arc<TFullClient<Block, RuntimeApi, ParachainRuntimeExecutor>>,
- config: &Configuration,
- telemetry: Option<TelemetryHandle>,
- task_manager: &TaskManager,
-) -> Result<
- sp_consensus::DefaultImportQueue<
- Block,
- TFullClient<Block, RuntimeApi, ParachainRuntimeExecutor>,
- >,
- sc_service::Error,
-> {
- let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
-
-
- cumulus_client_consensus_aura::import_queue::<
- sp_consensus_aura::sr25519::AuthorityPair,
- _,
- _,
- _,
- _,
- _,
- _,
- >(cumulus_client_consensus_aura::ImportQueueParams {
- block_import: client.clone(),
- client: client.clone(),
- create_inherent_data_providers: move |_, _| async move {
- let time = sp_timestamp::InherentDataProvider::from_system_time();
-
- let slot =
- sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
- *time,
- slot_duration.slot_duration(),
- );
-
- Ok((time, slot))
- },
- registry: config.prometheus_registry().clone(),
- can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
- spawner: &task_manager.spawn_essential_handle(),
- telemetry,
- })
- .map_err(Into::into)
-}
-
-/// Start a normal parachain node.
-pub async fn start_node(
- parachain_config: Configuration,
- collator_key: CollatorPair,
- polkadot_config: Configuration,
- id: ParaId,
-) -> sc_service::error::Result<(TaskManager, Arc<TFullClient<Block, RuntimeApi, ParachainRuntimeExecutor>>)> {
- start_node_impl::<RuntimeApi, ParachainRuntimeExecutor, _, _, _>(
- parachain_config,
- collator_key,
- polkadot_config,
- id,
- |_| Default::default(),
- parachain_build_import_queue,
- |client,
- prometheus_registry,
- telemetry,
- task_manager,
- relay_chain_node,
- transaction_pool,
- sync_oracle,
- keystore,
- force_authoring| {
- let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
-
- let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
- task_manager.spawn_handle(),
- client.clone(),
- transaction_pool,
- prometheus_registry.clone(),
- telemetry.clone(),
- );
-
- let relay_chain_backend = relay_chain_node.backend.clone();
- let relay_chain_client = relay_chain_node.client.clone();
- Ok(build_aura_consensus::<
- sp_consensus_aura::sr25519::AuthorityPair,
- _,
- _,
- _,
- _,
- _,
- _,
- _,
- _,
- _,
- >(BuildAuraConsensusParams {
- proposer_factory,
- create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
- let parachain_inherent =
- cumulus_primitives_parachain_inherent::ParachainInherentData::create_at_with_client(
- relay_parent,
- &relay_chain_client,
- &*relay_chain_backend,
- &validation_data,
- id,
- );
- async move {
- let time = sp_timestamp::InherentDataProvider::from_system_time();
-
- let slot =
- sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
- *time,
- slot_duration.slot_duration(),
- );
-
- let parachain_inherent = parachain_inherent.ok_or_else(|| {
- Box::<dyn std::error::Error + Send + Sync>::from(
- "Failed to create parachain inherent",
- )
- })?;
- Ok((time, slot, parachain_inherent))
- }
- },
- block_import: client.clone(),
- relay_chain_client: relay_chain_node.client.clone(),
- relay_chain_backend: relay_chain_node.backend.clone(),
- para_client: client.clone(),
- backoff_authoring_blocks: Option::<()>::None,
- sync_oracle,
- keystore,
- force_authoring,
- slot_duration,
- // We got around 500ms for proposing
- block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
- telemetry,
- }))
- },
- )
- .await
-}
\ No newline at end of file
pallets/nft-charge-transaction/Cargo.tomldiffbeforeafterboth--- a/pallets/nft-charge-transaction/Cargo.toml
+++ b/pallets/nft-charge-transaction/Cargo.toml
@@ -19,7 +19,7 @@
version = '2.0.0'
[dependencies]
-serde = { version = "1.0.119" }
+serde = { version = "1.0.119", default-features = false }
frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
pallet-balances = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
pallets/nft-transaction-payment/Cargo.tomldiffbeforeafterboth--- a/pallets/nft-transaction-payment/Cargo.toml
+++ b/pallets/nft-transaction-payment/Cargo.toml
@@ -19,7 +19,7 @@
version = '2.0.0'
[dependencies]
-serde = { version = "1.0.119" }
+serde = { version = "1.0.119", default-features = false }
frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
pallet-balances = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
pallets/nft/Cargo.tomldiffbeforeafterboth--- a/pallets/nft/Cargo.toml
+++ b/pallets/nft/Cargo.toml
@@ -31,6 +31,7 @@
'fp-evm/std',
'nft-data-structs/std',
'sp-std/std',
+ 'sp-api/std',
'sp-runtime/std',
'frame-benchmarking/std',
'ethereum/std',
@@ -106,6 +107,7 @@
version = '3.0.0'
[dependencies.serde]
+default-features = false
features = ['derive']
version = '1.0.119'
@@ -141,8 +143,12 @@
ethereum-tx-sign = { version = "3.0.4", optional = true }
ethereum = { default-features = false, version = "0.7.1" }
rlp = { default-features = false, version = "0.5.0" }
+sp-api = { default-features = false, version = '3.0.0', git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.3" }
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
primitive-types = { version = "0.9.0", default-features = false, features = ["serde_no_std"] }
+pallet-evm = { default-features = false, version = "4.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-ethereum = { default-features = false, version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fp-evm = { default-features = false, version = '2.0.0', git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
hex-literal = "0.3.1"
\ No newline at end of file
pallets/nft/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#![recursion_limit = "1024"]78#![cfg_attr(not(feature = "std"), no_std)]910extern crate alloc;1112pub use serde::{Serialize, Deserialize};1314pub use frame_support::{15 construct_runtime, decl_event, decl_module, decl_storage, decl_error,16 dispatch::DispatchResult,17 ensure, fail, parameter_types,18 traits::{19 Currency, ExistenceRequirement, Get, Imbalance, KeyOwnerProofSystem, OnUnbalanced,20 Randomness, IsSubType, WithdrawReasons,21 },22 weights::{23 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},24 DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,25 WeightToFeePolynomial, DispatchClass,26 },27 StorageValue,28 transactional,29};3031use frame_system::{self as system, ensure_signed, ensure_root};32use sp_core::H160;33use sp_runtime::sp_std::prelude::Vec;34use core::ops::{Deref, DerefMut};35use nft_data_structs::{36 MAX_DECIMAL_POINTS, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP, MAX_REFUNGIBLE_PIECES,37 AccessMode, ChainLimits, Collection, CreateItemData, CollectionLimits,38 CollectionId, CollectionMode, TokenId, 39 SchemaVersion, SponsorshipState, Ownership,40 NftItemType, FungibleItemType, ReFungibleItemType41};4243#[cfg(test)]44mod mock;4546#[cfg(test)]47mod tests;4849mod default_weights;50mod eth;5152pub use eth::NftErcSupport;53pub use eth::account::*;54use eth::erc::{ERC20Events, ERC721Events};5556#[cfg(feature = "runtime-benchmarks")]57mod benchmarking;5859pub trait WeightInfo {60 fn create_collection() -> Weight;61 fn destroy_collection() -> Weight;62 fn add_to_white_list() -> Weight;63 fn remove_from_white_list() -> Weight;64 fn set_public_access_mode() -> Weight;65 fn set_mint_permission() -> Weight;66 fn change_collection_owner() -> Weight;67 fn add_collection_admin() -> Weight;68 fn remove_collection_admin() -> Weight;69 fn set_collection_sponsor() -> Weight;70 fn confirm_sponsorship() -> Weight;71 fn remove_collection_sponsor() -> Weight;72 fn create_item(s: usize) -> Weight;73 fn burn_item() -> Weight;74 fn transfer() -> Weight;75 fn approve() -> Weight;76 fn transfer_from() -> Weight;77 fn set_offchain_schema() -> Weight;78 fn set_const_on_chain_schema() -> Weight;79 fn set_variable_on_chain_schema() -> Weight;80 fn set_variable_meta_data() -> Weight;81 fn enable_contract_sponsoring() -> Weight;82 fn set_schema_version() -> Weight;83 fn set_chain_limits() -> Weight;84 fn set_contract_sponsoring_rate_limit() -> Weight;85 fn set_variable_meta_data_sponsoring_rate_limit() -> Weight;86 fn toggle_contract_white_list() -> Weight;87 fn add_to_contract_white_list() -> Weight;88 fn remove_from_contract_white_list() -> Weight;89 fn set_collection_limits() -> Weight;90}9192decl_error! {93 /// Error for non-fungible-token module.94 pub enum Error for Module<T: Config> {95 /// Total collections bound exceeded.96 TotalCollectionsLimitExceeded,97 /// Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.98 CollectionDecimalPointLimitExceeded, 99 /// Collection name can not be longer than 63 char.100 CollectionNameLimitExceeded, 101 /// Collection description can not be longer than 255 char.102 CollectionDescriptionLimitExceeded, 103 /// Token prefix can not be longer than 15 char.104 CollectionTokenPrefixLimitExceeded,105 /// This collection does not exist.106 CollectionNotFound,107 /// Item not exists.108 TokenNotFound,109 /// Admin not found110 AdminNotFound,111 /// Arithmetic calculation overflow.112 NumOverflow, 113 /// Account already has admin role.114 AlreadyAdmin, 115 /// You do not own this collection.116 NoPermission,117 /// This address is not set as sponsor, use setCollectionSponsor first.118 ConfirmUnsetSponsorFail,119 /// Collection is not in mint mode.120 PublicMintingNotAllowed,121 /// Sender parameter and item owner must be equal.122 MustBeTokenOwner,123 /// Item balance not enough.124 TokenValueTooLow,125 /// Size of item is too large.126 NftSizeLimitExceeded,127 /// No approve found128 ApproveNotFound,129 /// Requested value more than approved.130 TokenValueNotEnough,131 /// Only approved addresses can call this method.132 ApproveRequired,133 /// Address is not in white list.134 AddresNotInWhiteList,135 /// Number of collection admins bound exceeded.136 CollectionAdminsLimitExceeded,137 /// Owned tokens by a single address bound exceeded.138 AddressOwnershipLimitExceeded,139 /// Length of items properties must be greater than 0.140 EmptyArgument,141 /// const_data exceeded data limit.142 TokenConstDataLimitExceeded,143 /// variable_data exceeded data limit.144 TokenVariableDataLimitExceeded,145 /// Not NFT item data used to mint in NFT collection.146 NotNftDataUsedToMintNftCollectionToken,147 /// Not Fungible item data used to mint in Fungible collection.148 NotFungibleDataUsedToMintFungibleCollectionToken,149 /// Not Re Fungible item data used to mint in Re Fungible collection.150 NotReFungibleDataUsedToMintReFungibleCollectionToken,151 /// Unexpected collection type.152 UnexpectedCollectionType,153 /// Can't store metadata in fungible tokens.154 CantStoreMetadataInFungibleTokens,155 /// Collection token limit exceeded156 CollectionTokenLimitExceeded,157 /// Account token limit exceeded per collection158 AccountTokenLimitExceeded,159 /// Collection limit bounds per collection exceeded160 CollectionLimitBoundsExceeded,161 /// Tried to enable permissions which are only permitted to be disabled162 OwnerPermissionsCantBeReverted,163 /// Schema data size limit bound exceeded164 SchemaDataLimitExceeded,165 /// Maximum refungibility exceeded166 WrongRefungiblePieces,167 /// createRefungible should be called with one owner168 BadCreateRefungibleCall,169 /// Gas limit exceeded170 OutOfGas,171 }172}173174pub struct CollectionHandle<T: system::Config> {175 pub id: CollectionId,176 pub collection: Collection<T>,177}178179impl<T: frame_system::Config> Deref for CollectionHandle<T> {180 type Target = Collection<T>;181182 fn deref(&self) -> &Self::Target {183 &self.collection184 }185}186187impl<T: frame_system::Config> DerefMut for CollectionHandle<T> {188 fn deref_mut(&mut self) -> &mut Self::Target {189 &mut self.collection190 }191}192193pub trait Config: system::Config + Sized {194 type Event: From<Event<Self>> + Into<<Self as system::Config>::Event>;195196 /// Weight information for extrinsics in this pallet.197 type WeightInfo: WeightInfo;198199 type EvmAddressMapping: pallet_evm::AddressMapping<Self::AccountId>;200 type EvmBackwardsAddressMapping: EvmBackwardsAddressMapping<Self::AccountId>;201 type EvmWithdrawOrigin: pallet_evm::EnsureAddressOrigin<Self::Origin, Success = Self::AccountId>;202203 type CrossAccountId: CrossAccountId<Self::AccountId>;204 type Currency: Currency<Self::AccountId>;205 type CollectionCreationPrice: Get<<<Self as Config>::Currency as Currency<Self::AccountId>>::Balance>;206 type TreasuryAccountId: Get<Self::AccountId>;207208 type EthereumChainId: Get<u64>;209 type EthereumTransactionSender: pallet_ethereum::EthereumTransactionSender;210}211212// # Used definitions213//214// ## User control levels215//216// chain-controlled - key is uncontrolled by user217// i.e autoincrementing index218// can use non-cryptographic hash219// real - key is controlled by user220// but it is hard to generate enough colliding values, i.e owner of signed txs221// can use non-cryptographic hash222// controlled - key is completly controlled by users223// i.e maps with mutable keys224// should use cryptographic hash225//226// ## User control level downgrade reasons227//228// ?1 - chain-controlled -> controlled229// collections/tokens can be destroyed, resulting in massive holes230// ?2 - chain-controlled -> controlled231// same as ?1, but can be only added, resulting in easier exploitation232// ?3 - real -> controlled233// no confirmation required, so addresses can be easily generated234decl_storage! {235 trait Store for Module<T: Config> as Nft {236237 //#region Private members238 /// Id of next collection239 CreatedCollectionCount: u32;240 /// Used for migrations241 ChainVersion: u64;242 /// Id of last collection token243 /// Collection id (controlled?1)244 ItemListIndex: map hasher(blake2_128_concat) CollectionId => TokenId;245 //#endregion246247 //#region Chain limits struct248 pub ChainLimit get(fn chain_limit) config(): ChainLimits;249 //#endregion250251 //#region Bound counters252 /// Amount of collections destroyed, used for total amount tracking with253 /// CreatedCollectionCount254 DestroyedCollectionCount: u32;255 /// Total amount of account owned tokens (NFTs + RFTs + unique fungibles)256 /// Account id (real)257 pub AccountItemCount get(fn account_item_count): map hasher(twox_64_concat) T::AccountId => u32;258 //#endregion259260 //#region Basic collections261 /// Collection info262 /// Collection id (controlled?1)263 pub CollectionById get(fn collection_id) config(): map hasher(blake2_128_concat) CollectionId => Option<Collection<T>> = None;264 /// List of collection admins265 /// Collection id (controlled?2)266 pub AdminList get(fn admin_list_collection): map hasher(blake2_128_concat) CollectionId => Vec<T::CrossAccountId>;267 /// Whitelisted collection users268 /// Collection id (controlled?2), user id (controlled?3)269 pub WhiteList get(fn white_list): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => bool;270 //#endregion271272 /// How many of collection items user have273 /// Collection id (controlled?2), account id (real)274 pub Balance get(fn balance_count): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => u128;275276 /// Amount of items which spender can transfer out of owners account (via transferFrom)277 /// Collection id (controlled?2), (token id (controlled ?2) + owner account id (real) + spender account id (controlled?3))278 /// TODO: Off chain worker should remove from this map when token gets removed279 pub Allowances get(fn approved): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) (TokenId, T::AccountId, T::AccountId) => u128;280281 //#region Item collections282 /// Collection id (controlled?2), token id (controlled?1)283 pub NftItemList get(fn nft_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<NftItemType<T::CrossAccountId>>;284 /// Collection id (controlled?2), owner (controlled?2)285 pub FungibleItemList get(fn fungible_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => FungibleItemType;286 /// Collection id (controlled?2), token id (controlled?1)287 pub ReFungibleItemList get(fn refungible_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<ReFungibleItemType<T::CrossAccountId>>;288 //#endregion289290 //#region Index list291 /// Collection id (controlled?2), tokens owner (controlled?2)292 pub AddressTokens get(fn address_tokens): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => Vec<TokenId>;293 //#endregion294295 //#region Tokens transfer rate limit baskets296 /// (Collection id (controlled?2), who created (real))297 /// TODO: Off chain worker should remove from this map when collection gets removed298 pub CreateItemBasket get(fn create_item_basket): map hasher(blake2_128_concat) (CollectionId, T::AccountId) => T::BlockNumber;299 /// Collection id (controlled?2), token id (controlled?2)300 pub NftTransferBasket get(fn nft_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => T::BlockNumber;301 /// Collection id (controlled?2), owning user (real)302 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => T::BlockNumber;303 /// Collection id (controlled?2), token id (controlled?2)304 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => T::BlockNumber;305 //#endregion306307 /// Variable metadata sponsoring308 /// Collection id (controlled?2), token id (controlled?2)309 pub VariableMetaDataBasket get(fn variable_meta_data_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber> = None;310 311 //#region Contract Sponsorship and Ownership312 /// Contract address (real)313 pub ContractOwner get(fn contract_owner): map hasher(twox_64_concat) T::AccountId => Option<T::AccountId>;314 /// Contract address (real)315 pub ContractSelfSponsoring get(fn contract_self_sponsoring): map hasher(twox_64_concat) T::AccountId => bool;316 /// (Contract address(real), caller (real))317 pub ContractSponsorBasket get(fn contract_sponsor_basket): map hasher(twox_64_concat) (T::AccountId, T::AccountId) => T::BlockNumber;318 /// Contract address (real)319 pub ContractSponsoringRateLimit get(fn contract_sponsoring_rate_limit): map hasher(twox_64_concat) T::AccountId => T::BlockNumber;320 /// Contract address (real)321 pub ContractWhiteListEnabled get(fn contract_white_list_enabled): map hasher(twox_64_concat) T::AccountId => bool; 322 /// Contract address (real) => Whitelisted user (controlled?3)323 pub ContractWhiteList get(fn contract_white_list): double_map hasher(twox_64_concat) T::AccountId, hasher(blake2_128_concat) T::AccountId => bool; 324 //#endregion325 }326 add_extra_genesis {327 build(|config: &GenesisConfig<T>| {328 // Modification of storage329 for (_num, _c) in &config.collection_id {330 <Module<T>>::init_collection(_c);331 }332333 for (_num, _c, _i) in &config.nft_item_id {334 <Module<T>>::init_nft_token(*_c, _i);335 }336337 for (collection_id, account_id, fungible_item) in &config.fungible_item_id {338 <Module<T>>::init_fungible_token(*collection_id, &T::CrossAccountId::from_sub(account_id.clone()), fungible_item);339 }340341 for (_num, _c, _i) in &config.refungible_item_id {342 <Module<T>>::init_refungible_token(*_c, _i);343 }344 })345 }346}347348decl_event!(349 pub enum Event<T>350 where351 AccountId = <T as frame_system::Config>::AccountId,352 CrossAccountId = <T as Config>::CrossAccountId,353 {354 /// New collection was created355 /// 356 /// # Arguments357 /// 358 /// * collection_id: Globally unique identifier of newly created collection.359 /// 360 /// * mode: [CollectionMode] converted into u8.361 /// 362 /// * account_id: Collection owner.363 CollectionCreated(CollectionId, u8, AccountId),364365 /// New item was created.366 /// 367 /// # Arguments368 /// 369 /// * collection_id: Id of the collection where item was created.370 /// 371 /// * item_id: Id of an item. Unique within the collection.372 ///373 /// * recipient: Owner of newly created item 374 ItemCreated(CollectionId, TokenId, CrossAccountId),375376 /// Collection item was burned.377 /// 378 /// # Arguments379 /// 380 /// collection_id.381 /// 382 /// item_id: Identifier of burned NFT.383 ItemDestroyed(CollectionId, TokenId),384385 /// Item was transferred386 ///387 /// * collection_id: Id of collection to which item is belong388 ///389 /// * item_id: Id of an item390 ///391 /// * sender: Original owner of item392 ///393 /// * recipient: New owner of item394 ///395 /// * amount: Always 1 for NFT396 Transfer(CollectionId, TokenId, CrossAccountId, CrossAccountId, u128),397398 /// * collection_id399 ///400 /// * item_id401 ///402 /// * sender403 ///404 /// * spender405 ///406 /// * amount407 Approved(CollectionId, TokenId, CrossAccountId, CrossAccountId, u128),408 }409);410411decl_module! {412 pub struct Module<T: Config> for enum Call 413 where 414 origin: T::Origin415 {416 fn deposit_event() = default;417 type Error = Error<T>;418419 fn on_initialize(_now: T::BlockNumber) -> Weight {420 0421 }422423 /// This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner and admin of the collection are set to the address that signed the transaction. Both addresses can be changed later.424 /// 425 /// # Permissions426 /// 427 /// * Anyone.428 /// 429 /// # Arguments430 /// 431 /// * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.432 /// 433 /// * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.434 /// 435 /// * token_prefix: UTF-8 string with token prefix.436 /// 437 /// * mode: [CollectionMode] collection type and type dependent data.438 // returns collection ID439 #[weight = <T as Config>::WeightInfo::create_collection()]440 #[transactional]441 pub fn create_collection(origin,442 collection_name: Vec<u16>,443 collection_description: Vec<u16>,444 token_prefix: Vec<u8>,445 mode: CollectionMode) -> DispatchResult {446447 // Anyone can create a collection448 let who = ensure_signed(origin)?;449450 // Take a (non-refundable) deposit of collection creation451 let mut imbalance = <<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();452 imbalance.subsume(<<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(453 &T::TreasuryAccountId::get(),454 T::CollectionCreationPrice::get(),455 ));456 <T as Config>::Currency::settle(457 &who,458 imbalance,459 WithdrawReasons::TRANSFER,460 ExistenceRequirement::KeepAlive,461 ).map_err(|_| Error::<T>::NoPermission)?;462463 let decimal_points = match mode {464 CollectionMode::Fungible(points) => points,465 _ => 0466 };467468 let chain_limit = ChainLimit::get();469470 let created_count = CreatedCollectionCount::get();471 let destroyed_count = DestroyedCollectionCount::get();472473 // bound Total number of collections474 ensure!(created_count - destroyed_count < chain_limit.collection_numbers_limit, Error::<T>::TotalCollectionsLimitExceeded);475476 // check params477 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);478 ensure!(collection_name.len() <= 64, Error::<T>::CollectionNameLimitExceeded);479 ensure!(collection_description.len() <= 256, Error::<T>::CollectionDescriptionLimitExceeded);480 ensure!(token_prefix.len() <= 16, Error::<T>::CollectionTokenPrefixLimitExceeded);481482 // Generate next collection ID483 let next_id = created_count484 .checked_add(1)485 .ok_or(Error::<T>::NumOverflow)?;486487 CreatedCollectionCount::put(next_id);488489 let limits = CollectionLimits {490 sponsored_data_size: chain_limit.custom_data_limit,491 ..Default::default()492 };493494 // Create new collection495 let new_collection = Collection {496 owner: who.clone(),497 name: collection_name,498 mode: mode.clone(),499 mint_mode: false,500 access: AccessMode::Normal,501 description: collection_description,502 decimal_points: decimal_points,503 token_prefix: token_prefix,504 offchain_schema: Vec::new(),505 schema_version: SchemaVersion::ImageURL,506 sponsorship: SponsorshipState::Disabled,507 variable_on_chain_schema: Vec::new(),508 const_on_chain_schema: Vec::new(),509 limits,510 };511512 // Add new collection to map513 <CollectionById<T>>::insert(next_id, new_collection);514515 // call event516 Self::deposit_event(RawEvent::CollectionCreated(next_id, mode.into(), who));517518 Ok(())519 }520521 /// **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.522 /// 523 /// # Permissions524 /// 525 /// * Collection Owner.526 /// 527 /// # Arguments528 /// 529 /// * collection_id: collection to destroy.530 #[weight = <T as Config>::WeightInfo::destroy_collection()]531 #[transactional]532 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {533534 let sender = ensure_signed(origin)?;535 let collection = Self::get_collection(collection_id)?;536 Self::check_owner_permissions(&collection, &sender)?;537 if !collection.limits.owner_can_destroy {538 fail!(Error::<T>::NoPermission);539 }540541 <AddressTokens<T>>::remove_prefix(collection_id);542 <Allowances<T>>::remove_prefix(collection_id);543 <Balance<T>>::remove_prefix(collection_id);544 <ItemListIndex>::remove(collection_id);545 <AdminList<T>>::remove(collection_id);546 <CollectionById<T>>::remove(collection_id);547 <WhiteList<T>>::remove_prefix(collection_id);548549 <NftItemList<T>>::remove_prefix(collection_id);550 <FungibleItemList<T>>::remove_prefix(collection_id);551 <ReFungibleItemList<T>>::remove_prefix(collection_id);552553 <NftTransferBasket<T>>::remove_prefix(collection_id);554 <FungibleTransferBasket<T>>::remove_prefix(collection_id);555 <ReFungibleTransferBasket<T>>::remove_prefix(collection_id);556557 <VariableMetaDataBasket<T>>::remove_prefix(collection_id);558559 DestroyedCollectionCount::put(DestroyedCollectionCount::get()560 .checked_add(1)561 .ok_or(Error::<T>::NumOverflow)?);562563 Ok(())564 }565566 /// Add an address to white list.567 /// 568 /// # Permissions569 /// 570 /// * Collection Owner571 /// * Collection Admin572 /// 573 /// # Arguments574 /// 575 /// * collection_id.576 /// 577 /// * address.578 #[weight = <T as Config>::WeightInfo::add_to_white_list()]579 #[transactional]580 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{581582 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);583 let collection = Self::get_collection(collection_id)?;584585 Self::toggle_white_list_internal(586 &sender,587 &collection,588 &address,589 true,590 )?;591592 Ok(())593 }594595 /// Remove an address from white list.596 /// 597 /// # Permissions598 /// 599 /// * Collection Owner600 /// * Collection Admin601 /// 602 /// # Arguments603 /// 604 /// * collection_id.605 /// 606 /// * address.607 #[weight = <T as Config>::WeightInfo::remove_from_white_list()]608 #[transactional]609 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{610611 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);612 let collection = Self::get_collection(collection_id)?;613614 Self::toggle_white_list_internal(615 &sender,616 &collection,617 &address,618 false,619 )?;620621 Ok(())622 }623624 /// Toggle between normal and white list access for the methods with access for `Anyone`.625 /// 626 /// # Permissions627 /// 628 /// * Collection Owner.629 /// 630 /// # Arguments631 /// 632 /// * collection_id.633 /// 634 /// * mode: [AccessMode]635 #[weight = <T as Config>::WeightInfo::set_public_access_mode()]636 #[transactional]637 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult638 {639 let sender = ensure_signed(origin)?;640641 let mut target_collection = Self::get_collection(collection_id)?;642 Self::check_owner_permissions(&target_collection, &sender)?;643 target_collection.access = mode;644 Self::save_collection(target_collection);645646 Ok(())647 }648649 /// Allows Anyone to create tokens if:650 /// * White List is enabled, and651 /// * Address is added to white list, and652 /// * This method was called with True parameter653 /// 654 /// # Permissions655 /// * Collection Owner656 ///657 /// # Arguments658 /// 659 /// * collection_id.660 /// 661 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.662 #[weight = <T as Config>::WeightInfo::set_mint_permission()]663 #[transactional]664 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult665 {666 let sender = ensure_signed(origin)?;667668 let mut target_collection = Self::get_collection(collection_id)?;669 Self::check_owner_permissions(&target_collection, &sender)?;670 target_collection.mint_mode = mint_permission;671 Self::save_collection(target_collection);672673 Ok(())674 }675676 /// Change the owner of the collection.677 /// 678 /// # Permissions679 /// 680 /// * Collection Owner.681 /// 682 /// # Arguments683 /// 684 /// * collection_id.685 /// 686 /// * new_owner.687 #[weight = <T as Config>::WeightInfo::change_collection_owner()]688 #[transactional]689 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {690691 let sender = ensure_signed(origin)?;692 let mut target_collection = Self::get_collection(collection_id)?;693 Self::check_owner_permissions(&target_collection, &sender)?;694 target_collection.owner = new_owner;695 Self::save_collection(target_collection);696697 Ok(())698 }699700 /// Adds an admin of the Collection.701 /// NFT Collection can be controlled by multiple admin addresses (some which can also be servers, for example). Admins can issue and burn NFTs, as well as add and remove other admins, but cannot change NFT or Collection ownership. 702 /// 703 /// # Permissions704 /// 705 /// * Collection Owner.706 /// * Collection Admin.707 /// 708 /// # Arguments709 /// 710 /// * collection_id: ID of the Collection to add admin for.711 /// 712 /// * new_admin_id: Address of new admin to add.713 #[weight = <T as Config>::WeightInfo::add_collection_admin()]714 #[transactional]715 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {716 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);717 let collection = Self::get_collection(collection_id)?;718 Self::check_owner_or_admin_permissions(&collection, &sender)?;719 let mut admin_arr = <AdminList<T>>::get(collection_id);720721 match admin_arr.binary_search(&new_admin_id) {722 Ok(_) => {},723 Err(idx) => {724 let limits = ChainLimit::get();725 ensure!(admin_arr.len() < limits.collections_admins_limit as usize, Error::<T>::CollectionAdminsLimitExceeded);726 admin_arr.insert(idx, new_admin_id);727 <AdminList<T>>::insert(collection_id, admin_arr);728 }729 }730 Ok(())731 }732733 /// Remove admin address of the Collection. An admin address can remove itself. List of admins may become empty, in which case only Collection Owner will be able to add an Admin.734 ///735 /// # Permissions736 /// 737 /// * Collection Owner.738 /// * Collection Admin.739 /// 740 /// # Arguments741 /// 742 /// * collection_id: ID of the Collection to remove admin for.743 /// 744 /// * account_id: Address of admin to remove.745 #[weight = <T as Config>::WeightInfo::remove_collection_admin()]746 #[transactional]747 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {748 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);749 let collection = Self::get_collection(collection_id)?;750 Self::check_owner_or_admin_permissions(&collection, &sender)?;751 let mut admin_arr = <AdminList<T>>::get(collection_id);752753 match admin_arr.binary_search(&account_id) {754 Ok(idx) => {755 admin_arr.remove(idx);756 <AdminList<T>>::insert(collection_id, admin_arr);757 },758 Err(_) => {}759 }760 Ok(())761 }762763 /// # Permissions764 /// 765 /// * Collection Owner766 /// 767 /// # Arguments768 /// 769 /// * collection_id.770 /// 771 /// * new_sponsor.772 #[weight = <T as Config>::WeightInfo::set_collection_sponsor()]773 #[transactional]774 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {775 let sender = ensure_signed(origin)?;776 let mut target_collection = Self::get_collection(collection_id)?;777 Self::check_owner_permissions(&target_collection, &sender)?;778779 target_collection.sponsorship = SponsorshipState::Unconfirmed(new_sponsor);780 Self::save_collection(target_collection);781782 Ok(())783 }784785 /// # Permissions786 /// 787 /// * Sponsor.788 /// 789 /// # Arguments790 /// 791 /// * collection_id.792 #[weight = <T as Config>::WeightInfo::confirm_sponsorship()]793 #[transactional]794 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {795 let sender = ensure_signed(origin)?;796797 let mut target_collection = Self::get_collection(collection_id)?;798 ensure!(799 target_collection.sponsorship.pending_sponsor() == Some(&sender),800 Error::<T>::ConfirmUnsetSponsorFail801 );802803 target_collection.sponsorship = SponsorshipState::Confirmed(sender);804 Self::save_collection(target_collection);805806 Ok(())807 }808809 /// Switch back to pay-per-own-transaction model.810 ///811 /// # Permissions812 ///813 /// * Collection owner.814 /// 815 /// # Arguments816 /// 817 /// * collection_id.818 #[weight = <T as Config>::WeightInfo::remove_collection_sponsor()]819 #[transactional]820 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {821 let sender = ensure_signed(origin)?;822823 let mut target_collection = Self::get_collection(collection_id)?;824 Self::check_owner_permissions(&target_collection, &sender)?;825826 target_collection.sponsorship = SponsorshipState::Disabled;827 Self::save_collection(target_collection);828829 Ok(())830 }831832 /// This method creates a concrete instance of NFT Collection created with CreateCollection method.833 /// 834 /// # Permissions835 /// 836 /// * Collection Owner.837 /// * Collection Admin.838 /// * Anyone if839 /// * White List is enabled, and840 /// * Address is added to white list, and841 /// * MintPermission is enabled (see SetMintPermission method)842 /// 843 /// # Arguments844 /// 845 /// * collection_id: ID of the collection.846 /// 847 /// * owner: Address, initial owner of the NFT.848 ///849 /// * data: Token data to store on chain.850 // #[weight =851 // (130_000_000 as Weight)852 // .saturating_add((2135 as Weight).saturating_mul((properties.len() as u64) as Weight))853 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))854 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]855856 #[weight = <T as Config>::WeightInfo::create_item(data.len())]857 #[transactional]858 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResult {859 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);860 let collection = Self::get_collection(collection_id)?;861862 Self::create_item_internal(&sender, &collection, &owner, data)?;863864 Self::submit_logs(collection)?;865 Ok(())866 }867868 /// This method creates multiple items in a collection created with CreateCollection method.869 /// 870 /// # Permissions871 /// 872 /// * Collection Owner.873 /// * Collection Admin.874 /// * Anyone if875 /// * White List is enabled, and876 /// * Address is added to white list, and877 /// * MintPermission is enabled (see SetMintPermission method)878 /// 879 /// # Arguments880 /// 881 /// * collection_id: ID of the collection.882 /// 883 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].884 /// 885 /// * owner: Address, initial owner of the NFT.886 #[weight = <T as Config>::WeightInfo::create_item(items_data.into_iter()887 .map(|data| { data.len() })888 .sum())]889 #[transactional]890 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResult {891892 ensure!(items_data.len() > 0, Error::<T>::EmptyArgument);893 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);894 let collection = Self::get_collection(collection_id)?;895896 Self::create_multiple_items_internal(&sender, &collection, &owner, items_data)?;897898 Self::submit_logs(collection)?;899 Ok(())900 }901902 /// Destroys a concrete instance of NFT.903 /// 904 /// # Permissions905 /// 906 /// * Collection Owner.907 /// * Collection Admin.908 /// * Current NFT Owner.909 /// 910 /// # Arguments911 /// 912 /// * collection_id: ID of the collection.913 /// 914 /// * item_id: ID of NFT to burn.915 #[weight = <T as Config>::WeightInfo::burn_item()]916 #[transactional]917 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {918919 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);920 let target_collection = Self::get_collection(collection_id)?;921922 Self::burn_item_internal(&sender, &target_collection, item_id, value)?;923924 Self::submit_logs(target_collection)?;925 Ok(())926 }927928 /// Change ownership of the token.929 /// 930 /// # Permissions931 /// 932 /// * Collection Owner933 /// * Collection Admin934 /// * Current NFT owner935 ///936 /// # Arguments937 /// 938 /// * recipient: Address of token recipient.939 /// 940 /// * collection_id.941 /// 942 /// * item_id: ID of the item943 /// * Non-Fungible Mode: Required.944 /// * Fungible Mode: Ignored.945 /// * Re-Fungible Mode: Required.946 /// 947 /// * value: Amount to transfer.948 /// * Non-Fungible Mode: Ignored949 /// * Fungible Mode: Must specify transferred amount950 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)951 #[weight = <T as Config>::WeightInfo::transfer()]952 #[transactional]953 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {954 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);955 let collection = Self::get_collection(collection_id)?;956957 Self::transfer_internal(&sender, &recipient, &collection, item_id, value)?;958959 Self::submit_logs(collection)?;960 Ok(())961 }962963 /// Set, change, or remove approved address to transfer the ownership of the NFT.964 /// 965 /// # Permissions966 /// 967 /// * Collection Owner968 /// * Collection Admin969 /// * Current NFT owner970 /// 971 /// # Arguments972 /// 973 /// * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).974 /// 975 /// * collection_id.976 /// 977 /// * item_id: ID of the item.978 #[weight = <T as Config>::WeightInfo::approve()]979 #[transactional]980 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResult {981 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);982 let collection = Self::get_collection(collection_id)?;983984 Self::approve_internal(&sender, &spender, &collection, item_id, amount)?;985986 Self::submit_logs(collection)?;987 Ok(())988 }989 990 /// Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.991 /// 992 /// # Permissions993 /// * Collection Owner994 /// * Collection Admin995 /// * Current NFT owner996 /// * Address approved by current NFT owner997 /// 998 /// # Arguments999 /// 1000 /// * from: Address that owns token.1001 /// 1002 /// * recipient: Address of token recipient.1003 /// 1004 /// * collection_id.1005 /// 1006 /// * item_id: ID of the item.1007 /// 1008 /// * value: Amount to transfer.1009 #[weight = <T as Config>::WeightInfo::transfer_from()]1010 #[transactional]1011 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResult {1012 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1013 let collection = Self::get_collection(collection_id)?;10141015 Self::transfer_from_internal(&sender, &from, &recipient, &collection, item_id, value)?;10161017 Self::submit_logs(collection)?;1018 Ok(())1019 }1020 // #[weight = 0]1021 // // let no_perm_mes = "You do not have permissions to modify this collection";1022 // // ensure!(<ApprovedList<T>>::contains_key((collection_id, item_id)), no_perm_mes);1023 // // let list_itm = <ApprovedList<T>>::get((collection_id, item_id));1024 // // ensure!(list_itm.contains(&new_owner.clone()), no_perm_mes);10251026 // // // on_nft_received call10271028 // // Self::transfer(origin, collection_id, item_id, new_owner)?;10291030 // Ok(())1031 // }10321033 /// Set off-chain data schema.1034 /// 1035 /// # Permissions1036 /// 1037 /// * Collection Owner1038 /// * Collection Admin1039 /// 1040 /// # Arguments1041 /// 1042 /// * collection_id.1043 /// 1044 /// * schema: String representing the offchain data schema.1045 #[weight = <T as Config>::WeightInfo::set_variable_meta_data()]1046 #[transactional]1047 pub fn set_variable_meta_data (1048 origin,1049 collection_id: CollectionId,1050 item_id: TokenId,1051 data: Vec<u8>1052 ) -> DispatchResult {1053 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1054 1055 let collection = Self::get_collection(collection_id)?;10561057 Self::set_variable_meta_data_internal(&sender, &collection, item_id, data)?;10581059 Ok(())1060 }1061 1062 /// Set schema standard1063 /// ImageURL1064 /// Unique1065 /// 1066 /// # Permissions1067 /// 1068 /// * Collection Owner1069 /// * Collection Admin1070 /// 1071 /// # Arguments1072 /// 1073 /// * collection_id.1074 /// 1075 /// * schema: SchemaVersion: enum1076 #[weight = <T as Config>::WeightInfo::set_schema_version()]1077 #[transactional]1078 pub fn set_schema_version(1079 origin,1080 collection_id: CollectionId,1081 version: SchemaVersion1082 ) -> DispatchResult {1083 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1084 let mut target_collection = Self::get_collection(collection_id)?;1085 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1086 target_collection.schema_version = version;1087 Self::save_collection(target_collection);10881089 Ok(())1090 }10911092 /// Set off-chain data schema.1093 /// 1094 /// # Permissions1095 /// 1096 /// * Collection Owner1097 /// * Collection Admin1098 /// 1099 /// # Arguments1100 /// 1101 /// * collection_id.1102 /// 1103 /// * schema: String representing the offchain data schema.1104 #[weight = <T as Config>::WeightInfo::set_offchain_schema()]1105 #[transactional]1106 pub fn set_offchain_schema(1107 origin,1108 collection_id: CollectionId,1109 schema: Vec<u8>1110 ) -> DispatchResult {1111 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1112 let mut target_collection = Self::get_collection(collection_id)?;1113 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;11141115 // check schema limit1116 ensure!(schema.len() as u32 <= ChainLimit::get().offchain_schema_limit, "");11171118 target_collection.offchain_schema = schema;1119 Self::save_collection(target_collection);11201121 Ok(())1122 }11231124 /// Set const on-chain data schema.1125 /// 1126 /// # Permissions1127 /// 1128 /// * Collection Owner1129 /// * Collection Admin1130 /// 1131 /// # Arguments1132 /// 1133 /// * collection_id.1134 /// 1135 /// * schema: String representing the const on-chain data schema.1136 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1137 #[transactional]1138 pub fn set_const_on_chain_schema (1139 origin,1140 collection_id: CollectionId,1141 schema: Vec<u8>1142 ) -> DispatchResult {1143 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1144 let mut target_collection = Self::get_collection(collection_id)?;1145 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;11461147 // check schema limit1148 ensure!(schema.len() as u32 <= ChainLimit::get().const_on_chain_schema_limit, "");11491150 target_collection.const_on_chain_schema = schema;1151 Self::save_collection(target_collection);11521153 Ok(())1154 }11551156 /// Set variable on-chain data schema.1157 /// 1158 /// # Permissions1159 /// 1160 /// * Collection Owner1161 /// * Collection Admin1162 /// 1163 /// # Arguments1164 /// 1165 /// * collection_id.1166 /// 1167 /// * schema: String representing the variable on-chain data schema.1168 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1169 #[transactional]1170 pub fn set_variable_on_chain_schema (1171 origin,1172 collection_id: CollectionId,1173 schema: Vec<u8>1174 ) -> DispatchResult {1175 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1176 let mut target_collection = Self::get_collection(collection_id)?;1177 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;11781179 // check schema limit1180 ensure!(schema.len() as u32 <= ChainLimit::get().variable_on_chain_schema_limit, "");11811182 target_collection.variable_on_chain_schema = schema;1183 Self::save_collection(target_collection);11841185 Ok(())1186 }11871188 // Sudo permissions function1189 #[weight = <T as Config>::WeightInfo::set_chain_limits()]1190 #[transactional]1191 pub fn set_chain_limits(1192 origin,1193 limits: ChainLimits1194 ) -> DispatchResult {11951196 #[cfg(not(feature = "runtime-benchmarks"))]1197 ensure_root(origin)?;11981199 <ChainLimit>::put(limits);1200 Ok(())1201 }12021203 /// Enable smart contract self-sponsoring.1204 /// 1205 /// # Permissions1206 /// 1207 /// * Contract Owner1208 /// 1209 /// # Arguments1210 /// 1211 /// * contract address1212 /// * enable flag1213 /// 1214 #[weight = <T as Config>::WeightInfo::enable_contract_sponsoring()]1215 #[transactional]1216 pub fn enable_contract_sponsoring(1217 origin,1218 contract_address: T::AccountId,1219 enable: bool1220 ) -> DispatchResult {12211222 let sender = ensure_signed(origin)?;12231224 #[cfg(feature = "runtime-benchmarks")]1225 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());12261227 Self::ensure_contract_owned(sender, &contract_address)?;12281229 <ContractSelfSponsoring<T>>::insert(contract_address, enable);1230 Ok(())1231 }12321233 /// Set the rate limit for contract sponsoring to specified number of blocks.1234 /// 1235 /// If not set (has the default value of 0 blocks), the sponsoring will be disabled. 1236 /// If set to the number B (for blocks), the transactions will be sponsored with a rate 1237 /// limit of B, i.e. fees for every transaction sent to this smart contract will be paid 1238 /// from contract endowment if there are at least B blocks between such transactions. 1239 /// Nonetheless, if transactions are sent more frequently, the fees are paid by the sender.1240 /// 1241 /// # Permissions1242 /// 1243 /// * Contract Owner1244 /// 1245 /// # Arguments1246 /// 1247 /// -`contract_address`: Address of the contract to sponsor1248 /// -`rate_limit`: Number of blocks to wait until the next sponsored transaction is allowed1249 /// 1250 #[weight = <T as Config>::WeightInfo::set_contract_sponsoring_rate_limit()]1251 #[transactional]1252 pub fn set_contract_sponsoring_rate_limit(1253 origin,1254 contract_address: T::AccountId,1255 rate_limit: T::BlockNumber1256 ) -> DispatchResult {1257 let sender = ensure_signed(origin)?;12581259 #[cfg(feature = "runtime-benchmarks")]1260 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());12611262 Self::ensure_contract_owned(sender, &contract_address)?;1263 <ContractSponsoringRateLimit<T>>::insert(contract_address, rate_limit);1264 Ok(())1265 }12661267 /// Enable the white list for a contract. Only addresses added to the white list with addToContractWhiteList will be able to call this smart contract.1268 /// 1269 /// # Permissions1270 /// 1271 /// * Address that deployed smart contract.1272 /// 1273 /// # Arguments1274 /// 1275 /// -`contract_address`: Address of the contract.1276 /// 1277 /// - `enable`: . 1278 #[weight = <T as Config>::WeightInfo::toggle_contract_white_list()]1279 #[transactional]1280 pub fn toggle_contract_white_list(1281 origin,1282 contract_address: T::AccountId,1283 enable: bool1284 ) -> DispatchResult {1285 let sender = ensure_signed(origin)?;12861287 #[cfg(feature = "runtime-benchmarks")]1288 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());12891290 Self::ensure_contract_owned(sender, &contract_address)?;1291 if enable {1292 <ContractWhiteListEnabled<T>>::insert(contract_address, true);1293 } else {1294 <ContractWhiteListEnabled<T>>::remove(contract_address);1295 }1296 Ok(())1297 }1298 1299 /// Add an address to smart contract white list.1300 /// 1301 /// # Permissions1302 /// 1303 /// * Address that deployed smart contract.1304 /// 1305 /// # Arguments1306 /// 1307 /// -`contract_address`: Address of the contract.1308 ///1309 /// -`account_address`: Address to add.1310 #[weight = <T as Config>::WeightInfo::add_to_contract_white_list()]1311 #[transactional]1312 pub fn add_to_contract_white_list(1313 origin,1314 contract_address: T::AccountId,1315 account_address: T::AccountId1316 ) -> DispatchResult {1317 let sender = ensure_signed(origin)?;13181319 #[cfg(feature = "runtime-benchmarks")]1320 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());1321 1322 Self::ensure_contract_owned(sender, &contract_address)?; 1323 <ContractWhiteList<T>>::insert(contract_address, account_address, true);1324 Ok(())1325 }13261327 /// Remove an address from smart contract white list.1328 /// 1329 /// # Permissions1330 /// 1331 /// * Address that deployed smart contract.1332 /// 1333 /// # Arguments1334 /// 1335 /// -`contract_address`: Address of the contract.1336 ///1337 /// -`account_address`: Address to remove.1338 #[weight = <T as Config>::WeightInfo::remove_from_contract_white_list()]1339 #[transactional]1340 pub fn remove_from_contract_white_list(1341 origin,1342 contract_address: T::AccountId,1343 account_address: T::AccountId1344 ) -> DispatchResult {1345 let sender = ensure_signed(origin)?;13461347 #[cfg(feature = "runtime-benchmarks")]1348 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());13491350 Self::ensure_contract_owned(sender, &contract_address)?;1351 <ContractWhiteList<T>>::remove(contract_address, account_address);1352 Ok(())1353 }13541355 #[weight = <T as Config>::WeightInfo::set_collection_limits()]1356 #[transactional]1357 pub fn set_collection_limits(1358 origin,1359 collection_id: u32,1360 new_limits: CollectionLimits<T::BlockNumber>,1361 ) -> DispatchResult {1362 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1363 let mut target_collection = Self::get_collection(collection_id)?;1364 Self::check_owner_permissions(&target_collection, &sender.as_sub())?;1365 let old_limits = &target_collection.limits;1366 let chain_limits = ChainLimit::get();13671368 // collection bounds1369 ensure!(new_limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&1370 new_limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP && 1371 new_limits.sponsored_data_size <= chain_limits.custom_data_limit,1372 Error::<T>::CollectionLimitBoundsExceeded);13731374 // token_limit check prev1375 ensure!(old_limits.token_limit >= new_limits.token_limit, Error::<T>::CollectionTokenLimitExceeded);1376 ensure!(new_limits.token_limit > 0, Error::<T>::CollectionTokenLimitExceeded);13771378 ensure!(1379 (old_limits.owner_can_transfer || !new_limits.owner_can_transfer) &&1380 (old_limits.owner_can_destroy || !new_limits.owner_can_destroy),1381 Error::<T>::OwnerPermissionsCantBeReverted,1382 );13831384 target_collection.limits = new_limits;1385 Self::save_collection(target_collection);13861387 Ok(())1388 } 1389 }1390}13911392impl<T: Config> Module<T> {1393 pub fn create_item_internal(sender: &T::CrossAccountId, collection: &CollectionHandle<T>, owner: &T::CrossAccountId, data: CreateItemData) -> DispatchResult {1394 Self::can_create_items_in_collection(&collection, &sender, &owner, 1)?;1395 Self::validate_create_item_args(&collection, &data)?;1396 Self::create_item_no_validation(&collection, owner, data)?;13971398 Ok(())1399 }14001401 pub fn transfer_internal(sender: &T::CrossAccountId, recipient: &T::CrossAccountId, target_collection: &CollectionHandle<T>, item_id: TokenId, value: u128) -> DispatchResult {1402 target_collection.consume_gas(2000000)?;1403 // Limits check1404 Self::is_correct_transfer(target_collection, &recipient)?;14051406 // Transfer permissions check1407 ensure!(Self::is_item_owner(&sender, target_collection, item_id) ||1408 Self::is_owner_or_admin_permissions(target_collection, &sender),1409 Error::<T>::NoPermission);14101411 if target_collection.access == AccessMode::WhiteList {1412 Self::check_white_list(target_collection, &sender)?;1413 Self::check_white_list(target_collection, &recipient)?;1414 }14151416 match target_collection.mode1417 {1418 CollectionMode::NFT => Self::transfer_nft(target_collection, item_id, sender.clone(), recipient.clone())?,1419 CollectionMode::Fungible(_) => Self::transfer_fungible(target_collection, value, &sender, &recipient)?,1420 CollectionMode::ReFungible => Self::transfer_refungible(target_collection, item_id, value, sender.clone(), recipient.clone())?,1421 _ => ()1422 };14231424 Self::deposit_event(RawEvent::Transfer(target_collection.id, item_id, sender.clone(), recipient.clone(), value));14251426 Ok(())1427 }14281429 pub fn approve_internal(1430 sender: &T::CrossAccountId,1431 spender: &T::CrossAccountId,1432 collection: &CollectionHandle<T>,1433 item_id: TokenId,1434 amount: u1281435 ) -> DispatchResult {1436 collection.consume_gas(2000000)?;1437 Self::token_exists(&collection, item_id)?;14381439 // Transfer permissions check1440 let bypasses_limits = collection.limits.owner_can_transfer &&1441 Self::is_owner_or_admin_permissions(1442 &collection,1443 &sender,1444 );14451446 let allowance_limit = if bypasses_limits {1447 None1448 } else if let Some(amount) = Self::owned_amount(1449 &sender,1450 &collection,1451 item_id,1452 ) {1453 Some(amount)1454 } else {1455 fail!(Error::<T>::NoPermission);1456 };14571458 if collection.access == AccessMode::WhiteList {1459 Self::check_white_list(&collection, &sender)?;1460 Self::check_white_list(&collection, &spender)?;1461 }14621463 let allowance: u128 = amount1464 .checked_add(<Allowances<T>>::get(collection.id, (item_id, sender.as_sub(), spender.as_sub())))1465 .ok_or(Error::<T>::NumOverflow)?;1466 if let Some(limit) = allowance_limit {1467 ensure!(limit >= allowance, Error::<T>::TokenValueTooLow);1468 }1469 <Allowances<T>>::insert(collection.id, (item_id, sender.as_sub(), spender.as_sub()), allowance);14701471 if matches!(collection.mode, CollectionMode::NFT) {1472 // TODO: NFT: only one owner may exist for token in ERC7211473 collection.log(ERC721Events::Approval {1474 owner: *sender.as_eth(),1475 approved: *spender.as_eth(),1476 token_id: item_id.into(),1477 });1478 }14791480 if matches!(collection.mode, CollectionMode::Fungible(_)) {1481 // TODO: NFT: only one owner may exist for token in ERC201482 collection.log(ERC20Events::Approval {1483 owner: *sender.as_eth(),1484 spender: *spender.as_eth(),1485 value: allowance.into()1486 });1487 }14881489 Self::deposit_event(RawEvent::Approved(collection.id, item_id, sender.clone(), spender.clone(), allowance));1490 Ok(())1491 }14921493 pub fn transfer_from_internal(1494 sender: &T::CrossAccountId,1495 from: &T::CrossAccountId,1496 recipient: &T::CrossAccountId,1497 collection: &CollectionHandle<T>,1498 item_id: TokenId,1499 amount: u128,1500 ) -> DispatchResult {1501 collection.consume_gas(2000000)?;1502 // Check approval1503 let approval: u128 = <Allowances<T>>::get(collection.id, (item_id, from.as_sub(), sender.as_sub()));15041505 // Limits check1506 Self::is_correct_transfer(&collection, &recipient)?;15071508 // Transfer permissions check1509 ensure!(1510 approval >= amount || 1511 (1512 collection.limits.owner_can_transfer &&1513 Self::is_owner_or_admin_permissions(&collection, &sender)1514 ),1515 Error::<T>::NoPermission1516 );15171518 if collection.access == AccessMode::WhiteList {1519 Self::check_white_list(&collection, &sender)?;1520 Self::check_white_list(&collection, &recipient)?;1521 }15221523 // Reduce approval by transferred amount or remove if remaining approval drops to 01524 let allowance = approval.saturating_sub(amount);1525 if allowance > 0 {1526 <Allowances<T>>::insert(collection.id, (item_id, from.as_sub(), sender.as_sub()), allowance);1527 } else {1528 <Allowances<T>>::remove(collection.id, (item_id, from.as_sub(), sender.as_sub()));1529 }15301531 match collection.mode {1532 CollectionMode::NFT => {1533 Self::transfer_nft(&collection, item_id, from.clone(), recipient.clone())?1534 }1535 CollectionMode::Fungible(_) => {1536 Self::transfer_fungible(&collection, amount, &from, &recipient)?1537 }1538 CollectionMode::ReFungible => {1539 Self::transfer_refungible(&collection, item_id, amount, from.clone(), recipient.clone())?1540 }1541 _ => ()1542 };15431544 if matches!(collection.mode, CollectionMode::Fungible(_)) {1545 collection.log(ERC20Events::Approval {1546 owner: *from.as_eth(),1547 spender: *sender.as_eth(),1548 value: allowance.into()1549 });1550 }15511552 Ok(())1553 }15541555 pub fn set_variable_meta_data_internal(1556 sender: &T::CrossAccountId,1557 collection: &CollectionHandle<T>, 1558 item_id: TokenId,1559 data: Vec<u8>,1560 ) -> DispatchResult {1561 Self::token_exists(&collection, item_id)?;15621563 ensure!(ChainLimit::get().custom_data_limit >= data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);15641565 // Modify permissions check1566 ensure!(Self::is_item_owner(&sender, &collection, item_id) ||1567 Self::is_owner_or_admin_permissions(&collection, &sender),1568 Error::<T>::NoPermission);15691570 match collection.mode1571 {1572 CollectionMode::NFT => Self::set_nft_variable_data(&collection, item_id, data)?,1573 CollectionMode::ReFungible => Self::set_re_fungible_variable_data(&collection, item_id, data)?,1574 CollectionMode::Fungible(_) => fail!(Error::<T>::CantStoreMetadataInFungibleTokens),1575 _ => fail!(Error::<T>::UnexpectedCollectionType)1576 };15771578 Ok(())1579 }15801581 pub fn create_multiple_items_internal(1582 sender: &T::CrossAccountId,1583 collection: &CollectionHandle<T>,1584 owner: &T::CrossAccountId,1585 items_data: Vec<CreateItemData>,1586 ) -> DispatchResult {1587 Self::can_create_items_in_collection(&collection, &sender, &owner, items_data.len() as u32)?;15881589 for data in &items_data {1590 Self::validate_create_item_args(&collection, data)?;1591 }1592 for data in &items_data {1593 Self::create_item_no_validation(&collection, owner, data.clone())?;1594 }15951596 Ok(())1597 }15981599 pub fn burn_item_internal(1600 sender: &T::CrossAccountId,1601 collection: &CollectionHandle<T>,1602 item_id: TokenId,1603 value: u128,1604 ) -> DispatchResult {1605 ensure!(1606 Self::is_item_owner(&sender, &collection, item_id) ||1607 (1608 collection.limits.owner_can_transfer &&1609 Self::is_owner_or_admin_permissions(&collection, &sender)1610 ),1611 Error::<T>::NoPermission1612 );16131614 if collection.access == AccessMode::WhiteList {1615 Self::check_white_list(&collection, &sender)?;1616 }16171618 match collection.mode1619 {1620 CollectionMode::NFT => Self::burn_nft_item(&collection, item_id)?,1621 CollectionMode::Fungible(_) => Self::burn_fungible_item(&sender, &collection, value)?,1622 CollectionMode::ReFungible => Self::burn_refungible_item(&collection, item_id, &sender)?,1623 _ => ()1624 };16251626 Ok(())1627 }16281629 pub fn toggle_white_list_internal(1630 sender: &T::CrossAccountId,1631 collection: &CollectionHandle<T>,1632 address: &T::CrossAccountId,1633 whitelisted: bool,1634 ) -> DispatchResult {1635 Self::check_owner_or_admin_permissions(&collection, &sender)?;16361637 if whitelisted {1638 <WhiteList<T>>::insert(collection.id, address.as_sub(), true);1639 } else {1640 <WhiteList<T>>::remove(collection.id, address.as_sub());1641 }16421643 Ok(())1644 }16451646 fn is_correct_transfer(collection: &CollectionHandle<T>, recipient: &T::CrossAccountId) -> DispatchResult {1647 let collection_id = collection.id;16481649 // check token limit and account token limit1650 let account_items: u32 = <AddressTokens<T>>::get(collection_id, recipient.as_sub()).len() as u32;1651 ensure!(collection.limits.account_token_ownership_limit > account_items, Error::<T>::AccountTokenLimitExceeded);1652 1653 Ok(())1654 }16551656 fn can_create_items_in_collection(collection: &CollectionHandle<T>, sender: &T::CrossAccountId, owner: &T::CrossAccountId, amount: u32) -> DispatchResult {1657 let collection_id = collection.id;16581659 // check token limit and account token limit1660 let total_items: u32 = ItemListIndex::get(collection_id)1661 .checked_add(amount)1662 .ok_or(Error::<T>::CollectionTokenLimitExceeded)?;1663 let account_items: u32 = (<AddressTokens<T>>::get(collection_id, owner.as_sub()).len() as u32)1664 .checked_add(amount)1665 .ok_or(Error::<T>::AccountTokenLimitExceeded)?;1666 ensure!(collection.limits.token_limit >= total_items, Error::<T>::CollectionTokenLimitExceeded);1667 ensure!(collection.limits.account_token_ownership_limit >= account_items, Error::<T>::AccountTokenLimitExceeded);16681669 if !Self::is_owner_or_admin_permissions(collection, &sender) {1670 ensure!(collection.mint_mode == true, Error::<T>::PublicMintingNotAllowed);1671 Self::check_white_list(collection, owner)?;1672 Self::check_white_list(collection, sender)?;1673 }16741675 Ok(())1676 }16771678 fn validate_create_item_args(target_collection: &CollectionHandle<T>, data: &CreateItemData) -> DispatchResult {1679 match target_collection.mode1680 {1681 CollectionMode::NFT => {1682 if let CreateItemData::NFT(data) = data {1683 // check sizes1684 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);1685 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);1686 } else {1687 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);1688 }1689 },1690 CollectionMode::Fungible(_) => {1691 if let CreateItemData::Fungible(_) = data {1692 } else {1693 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);1694 }1695 },1696 CollectionMode::ReFungible => {1697 if let CreateItemData::ReFungible(data) = data {16981699 // check sizes1700 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);1701 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);17021703 // Check refungibility limits1704 ensure!(data.pieces <= MAX_REFUNGIBLE_PIECES, Error::<T>::WrongRefungiblePieces);1705 ensure!(data.pieces > 0, Error::<T>::WrongRefungiblePieces);1706 } else {1707 fail!(Error::<T>::NotReFungibleDataUsedToMintReFungibleCollectionToken);1708 }1709 },1710 _ => { fail!(Error::<T>::UnexpectedCollectionType); }1711 };17121713 Ok(())1714 }17151716 fn create_item_no_validation(collection: &CollectionHandle<T>, owner: &T::CrossAccountId, data: CreateItemData) -> DispatchResult {1717 match data1718 {1719 CreateItemData::NFT(data) => {1720 let item = NftItemType {1721 owner: owner.clone(),1722 const_data: data.const_data,1723 variable_data: data.variable_data1724 };17251726 Self::add_nft_item(collection, item)?;1727 },1728 CreateItemData::Fungible(data) => {1729 Self::add_fungible_item(collection, &owner, data.value)?;1730 },1731 CreateItemData::ReFungible(data) => {1732 let mut owner_list = Vec::new();1733 owner_list.push(Ownership {owner: owner.clone(), fraction: data.pieces});17341735 let item = ReFungibleItemType {1736 owner: owner_list,1737 const_data: data.const_data,1738 variable_data: data.variable_data1739 };17401741 Self::add_refungible_item(collection, item)?;1742 }1743 };17441745 Ok(())1746 }17471748 fn add_fungible_item(collection: &CollectionHandle<T>, owner: &T::CrossAccountId, value: u128) -> DispatchResult {1749 let collection_id = collection.id;17501751 // Does new owner already have an account?1752 let balance: u128 = <FungibleItemList<T>>::get(collection_id, owner.as_sub()).value;17531754 // Mint 1755 let item = FungibleItemType {1756 value: balance.checked_add(value).ok_or(Error::<T>::NumOverflow)?,1757 };1758 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), item);17591760 // Update balance1761 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1762 .checked_add(value)1763 .ok_or(Error::<T>::NumOverflow)?;1764 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);17651766 Self::deposit_event(RawEvent::ItemCreated(collection_id, 0, owner.clone()));1767 Ok(())1768 }17691770 fn add_refungible_item(collection: &CollectionHandle<T>, item: ReFungibleItemType<T::CrossAccountId>) -> DispatchResult {1771 let collection_id = collection.id;17721773 let current_index = <ItemListIndex>::get(collection_id)1774 .checked_add(1)1775 .ok_or(Error::<T>::NumOverflow)?;1776 let itemcopy = item.clone();17771778 ensure!(1779 item.owner.len() == 1,1780 Error::<T>::BadCreateRefungibleCall,1781 );1782 let item_owner = item.owner.first().expect("only one owner is defined");17831784 let value = item_owner.fraction;1785 let owner = item_owner.owner.clone();17861787 Self::add_token_index(collection_id, current_index, &owner)?;17881789 <ItemListIndex>::insert(collection_id, current_index);1790 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);17911792 // Update balance1793 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1794 .checked_add(value)1795 .ok_or(Error::<T>::NumOverflow)?;1796 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);17971798 Self::deposit_event(RawEvent::ItemCreated(collection_id, current_index, owner));1799 Ok(())1800 }18011802 fn add_nft_item(collection: &CollectionHandle<T>, item: NftItemType<T::CrossAccountId>) -> DispatchResult {1803 let collection_id = collection.id;18041805 let current_index = <ItemListIndex>::get(collection_id)1806 .checked_add(1)1807 .ok_or(Error::<T>::NumOverflow)?;18081809 let item_owner = item.owner.clone();1810 Self::add_token_index(collection_id, current_index, &item.owner)?;18111812 <ItemListIndex>::insert(collection_id, current_index);1813 <NftItemList<T>>::insert(collection_id, current_index, item);18141815 // Update balance1816 let new_balance = <Balance<T>>::get(collection_id, item_owner.as_sub())1817 .checked_add(1)1818 .ok_or(Error::<T>::NumOverflow)?;1819 <Balance<T>>::insert(collection_id, item_owner.as_sub(), new_balance);18201821 collection.log(ERC721Events::Transfer {1822 from: H160::default(),1823 to: *item_owner.as_eth(),1824 token_id: current_index.into(),1825 });1826 Self::deposit_event(RawEvent::ItemCreated(collection_id, current_index, item_owner));1827 Ok(())1828 }18291830 fn burn_refungible_item(1831 collection: &CollectionHandle<T>,1832 item_id: TokenId,1833 owner: &T::CrossAccountId,1834 ) -> DispatchResult {1835 let collection_id = collection.id;18361837 let mut token = <ReFungibleItemList<T>>::get(collection_id, item_id)1838 .ok_or(Error::<T>::TokenNotFound)?;1839 let rft_balance = token1840 .owner1841 .iter()1842 .find(|&i| i.owner == *owner)1843 .ok_or(Error::<T>::TokenNotFound)?;1844 Self::remove_token_index(collection_id, item_id, owner)?;18451846 // update balance1847 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.as_sub())1848 .checked_sub(rft_balance.fraction)1849 .ok_or(Error::<T>::NumOverflow)?;1850 <Balance<T>>::insert(collection_id, rft_balance.owner.as_sub(), new_balance);18511852 // Re-create owners list with sender removed1853 let index = token1854 .owner1855 .iter()1856 .position(|i| i.owner == *owner)1857 .expect("owned item is exists");1858 token.owner.remove(index);1859 let owner_count = token.owner.len();18601861 // Burn the token completely if this was the last (only) owner1862 if owner_count == 0 {1863 <ReFungibleItemList<T>>::remove(collection_id, item_id);1864 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);1865 }1866 else {1867 <ReFungibleItemList<T>>::insert(collection_id, item_id, token);1868 }18691870 Ok(())1871 }18721873 fn burn_nft_item(collection: &CollectionHandle<T>, item_id: TokenId) -> DispatchResult {1874 let collection_id = collection.id;18751876 let item = <NftItemList<T>>::get(collection_id, item_id)1877 .ok_or(Error::<T>::TokenNotFound)?;1878 Self::remove_token_index(collection_id, item_id, &item.owner)?;18791880 // update balance1881 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())1882 .checked_sub(1)1883 .ok_or(Error::<T>::NumOverflow)?;1884 <Balance<T>>::insert(collection_id, item.owner.as_sub(), new_balance);1885 <NftItemList<T>>::remove(collection_id, item_id);1886 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);18871888 Self::deposit_event(RawEvent::ItemDestroyed(collection.id, item_id));1889 Ok(())1890 }18911892 fn burn_fungible_item(owner: &T::CrossAccountId, collection: &CollectionHandle<T>, value: u128) -> DispatchResult {1893 let collection_id = collection.id;18941895 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());1896 ensure!(balance.value >= value, Error::<T>::TokenValueNotEnough);18971898 // update balance1899 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1900 .checked_sub(value)1901 .ok_or(Error::<T>::NumOverflow)?;1902 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);19031904 if balance.value - value > 0 {1905 balance.value -= value;1906 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);1907 }1908 else {1909 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());1910 }19111912 collection.log(ERC20Events::Transfer {1913 from: *owner.as_eth(),1914 to: H160::default(),1915 value: value.into(),1916 });1917 Ok(())1918 }19191920 pub fn get_collection(collection_id: CollectionId) -> Result<CollectionHandle<T>, sp_runtime::DispatchError> {1921 Ok(<CollectionHandle<T>>::get(collection_id)1922 .ok_or(Error::<T>::CollectionNotFound)?)1923 }19241925 fn save_collection(collection: CollectionHandle<T>) {1926 <CollectionById<T>>::insert(collection.id, collection.into_inner());1927 }19281929 pub fn submit_logs(collection: CollectionHandle<T>) -> DispatchResult {1930 if collection.logs.is_empty() {1931 return Ok(())1932 }1933 T::EthereumTransactionSender::submit_logs_transaction(1934 eth::generate_transaction(collection.id, T::EthereumChainId::get()),1935 collection.logs.retrieve_logs(),1936 )1937 }19381939 fn check_owner_permissions(target_collection: &CollectionHandle<T>, subject: &T::AccountId) -> DispatchResult {1940 ensure!(1941 *subject == target_collection.owner,1942 Error::<T>::NoPermission1943 );19441945 Ok(())1946 }19471948 fn is_owner_or_admin_permissions(collection: &CollectionHandle<T>, subject: &T::CrossAccountId) -> bool {1949 *subject.as_sub() == collection.owner || <AdminList<T>>::get(collection.id).contains(&subject)1950 }19511952 fn check_owner_or_admin_permissions(1953 collection: &CollectionHandle<T>,1954 subject: &T::CrossAccountId,1955 ) -> DispatchResult {1956 ensure!(Self::is_owner_or_admin_permissions(collection, subject), Error::<T>::NoPermission);19571958 Ok(())1959 }19601961 fn owned_amount(1962 subject: &T::CrossAccountId,1963 target_collection: &CollectionHandle<T>,1964 item_id: TokenId,1965 ) -> Option<u128> {1966 let collection_id = target_collection.id;19671968 match target_collection.mode {1969 CollectionMode::NFT => (<NftItemList<T>>::get(collection_id, item_id)?.owner == *subject)1970 .then(|| 1),1971 CollectionMode::Fungible(_) => Some(<FungibleItemList<T>>::get(collection_id, &subject.as_sub())1972 .value),1973 CollectionMode::ReFungible => <ReFungibleItemList<T>>::get(collection_id, item_id)?1974 .owner1975 .iter()1976 .find(|i| i.owner == *subject)1977 .map(|i| i.fraction),1978 CollectionMode::Invalid => None,1979 }1980 }19811982 fn is_item_owner(subject: &T::CrossAccountId, target_collection: &CollectionHandle<T>, item_id: TokenId) -> bool {1983 match target_collection.mode {1984 CollectionMode::Fungible(_) => true,1985 _ => Self::owned_amount(&subject, target_collection, item_id).is_some(),1986 }1987 }19881989 fn check_white_list(collection: &CollectionHandle<T>, address: &T::CrossAccountId) -> DispatchResult {1990 let collection_id = collection.id;19911992 let mes = Error::<T>::AddresNotInWhiteList;1993 ensure!(<WhiteList<T>>::contains_key(collection_id, address.as_sub()), mes);19941995 Ok(())1996 }19971998 /// Check if token exists. In case of Fungible, check if there is an entry for 1999 /// the owner in fungible balances double map2000 fn token_exists(2001 target_collection: &CollectionHandle<T>,2002 item_id: TokenId,2003 ) -> DispatchResult {2004 let collection_id = target_collection.id;2005 let exists = match target_collection.mode2006 {2007 CollectionMode::NFT => <NftItemList<T>>::contains_key(collection_id, item_id),2008 CollectionMode::Fungible(_) => true,2009 CollectionMode::ReFungible => <ReFungibleItemList<T>>::contains_key(collection_id, item_id),2010 _ => false2011 };20122013 ensure!(exists == true, Error::<T>::TokenNotFound);2014 Ok(())2015 }20162017 fn transfer_fungible(2018 collection: &CollectionHandle<T>,2019 value: u128,2020 owner: &T::CrossAccountId,2021 recipient: &T::CrossAccountId,2022 ) -> DispatchResult {2023 let collection_id = collection.id;20242025 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());2026 ensure!(balance.value >= value, Error::<T>::TokenValueTooLow);20272028 // Send balance to recipient (updates balanceOf of recipient)2029 Self::add_fungible_item(collection, recipient, value)?;20302031 // update balanceOf of sender2032 <Balance<T>>::insert(collection_id, owner.as_sub(), balance.value - value);20332034 // Reduce or remove sender2035 if balance.value == value {2036 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());2037 }2038 else {2039 balance.value -= value;2040 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);2041 }20422043 collection.log(ERC20Events::Transfer {2044 from: *owner.as_eth(),2045 to: *recipient.as_eth(),2046 value: value.into(),2047 });2048 Self::deposit_event(RawEvent::Transfer(collection.id, 1, owner.clone(), recipient.clone(), value));20492050 Ok(())2051 }20522053 fn transfer_refungible(2054 collection: &CollectionHandle<T>,2055 item_id: TokenId,2056 value: u128,2057 owner: T::CrossAccountId,2058 new_owner: T::CrossAccountId,2059 ) -> DispatchResult {2060 let collection_id = collection.id;2061 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id)2062 .ok_or(Error::<T>::TokenNotFound)?;20632064 let item = full_item2065 .owner2066 .iter()2067 .filter(|i| i.owner == owner)2068 .next()2069 .ok_or(Error::<T>::TokenNotFound)?;2070 let amount = item.fraction;20712072 ensure!(amount >= value, Error::<T>::TokenValueTooLow);20732074 // update balance2075 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2076 .checked_sub(value)2077 .ok_or(Error::<T>::NumOverflow)?;2078 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);20792080 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2081 .checked_add(value)2082 .ok_or(Error::<T>::NumOverflow)?;2083 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);20842085 let old_owner = item.owner.clone();2086 let new_owner_has_account = full_item.owner.iter().any(|i| i.owner == new_owner);20872088 // transfer2089 if amount == value && !new_owner_has_account {2090 // change owner2091 // new owner do not have account2092 let mut new_full_item = full_item.clone();2093 new_full_item2094 .owner2095 .iter_mut()2096 .find(|i| i.owner == owner)2097 .expect("old owner does present in refungible")2098 .owner = new_owner.clone();2099 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);21002101 // update index collection2102 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;2103 } else {2104 let mut new_full_item = full_item.clone();2105 new_full_item2106 .owner2107 .iter_mut()2108 .find(|i| i.owner == owner)2109 .expect("old owner does present in refungible")2110 .fraction -= value;21112112 // separate amount2113 if new_owner_has_account {2114 // new owner has account2115 new_full_item2116 .owner2117 .iter_mut()2118 .find(|i| i.owner == new_owner)2119 .expect("new owner has account")2120 .fraction += value;2121 } else {2122 // new owner do not have account2123 new_full_item.owner.push(Ownership {2124 owner: new_owner.clone(),2125 fraction: value,2126 });2127 Self::add_token_index(collection_id, item_id, &new_owner)?;2128 }21292130 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2131 }21322133 Self::deposit_event(RawEvent::Transfer(collection.id, item_id, owner, new_owner, amount));21342135 Ok(())2136 }21372138 fn transfer_nft(2139 collection: &CollectionHandle<T>,2140 item_id: TokenId,2141 sender: T::CrossAccountId,2142 new_owner: T::CrossAccountId,2143 ) -> DispatchResult {2144 let collection_id = collection.id;2145 let mut item = <NftItemList<T>>::get(collection_id, item_id)2146 .ok_or(Error::<T>::TokenNotFound)?;21472148 ensure!(2149 sender == item.owner,2150 Error::<T>::MustBeTokenOwner2151 );21522153 // update balance2154 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2155 .checked_sub(1)2156 .ok_or(Error::<T>::NumOverflow)?;2157 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);21582159 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2160 .checked_add(1)2161 .ok_or(Error::<T>::NumOverflow)?;2162 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);21632164 // change owner2165 let old_owner = item.owner.clone();2166 item.owner = new_owner.clone();2167 <NftItemList<T>>::insert(collection_id, item_id, item);21682169 // update index collection2170 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;21712172 collection.log(ERC721Events::Transfer {2173 from: *sender.as_eth(),2174 to: *new_owner.as_eth(),2175 token_id: item_id.into(),2176 });2177 Self::deposit_event(RawEvent::Transfer(collection.id, item_id, sender, new_owner, 1));21782179 Ok(())2180 }2181 2182 fn set_re_fungible_variable_data(2183 collection: &CollectionHandle<T>,2184 item_id: TokenId,2185 data: Vec<u8>2186 ) -> DispatchResult {2187 let collection_id = collection.id;2188 let mut item = <ReFungibleItemList<T>>::get(collection_id, item_id)2189 .ok_or(Error::<T>::TokenNotFound)?;21902191 item.variable_data = data;21922193 <ReFungibleItemList<T>>::insert(collection_id, item_id, item);21942195 Ok(())2196 }21972198 fn set_nft_variable_data(2199 collection: &CollectionHandle<T>,2200 item_id: TokenId,2201 data: Vec<u8>2202 ) -> DispatchResult {2203 let collection_id = collection.id;2204 let mut item = <NftItemList<T>>::get(collection_id, item_id)2205 .ok_or(Error::<T>::TokenNotFound)?;2206 2207 item.variable_data = data;22082209 <NftItemList<T>>::insert(collection_id, item_id, item);2210 2211 Ok(())2212 }22132214 #[allow(dead_code)]2215 fn init_collection(item: &Collection<T>) {2216 // check params2217 assert!(2218 item.decimal_points <= MAX_DECIMAL_POINTS,2219 "decimal_points parameter must be lower than MAX_DECIMAL_POINTS"2220 );2221 assert!(2222 item.name.len() <= 64,2223 "Collection name can not be longer than 63 char"2224 );2225 assert!(2226 item.name.len() <= 256,2227 "Collection description can not be longer than 255 char"2228 );2229 assert!(2230 item.token_prefix.len() <= 16,2231 "Token prefix can not be longer than 15 char"2232 );22332234 // Generate next collection ID2235 let next_id = CreatedCollectionCount::get()2236 .checked_add(1)2237 .unwrap();22382239 CreatedCollectionCount::put(next_id);2240 }22412242 #[allow(dead_code)]2243 fn init_nft_token(collection_id: CollectionId, item: &NftItemType<T::CrossAccountId>) {2244 let current_index = <ItemListIndex>::get(collection_id)2245 .checked_add(1)2246 .unwrap();22472248 Self::add_token_index(collection_id, current_index, &item.owner).unwrap();22492250 <ItemListIndex>::insert(collection_id, current_index);22512252 // Update balance2253 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())2254 .checked_add(1)2255 .unwrap();2256 <Balance<T>>::insert(collection_id, item.owner.as_sub(), new_balance);2257 }22582259 #[allow(dead_code)]2260 fn init_fungible_token(collection_id: CollectionId, owner: &T::CrossAccountId, item: &FungibleItemType) {2261 let current_index = <ItemListIndex>::get(collection_id)2262 .checked_add(1)2263 .unwrap();22642265 Self::add_token_index(collection_id, current_index, owner).unwrap();22662267 <ItemListIndex>::insert(collection_id, current_index);22682269 // Update balance2270 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())2271 .checked_add(item.value)2272 .unwrap();2273 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);2274 }22752276 #[allow(dead_code)]2277 fn init_refungible_token(collection_id: CollectionId, item: &ReFungibleItemType<T::CrossAccountId>) {2278 let current_index = <ItemListIndex>::get(collection_id)2279 .checked_add(1)2280 .unwrap();22812282 let value = item.owner.first().unwrap().fraction;2283 let owner = item.owner.first().unwrap().owner.clone();22842285 Self::add_token_index(collection_id, current_index, &owner).unwrap();22862287 <ItemListIndex>::insert(collection_id, current_index);22882289 // Update balance2290 let new_balance = <Balance<T>>::get(collection_id, &owner.as_sub())2291 .checked_add(value)2292 .unwrap();2293 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);2294 }22952296 fn add_token_index(collection_id: CollectionId, item_index: TokenId, owner: &T::CrossAccountId) -> DispatchResult {2297 // add to account limit2298 if <AccountItemCount<T>>::contains_key(owner.as_sub()) {22992300 // bound Owned tokens by a single address2301 let count = <AccountItemCount<T>>::get(owner.as_sub());2302 ensure!(count < ChainLimit::get().account_token_ownership_limit, Error::<T>::AddressOwnershipLimitExceeded);23032304 <AccountItemCount<T>>::insert(owner.as_sub(), count2305 .checked_add(1)2306 .ok_or(Error::<T>::NumOverflow)?);2307 }2308 else {2309 <AccountItemCount<T>>::insert(owner.as_sub(), 1);2310 }23112312 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2313 if list_exists {2314 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2315 let item_contains = list.contains(&item_index.clone());23162317 if !item_contains {2318 list.push(item_index.clone());2319 }23202321 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2322 } else {2323 let mut itm = Vec::new();2324 itm.push(item_index.clone());2325 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), itm);2326 }23272328 Ok(())2329 }23302331 fn remove_token_index(2332 collection_id: CollectionId,2333 item_index: TokenId,2334 owner: &T::CrossAccountId,2335 ) -> DispatchResult {23362337 // update counter2338 <AccountItemCount<T>>::insert(owner.as_sub(), 2339 <AccountItemCount<T>>::get(owner.as_sub())2340 .checked_sub(1)2341 .ok_or(Error::<T>::NumOverflow)?);234223432344 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2345 if list_exists {2346 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2347 let item_contains = list.contains(&item_index.clone());23482349 if item_contains {2350 list.retain(|&item| item != item_index);2351 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2352 }2353 }23542355 Ok(())2356 }23572358 fn move_token_index(2359 collection_id: CollectionId,2360 item_index: TokenId,2361 old_owner: &T::CrossAccountId,2362 new_owner: &T::CrossAccountId,2363 ) -> DispatchResult {2364 Self::remove_token_index(collection_id, item_index, old_owner)?;2365 Self::add_token_index(collection_id, item_index, new_owner)?;23662367 Ok(())2368 }2369 2370 fn ensure_contract_owned(account: T::AccountId, contract: &T::AccountId) -> DispatchResult {2371 ensure!(<ContractOwner<T>>::get(contract) == Some(account), Error::<T>::NoPermission);23722373 Ok(())2374 }2375}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#![recursion_limit = "1024"]78#![cfg_attr(not(feature = "std"), no_std)]910extern crate alloc;1112pub use serde::{Serialize, Deserialize};1314pub use frame_support::{15 construct_runtime, decl_event, decl_module, decl_storage, decl_error,16 dispatch::DispatchResult,17 ensure, fail, parameter_types,18 traits::{19 Currency, ExistenceRequirement, Get, Imbalance, KeyOwnerProofSystem, OnUnbalanced,20 Randomness, IsSubType, WithdrawReasons,21 },22 weights::{23 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},24 DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,25 WeightToFeePolynomial, DispatchClass,26 },27 StorageValue,28 transactional,29};3031use frame_system::{self as system, ensure_signed, ensure_root};32use sp_core::H160;33use sp_runtime::sp_std::prelude::Vec;34use core::ops::{Deref, DerefMut};35use core::cell::RefCell;36use nft_data_structs::{37 MAX_DECIMAL_POINTS, MAX_SPONSOR_TIMEOUT, MAX_TOKEN_OWNERSHIP, MAX_REFUNGIBLE_PIECES,38 AccessMode, ChainLimits, Collection, CreateItemData, CollectionLimits,39 CollectionId, CollectionMode, TokenId, 40 SchemaVersion, SponsorshipState, Ownership,41 NftItemType, FungibleItemType, ReFungibleItemType42};43use pallet_ethereum::EthereumTransactionSender;4445#[cfg(test)]46mod mock;4748#[cfg(test)]49mod tests;5051mod default_weights;52mod eth;5354pub use eth::NftErcSupport;55pub use eth::account::*;56use eth::erc::{ERC20Events, ERC721Events};5758#[cfg(feature = "runtime-benchmarks")]59mod benchmarking;6061pub trait WeightInfo {62 fn create_collection() -> Weight;63 fn destroy_collection() -> Weight;64 fn add_to_white_list() -> Weight;65 fn remove_from_white_list() -> Weight;66 fn set_public_access_mode() -> Weight;67 fn set_mint_permission() -> Weight;68 fn change_collection_owner() -> Weight;69 fn add_collection_admin() -> Weight;70 fn remove_collection_admin() -> Weight;71 fn set_collection_sponsor() -> Weight;72 fn confirm_sponsorship() -> Weight;73 fn remove_collection_sponsor() -> Weight;74 fn create_item(s: usize) -> Weight;75 fn burn_item() -> Weight;76 fn transfer() -> Weight;77 fn approve() -> Weight;78 fn transfer_from() -> Weight;79 fn set_offchain_schema() -> Weight;80 fn set_const_on_chain_schema() -> Weight;81 fn set_variable_on_chain_schema() -> Weight;82 fn set_variable_meta_data() -> Weight;83 fn enable_contract_sponsoring() -> Weight;84 fn set_schema_version() -> Weight;85 fn set_chain_limits() -> Weight;86 fn set_contract_sponsoring_rate_limit() -> Weight;87 fn set_variable_meta_data_sponsoring_rate_limit() -> Weight;88 fn toggle_contract_white_list() -> Weight;89 fn add_to_contract_white_list() -> Weight;90 fn remove_from_contract_white_list() -> Weight;91 fn set_collection_limits() -> Weight;92}9394decl_error! {95 /// Error for non-fungible-token module.96 pub enum Error for Module<T: Config> {97 /// Total collections bound exceeded.98 TotalCollectionsLimitExceeded,99 /// Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.100 CollectionDecimalPointLimitExceeded, 101 /// Collection name can not be longer than 63 char.102 CollectionNameLimitExceeded, 103 /// Collection description can not be longer than 255 char.104 CollectionDescriptionLimitExceeded, 105 /// Token prefix can not be longer than 15 char.106 CollectionTokenPrefixLimitExceeded,107 /// This collection does not exist.108 CollectionNotFound,109 /// Item not exists.110 TokenNotFound,111 /// Admin not found112 AdminNotFound,113 /// Arithmetic calculation overflow.114 NumOverflow, 115 /// Account already has admin role.116 AlreadyAdmin, 117 /// You do not own this collection.118 NoPermission,119 /// This address is not set as sponsor, use setCollectionSponsor first.120 ConfirmUnsetSponsorFail,121 /// Collection is not in mint mode.122 PublicMintingNotAllowed,123 /// Sender parameter and item owner must be equal.124 MustBeTokenOwner,125 /// Item balance not enough.126 TokenValueTooLow,127 /// Size of item is too large.128 NftSizeLimitExceeded,129 /// No approve found130 ApproveNotFound,131 /// Requested value more than approved.132 TokenValueNotEnough,133 /// Only approved addresses can call this method.134 ApproveRequired,135 /// Address is not in white list.136 AddresNotInWhiteList,137 /// Number of collection admins bound exceeded.138 CollectionAdminsLimitExceeded,139 /// Owned tokens by a single address bound exceeded.140 AddressOwnershipLimitExceeded,141 /// Length of items properties must be greater than 0.142 EmptyArgument,143 /// const_data exceeded data limit.144 TokenConstDataLimitExceeded,145 /// variable_data exceeded data limit.146 TokenVariableDataLimitExceeded,147 /// Not NFT item data used to mint in NFT collection.148 NotNftDataUsedToMintNftCollectionToken,149 /// Not Fungible item data used to mint in Fungible collection.150 NotFungibleDataUsedToMintFungibleCollectionToken,151 /// Not Re Fungible item data used to mint in Re Fungible collection.152 NotReFungibleDataUsedToMintReFungibleCollectionToken,153 /// Unexpected collection type.154 UnexpectedCollectionType,155 /// Can't store metadata in fungible tokens.156 CantStoreMetadataInFungibleTokens,157 /// Collection token limit exceeded158 CollectionTokenLimitExceeded,159 /// Account token limit exceeded per collection160 AccountTokenLimitExceeded,161 /// Collection limit bounds per collection exceeded162 CollectionLimitBoundsExceeded,163 /// Tried to enable permissions which are only permitted to be disabled164 OwnerPermissionsCantBeReverted,165 /// Schema data size limit bound exceeded166 SchemaDataLimitExceeded,167 /// Maximum refungibility exceeded168 WrongRefungiblePieces,169 /// createRefungible should be called with one owner170 BadCreateRefungibleCall,171 /// Gas limit exceeded172 OutOfGas,173 }174}175176pub struct CollectionHandle<T: Config> {177 pub id: CollectionId,178 collection: Collection<T>,179 logs: eth::log::LogRecorder,180 evm_address: H160,181 gas_limit: RefCell<u64>,182}183impl<T: Config> CollectionHandle<T> {184 pub fn get_with_gas_limit(id: CollectionId, gas_limit: u64) -> Option<Self> {185 <CollectionById<T>>::get(id)186 .map(|collection| Self {187 id,188 collection,189 logs: eth::log::LogRecorder::default(),190 evm_address: eth::collection_id_to_address(id),191 gas_limit: RefCell::new(gas_limit),192 })193 }194 pub fn get(id: CollectionId) -> Option<Self> {195 Self::get_with_gas_limit(id, u64::MAX)196 }197 pub fn gas_left(&self) -> u64 {198 *self.gas_limit.borrow()199 }200 pub fn consume_gas(&self, gas: u64) -> DispatchResult {201 let mut gas_limit = self.gas_limit.borrow_mut();202 if *gas_limit < gas {203 fail!(Error::<T>::OutOfGas);204 }205 *gas_limit -= gas;206 Ok(())207 }208 pub fn log(&self, log: impl evm_coder::ToLog) {209 self.logs.log(log.to_log(self.evm_address))210 }211 pub fn into_inner(self) -> Collection<T> {212 self.collection.clone()213 }214}215impl<T: Config> Deref for CollectionHandle<T> {216 type Target = Collection<T>;217218 fn deref(&self) -> &Self::Target {219 &self.collection220 }221}222223impl<T: Config> DerefMut for CollectionHandle<T> {224 fn deref_mut(&mut self) -> &mut Self::Target {225 &mut self.collection226 }227}228229pub trait Config: system::Config + Sized {230 type Event: From<Event<Self>> + Into<<Self as system::Config>::Event>;231232 /// Weight information for extrinsics in this pallet.233 type WeightInfo: WeightInfo;234235 type EvmAddressMapping: pallet_evm::AddressMapping<Self::AccountId>;236 type EvmBackwardsAddressMapping: EvmBackwardsAddressMapping<Self::AccountId>;237 type EvmWithdrawOrigin: pallet_evm::EnsureAddressOrigin<Self::Origin, Success = Self::AccountId>;238239 type CrossAccountId: CrossAccountId<Self::AccountId>;240 type Currency: Currency<Self::AccountId>;241 type CollectionCreationPrice: Get<<<Self as Config>::Currency as Currency<Self::AccountId>>::Balance>;242 type TreasuryAccountId: Get<Self::AccountId>;243244 type EthereumChainId: Get<u64>;245 type EthereumTransactionSender: pallet_ethereum::EthereumTransactionSender;246}247248// # Used definitions249//250// ## User control levels251//252// chain-controlled - key is uncontrolled by user253// i.e autoincrementing index254// can use non-cryptographic hash255// real - key is controlled by user256// but it is hard to generate enough colliding values, i.e owner of signed txs257// can use non-cryptographic hash258// controlled - key is completly controlled by users259// i.e maps with mutable keys260// should use cryptographic hash261//262// ## User control level downgrade reasons263//264// ?1 - chain-controlled -> controlled265// collections/tokens can be destroyed, resulting in massive holes266// ?2 - chain-controlled -> controlled267// same as ?1, but can be only added, resulting in easier exploitation268// ?3 - real -> controlled269// no confirmation required, so addresses can be easily generated270decl_storage! {271 trait Store for Module<T: Config> as Nft {272273 //#region Private members274 /// Id of next collection275 CreatedCollectionCount: u32;276 /// Used for migrations277 ChainVersion: u64;278 /// Id of last collection token279 /// Collection id (controlled?1)280 ItemListIndex: map hasher(blake2_128_concat) CollectionId => TokenId;281 //#endregion282283 //#region Chain limits struct284 pub ChainLimit get(fn chain_limit) config(): ChainLimits;285 //#endregion286287 //#region Bound counters288 /// Amount of collections destroyed, used for total amount tracking with289 /// CreatedCollectionCount290 DestroyedCollectionCount: u32;291 /// Total amount of account owned tokens (NFTs + RFTs + unique fungibles)292 /// Account id (real)293 pub AccountItemCount get(fn account_item_count): map hasher(twox_64_concat) T::AccountId => u32;294 //#endregion295296 //#region Basic collections297 /// Collection info298 /// Collection id (controlled?1)299 pub CollectionById get(fn collection_id) config(): map hasher(blake2_128_concat) CollectionId => Option<Collection<T>> = None;300 /// List of collection admins301 /// Collection id (controlled?2)302 pub AdminList get(fn admin_list_collection): map hasher(blake2_128_concat) CollectionId => Vec<T::CrossAccountId>;303 /// Whitelisted collection users304 /// Collection id (controlled?2), user id (controlled?3)305 pub WhiteList get(fn white_list): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => bool;306 //#endregion307308 /// How many of collection items user have309 /// Collection id (controlled?2), account id (real)310 pub Balance get(fn balance_count): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => u128;311312 /// Amount of items which spender can transfer out of owners account (via transferFrom)313 /// Collection id (controlled?2), (token id (controlled ?2) + owner account id (real) + spender account id (controlled?3))314 /// TODO: Off chain worker should remove from this map when token gets removed315 pub Allowances get(fn approved): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) (TokenId, T::AccountId, T::AccountId) => u128;316317 //#region Item collections318 /// Collection id (controlled?2), token id (controlled?1)319 pub NftItemList get(fn nft_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<NftItemType<T::CrossAccountId>>;320 /// Collection id (controlled?2), owner (controlled?2)321 pub FungibleItemList get(fn fungible_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => FungibleItemType;322 /// Collection id (controlled?2), token id (controlled?1)323 pub ReFungibleItemList get(fn refungible_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<ReFungibleItemType<T::CrossAccountId>>;324 //#endregion325326 //#region Index list327 /// Collection id (controlled?2), tokens owner (controlled?2)328 pub AddressTokens get(fn address_tokens): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => Vec<TokenId>;329 //#endregion330331 //#region Tokens transfer rate limit baskets332 /// (Collection id (controlled?2), who created (real))333 /// TODO: Off chain worker should remove from this map when collection gets removed334 pub CreateItemBasket get(fn create_item_basket): map hasher(blake2_128_concat) (CollectionId, T::AccountId) => T::BlockNumber;335 /// Collection id (controlled?2), token id (controlled?2)336 pub NftTransferBasket get(fn nft_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => T::BlockNumber;337 /// Collection id (controlled?2), owning user (real)338 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => T::BlockNumber;339 /// Collection id (controlled?2), token id (controlled?2)340 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => T::BlockNumber;341 //#endregion342343 /// Variable metadata sponsoring344 /// Collection id (controlled?2), token id (controlled?2)345 pub VariableMetaDataBasket get(fn variable_meta_data_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber> = None;346 347 //#region Contract Sponsorship and Ownership348 /// Contract address (real)349 pub ContractOwner get(fn contract_owner): map hasher(twox_64_concat) T::AccountId => Option<T::AccountId>;350 /// Contract address (real)351 pub ContractSelfSponsoring get(fn contract_self_sponsoring): map hasher(twox_64_concat) T::AccountId => bool;352 /// (Contract address(real), caller (real))353 pub ContractSponsorBasket get(fn contract_sponsor_basket): map hasher(twox_64_concat) (T::AccountId, T::AccountId) => T::BlockNumber;354 /// Contract address (real)355 pub ContractSponsoringRateLimit get(fn contract_sponsoring_rate_limit): map hasher(twox_64_concat) T::AccountId => T::BlockNumber;356 /// Contract address (real)357 pub ContractWhiteListEnabled get(fn contract_white_list_enabled): map hasher(twox_64_concat) T::AccountId => bool; 358 /// Contract address (real) => Whitelisted user (controlled?3)359 pub ContractWhiteList get(fn contract_white_list): double_map hasher(twox_64_concat) T::AccountId, hasher(blake2_128_concat) T::AccountId => bool; 360 //#endregion361 }362 add_extra_genesis {363 build(|config: &GenesisConfig<T>| {364 // Modification of storage365 for (_num, _c) in &config.collection_id {366 <Module<T>>::init_collection(_c);367 }368369 for (_num, _c, _i) in &config.nft_item_id {370 <Module<T>>::init_nft_token(*_c, _i);371 }372373 for (collection_id, account_id, fungible_item) in &config.fungible_item_id {374 <Module<T>>::init_fungible_token(*collection_id, &T::CrossAccountId::from_sub(account_id.clone()), fungible_item);375 }376377 for (_num, _c, _i) in &config.refungible_item_id {378 <Module<T>>::init_refungible_token(*_c, _i);379 }380 })381 }382}383384decl_event!(385 pub enum Event<T>386 where387 AccountId = <T as frame_system::Config>::AccountId,388 CrossAccountId = <T as Config>::CrossAccountId,389 {390 /// New collection was created391 /// 392 /// # Arguments393 /// 394 /// * collection_id: Globally unique identifier of newly created collection.395 /// 396 /// * mode: [CollectionMode] converted into u8.397 /// 398 /// * account_id: Collection owner.399 CollectionCreated(CollectionId, u8, AccountId),400401 /// New item was created.402 /// 403 /// # Arguments404 /// 405 /// * collection_id: Id of the collection where item was created.406 /// 407 /// * item_id: Id of an item. Unique within the collection.408 ///409 /// * recipient: Owner of newly created item 410 ItemCreated(CollectionId, TokenId, CrossAccountId),411412 /// Collection item was burned.413 /// 414 /// # Arguments415 /// 416 /// collection_id.417 /// 418 /// item_id: Identifier of burned NFT.419 ItemDestroyed(CollectionId, TokenId),420421 /// Item was transferred422 ///423 /// * collection_id: Id of collection to which item is belong424 ///425 /// * item_id: Id of an item426 ///427 /// * sender: Original owner of item428 ///429 /// * recipient: New owner of item430 ///431 /// * amount: Always 1 for NFT432 Transfer(CollectionId, TokenId, CrossAccountId, CrossAccountId, u128),433434 /// * collection_id435 ///436 /// * item_id437 ///438 /// * sender439 ///440 /// * spender441 ///442 /// * amount443 Approved(CollectionId, TokenId, CrossAccountId, CrossAccountId, u128),444 }445);446447decl_module! {448 pub struct Module<T: Config> for enum Call 449 where 450 origin: T::Origin451 {452 fn deposit_event() = default;453 type Error = Error<T>;454455 fn on_initialize(_now: T::BlockNumber) -> Weight {456 0457 }458459 /// This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner and admin of the collection are set to the address that signed the transaction. Both addresses can be changed later.460 /// 461 /// # Permissions462 /// 463 /// * Anyone.464 /// 465 /// # Arguments466 /// 467 /// * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.468 /// 469 /// * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.470 /// 471 /// * token_prefix: UTF-8 string with token prefix.472 /// 473 /// * mode: [CollectionMode] collection type and type dependent data.474 // returns collection ID475 #[weight = <T as Config>::WeightInfo::create_collection()]476 #[transactional]477 pub fn create_collection(origin,478 collection_name: Vec<u16>,479 collection_description: Vec<u16>,480 token_prefix: Vec<u8>,481 mode: CollectionMode) -> DispatchResult {482483 // Anyone can create a collection484 let who = ensure_signed(origin)?;485486 // Take a (non-refundable) deposit of collection creation487 let mut imbalance = <<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();488 imbalance.subsume(<<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(489 &T::TreasuryAccountId::get(),490 T::CollectionCreationPrice::get(),491 ));492 <T as Config>::Currency::settle(493 &who,494 imbalance,495 WithdrawReasons::TRANSFER,496 ExistenceRequirement::KeepAlive,497 ).map_err(|_| Error::<T>::NoPermission)?;498499 let decimal_points = match mode {500 CollectionMode::Fungible(points) => points,501 _ => 0502 };503504 let chain_limit = ChainLimit::get();505506 let created_count = CreatedCollectionCount::get();507 let destroyed_count = DestroyedCollectionCount::get();508509 // bound Total number of collections510 ensure!(created_count - destroyed_count < chain_limit.collection_numbers_limit, Error::<T>::TotalCollectionsLimitExceeded);511512 // check params513 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);514 ensure!(collection_name.len() <= 64, Error::<T>::CollectionNameLimitExceeded);515 ensure!(collection_description.len() <= 256, Error::<T>::CollectionDescriptionLimitExceeded);516 ensure!(token_prefix.len() <= 16, Error::<T>::CollectionTokenPrefixLimitExceeded);517518 // Generate next collection ID519 let next_id = created_count520 .checked_add(1)521 .ok_or(Error::<T>::NumOverflow)?;522523 CreatedCollectionCount::put(next_id);524525 let limits = CollectionLimits {526 sponsored_data_size: chain_limit.custom_data_limit,527 ..Default::default()528 };529530 // Create new collection531 let new_collection = Collection {532 owner: who.clone(),533 name: collection_name,534 mode: mode.clone(),535 mint_mode: false,536 access: AccessMode::Normal,537 description: collection_description,538 decimal_points: decimal_points,539 token_prefix: token_prefix,540 offchain_schema: Vec::new(),541 schema_version: SchemaVersion::ImageURL,542 sponsorship: SponsorshipState::Disabled,543 variable_on_chain_schema: Vec::new(),544 const_on_chain_schema: Vec::new(),545 limits,546 };547548 // Add new collection to map549 <CollectionById<T>>::insert(next_id, new_collection);550551 // call event552 Self::deposit_event(RawEvent::CollectionCreated(next_id, mode.into(), who));553554 Ok(())555 }556557 /// **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.558 /// 559 /// # Permissions560 /// 561 /// * Collection Owner.562 /// 563 /// # Arguments564 /// 565 /// * collection_id: collection to destroy.566 #[weight = <T as Config>::WeightInfo::destroy_collection()]567 #[transactional]568 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {569570 let sender = ensure_signed(origin)?;571 let collection = Self::get_collection(collection_id)?;572 Self::check_owner_permissions(&collection, &sender)?;573 if !collection.limits.owner_can_destroy {574 fail!(Error::<T>::NoPermission);575 }576577 <AddressTokens<T>>::remove_prefix(collection_id);578 <Allowances<T>>::remove_prefix(collection_id);579 <Balance<T>>::remove_prefix(collection_id);580 <ItemListIndex>::remove(collection_id);581 <AdminList<T>>::remove(collection_id);582 <CollectionById<T>>::remove(collection_id);583 <WhiteList<T>>::remove_prefix(collection_id);584585 <NftItemList<T>>::remove_prefix(collection_id);586 <FungibleItemList<T>>::remove_prefix(collection_id);587 <ReFungibleItemList<T>>::remove_prefix(collection_id);588589 <NftTransferBasket<T>>::remove_prefix(collection_id);590 <FungibleTransferBasket<T>>::remove_prefix(collection_id);591 <ReFungibleTransferBasket<T>>::remove_prefix(collection_id);592593 <VariableMetaDataBasket<T>>::remove_prefix(collection_id);594595 DestroyedCollectionCount::put(DestroyedCollectionCount::get()596 .checked_add(1)597 .ok_or(Error::<T>::NumOverflow)?);598599 Ok(())600 }601602 /// Add an address to white list.603 /// 604 /// # Permissions605 /// 606 /// * Collection Owner607 /// * Collection Admin608 /// 609 /// # Arguments610 /// 611 /// * collection_id.612 /// 613 /// * address.614 #[weight = <T as Config>::WeightInfo::add_to_white_list()]615 #[transactional]616 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{617618 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);619 let collection = Self::get_collection(collection_id)?;620621 Self::toggle_white_list_internal(622 &sender,623 &collection,624 &address,625 true,626 )?;627628 Ok(())629 }630631 /// Remove an address from white list.632 /// 633 /// # Permissions634 /// 635 /// * Collection Owner636 /// * Collection Admin637 /// 638 /// # Arguments639 /// 640 /// * collection_id.641 /// 642 /// * address.643 #[weight = <T as Config>::WeightInfo::remove_from_white_list()]644 #[transactional]645 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{646647 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);648 let collection = Self::get_collection(collection_id)?;649650 Self::toggle_white_list_internal(651 &sender,652 &collection,653 &address,654 false,655 )?;656657 Ok(())658 }659660 /// Toggle between normal and white list access for the methods with access for `Anyone`.661 /// 662 /// # Permissions663 /// 664 /// * Collection Owner.665 /// 666 /// # Arguments667 /// 668 /// * collection_id.669 /// 670 /// * mode: [AccessMode]671 #[weight = <T as Config>::WeightInfo::set_public_access_mode()]672 #[transactional]673 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult674 {675 let sender = ensure_signed(origin)?;676677 let mut target_collection = Self::get_collection(collection_id)?;678 Self::check_owner_permissions(&target_collection, &sender)?;679 target_collection.access = mode;680 Self::save_collection(target_collection);681682 Ok(())683 }684685 /// Allows Anyone to create tokens if:686 /// * White List is enabled, and687 /// * Address is added to white list, and688 /// * This method was called with True parameter689 /// 690 /// # Permissions691 /// * Collection Owner692 ///693 /// # Arguments694 /// 695 /// * collection_id.696 /// 697 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.698 #[weight = <T as Config>::WeightInfo::set_mint_permission()]699 #[transactional]700 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult701 {702 let sender = ensure_signed(origin)?;703704 let mut target_collection = Self::get_collection(collection_id)?;705 Self::check_owner_permissions(&target_collection, &sender)?;706 target_collection.mint_mode = mint_permission;707 Self::save_collection(target_collection);708709 Ok(())710 }711712 /// Change the owner of the collection.713 /// 714 /// # Permissions715 /// 716 /// * Collection Owner.717 /// 718 /// # Arguments719 /// 720 /// * collection_id.721 /// 722 /// * new_owner.723 #[weight = <T as Config>::WeightInfo::change_collection_owner()]724 #[transactional]725 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {726727 let sender = ensure_signed(origin)?;728 let mut target_collection = Self::get_collection(collection_id)?;729 Self::check_owner_permissions(&target_collection, &sender)?;730 target_collection.owner = new_owner;731 Self::save_collection(target_collection);732733 Ok(())734 }735736 /// Adds an admin of the Collection.737 /// NFT Collection can be controlled by multiple admin addresses (some which can also be servers, for example). Admins can issue and burn NFTs, as well as add and remove other admins, but cannot change NFT or Collection ownership. 738 /// 739 /// # Permissions740 /// 741 /// * Collection Owner.742 /// * Collection Admin.743 /// 744 /// # Arguments745 /// 746 /// * collection_id: ID of the Collection to add admin for.747 /// 748 /// * new_admin_id: Address of new admin to add.749 #[weight = <T as Config>::WeightInfo::add_collection_admin()]750 #[transactional]751 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {752 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);753 let collection = Self::get_collection(collection_id)?;754 Self::check_owner_or_admin_permissions(&collection, &sender)?;755 let mut admin_arr = <AdminList<T>>::get(collection_id);756757 match admin_arr.binary_search(&new_admin_id) {758 Ok(_) => {},759 Err(idx) => {760 let limits = ChainLimit::get();761 ensure!(admin_arr.len() < limits.collections_admins_limit as usize, Error::<T>::CollectionAdminsLimitExceeded);762 admin_arr.insert(idx, new_admin_id);763 <AdminList<T>>::insert(collection_id, admin_arr);764 }765 }766 Ok(())767 }768769 /// Remove admin address of the Collection. An admin address can remove itself. List of admins may become empty, in which case only Collection Owner will be able to add an Admin.770 ///771 /// # Permissions772 /// 773 /// * Collection Owner.774 /// * Collection Admin.775 /// 776 /// # Arguments777 /// 778 /// * collection_id: ID of the Collection to remove admin for.779 /// 780 /// * account_id: Address of admin to remove.781 #[weight = <T as Config>::WeightInfo::remove_collection_admin()]782 #[transactional]783 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {784 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);785 let collection = Self::get_collection(collection_id)?;786 Self::check_owner_or_admin_permissions(&collection, &sender)?;787 let mut admin_arr = <AdminList<T>>::get(collection_id);788789 match admin_arr.binary_search(&account_id) {790 Ok(idx) => {791 admin_arr.remove(idx);792 <AdminList<T>>::insert(collection_id, admin_arr);793 },794 Err(_) => {}795 }796 Ok(())797 }798799 /// # Permissions800 /// 801 /// * Collection Owner802 /// 803 /// # Arguments804 /// 805 /// * collection_id.806 /// 807 /// * new_sponsor.808 #[weight = <T as Config>::WeightInfo::set_collection_sponsor()]809 #[transactional]810 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {811 let sender = ensure_signed(origin)?;812 let mut target_collection = Self::get_collection(collection_id)?;813 Self::check_owner_permissions(&target_collection, &sender)?;814815 target_collection.sponsorship = SponsorshipState::Unconfirmed(new_sponsor);816 Self::save_collection(target_collection);817818 Ok(())819 }820821 /// # Permissions822 /// 823 /// * Sponsor.824 /// 825 /// # Arguments826 /// 827 /// * collection_id.828 #[weight = <T as Config>::WeightInfo::confirm_sponsorship()]829 #[transactional]830 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {831 let sender = ensure_signed(origin)?;832833 let mut target_collection = Self::get_collection(collection_id)?;834 ensure!(835 target_collection.sponsorship.pending_sponsor() == Some(&sender),836 Error::<T>::ConfirmUnsetSponsorFail837 );838839 target_collection.sponsorship = SponsorshipState::Confirmed(sender);840 Self::save_collection(target_collection);841842 Ok(())843 }844845 /// Switch back to pay-per-own-transaction model.846 ///847 /// # Permissions848 ///849 /// * Collection owner.850 /// 851 /// # Arguments852 /// 853 /// * collection_id.854 #[weight = <T as Config>::WeightInfo::remove_collection_sponsor()]855 #[transactional]856 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {857 let sender = ensure_signed(origin)?;858859 let mut target_collection = Self::get_collection(collection_id)?;860 Self::check_owner_permissions(&target_collection, &sender)?;861862 target_collection.sponsorship = SponsorshipState::Disabled;863 Self::save_collection(target_collection);864865 Ok(())866 }867868 /// This method creates a concrete instance of NFT Collection created with CreateCollection method.869 /// 870 /// # Permissions871 /// 872 /// * Collection Owner.873 /// * Collection Admin.874 /// * Anyone if875 /// * White List is enabled, and876 /// * Address is added to white list, and877 /// * MintPermission is enabled (see SetMintPermission method)878 /// 879 /// # Arguments880 /// 881 /// * collection_id: ID of the collection.882 /// 883 /// * owner: Address, initial owner of the NFT.884 ///885 /// * data: Token data to store on chain.886 // #[weight =887 // (130_000_000 as Weight)888 // .saturating_add((2135 as Weight).saturating_mul((properties.len() as u64) as Weight))889 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))890 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]891892 #[weight = <T as Config>::WeightInfo::create_item(data.len())]893 #[transactional]894 pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResult {895 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);896 let collection = Self::get_collection(collection_id)?;897898 Self::create_item_internal(&sender, &collection, &owner, data)?;899900 Self::submit_logs(collection)?;901 Ok(())902 }903904 /// This method creates multiple items in a collection created with CreateCollection method.905 /// 906 /// # Permissions907 /// 908 /// * Collection Owner.909 /// * Collection Admin.910 /// * Anyone if911 /// * White List is enabled, and912 /// * Address is added to white list, and913 /// * MintPermission is enabled (see SetMintPermission method)914 /// 915 /// # Arguments916 /// 917 /// * collection_id: ID of the collection.918 /// 919 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].920 /// 921 /// * owner: Address, initial owner of the NFT.922 #[weight = <T as Config>::WeightInfo::create_item(items_data.into_iter()923 .map(|data| { data.len() })924 .sum())]925 #[transactional]926 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResult {927928 ensure!(items_data.len() > 0, Error::<T>::EmptyArgument);929 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);930 let collection = Self::get_collection(collection_id)?;931932 Self::create_multiple_items_internal(&sender, &collection, &owner, items_data)?;933934 Self::submit_logs(collection)?;935 Ok(())936 }937938 /// Destroys a concrete instance of NFT.939 /// 940 /// # Permissions941 /// 942 /// * Collection Owner.943 /// * Collection Admin.944 /// * Current NFT Owner.945 /// 946 /// # Arguments947 /// 948 /// * collection_id: ID of the collection.949 /// 950 /// * item_id: ID of NFT to burn.951 #[weight = <T as Config>::WeightInfo::burn_item()]952 #[transactional]953 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {954955 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);956 let target_collection = Self::get_collection(collection_id)?;957958 Self::burn_item_internal(&sender, &target_collection, item_id, value)?;959960 Self::submit_logs(target_collection)?;961 Ok(())962 }963964 /// Change ownership of the token.965 /// 966 /// # Permissions967 /// 968 /// * Collection Owner969 /// * Collection Admin970 /// * Current NFT owner971 ///972 /// # Arguments973 /// 974 /// * recipient: Address of token recipient.975 /// 976 /// * collection_id.977 /// 978 /// * item_id: ID of the item979 /// * Non-Fungible Mode: Required.980 /// * Fungible Mode: Ignored.981 /// * Re-Fungible Mode: Required.982 /// 983 /// * value: Amount to transfer.984 /// * Non-Fungible Mode: Ignored985 /// * Fungible Mode: Must specify transferred amount986 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)987 #[weight = <T as Config>::WeightInfo::transfer()]988 #[transactional]989 pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {990 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);991 let collection = Self::get_collection(collection_id)?;992993 Self::transfer_internal(&sender, &recipient, &collection, item_id, value)?;994995 Self::submit_logs(collection)?;996 Ok(())997 }998999 /// Set, change, or remove approved address to transfer the ownership of the NFT.1000 /// 1001 /// # Permissions1002 /// 1003 /// * Collection Owner1004 /// * Collection Admin1005 /// * Current NFT owner1006 /// 1007 /// # Arguments1008 /// 1009 /// * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).1010 /// 1011 /// * collection_id.1012 /// 1013 /// * item_id: ID of the item.1014 #[weight = <T as Config>::WeightInfo::approve()]1015 #[transactional]1016 pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResult {1017 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1018 let collection = Self::get_collection(collection_id)?;10191020 Self::approve_internal(&sender, &spender, &collection, item_id, amount)?;10211022 Self::submit_logs(collection)?;1023 Ok(())1024 }1025 1026 /// Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.1027 /// 1028 /// # Permissions1029 /// * Collection Owner1030 /// * Collection Admin1031 /// * Current NFT owner1032 /// * Address approved by current NFT owner1033 /// 1034 /// # Arguments1035 /// 1036 /// * from: Address that owns token.1037 /// 1038 /// * recipient: Address of token recipient.1039 /// 1040 /// * collection_id.1041 /// 1042 /// * item_id: ID of the item.1043 /// 1044 /// * value: Amount to transfer.1045 #[weight = <T as Config>::WeightInfo::transfer_from()]1046 #[transactional]1047 pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResult {1048 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1049 let collection = Self::get_collection(collection_id)?;10501051 Self::transfer_from_internal(&sender, &from, &recipient, &collection, item_id, value)?;10521053 Self::submit_logs(collection)?;1054 Ok(())1055 }1056 // #[weight = 0]1057 // // let no_perm_mes = "You do not have permissions to modify this collection";1058 // // ensure!(<ApprovedList<T>>::contains_key((collection_id, item_id)), no_perm_mes);1059 // // let list_itm = <ApprovedList<T>>::get((collection_id, item_id));1060 // // ensure!(list_itm.contains(&new_owner.clone()), no_perm_mes);10611062 // // // on_nft_received call10631064 // // Self::transfer(origin, collection_id, item_id, new_owner)?;10651066 // Ok(())1067 // }10681069 /// Set off-chain data schema.1070 /// 1071 /// # Permissions1072 /// 1073 /// * Collection Owner1074 /// * Collection Admin1075 /// 1076 /// # Arguments1077 /// 1078 /// * collection_id.1079 /// 1080 /// * schema: String representing the offchain data schema.1081 #[weight = <T as Config>::WeightInfo::set_variable_meta_data()]1082 #[transactional]1083 pub fn set_variable_meta_data (1084 origin,1085 collection_id: CollectionId,1086 item_id: TokenId,1087 data: Vec<u8>1088 ) -> DispatchResult {1089 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1090 1091 let collection = Self::get_collection(collection_id)?;10921093 Self::set_variable_meta_data_internal(&sender, &collection, item_id, data)?;10941095 Ok(())1096 }1097 1098 /// Set schema standard1099 /// ImageURL1100 /// Unique1101 /// 1102 /// # Permissions1103 /// 1104 /// * Collection Owner1105 /// * Collection Admin1106 /// 1107 /// # Arguments1108 /// 1109 /// * collection_id.1110 /// 1111 /// * schema: SchemaVersion: enum1112 #[weight = <T as Config>::WeightInfo::set_schema_version()]1113 #[transactional]1114 pub fn set_schema_version(1115 origin,1116 collection_id: CollectionId,1117 version: SchemaVersion1118 ) -> DispatchResult {1119 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1120 let mut target_collection = Self::get_collection(collection_id)?;1121 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;1122 target_collection.schema_version = version;1123 Self::save_collection(target_collection);11241125 Ok(())1126 }11271128 /// Set off-chain data schema.1129 /// 1130 /// # Permissions1131 /// 1132 /// * Collection Owner1133 /// * Collection Admin1134 /// 1135 /// # Arguments1136 /// 1137 /// * collection_id.1138 /// 1139 /// * schema: String representing the offchain data schema.1140 #[weight = <T as Config>::WeightInfo::set_offchain_schema()]1141 #[transactional]1142 pub fn set_offchain_schema(1143 origin,1144 collection_id: CollectionId,1145 schema: Vec<u8>1146 ) -> DispatchResult {1147 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1148 let mut target_collection = Self::get_collection(collection_id)?;1149 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;11501151 // check schema limit1152 ensure!(schema.len() as u32 <= ChainLimit::get().offchain_schema_limit, "");11531154 target_collection.offchain_schema = schema;1155 Self::save_collection(target_collection);11561157 Ok(())1158 }11591160 /// Set const on-chain data schema.1161 /// 1162 /// # Permissions1163 /// 1164 /// * Collection Owner1165 /// * Collection Admin1166 /// 1167 /// # Arguments1168 /// 1169 /// * collection_id.1170 /// 1171 /// * schema: String representing the const on-chain data schema.1172 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1173 #[transactional]1174 pub fn set_const_on_chain_schema (1175 origin,1176 collection_id: CollectionId,1177 schema: Vec<u8>1178 ) -> DispatchResult {1179 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1180 let mut target_collection = Self::get_collection(collection_id)?;1181 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;11821183 // check schema limit1184 ensure!(schema.len() as u32 <= ChainLimit::get().const_on_chain_schema_limit, "");11851186 target_collection.const_on_chain_schema = schema;1187 Self::save_collection(target_collection);11881189 Ok(())1190 }11911192 /// Set variable on-chain data schema.1193 /// 1194 /// # Permissions1195 /// 1196 /// * Collection Owner1197 /// * Collection Admin1198 /// 1199 /// # Arguments1200 /// 1201 /// * collection_id.1202 /// 1203 /// * schema: String representing the variable on-chain data schema.1204 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1205 #[transactional]1206 pub fn set_variable_on_chain_schema (1207 origin,1208 collection_id: CollectionId,1209 schema: Vec<u8>1210 ) -> DispatchResult {1211 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1212 let mut target_collection = Self::get_collection(collection_id)?;1213 Self::check_owner_or_admin_permissions(&target_collection, &sender)?;12141215 // check schema limit1216 ensure!(schema.len() as u32 <= ChainLimit::get().variable_on_chain_schema_limit, "");12171218 target_collection.variable_on_chain_schema = schema;1219 Self::save_collection(target_collection);12201221 Ok(())1222 }12231224 // Sudo permissions function1225 #[weight = <T as Config>::WeightInfo::set_chain_limits()]1226 #[transactional]1227 pub fn set_chain_limits(1228 origin,1229 limits: ChainLimits1230 ) -> DispatchResult {12311232 #[cfg(not(feature = "runtime-benchmarks"))]1233 ensure_root(origin)?;12341235 <ChainLimit>::put(limits);1236 Ok(())1237 }12381239 /// Enable smart contract self-sponsoring.1240 /// 1241 /// # Permissions1242 /// 1243 /// * Contract Owner1244 /// 1245 /// # Arguments1246 /// 1247 /// * contract address1248 /// * enable flag1249 /// 1250 #[weight = <T as Config>::WeightInfo::enable_contract_sponsoring()]1251 #[transactional]1252 pub fn enable_contract_sponsoring(1253 origin,1254 contract_address: T::AccountId,1255 enable: bool1256 ) -> DispatchResult {12571258 let sender = ensure_signed(origin)?;12591260 #[cfg(feature = "runtime-benchmarks")]1261 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());12621263 Self::ensure_contract_owned(sender, &contract_address)?;12641265 <ContractSelfSponsoring<T>>::insert(contract_address, enable);1266 Ok(())1267 }12681269 /// Set the rate limit for contract sponsoring to specified number of blocks.1270 /// 1271 /// If not set (has the default value of 0 blocks), the sponsoring will be disabled. 1272 /// If set to the number B (for blocks), the transactions will be sponsored with a rate 1273 /// limit of B, i.e. fees for every transaction sent to this smart contract will be paid 1274 /// from contract endowment if there are at least B blocks between such transactions. 1275 /// Nonetheless, if transactions are sent more frequently, the fees are paid by the sender.1276 /// 1277 /// # Permissions1278 /// 1279 /// * Contract Owner1280 /// 1281 /// # Arguments1282 /// 1283 /// -`contract_address`: Address of the contract to sponsor1284 /// -`rate_limit`: Number of blocks to wait until the next sponsored transaction is allowed1285 /// 1286 #[weight = <T as Config>::WeightInfo::set_contract_sponsoring_rate_limit()]1287 #[transactional]1288 pub fn set_contract_sponsoring_rate_limit(1289 origin,1290 contract_address: T::AccountId,1291 rate_limit: T::BlockNumber1292 ) -> DispatchResult {1293 let sender = ensure_signed(origin)?;12941295 #[cfg(feature = "runtime-benchmarks")]1296 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());12971298 Self::ensure_contract_owned(sender, &contract_address)?;1299 <ContractSponsoringRateLimit<T>>::insert(contract_address, rate_limit);1300 Ok(())1301 }13021303 /// Enable the white list for a contract. Only addresses added to the white list with addToContractWhiteList will be able to call this smart contract.1304 /// 1305 /// # Permissions1306 /// 1307 /// * Address that deployed smart contract.1308 /// 1309 /// # Arguments1310 /// 1311 /// -`contract_address`: Address of the contract.1312 /// 1313 /// - `enable`: . 1314 #[weight = <T as Config>::WeightInfo::toggle_contract_white_list()]1315 #[transactional]1316 pub fn toggle_contract_white_list(1317 origin,1318 contract_address: T::AccountId,1319 enable: bool1320 ) -> DispatchResult {1321 let sender = ensure_signed(origin)?;13221323 #[cfg(feature = "runtime-benchmarks")]1324 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());13251326 Self::ensure_contract_owned(sender, &contract_address)?;1327 if enable {1328 <ContractWhiteListEnabled<T>>::insert(contract_address, true);1329 } else {1330 <ContractWhiteListEnabled<T>>::remove(contract_address);1331 }1332 Ok(())1333 }1334 1335 /// Add an address to smart contract white list.1336 /// 1337 /// # Permissions1338 /// 1339 /// * Address that deployed smart contract.1340 /// 1341 /// # Arguments1342 /// 1343 /// -`contract_address`: Address of the contract.1344 ///1345 /// -`account_address`: Address to add.1346 #[weight = <T as Config>::WeightInfo::add_to_contract_white_list()]1347 #[transactional]1348 pub fn add_to_contract_white_list(1349 origin,1350 contract_address: T::AccountId,1351 account_address: T::AccountId1352 ) -> DispatchResult {1353 let sender = ensure_signed(origin)?;13541355 #[cfg(feature = "runtime-benchmarks")]1356 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());1357 1358 Self::ensure_contract_owned(sender, &contract_address)?; 1359 <ContractWhiteList<T>>::insert(contract_address, account_address, true);1360 Ok(())1361 }13621363 /// Remove an address from smart contract white list.1364 /// 1365 /// # Permissions1366 /// 1367 /// * Address that deployed smart contract.1368 /// 1369 /// # Arguments1370 /// 1371 /// -`contract_address`: Address of the contract.1372 ///1373 /// -`account_address`: Address to remove.1374 #[weight = <T as Config>::WeightInfo::remove_from_contract_white_list()]1375 #[transactional]1376 pub fn remove_from_contract_white_list(1377 origin,1378 contract_address: T::AccountId,1379 account_address: T::AccountId1380 ) -> DispatchResult {1381 let sender = ensure_signed(origin)?;13821383 #[cfg(feature = "runtime-benchmarks")]1384 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());13851386 Self::ensure_contract_owned(sender, &contract_address)?;1387 <ContractWhiteList<T>>::remove(contract_address, account_address);1388 Ok(())1389 }13901391 #[weight = <T as Config>::WeightInfo::set_collection_limits()]1392 #[transactional]1393 pub fn set_collection_limits(1394 origin,1395 collection_id: u32,1396 new_limits: CollectionLimits<T::BlockNumber>,1397 ) -> DispatchResult {1398 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1399 let mut target_collection = Self::get_collection(collection_id)?;1400 Self::check_owner_permissions(&target_collection, &sender.as_sub())?;1401 let old_limits = &target_collection.limits;1402 let chain_limits = ChainLimit::get();14031404 // collection bounds1405 ensure!(new_limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&1406 new_limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP && 1407 new_limits.sponsored_data_size <= chain_limits.custom_data_limit,1408 Error::<T>::CollectionLimitBoundsExceeded);14091410 // token_limit check prev1411 ensure!(old_limits.token_limit >= new_limits.token_limit, Error::<T>::CollectionTokenLimitExceeded);1412 ensure!(new_limits.token_limit > 0, Error::<T>::CollectionTokenLimitExceeded);14131414 ensure!(1415 (old_limits.owner_can_transfer || !new_limits.owner_can_transfer) &&1416 (old_limits.owner_can_destroy || !new_limits.owner_can_destroy),1417 Error::<T>::OwnerPermissionsCantBeReverted,1418 );14191420 target_collection.limits = new_limits;1421 Self::save_collection(target_collection);14221423 Ok(())1424 } 1425 }1426}14271428impl<T: Config> Module<T> {1429 pub fn create_item_internal(sender: &T::CrossAccountId, collection: &CollectionHandle<T>, owner: &T::CrossAccountId, data: CreateItemData) -> DispatchResult {1430 Self::can_create_items_in_collection(&collection, &sender, &owner, 1)?;1431 Self::validate_create_item_args(&collection, &data)?;1432 Self::create_item_no_validation(&collection, owner, data)?;14331434 Ok(())1435 }14361437 pub fn transfer_internal(sender: &T::CrossAccountId, recipient: &T::CrossAccountId, target_collection: &CollectionHandle<T>, item_id: TokenId, value: u128) -> DispatchResult {1438 target_collection.consume_gas(2000000)?;1439 // Limits check1440 Self::is_correct_transfer(target_collection, &recipient)?;14411442 // Transfer permissions check1443 ensure!(Self::is_item_owner(&sender, target_collection, item_id) ||1444 Self::is_owner_or_admin_permissions(target_collection, &sender),1445 Error::<T>::NoPermission);14461447 if target_collection.access == AccessMode::WhiteList {1448 Self::check_white_list(target_collection, &sender)?;1449 Self::check_white_list(target_collection, &recipient)?;1450 }14511452 match target_collection.mode1453 {1454 CollectionMode::NFT => Self::transfer_nft(target_collection, item_id, sender.clone(), recipient.clone())?,1455 CollectionMode::Fungible(_) => Self::transfer_fungible(target_collection, value, &sender, &recipient)?,1456 CollectionMode::ReFungible => Self::transfer_refungible(target_collection, item_id, value, sender.clone(), recipient.clone())?,1457 _ => ()1458 };14591460 Self::deposit_event(RawEvent::Transfer(target_collection.id, item_id, sender.clone(), recipient.clone(), value));14611462 Ok(())1463 }14641465 pub fn approve_internal(1466 sender: &T::CrossAccountId,1467 spender: &T::CrossAccountId,1468 collection: &CollectionHandle<T>,1469 item_id: TokenId,1470 amount: u1281471 ) -> DispatchResult {1472 collection.consume_gas(2000000)?;1473 Self::token_exists(&collection, item_id)?;14741475 // Transfer permissions check1476 let bypasses_limits = collection.limits.owner_can_transfer &&1477 Self::is_owner_or_admin_permissions(1478 &collection,1479 &sender,1480 );14811482 let allowance_limit = if bypasses_limits {1483 None1484 } else if let Some(amount) = Self::owned_amount(1485 &sender,1486 &collection,1487 item_id,1488 ) {1489 Some(amount)1490 } else {1491 fail!(Error::<T>::NoPermission);1492 };14931494 if collection.access == AccessMode::WhiteList {1495 Self::check_white_list(&collection, &sender)?;1496 Self::check_white_list(&collection, &spender)?;1497 }14981499 let allowance: u128 = amount1500 .checked_add(<Allowances<T>>::get(collection.id, (item_id, sender.as_sub(), spender.as_sub())))1501 .ok_or(Error::<T>::NumOverflow)?;1502 if let Some(limit) = allowance_limit {1503 ensure!(limit >= allowance, Error::<T>::TokenValueTooLow);1504 }1505 <Allowances<T>>::insert(collection.id, (item_id, sender.as_sub(), spender.as_sub()), allowance);15061507 if matches!(collection.mode, CollectionMode::NFT) {1508 // TODO: NFT: only one owner may exist for token in ERC7211509 collection.log(ERC721Events::Approval {1510 owner: *sender.as_eth(),1511 approved: *spender.as_eth(),1512 token_id: item_id.into(),1513 });1514 }15151516 if matches!(collection.mode, CollectionMode::Fungible(_)) {1517 // TODO: NFT: only one owner may exist for token in ERC201518 collection.log(ERC20Events::Approval {1519 owner: *sender.as_eth(),1520 spender: *spender.as_eth(),1521 value: allowance.into()1522 });1523 }15241525 Self::deposit_event(RawEvent::Approved(collection.id, item_id, sender.clone(), spender.clone(), allowance));1526 Ok(())1527 }15281529 pub fn transfer_from_internal(1530 sender: &T::CrossAccountId,1531 from: &T::CrossAccountId,1532 recipient: &T::CrossAccountId,1533 collection: &CollectionHandle<T>,1534 item_id: TokenId,1535 amount: u128,1536 ) -> DispatchResult {1537 collection.consume_gas(2000000)?;1538 // Check approval1539 let approval: u128 = <Allowances<T>>::get(collection.id, (item_id, from.as_sub(), sender.as_sub()));15401541 // Limits check1542 Self::is_correct_transfer(&collection, &recipient)?;15431544 // Transfer permissions check1545 ensure!(1546 approval >= amount || 1547 (1548 collection.limits.owner_can_transfer &&1549 Self::is_owner_or_admin_permissions(&collection, &sender)1550 ),1551 Error::<T>::NoPermission1552 );15531554 if collection.access == AccessMode::WhiteList {1555 Self::check_white_list(&collection, &sender)?;1556 Self::check_white_list(&collection, &recipient)?;1557 }15581559 // Reduce approval by transferred amount or remove if remaining approval drops to 01560 let allowance = approval.saturating_sub(amount);1561 if allowance > 0 {1562 <Allowances<T>>::insert(collection.id, (item_id, from.as_sub(), sender.as_sub()), allowance);1563 } else {1564 <Allowances<T>>::remove(collection.id, (item_id, from.as_sub(), sender.as_sub()));1565 }15661567 match collection.mode {1568 CollectionMode::NFT => {1569 Self::transfer_nft(&collection, item_id, from.clone(), recipient.clone())?1570 }1571 CollectionMode::Fungible(_) => {1572 Self::transfer_fungible(&collection, amount, &from, &recipient)?1573 }1574 CollectionMode::ReFungible => {1575 Self::transfer_refungible(&collection, item_id, amount, from.clone(), recipient.clone())?1576 }1577 _ => ()1578 };15791580 if matches!(collection.mode, CollectionMode::Fungible(_)) {1581 collection.log(ERC20Events::Approval {1582 owner: *from.as_eth(),1583 spender: *sender.as_eth(),1584 value: allowance.into()1585 });1586 }15871588 Ok(())1589 }15901591 pub fn set_variable_meta_data_internal(1592 sender: &T::CrossAccountId,1593 collection: &CollectionHandle<T>, 1594 item_id: TokenId,1595 data: Vec<u8>,1596 ) -> DispatchResult {1597 Self::token_exists(&collection, item_id)?;15981599 ensure!(ChainLimit::get().custom_data_limit >= data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);16001601 // Modify permissions check1602 ensure!(Self::is_item_owner(&sender, &collection, item_id) ||1603 Self::is_owner_or_admin_permissions(&collection, &sender),1604 Error::<T>::NoPermission);16051606 match collection.mode1607 {1608 CollectionMode::NFT => Self::set_nft_variable_data(&collection, item_id, data)?,1609 CollectionMode::ReFungible => Self::set_re_fungible_variable_data(&collection, item_id, data)?,1610 CollectionMode::Fungible(_) => fail!(Error::<T>::CantStoreMetadataInFungibleTokens),1611 _ => fail!(Error::<T>::UnexpectedCollectionType)1612 };16131614 Ok(())1615 }16161617 pub fn create_multiple_items_internal(1618 sender: &T::CrossAccountId,1619 collection: &CollectionHandle<T>,1620 owner: &T::CrossAccountId,1621 items_data: Vec<CreateItemData>,1622 ) -> DispatchResult {1623 Self::can_create_items_in_collection(&collection, &sender, &owner, items_data.len() as u32)?;16241625 for data in &items_data {1626 Self::validate_create_item_args(&collection, data)?;1627 }1628 for data in &items_data {1629 Self::create_item_no_validation(&collection, owner, data.clone())?;1630 }16311632 Ok(())1633 }16341635 pub fn burn_item_internal(1636 sender: &T::CrossAccountId,1637 collection: &CollectionHandle<T>,1638 item_id: TokenId,1639 value: u128,1640 ) -> DispatchResult {1641 ensure!(1642 Self::is_item_owner(&sender, &collection, item_id) ||1643 (1644 collection.limits.owner_can_transfer &&1645 Self::is_owner_or_admin_permissions(&collection, &sender)1646 ),1647 Error::<T>::NoPermission1648 );16491650 if collection.access == AccessMode::WhiteList {1651 Self::check_white_list(&collection, &sender)?;1652 }16531654 match collection.mode1655 {1656 CollectionMode::NFT => Self::burn_nft_item(&collection, item_id)?,1657 CollectionMode::Fungible(_) => Self::burn_fungible_item(&sender, &collection, value)?,1658 CollectionMode::ReFungible => Self::burn_refungible_item(&collection, item_id, &sender)?,1659 _ => ()1660 };16611662 Ok(())1663 }16641665 pub fn toggle_white_list_internal(1666 sender: &T::CrossAccountId,1667 collection: &CollectionHandle<T>,1668 address: &T::CrossAccountId,1669 whitelisted: bool,1670 ) -> DispatchResult {1671 Self::check_owner_or_admin_permissions(&collection, &sender)?;16721673 if whitelisted {1674 <WhiteList<T>>::insert(collection.id, address.as_sub(), true);1675 } else {1676 <WhiteList<T>>::remove(collection.id, address.as_sub());1677 }16781679 Ok(())1680 }16811682 fn is_correct_transfer(collection: &CollectionHandle<T>, recipient: &T::CrossAccountId) -> DispatchResult {1683 let collection_id = collection.id;16841685 // check token limit and account token limit1686 let account_items: u32 = <AddressTokens<T>>::get(collection_id, recipient.as_sub()).len() as u32;1687 ensure!(collection.limits.account_token_ownership_limit > account_items, Error::<T>::AccountTokenLimitExceeded);1688 1689 Ok(())1690 }16911692 fn can_create_items_in_collection(collection: &CollectionHandle<T>, sender: &T::CrossAccountId, owner: &T::CrossAccountId, amount: u32) -> DispatchResult {1693 let collection_id = collection.id;16941695 // check token limit and account token limit1696 let total_items: u32 = ItemListIndex::get(collection_id)1697 .checked_add(amount)1698 .ok_or(Error::<T>::CollectionTokenLimitExceeded)?;1699 let account_items: u32 = (<AddressTokens<T>>::get(collection_id, owner.as_sub()).len() as u32)1700 .checked_add(amount)1701 .ok_or(Error::<T>::AccountTokenLimitExceeded)?;1702 ensure!(collection.limits.token_limit >= total_items, Error::<T>::CollectionTokenLimitExceeded);1703 ensure!(collection.limits.account_token_ownership_limit >= account_items, Error::<T>::AccountTokenLimitExceeded);17041705 if !Self::is_owner_or_admin_permissions(collection, &sender) {1706 ensure!(collection.mint_mode == true, Error::<T>::PublicMintingNotAllowed);1707 Self::check_white_list(collection, owner)?;1708 Self::check_white_list(collection, sender)?;1709 }17101711 Ok(())1712 }17131714 fn validate_create_item_args(target_collection: &CollectionHandle<T>, data: &CreateItemData) -> DispatchResult {1715 match target_collection.mode1716 {1717 CollectionMode::NFT => {1718 if let CreateItemData::NFT(data) = data {1719 // check sizes1720 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);1721 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);1722 } else {1723 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);1724 }1725 },1726 CollectionMode::Fungible(_) => {1727 if let CreateItemData::Fungible(_) = data {1728 } else {1729 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);1730 }1731 },1732 CollectionMode::ReFungible => {1733 if let CreateItemData::ReFungible(data) = data {17341735 // check sizes1736 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);1737 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);17381739 // Check refungibility limits1740 ensure!(data.pieces <= MAX_REFUNGIBLE_PIECES, Error::<T>::WrongRefungiblePieces);1741 ensure!(data.pieces > 0, Error::<T>::WrongRefungiblePieces);1742 } else {1743 fail!(Error::<T>::NotReFungibleDataUsedToMintReFungibleCollectionToken);1744 }1745 },1746 _ => { fail!(Error::<T>::UnexpectedCollectionType); }1747 };17481749 Ok(())1750 }17511752 fn create_item_no_validation(collection: &CollectionHandle<T>, owner: &T::CrossAccountId, data: CreateItemData) -> DispatchResult {1753 match data1754 {1755 CreateItemData::NFT(data) => {1756 let item = NftItemType {1757 owner: owner.clone(),1758 const_data: data.const_data,1759 variable_data: data.variable_data1760 };17611762 Self::add_nft_item(collection, item)?;1763 },1764 CreateItemData::Fungible(data) => {1765 Self::add_fungible_item(collection, &owner, data.value)?;1766 },1767 CreateItemData::ReFungible(data) => {1768 let mut owner_list = Vec::new();1769 owner_list.push(Ownership {owner: owner.clone(), fraction: data.pieces});17701771 let item = ReFungibleItemType {1772 owner: owner_list,1773 const_data: data.const_data,1774 variable_data: data.variable_data1775 };17761777 Self::add_refungible_item(collection, item)?;1778 }1779 };17801781 Ok(())1782 }17831784 fn add_fungible_item(collection: &CollectionHandle<T>, owner: &T::CrossAccountId, value: u128) -> DispatchResult {1785 let collection_id = collection.id;17861787 // Does new owner already have an account?1788 let balance: u128 = <FungibleItemList<T>>::get(collection_id, owner.as_sub()).value;17891790 // Mint 1791 let item = FungibleItemType {1792 value: balance.checked_add(value).ok_or(Error::<T>::NumOverflow)?,1793 };1794 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), item);17951796 // Update balance1797 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1798 .checked_add(value)1799 .ok_or(Error::<T>::NumOverflow)?;1800 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);18011802 Self::deposit_event(RawEvent::ItemCreated(collection_id, 0, owner.clone()));1803 Ok(())1804 }18051806 fn add_refungible_item(collection: &CollectionHandle<T>, item: ReFungibleItemType<T::CrossAccountId>) -> DispatchResult {1807 let collection_id = collection.id;18081809 let current_index = <ItemListIndex>::get(collection_id)1810 .checked_add(1)1811 .ok_or(Error::<T>::NumOverflow)?;1812 let itemcopy = item.clone();18131814 ensure!(1815 item.owner.len() == 1,1816 Error::<T>::BadCreateRefungibleCall,1817 );1818 let item_owner = item.owner.first().expect("only one owner is defined");18191820 let value = item_owner.fraction;1821 let owner = item_owner.owner.clone();18221823 Self::add_token_index(collection_id, current_index, &owner)?;18241825 <ItemListIndex>::insert(collection_id, current_index);1826 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);18271828 // Update balance1829 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1830 .checked_add(value)1831 .ok_or(Error::<T>::NumOverflow)?;1832 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);18331834 Self::deposit_event(RawEvent::ItemCreated(collection_id, current_index, owner));1835 Ok(())1836 }18371838 fn add_nft_item(collection: &CollectionHandle<T>, item: NftItemType<T::CrossAccountId>) -> DispatchResult {1839 let collection_id = collection.id;18401841 let current_index = <ItemListIndex>::get(collection_id)1842 .checked_add(1)1843 .ok_or(Error::<T>::NumOverflow)?;18441845 let item_owner = item.owner.clone();1846 Self::add_token_index(collection_id, current_index, &item.owner)?;18471848 <ItemListIndex>::insert(collection_id, current_index);1849 <NftItemList<T>>::insert(collection_id, current_index, item);18501851 // Update balance1852 let new_balance = <Balance<T>>::get(collection_id, item_owner.as_sub())1853 .checked_add(1)1854 .ok_or(Error::<T>::NumOverflow)?;1855 <Balance<T>>::insert(collection_id, item_owner.as_sub(), new_balance);18561857 collection.log(ERC721Events::Transfer {1858 from: H160::default(),1859 to: *item_owner.as_eth(),1860 token_id: current_index.into(),1861 });1862 Self::deposit_event(RawEvent::ItemCreated(collection_id, current_index, item_owner));1863 Ok(())1864 }18651866 fn burn_refungible_item(1867 collection: &CollectionHandle<T>,1868 item_id: TokenId,1869 owner: &T::CrossAccountId,1870 ) -> DispatchResult {1871 let collection_id = collection.id;18721873 let mut token = <ReFungibleItemList<T>>::get(collection_id, item_id)1874 .ok_or(Error::<T>::TokenNotFound)?;1875 let rft_balance = token1876 .owner1877 .iter()1878 .find(|&i| i.owner == *owner)1879 .ok_or(Error::<T>::TokenNotFound)?;1880 Self::remove_token_index(collection_id, item_id, owner)?;18811882 // update balance1883 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.as_sub())1884 .checked_sub(rft_balance.fraction)1885 .ok_or(Error::<T>::NumOverflow)?;1886 <Balance<T>>::insert(collection_id, rft_balance.owner.as_sub(), new_balance);18871888 // Re-create owners list with sender removed1889 let index = token1890 .owner1891 .iter()1892 .position(|i| i.owner == *owner)1893 .expect("owned item is exists");1894 token.owner.remove(index);1895 let owner_count = token.owner.len();18961897 // Burn the token completely if this was the last (only) owner1898 if owner_count == 0 {1899 <ReFungibleItemList<T>>::remove(collection_id, item_id);1900 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);1901 }1902 else {1903 <ReFungibleItemList<T>>::insert(collection_id, item_id, token);1904 }19051906 Ok(())1907 }19081909 fn burn_nft_item(collection: &CollectionHandle<T>, item_id: TokenId) -> DispatchResult {1910 let collection_id = collection.id;19111912 let item = <NftItemList<T>>::get(collection_id, item_id)1913 .ok_or(Error::<T>::TokenNotFound)?;1914 Self::remove_token_index(collection_id, item_id, &item.owner)?;19151916 // update balance1917 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())1918 .checked_sub(1)1919 .ok_or(Error::<T>::NumOverflow)?;1920 <Balance<T>>::insert(collection_id, item.owner.as_sub(), new_balance);1921 <NftItemList<T>>::remove(collection_id, item_id);1922 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);19231924 Self::deposit_event(RawEvent::ItemDestroyed(collection.id, item_id));1925 Ok(())1926 }19271928 fn burn_fungible_item(owner: &T::CrossAccountId, collection: &CollectionHandle<T>, value: u128) -> DispatchResult {1929 let collection_id = collection.id;19301931 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());1932 ensure!(balance.value >= value, Error::<T>::TokenValueNotEnough);19331934 // update balance1935 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())1936 .checked_sub(value)1937 .ok_or(Error::<T>::NumOverflow)?;1938 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);19391940 if balance.value - value > 0 {1941 balance.value -= value;1942 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);1943 }1944 else {1945 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());1946 }19471948 collection.log(ERC20Events::Transfer {1949 from: *owner.as_eth(),1950 to: H160::default(),1951 value: value.into(),1952 });1953 Ok(())1954 }19551956 pub fn get_collection(collection_id: CollectionId) -> Result<CollectionHandle<T>, sp_runtime::DispatchError> {1957 Ok(<CollectionHandle<T>>::get(collection_id)1958 .ok_or(Error::<T>::CollectionNotFound)?)1959 }19601961 fn save_collection(collection: CollectionHandle<T>) {1962 <CollectionById<T>>::insert(collection.id, collection.into_inner());1963 }19641965 pub fn submit_logs(collection: CollectionHandle<T>) -> DispatchResult {1966 if collection.logs.is_empty() {1967 return Ok(())1968 }1969 T::EthereumTransactionSender::submit_logs_transaction(1970 eth::generate_transaction(collection.id, T::EthereumChainId::get()),1971 collection.logs.retrieve_logs(),1972 )1973 }19741975 fn check_owner_permissions(target_collection: &CollectionHandle<T>, subject: &T::AccountId) -> DispatchResult {1976 ensure!(1977 *subject == target_collection.owner,1978 Error::<T>::NoPermission1979 );19801981 Ok(())1982 }19831984 fn is_owner_or_admin_permissions(collection: &CollectionHandle<T>, subject: &T::CrossAccountId) -> bool {1985 *subject.as_sub() == collection.owner || <AdminList<T>>::get(collection.id).contains(&subject)1986 }19871988 fn check_owner_or_admin_permissions(1989 collection: &CollectionHandle<T>,1990 subject: &T::CrossAccountId,1991 ) -> DispatchResult {1992 ensure!(Self::is_owner_or_admin_permissions(collection, subject), Error::<T>::NoPermission);19931994 Ok(())1995 }19961997 fn owned_amount(1998 subject: &T::CrossAccountId,1999 target_collection: &CollectionHandle<T>,2000 item_id: TokenId,2001 ) -> Option<u128> {2002 let collection_id = target_collection.id;20032004 match target_collection.mode {2005 CollectionMode::NFT => (<NftItemList<T>>::get(collection_id, item_id)?.owner == *subject)2006 .then(|| 1),2007 CollectionMode::Fungible(_) => Some(<FungibleItemList<T>>::get(collection_id, &subject.as_sub())2008 .value),2009 CollectionMode::ReFungible => <ReFungibleItemList<T>>::get(collection_id, item_id)?2010 .owner2011 .iter()2012 .find(|i| i.owner == *subject)2013 .map(|i| i.fraction),2014 CollectionMode::Invalid => None,2015 }2016 }20172018 fn is_item_owner(subject: &T::CrossAccountId, target_collection: &CollectionHandle<T>, item_id: TokenId) -> bool {2019 match target_collection.mode {2020 CollectionMode::Fungible(_) => true,2021 _ => Self::owned_amount(&subject, target_collection, item_id).is_some(),2022 }2023 }20242025 fn check_white_list(collection: &CollectionHandle<T>, address: &T::CrossAccountId) -> DispatchResult {2026 let collection_id = collection.id;20272028 let mes = Error::<T>::AddresNotInWhiteList;2029 ensure!(<WhiteList<T>>::contains_key(collection_id, address.as_sub()), mes);20302031 Ok(())2032 }20332034 /// Check if token exists. In case of Fungible, check if there is an entry for 2035 /// the owner in fungible balances double map2036 fn token_exists(2037 target_collection: &CollectionHandle<T>,2038 item_id: TokenId,2039 ) -> DispatchResult {2040 let collection_id = target_collection.id;2041 let exists = match target_collection.mode2042 {2043 CollectionMode::NFT => <NftItemList<T>>::contains_key(collection_id, item_id),2044 CollectionMode::Fungible(_) => true,2045 CollectionMode::ReFungible => <ReFungibleItemList<T>>::contains_key(collection_id, item_id),2046 _ => false2047 };20482049 ensure!(exists == true, Error::<T>::TokenNotFound);2050 Ok(())2051 }20522053 fn transfer_fungible(2054 collection: &CollectionHandle<T>,2055 value: u128,2056 owner: &T::CrossAccountId,2057 recipient: &T::CrossAccountId,2058 ) -> DispatchResult {2059 let collection_id = collection.id;20602061 let mut balance = <FungibleItemList<T>>::get(collection_id, owner.as_sub());2062 ensure!(balance.value >= value, Error::<T>::TokenValueTooLow);20632064 // Send balance to recipient (updates balanceOf of recipient)2065 Self::add_fungible_item(collection, recipient, value)?;20662067 // update balanceOf of sender2068 <Balance<T>>::insert(collection_id, owner.as_sub(), balance.value - value);20692070 // Reduce or remove sender2071 if balance.value == value {2072 <FungibleItemList<T>>::remove(collection_id, owner.as_sub());2073 }2074 else {2075 balance.value -= value;2076 <FungibleItemList<T>>::insert(collection_id, owner.as_sub(), balance);2077 }20782079 collection.log(ERC20Events::Transfer {2080 from: *owner.as_eth(),2081 to: *recipient.as_eth(),2082 value: value.into(),2083 });2084 Self::deposit_event(RawEvent::Transfer(collection.id, 1, owner.clone(), recipient.clone(), value));20852086 Ok(())2087 }20882089 fn transfer_refungible(2090 collection: &CollectionHandle<T>,2091 item_id: TokenId,2092 value: u128,2093 owner: T::CrossAccountId,2094 new_owner: T::CrossAccountId,2095 ) -> DispatchResult {2096 let collection_id = collection.id;2097 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id)2098 .ok_or(Error::<T>::TokenNotFound)?;20992100 let item = full_item2101 .owner2102 .iter()2103 .filter(|i| i.owner == owner)2104 .next()2105 .ok_or(Error::<T>::TokenNotFound)?;2106 let amount = item.fraction;21072108 ensure!(amount >= value, Error::<T>::TokenValueTooLow);21092110 // update balance2111 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2112 .checked_sub(value)2113 .ok_or(Error::<T>::NumOverflow)?;2114 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);21152116 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2117 .checked_add(value)2118 .ok_or(Error::<T>::NumOverflow)?;2119 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);21202121 let old_owner = item.owner.clone();2122 let new_owner_has_account = full_item.owner.iter().any(|i| i.owner == new_owner);21232124 // transfer2125 if amount == value && !new_owner_has_account {2126 // change owner2127 // new owner do not have account2128 let mut new_full_item = full_item.clone();2129 new_full_item2130 .owner2131 .iter_mut()2132 .find(|i| i.owner == owner)2133 .expect("old owner does present in refungible")2134 .owner = new_owner.clone();2135 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);21362137 // update index collection2138 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;2139 } else {2140 let mut new_full_item = full_item.clone();2141 new_full_item2142 .owner2143 .iter_mut()2144 .find(|i| i.owner == owner)2145 .expect("old owner does present in refungible")2146 .fraction -= value;21472148 // separate amount2149 if new_owner_has_account {2150 // new owner has account2151 new_full_item2152 .owner2153 .iter_mut()2154 .find(|i| i.owner == new_owner)2155 .expect("new owner has account")2156 .fraction += value;2157 } else {2158 // new owner do not have account2159 new_full_item.owner.push(Ownership {2160 owner: new_owner.clone(),2161 fraction: value,2162 });2163 Self::add_token_index(collection_id, item_id, &new_owner)?;2164 }21652166 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2167 }21682169 Self::deposit_event(RawEvent::Transfer(collection.id, item_id, owner, new_owner, amount));21702171 Ok(())2172 }21732174 fn transfer_nft(2175 collection: &CollectionHandle<T>,2176 item_id: TokenId,2177 sender: T::CrossAccountId,2178 new_owner: T::CrossAccountId,2179 ) -> DispatchResult {2180 let collection_id = collection.id;2181 let mut item = <NftItemList<T>>::get(collection_id, item_id)2182 .ok_or(Error::<T>::TokenNotFound)?;21832184 ensure!(2185 sender == item.owner,2186 Error::<T>::MustBeTokenOwner2187 );21882189 // update balance2190 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.as_sub())2191 .checked_sub(1)2192 .ok_or(Error::<T>::NumOverflow)?;2193 <Balance<T>>::insert(collection_id, item.owner.as_sub(), balance_old_owner);21942195 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.as_sub())2196 .checked_add(1)2197 .ok_or(Error::<T>::NumOverflow)?;2198 <Balance<T>>::insert(collection_id, new_owner.as_sub(), balance_new_owner);21992200 // change owner2201 let old_owner = item.owner.clone();2202 item.owner = new_owner.clone();2203 <NftItemList<T>>::insert(collection_id, item_id, item);22042205 // update index collection2206 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;22072208 collection.log(ERC721Events::Transfer {2209 from: *sender.as_eth(),2210 to: *new_owner.as_eth(),2211 token_id: item_id.into(),2212 });2213 Self::deposit_event(RawEvent::Transfer(collection.id, item_id, sender, new_owner, 1));22142215 Ok(())2216 }2217 2218 fn set_re_fungible_variable_data(2219 collection: &CollectionHandle<T>,2220 item_id: TokenId,2221 data: Vec<u8>2222 ) -> DispatchResult {2223 let collection_id = collection.id;2224 let mut item = <ReFungibleItemList<T>>::get(collection_id, item_id)2225 .ok_or(Error::<T>::TokenNotFound)?;22262227 item.variable_data = data;22282229 <ReFungibleItemList<T>>::insert(collection_id, item_id, item);22302231 Ok(())2232 }22332234 fn set_nft_variable_data(2235 collection: &CollectionHandle<T>,2236 item_id: TokenId,2237 data: Vec<u8>2238 ) -> DispatchResult {2239 let collection_id = collection.id;2240 let mut item = <NftItemList<T>>::get(collection_id, item_id)2241 .ok_or(Error::<T>::TokenNotFound)?;2242 2243 item.variable_data = data;22442245 <NftItemList<T>>::insert(collection_id, item_id, item);2246 2247 Ok(())2248 }22492250 #[allow(dead_code)]2251 fn init_collection(item: &Collection<T>) {2252 // check params2253 assert!(2254 item.decimal_points <= MAX_DECIMAL_POINTS,2255 "decimal_points parameter must be lower than MAX_DECIMAL_POINTS"2256 );2257 assert!(2258 item.name.len() <= 64,2259 "Collection name can not be longer than 63 char"2260 );2261 assert!(2262 item.name.len() <= 256,2263 "Collection description can not be longer than 255 char"2264 );2265 assert!(2266 item.token_prefix.len() <= 16,2267 "Token prefix can not be longer than 15 char"2268 );22692270 // Generate next collection ID2271 let next_id = CreatedCollectionCount::get()2272 .checked_add(1)2273 .unwrap();22742275 CreatedCollectionCount::put(next_id);2276 }22772278 #[allow(dead_code)]2279 fn init_nft_token(collection_id: CollectionId, item: &NftItemType<T::CrossAccountId>) {2280 let current_index = <ItemListIndex>::get(collection_id)2281 .checked_add(1)2282 .unwrap();22832284 Self::add_token_index(collection_id, current_index, &item.owner).unwrap();22852286 <ItemListIndex>::insert(collection_id, current_index);22872288 // Update balance2289 let new_balance = <Balance<T>>::get(collection_id, item.owner.as_sub())2290 .checked_add(1)2291 .unwrap();2292 <Balance<T>>::insert(collection_id, item.owner.as_sub(), new_balance);2293 }22942295 #[allow(dead_code)]2296 fn init_fungible_token(collection_id: CollectionId, owner: &T::CrossAccountId, item: &FungibleItemType) {2297 let current_index = <ItemListIndex>::get(collection_id)2298 .checked_add(1)2299 .unwrap();23002301 Self::add_token_index(collection_id, current_index, owner).unwrap();23022303 <ItemListIndex>::insert(collection_id, current_index);23042305 // Update balance2306 let new_balance = <Balance<T>>::get(collection_id, owner.as_sub())2307 .checked_add(item.value)2308 .unwrap();2309 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);2310 }23112312 #[allow(dead_code)]2313 fn init_refungible_token(collection_id: CollectionId, item: &ReFungibleItemType<T::CrossAccountId>) {2314 let current_index = <ItemListIndex>::get(collection_id)2315 .checked_add(1)2316 .unwrap();23172318 let value = item.owner.first().unwrap().fraction;2319 let owner = item.owner.first().unwrap().owner.clone();23202321 Self::add_token_index(collection_id, current_index, &owner).unwrap();23222323 <ItemListIndex>::insert(collection_id, current_index);23242325 // Update balance2326 let new_balance = <Balance<T>>::get(collection_id, &owner.as_sub())2327 .checked_add(value)2328 .unwrap();2329 <Balance<T>>::insert(collection_id, owner.as_sub(), new_balance);2330 }23312332 fn add_token_index(collection_id: CollectionId, item_index: TokenId, owner: &T::CrossAccountId) -> DispatchResult {2333 // add to account limit2334 if <AccountItemCount<T>>::contains_key(owner.as_sub()) {23352336 // bound Owned tokens by a single address2337 let count = <AccountItemCount<T>>::get(owner.as_sub());2338 ensure!(count < ChainLimit::get().account_token_ownership_limit, Error::<T>::AddressOwnershipLimitExceeded);23392340 <AccountItemCount<T>>::insert(owner.as_sub(), count2341 .checked_add(1)2342 .ok_or(Error::<T>::NumOverflow)?);2343 }2344 else {2345 <AccountItemCount<T>>::insert(owner.as_sub(), 1);2346 }23472348 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2349 if list_exists {2350 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2351 let item_contains = list.contains(&item_index.clone());23522353 if !item_contains {2354 list.push(item_index.clone());2355 }23562357 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2358 } else {2359 let mut itm = Vec::new();2360 itm.push(item_index.clone());2361 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), itm);2362 }23632364 Ok(())2365 }23662367 fn remove_token_index(2368 collection_id: CollectionId,2369 item_index: TokenId,2370 owner: &T::CrossAccountId,2371 ) -> DispatchResult {23722373 // update counter2374 <AccountItemCount<T>>::insert(owner.as_sub(), 2375 <AccountItemCount<T>>::get(owner.as_sub())2376 .checked_sub(1)2377 .ok_or(Error::<T>::NumOverflow)?);237823792380 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.as_sub());2381 if list_exists {2382 let mut list = <AddressTokens<T>>::get(collection_id, owner.as_sub());2383 let item_contains = list.contains(&item_index.clone());23842385 if item_contains {2386 list.retain(|&item| item != item_index);2387 <AddressTokens<T>>::insert(collection_id, owner.as_sub(), list);2388 }2389 }23902391 Ok(())2392 }23932394 fn move_token_index(2395 collection_id: CollectionId,2396 item_index: TokenId,2397 old_owner: &T::CrossAccountId,2398 new_owner: &T::CrossAccountId,2399 ) -> DispatchResult {2400 Self::remove_token_index(collection_id, item_index, old_owner)?;2401 Self::add_token_index(collection_id, item_index, new_owner)?;24022403 Ok(())2404 }2405 2406 fn ensure_contract_owned(account: T::AccountId, contract: &T::AccountId) -> DispatchResult {2407 ensure!(<ContractOwner<T>>::get(contract) == Some(account), Error::<T>::NoPermission);24082409 Ok(())2410 }2411}24122413sp_api::decl_runtime_apis! {2414 pub trait NftApi {2415 /// Used for ethereum integration2416 fn eth_contract_code(account: H160) -> Option<Vec<u8>>;2417 }2418}pallets/scheduler/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -10,7 +10,7 @@
readme = "README.md"
[dependencies]
-serde = { version = "1.0.119" }
+serde = { version = "1.0.119", default-features = false }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
primitives/Cargo.tomldiffbeforeafterboth--- a/primitives/Cargo.toml
+++ b/primitives/Cargo.toml
@@ -10,7 +10,7 @@
[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ['derive'] }
-serde = { version = "1.0.119", optional = true, features = ['derive'] }
+serde = { version = "1.0.119", features = ['derive'], default-features = false }
frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
pallet-contracts = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
@@ -20,7 +20,7 @@
[features]
default = ["std"]
std = [
- "serde",
+ "serde/std",
"codec/std",
"frame-system/std",
"frame-support/std",
primitives/src/lib.rsdiffbeforeafterboth--- a/primitives/src/lib.rs
+++ b/primitives/src/lib.rs
@@ -1,7 +1,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
-pub use serde::{Serealize, Deserialize};
+pub use serde::{Serialize, Deserialize};
use frame_system;
use sp_runtime::sp_std::prelude::Vec;
runtime/Cargo.tomldiffbeforeafterboth--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -133,6 +133,7 @@
version = '0.3.1'
[dependencies.serde]
+default-features = false
features = ['derive']
optional = true
version = '1.0.119'
@@ -376,8 +377,9 @@
pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }
pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }
-pallet-evm = { default-features = false, version = "4.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
-pallet-ethereum = { default-features = false, version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions" }
+pallet-evm = { default-features = false, version = "4.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-ethereum = { default-features = false, version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+fp-rpc = { default-features = false, version = "2.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
################################################################################
# Build Dependencies
runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -14,7 +14,7 @@
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
use sp_api::impl_runtime_apis;
-use sp_core::{ crypto::KeyTypeId, OpaqueMetadata };
+use sp_core::{ crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160 };
// #[cfg(any(feature = "std", test))]
// pub use sp_runtime::BuildStorage;
@@ -45,8 +45,9 @@
PalletId,
parameter_types,
StorageValue,
+ ConsensusEngineId,
traits::{
- All, Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem, LockIdentifier, OnUnbalanced, Randomness
+ All, Currency, ExistenceRequirement, Get, IsInVec, KeyOwnerProofSystem, LockIdentifier, OnUnbalanced, Randomness, FindAuthor
},
weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
@@ -67,8 +68,7 @@
use codec::{Encode, Decode};
use pallet_evm::{Account as EVMAccount, FeeCalculator, OnMethodCall};
use fp_rpc::TransactionStatus;
-use sp_core::H256;
-
+use sp_core::crypto::Public;
use sp_runtime::{
traits::{
Dispatchable,
@@ -100,12 +100,12 @@
/// Re-export a nft pallet
/// TODO: Check this re-export. Is this safe and good style?
-extern crate pallet_nft;
-pub use pallet_nft::*;
+// extern crate pallet_nft;
+// pub use pallet_nft::*;
/// Reimport pallet inflation
-extern crate pallet_inflation;
-pub use pallet_inflation::*;
+// extern crate pallet_inflation;
+// pub use pallet_inflation::*;
/// An index to a block.
pub type BlockNumber = u32;
@@ -267,7 +267,7 @@
type OnChargeTransaction = ();
}
-pub struct EthereumFindAuthor<F>(PhantomData<F>);
+pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);
impl<F: FindAuthor<u32>> FindAuthor<H160> for EthereumFindAuthor<F>
{
fn find_author<'a, I>(digests: I) -> Option<H160> where
@@ -289,7 +289,7 @@
type Event = Event;
type FindAuthor = EthereumFindAuthor<Aura>;
type StateRoot = pallet_ethereum::IntermediateStateRoot;
- type EvmSubmitLog = pallet_evm::Module<Runtime>;
+ type EvmSubmitLog = pallet_evm::Pallet<Runtime>;
}
impl system::Config for Runtime {
@@ -775,8 +775,8 @@
AuraExt: cumulus_pallet_aura_ext::{Pallet, Config},
// Frontier
- EVM: pallet_evm::{Module, Config, Call, Storage, Event<T>},
- Ethereum: pallet_ethereum::{Module, Config, Call, Storage, Event, ValidateUnsigned},
+ EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>},
+ Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, ValidateUnsigned},
// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
@@ -850,6 +850,14 @@
}
impl_runtime_apis! {
+ impl pallet_nft::NftApi<Block>
+ for Runtime
+ {
+ fn eth_contract_code(account: H160) -> Option<Vec<u8>> {
+ <pallet_nft::NftErcSupport<Runtime>>::get_code(&account)
+ }
+ }
+
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION