difftreelog
Merge branch 'develop' into release/v2.0.0
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -248,13 +248,13 @@
[[package]]
name = "async-process"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c8cea09c1fb10a317d1b5af8024eeba256d6554763e85ecd90ff8df31c7bbda"
+checksum = "ef37b86e2fa961bae5a4d212708ea0154f904ce31d1a4a7f47e1bbc33a0c040b"
dependencies = [
"async-io",
"blocking",
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
"event-listener",
"futures-lite",
"once_cell",
@@ -534,9 +534,9 @@
[[package]]
name = "bstr"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf"
+checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d"
dependencies = [
"memchr",
]
@@ -1378,7 +1378,7 @@
[[package]]
name = "fork-tree"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
]
@@ -1396,7 +1396,7 @@
[[package]]
name = "frame-benchmarking"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -1414,7 +1414,7 @@
[[package]]
name = "frame-benchmarking-cli"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"Inflector",
"chrono",
@@ -1437,7 +1437,7 @@
[[package]]
name = "frame-executive"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -1453,7 +1453,7 @@
[[package]]
name = "frame-metadata"
version = "12.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"serde",
@@ -1464,12 +1464,12 @@
[[package]]
name = "frame-support"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"bitflags",
"frame-metadata",
"frame-support-procedural",
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"log",
"once_cell",
"parity-scale-codec",
@@ -1489,7 +1489,7 @@
[[package]]
name = "frame-support-procedural"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"Inflector",
"frame-support-procedural-tools",
@@ -1501,7 +1501,7 @@
[[package]]
name = "frame-support-procedural-tools"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate",
@@ -1513,7 +1513,7 @@
[[package]]
name = "frame-support-procedural-tools-derive"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"proc-macro2",
"quote",
@@ -1523,10 +1523,10 @@
[[package]]
name = "frame-system"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-scale-codec",
"serde",
"sp-core",
@@ -1539,7 +1539,7 @@
[[package]]
name = "frame-system-benchmarking"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -1553,7 +1553,7 @@
[[package]]
name = "frame-system-rpc-runtime-api"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -2115,9 +2115,9 @@
[[package]]
name = "hyper"
-version = "0.13.9"
+version = "0.13.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf"
+checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb"
dependencies = [
"bytes 0.5.6",
"futures-channel",
@@ -2146,7 +2146,7 @@
"bytes 0.5.6",
"ct-logs",
"futures-util",
- "hyper 0.13.9",
+ "hyper 0.13.10",
"log",
"rustls 0.18.1",
"rustls-native-certs",
@@ -2168,9 +2168,9 @@
[[package]]
name = "idna"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
+checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094"
dependencies = [
"matches",
"unicode-bidi",
@@ -2245,9 +2245,9 @@
[[package]]
name = "impl-trait-for-tuples"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f65a8ecf74feeacdab8d38cb129e550ca871cccaa7d1921d8636ecd75534903"
+checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee"
dependencies = [
"proc-macro2",
"quote",
@@ -2553,9 +2553,9 @@
[[package]]
name = "libc"
-version = "0.2.85"
+version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3"
+checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
[[package]]
name = "libloading"
@@ -3631,7 +3631,7 @@
[[package]]
name = "pallet-aura"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -3650,11 +3650,11 @@
[[package]]
name = "pallet-authorship"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-scale-codec",
"sp-authorship",
"sp-inherents",
@@ -3665,7 +3665,7 @@
[[package]]
name = "pallet-balances"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -3679,7 +3679,7 @@
[[package]]
name = "pallet-contracts"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -3700,7 +3700,7 @@
[[package]]
name = "pallet-contracts-primitives"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"bitflags",
"parity-scale-codec",
@@ -3711,7 +3711,7 @@
[[package]]
name = "pallet-contracts-proc-macro"
version = "0.1.0"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"proc-macro2",
"quote",
@@ -3721,7 +3721,7 @@
[[package]]
name = "pallet-contracts-rpc"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -3740,7 +3740,7 @@
[[package]]
name = "pallet-contracts-rpc-runtime-api"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"pallet-contracts-primitives",
"parity-scale-codec",
@@ -3752,7 +3752,7 @@
[[package]]
name = "pallet-grandpa"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -3794,7 +3794,7 @@
[[package]]
name = "pallet-randomness-collective-flip"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -3807,7 +3807,7 @@
[[package]]
name = "pallet-session"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -3827,7 +3827,7 @@
[[package]]
name = "pallet-sudo"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -3841,12 +3841,12 @@
[[package]]
name = "pallet-timestamp"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-scale-codec",
"serde",
"sp-inherents",
@@ -3859,7 +3859,7 @@
[[package]]
name = "pallet-transaction-payment"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
@@ -3875,7 +3875,7 @@
[[package]]
name = "pallet-transaction-payment-rpc"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -3892,7 +3892,7 @@
[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
@@ -3903,11 +3903,11 @@
[[package]]
name = "pallet-treasury"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-support",
"frame-system",
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"pallet-balances",
"parity-scale-codec",
"serde",
@@ -3918,7 +3918,7 @@
[[package]]
name = "pallet-vesting"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"enumflags2",
"frame-support",
@@ -4019,7 +4019,7 @@
dependencies = [
"cfg-if 1.0.0",
"hashbrown",
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-util-mem-derive",
"parking_lot 0.11.1",
"primitive-types",
@@ -5010,7 +5010,7 @@
[[package]]
name = "sc-basic-authorship"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"futures-timer 3.0.2",
@@ -5033,7 +5033,7 @@
[[package]]
name = "sc-block-builder"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -5050,9 +5050,9 @@
[[package]]
name = "sc-chain-spec"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-scale-codec",
"sc-chain-spec-derive",
"sc-consensus-babe",
@@ -5071,7 +5071,7 @@
[[package]]
name = "sc-chain-spec-derive"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -5082,7 +5082,7 @@
[[package]]
name = "sc-cli"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"chrono",
"fdlimit",
@@ -5120,7 +5120,7 @@
[[package]]
name = "sc-client-api"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"fnv",
@@ -5154,7 +5154,7 @@
[[package]]
name = "sc-client-db"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"blake2-rfc",
"hash-db",
@@ -5184,7 +5184,7 @@
[[package]]
name = "sc-consensus"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"sc-client-api",
"sp-blockchain",
@@ -5195,7 +5195,7 @@
[[package]]
name = "sc-consensus-aura"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"futures 0.3.12",
@@ -5226,7 +5226,7 @@
[[package]]
name = "sc-consensus-babe"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"fork-tree",
@@ -5271,7 +5271,7 @@
[[package]]
name = "sc-consensus-epochs"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"fork-tree",
"parity-scale-codec",
@@ -5284,7 +5284,7 @@
[[package]]
name = "sc-consensus-slots"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"futures-timer 3.0.2",
@@ -5310,7 +5310,7 @@
[[package]]
name = "sc-consensus-uncles"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"sc-client-api",
@@ -5324,7 +5324,7 @@
[[package]]
name = "sc-executor"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"lazy_static",
@@ -5353,7 +5353,7 @@
[[package]]
name = "sc-executor-common"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"parity-scale-codec",
@@ -5369,7 +5369,7 @@
[[package]]
name = "sc-executor-wasmi"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"parity-scale-codec",
@@ -5384,7 +5384,7 @@
[[package]]
name = "sc-executor-wasmtime"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"parity-scale-codec",
@@ -5402,7 +5402,7 @@
[[package]]
name = "sc-finality-grandpa"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"finality-grandpa",
@@ -5440,7 +5440,7 @@
[[package]]
name = "sc-informant"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"ansi_term 0.12.1",
"futures 0.3.12",
@@ -5458,7 +5458,7 @@
[[package]]
name = "sc-keystore"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"async-trait",
"derive_more",
@@ -5478,7 +5478,7 @@
[[package]]
name = "sc-light"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"hash-db",
"lazy_static",
@@ -5497,7 +5497,7 @@
[[package]]
name = "sc-network"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"async-std",
"async-trait",
@@ -5549,7 +5549,7 @@
[[package]]
name = "sc-network-gossip"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"futures-timer 3.0.2",
@@ -5565,13 +5565,13 @@
[[package]]
name = "sc-offchain"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"bytes 0.5.6",
"fnv",
"futures 0.3.12",
"futures-timer 3.0.2",
- "hyper 0.13.9",
+ "hyper 0.13.10",
"hyper-rustls",
"log",
"num_cpus",
@@ -5592,7 +5592,7 @@
[[package]]
name = "sc-peerset"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"libp2p",
@@ -5605,7 +5605,7 @@
[[package]]
name = "sc-proposer-metrics"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"substrate-prometheus-endpoint",
@@ -5614,7 +5614,7 @@
[[package]]
name = "sc-rpc"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"hash-db",
@@ -5648,7 +5648,7 @@
[[package]]
name = "sc-rpc-api"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"futures 0.3.12",
@@ -5672,7 +5672,7 @@
[[package]]
name = "sc-rpc-server"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.1.30",
"jsonrpc-core",
@@ -5690,7 +5690,7 @@
[[package]]
name = "sc-service"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"directories 3.0.1",
"exit-future",
@@ -5753,7 +5753,7 @@
[[package]]
name = "sc-state-db"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"parity-scale-codec",
@@ -5768,7 +5768,7 @@
[[package]]
name = "sc-telemetry"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"chrono",
"futures 0.3.12",
@@ -5790,7 +5790,7 @@
[[package]]
name = "sc-tracing"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"ansi_term 0.12.1",
"atty",
@@ -5818,7 +5818,7 @@
[[package]]
name = "sc-tracing-proc-macro"
version = "2.0.0"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -5829,7 +5829,7 @@
[[package]]
name = "sc-transaction-graph"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"futures 0.3.12",
@@ -5851,7 +5851,7 @@
[[package]]
name = "sc-transaction-pool"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"futures-diagnose",
@@ -6014,9 +6014,9 @@
[[package]]
name = "serde_json"
-version = "1.0.61"
+version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a"
+checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486"
dependencies = [
"itoa",
"ryu",
@@ -6102,9 +6102,9 @@
[[package]]
name = "signal-hook"
-version = "0.1.17"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729"
+checksum = "780f5e3fe0c66f67197236097d89de1e86216f1f6fdeaf47c442f854ab46c240"
dependencies = [
"libc",
"signal-hook-registry",
@@ -6206,7 +6206,7 @@
[[package]]
name = "sp-allocator"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"sp-core",
@@ -6218,7 +6218,7 @@
[[package]]
name = "sp-api"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"hash-db",
"parity-scale-codec",
@@ -6234,7 +6234,7 @@
[[package]]
name = "sp-api-proc-macro"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"blake2-rfc",
"proc-macro-crate",
@@ -6246,7 +6246,7 @@
[[package]]
name = "sp-application-crypto"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"serde",
@@ -6258,7 +6258,7 @@
[[package]]
name = "sp-arithmetic"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"integer-sqrt",
"num-traits",
@@ -6271,7 +6271,7 @@
[[package]]
name = "sp-authorship"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-inherents",
@@ -6282,7 +6282,7 @@
[[package]]
name = "sp-block-builder"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -6294,7 +6294,7 @@
[[package]]
name = "sp-blockchain"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"log",
@@ -6312,7 +6312,7 @@
[[package]]
name = "sp-chain-spec"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"serde",
"serde_json",
@@ -6321,7 +6321,7 @@
[[package]]
name = "sp-consensus"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"futures-timer 3.0.2",
@@ -6347,7 +6347,7 @@
[[package]]
name = "sp-consensus-aura"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -6361,7 +6361,7 @@
[[package]]
name = "sp-consensus-babe"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"merlin",
"parity-scale-codec",
@@ -6381,7 +6381,7 @@
[[package]]
name = "sp-consensus-slots"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -6390,7 +6390,7 @@
[[package]]
name = "sp-consensus-vrf"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"schnorrkel",
@@ -6402,7 +6402,7 @@
[[package]]
name = "sp-core"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"base58",
"blake2-rfc",
@@ -6446,7 +6446,7 @@
[[package]]
name = "sp-database"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"kvdb",
"parking_lot 0.11.1",
@@ -6455,7 +6455,7 @@
[[package]]
name = "sp-debug-derive"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"proc-macro2",
"quote",
@@ -6465,7 +6465,7 @@
[[package]]
name = "sp-externalities"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"environmental",
"parity-scale-codec",
@@ -6476,7 +6476,7 @@
[[package]]
name = "sp-finality-grandpa"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"finality-grandpa",
"log",
@@ -6493,7 +6493,7 @@
[[package]]
name = "sp-inherents"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"parking_lot 0.11.1",
@@ -6505,7 +6505,7 @@
[[package]]
name = "sp-io"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"hash-db",
@@ -6529,7 +6529,7 @@
[[package]]
name = "sp-keyring"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"lazy_static",
"sp-core",
@@ -6540,7 +6540,7 @@
[[package]]
name = "sp-keystore"
version = "0.8.0"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"async-trait",
"derive_more",
@@ -6557,7 +6557,7 @@
[[package]]
name = "sp-offchain"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"sp-api",
"sp-core",
@@ -6567,7 +6567,7 @@
[[package]]
name = "sp-panic-handler"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"backtrace",
]
@@ -6575,7 +6575,7 @@
[[package]]
name = "sp-rpc"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"serde",
"sp-core",
@@ -6584,11 +6584,11 @@
[[package]]
name = "sp-runtime"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"either",
"hash256-std-hasher",
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"log",
"parity-scale-codec",
"parity-util-mem",
@@ -6605,9 +6605,9 @@
[[package]]
name = "sp-runtime-interface"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-scale-codec",
"primitive-types",
"sp-externalities",
@@ -6622,7 +6622,7 @@
[[package]]
name = "sp-runtime-interface-proc-macro"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"Inflector",
"proc-macro-crate",
@@ -6634,7 +6634,7 @@
[[package]]
name = "sp-sandbox"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-core",
@@ -6647,7 +6647,7 @@
[[package]]
name = "sp-serializer"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"serde",
"serde_json",
@@ -6656,7 +6656,7 @@
[[package]]
name = "sp-session"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -6669,7 +6669,7 @@
[[package]]
name = "sp-staking"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"parity-scale-codec",
"sp-runtime",
@@ -6679,7 +6679,7 @@
[[package]]
name = "sp-state-machine"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"hash-db",
"log",
@@ -6701,12 +6701,12 @@
[[package]]
name = "sp-std"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
[[package]]
name = "sp-storage"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -6719,7 +6719,7 @@
[[package]]
name = "sp-tasks"
version = "2.0.0"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"sp-core",
@@ -6732,9 +6732,9 @@
[[package]]
name = "sp-timestamp"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-scale-codec",
"sp-api",
"sp-inherents",
@@ -6746,7 +6746,7 @@
[[package]]
name = "sp-tracing"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"log",
"parity-scale-codec",
@@ -6759,7 +6759,7 @@
[[package]]
name = "sp-transaction-pool"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"derive_more",
"futures 0.3.12",
@@ -6775,7 +6775,7 @@
[[package]]
name = "sp-trie"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"hash-db",
"memory-db",
@@ -6789,7 +6789,7 @@
[[package]]
name = "sp-utils"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"futures 0.3.12",
"futures-core",
@@ -6801,7 +6801,7 @@
[[package]]
name = "sp-version"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -6813,9 +6813,9 @@
[[package]]
name = "sp-wasm-interface"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
- "impl-trait-for-tuples 0.2.0",
+ "impl-trait-for-tuples 0.2.1",
"parity-scale-codec",
"sp-std",
"wasmi",
@@ -6934,7 +6934,7 @@
[[package]]
name = "substrate-build-script-utils"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"platforms",
]
@@ -6942,7 +6942,7 @@
[[package]]
name = "substrate-frame-rpc-system"
version = "2.0.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"frame-system-rpc-runtime-api",
"futures 0.3.12",
@@ -6965,12 +6965,12 @@
[[package]]
name = "substrate-prometheus-endpoint"
version = "0.8.1"
-source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
+source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#c8641b52ea9acfd2cee6df8653b453edbe0bbed7"
dependencies = [
"async-std",
"derive_more",
"futures-util",
- "hyper 0.13.9",
+ "hyper 0.13.10",
"log",
"prometheus",
"tokio 0.2.25",
@@ -7599,9 +7599,9 @@
[[package]]
name = "unicode-normalization"
-version = "0.1.16"
+version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606"
+checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
dependencies = [
"tinyvec",
]
@@ -7676,7 +7676,7 @@
checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e"
dependencies = [
"form_urlencoded",
- "idna 0.2.0",
+ "idna 0.2.1",
"matches",
"percent-encoding 2.1.0",
]
tests/src/addCollectionAdmin.test.tsdiffbeforeafterboth--- a/tests/src/addCollectionAdmin.test.ts
+++ b/tests/src/addCollectionAdmin.test.ts
@@ -103,7 +103,7 @@
});
});
- it.only('Add an admin to a collection that has reached the maximum number of admins limit', async () => {
+ it('Add an admin to a collection that has reached the maximum number of admins limit', async () => {
await usingApi(async (api: ApiPromise) => {
const Alice = privateKey('//Alice');
const accounts = [
tests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth--- a/tests/src/creditFeesToTreasury.test.ts
+++ b/tests/src/creditFeesToTreasury.test.ts
@@ -17,6 +17,8 @@
transferExpectSuccess
} from './util/helpers';
+import { default as waitNewBlocks } from './substrate/wait-new-blocks';
+
chai.use(chaiAsPromised);
const expect = chai.expect;
@@ -37,6 +39,8 @@
it('Total issuance does not change', async () => {
await usingApi(async (api) => {
+ await waitNewBlocks(api, 1);
+
const totalBefore = new BigNumber((await api.query.balances.totalIssuance()).toString());
const alicePrivateKey = privateKey('//Alice');
@@ -54,6 +58,8 @@
it('Sender balance decreased by fee+sent amount, Treasury balance increased by fee', async () => {
await usingApi(async (api) => {
+ await waitNewBlocks(api, 1);
+
const alicePrivateKey = privateKey('//Alice');
const treasuryBalanceBefore = new BigNumber((await api.query.system.account(Treasury)).data.free.toString());
const aliceBalanceBefore = new BigNumber((await api.query.system.account(alicesPublicKey)).data.free.toString());
@@ -74,6 +80,8 @@
it('Treasury balance increased by failed tx fee', async () => {
await usingApi(async (api) => {
+ await waitNewBlocks(api, 1);
+
const bobPrivateKey = privateKey('//Bob');
const treasuryBalanceBefore = new BigNumber((await api.query.system.account(Treasury)).data.free.toString());
const bobBalanceBefore = new BigNumber((await api.query.system.account(bobsPublicKey)).data.free.toString());
@@ -92,6 +100,8 @@
it('NFT Transactions also send fees to Treasury', async () => {
await usingApi(async (api) => {
+ await waitNewBlocks(api, 1);
+
const treasuryBalanceBefore = new BigNumber((await api.query.system.account(Treasury)).data.free.toString());
const aliceBalanceBefore = new BigNumber((await api.query.system.account(alicesPublicKey)).data.free.toString());
@@ -108,15 +118,12 @@
it('Fees are sane', async () => {
await usingApi(async (api) => {
- const treasuryBalanceBefore = new BigNumber((await api.query.system.account(Treasury)).data.free.toString());
const aliceBalanceBefore = new BigNumber((await api.query.system.account(alicesPublicKey)).data.free.toString());
await createCollectionExpectSuccess();
- const treasuryBalanceAfter = new BigNumber((await api.query.system.account(Treasury)).data.free.toString());
const aliceBalanceAfter = new BigNumber((await api.query.system.account(alicesPublicKey)).data.free.toString());
const fee = aliceBalanceBefore.minus(aliceBalanceAfter);
- const treasuryIncrease = treasuryBalanceAfter.minus(treasuryBalanceBefore);
expect(fee.dividedBy(1e15).toNumber()).to.be.lessThan(saneMaximumFee);
expect(fee.dividedBy(1e15).toNumber()).to.be.greaterThan(saneMinimumFee);
tests/src/transferFrom.test.tsdiffbeforeafterboth--- a/tests/src/transferFrom.test.ts
+++ b/tests/src/transferFrom.test.ts
@@ -15,6 +15,7 @@
destroyCollectionExpectSuccess,
transferFromExpectFail,
transferFromExpectSuccess,
+ burnItemExpectSuccess,
} from './util/helpers';
chai.use(chaiAsPromised);
@@ -185,4 +186,83 @@
}
});
});
+ it( 'transferFrom burnt token before approve NFT', async () => {
+ await usingApi(async (api: ApiPromise) => {
+ const Alice = privateKey('//Alice');
+ const Bob = privateKey('//Bob');
+ const Charlie = privateKey('//Charlie');
+ // nft
+ const nftCollectionId = await createCollectionExpectSuccess();
+ const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');
+ await burnItemExpectSuccess(Alice, nftCollectionId, newNftTokenId, 1);
+ await approveExpectFail(nftCollectionId, newNftTokenId, Alice, Bob);
+ await transferFromExpectFail(nftCollectionId, newNftTokenId, Bob, Alice, Charlie, 1);
+ });
+ });
+ it( 'transferFrom burnt token before approve Fungible', async () => {
+ await usingApi(async (api: ApiPromise) => {
+ const Alice = privateKey('//Alice');
+ const Bob = privateKey('//Bob');
+ const Charlie = privateKey('//Charlie');
+ const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
+ const newFungibleTokenId = await createItemExpectSuccess(Alice, fungibleCollectionId, 'Fungible');
+ await burnItemExpectSuccess(Alice, fungibleCollectionId, 1, 10);
+ await approveExpectFail(fungibleCollectionId, newFungibleTokenId, Alice, Bob);
+ await transferFromExpectFail(fungibleCollectionId, newFungibleTokenId, Bob, Alice, Charlie, 1);
+
+ });
+ });
+ it( 'transferFrom burnt token before approve ReFungible', async () => {
+ await usingApi(async (api: ApiPromise) => {
+ const Alice = privateKey('//Alice');
+ const Bob = privateKey('//Bob');
+ const Charlie = privateKey('//Charlie');
+ const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible', decimalPoints: 0}});
+ const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');
+ await burnItemExpectSuccess(Alice, reFungibleCollectionId, newReFungibleTokenId, 1);
+ await approveExpectFail(reFungibleCollectionId, newReFungibleTokenId, Alice, Bob);
+ await transferFromExpectFail(reFungibleCollectionId, newReFungibleTokenId, Bob, Alice, Charlie, 1);
+
+ });
+ });
+
+ it( 'transferFrom burnt token after approve NFT', async () => {
+ await usingApi(async (api: ApiPromise) => {
+ const Alice = privateKey('//Alice');
+ const Bob = privateKey('//Bob');
+ const Charlie = privateKey('//Charlie');
+ // nft
+ const nftCollectionId = await createCollectionExpectSuccess();
+ const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');
+ await approveExpectSuccess(nftCollectionId, newNftTokenId, Alice, Bob);
+ await burnItemExpectSuccess(Alice, nftCollectionId, newNftTokenId, 1);
+ await transferFromExpectFail(nftCollectionId, newNftTokenId, Bob, Alice, Charlie, 1);
+ });
+ });
+ it( 'transferFrom burnt token after approve Fungible', async () => {
+ await usingApi(async (api: ApiPromise) => {
+ const Alice = privateKey('//Alice');
+ const Bob = privateKey('//Bob');
+ const Charlie = privateKey('//Charlie');
+ const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
+ const newFungibleTokenId = await createItemExpectSuccess(Alice, fungibleCollectionId, 'Fungible');
+ await approveExpectSuccess(fungibleCollectionId, newFungibleTokenId, Alice, Bob);
+ await burnItemExpectSuccess(Alice, fungibleCollectionId, 1, 10);
+ await transferFromExpectFail(fungibleCollectionId, newFungibleTokenId, Bob, Alice, Charlie, 1);
+
+ });
+ });
+ it( 'transferFrom burnt token after approve ReFungible', async () => {
+ await usingApi(async (api: ApiPromise) => {
+ const Alice = privateKey('//Alice');
+ const Bob = privateKey('//Bob');
+ const Charlie = privateKey('//Charlie');
+ const reFungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'ReFungible', decimalPoints: 0}});
+ const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');
+ await approveExpectSuccess(reFungibleCollectionId, newReFungibleTokenId, Alice, Bob);
+ await burnItemExpectSuccess(Alice, reFungibleCollectionId, newReFungibleTokenId, 1);
+ await transferFromExpectFail(reFungibleCollectionId, newReFungibleTokenId, Bob, Alice, Charlie, 1);
+
+ });
+ });
});
tests/src/util/helpers.tsdiffbeforeafterboth1//2// This file is subject to the terms and conditions defined in3// file 'LICENSE', which is part of this source code package.4//56import { ApiPromise, Keyring } from '@polkadot/api';7import { Enum, Struct } from '@polkadot/types/codec';8import type { AccountId, EventRecord } from '@polkadot/types/interfaces';9import { u128 } from '@polkadot/types/primitive';10import { IKeyringPair } from '@polkadot/types/types';11import { BigNumber } from 'bignumber.js';12import BN from 'bn.js';13import chai from 'chai';14import chaiAsPromised from 'chai-as-promised';15import { alicesPublicKey, nullPublicKey } from '../accounts';16import privateKey from '../substrate/privateKey';17import { default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';18import { ICollectionInterface } from '../types';19import { hexToStr, strToUTF16, utf16ToStr } from './util';2021chai.use(chaiAsPromised);22const expect = chai.expect;2324type GenericResult = {25 success: boolean,26};2728interface CreateCollectionResult {29 success: boolean;30 collectionId: number;31}3233interface CreateItemResult {34 success: boolean;35 collectionId: number;36 itemId: number;37}3839interface IReFungibleOwner {40 Fraction: BN;41 Owner: number[];42}4344interface ITokenDataType {45 Owner: number[];46 ConstData: number[];47 VariableData: number[];48}4950interface IFungibleTokenDataType {51 Value: BN;52}5354export interface IReFungibleTokenDataType {55 Owner: IReFungibleOwner[];56 ConstData: number[];57 VariableData: number[];58}5960export function getGenericResult(events: EventRecord[]): GenericResult {61 const result: GenericResult = {62 success: false,63 };64 events.forEach(({ phase, event: { data, method, section } }) => {65 // console.log(` ${phase}: ${section}.${method}:: ${data}`);66 if (method === 'ExtrinsicSuccess') {67 result.success = true;68 }69 });70 return result;71}7273export function getCreateCollectionResult(events: EventRecord[]): CreateCollectionResult {74 let success = false;75 let collectionId: number = 0;76 events.forEach(({ phase, event: { data, method, section } }) => {77 // console.log(` ${phase}: ${section}.${method}:: ${data}`);78 if (method == 'ExtrinsicSuccess') {79 success = true;80 } else if ((section == 'nft') && (method == 'Created')) {81 collectionId = parseInt(data[0].toString());82 }83 });84 const result: CreateCollectionResult = {85 success,86 collectionId,87 };88 return result;89}9091export function getCreateItemResult(events: EventRecord[]): CreateItemResult {92 let success = false;93 let collectionId: number = 0;94 let itemId: number = 0;95 events.forEach(({ phase, event: { data, method, section } }) => {96 // console.log(` ${phase}: ${section}.${method}:: ${data}`);97 if (method == 'ExtrinsicSuccess') {98 success = true;99 } else if ((section == 'nft') && (method == 'ItemCreated')) {100 collectionId = parseInt(data[0].toString());101 itemId = parseInt(data[1].toString());102 }103 });104 const result: CreateItemResult = {105 success,106 collectionId,107 itemId,108 };109 return result;110}111112interface Invalid {113 type: 'Invalid';114}115116interface Nft {117 type: 'NFT';118}119120interface Fungible {121 type: 'Fungible';122 decimalPoints: number;123}124125interface ReFungible {126 type: 'ReFungible';127}128129type CollectionMode = Nft | Fungible | ReFungible | Invalid;130131export type CreateCollectionParams = {132 mode: CollectionMode,133 name: string,134 description: string,135 tokenPrefix: string,136};137138const defaultCreateCollectionParams: CreateCollectionParams = {139 description: 'description',140 mode: { type: 'NFT' },141 name: 'name',142 tokenPrefix: 'prefix',143}144145export async function createCollectionExpectSuccess(params: Partial<CreateCollectionParams> = {}): Promise<number> {146 const {name, description, mode, tokenPrefix } = {...defaultCreateCollectionParams, ...params};147148 let collectionId: number = 0;149 await usingApi(async (api) => {150 // Get number of collections before the transaction151 const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);152153 // Run the CreateCollection transaction154 const alicePrivateKey = privateKey('//Alice');155156 let modeprm = {};157 if (mode.type === 'NFT') {158 modeprm = {nft: null};159 } else if (mode.type === 'Fungible') {160 modeprm = {fungible: mode.decimalPoints};161 } else if (mode.type === 'ReFungible') {162 modeprm = {refungible: null};163 } else if (mode.type === 'Invalid') {164 modeprm = {invalid: null};165 }166167 const tx = api.tx.nft.createCollection(strToUTF16(name), strToUTF16(description), strToUTF16(tokenPrefix), modeprm);168 const events = await submitTransactionAsync(alicePrivateKey, tx);169 const result = getCreateCollectionResult(events);170171 // Get number of collections after the transaction172 const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);173174 // Get the collection175 const collection: any = (await api.query.nft.collection(result.collectionId)).toJSON();176177 // What to expect178 // tslint:disable-next-line:no-unused-expression179 expect(result.success).to.be.true;180 expect(result.collectionId).to.be.equal(BcollectionCount);181 // tslint:disable-next-line:no-unused-expression182 expect(collection).to.be.not.null;183 expect(BcollectionCount).to.be.equal(AcollectionCount + 1, 'Error: NFT collection NOT created.');184 expect(collection.Owner).to.be.equal(alicesPublicKey);185 expect(utf16ToStr(collection.Name)).to.be.equal(name);186 expect(utf16ToStr(collection.Description)).to.be.equal(description);187 expect(hexToStr(collection.TokenPrefix)).to.be.equal(tokenPrefix);188189 collectionId = result.collectionId;190 });191192 return collectionId;193}194195export async function createCollectionExpectFailure(params: Partial<CreateCollectionParams> = {}) {196 const {name, description, mode, tokenPrefix } = {...defaultCreateCollectionParams, ...params};197198 let modeprm = {};199 if (mode.type === 'NFT') {200 modeprm = {nft: null};201 } else if (mode.type === 'Fungible') {202 modeprm = {fungible: mode.decimalPoints};203 } else if (mode.type === 'ReFungible') {204 modeprm = {refungible: null};205 } else if (mode.type === 'Invalid') {206 modeprm = {invalid: null};207 }208209 await usingApi(async (api) => {210 // Get number of collections before the transaction211 const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString());212213 // Run the CreateCollection transaction214 const alicePrivateKey = privateKey('//Alice');215 const tx = api.tx.nft.createCollection(strToUTF16(name), strToUTF16(description), strToUTF16(tokenPrefix), modeprm);216 const events = await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;217 const result = getCreateCollectionResult(events);218219 // Get number of collections after the transaction220 const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString());221222 // What to expect223 // tslint:disable-next-line:no-unused-expression224 expect(result.success).to.be.false;225 expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Collection with incorrect data created.');226 });227}228229export async function findUnusedAddress(api: ApiPromise): Promise<IKeyringPair> {230 let bal = new BigNumber(0);231 let unused;232 do {233 const randomSeed = 'seed' + Math.floor(Math.random() * Math.floor(10000));234 const keyring = new Keyring({ type: 'sr25519' });235 unused = keyring.addFromUri(`//${randomSeed}`);236 bal = new BigNumber((await api.query.system.account(unused.address)).data.free.toString());237 } while (bal.toFixed() != '0');238 return unused;239}240241export async function findNotExistingCollection(api: ApiPromise): Promise<number> {242 const totalNumber = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10) as unknown as number;243 const newCollection: number = totalNumber + 1;244 return newCollection;245}246247function getDestroyResult(events: EventRecord[]): boolean {248 let success: boolean = false;249 events.forEach(({ phase, event: { data, method, section } }) => {250 // console.log(` ${phase}: ${section}.${method}:: ${data}`);251 if (method == 'ExtrinsicSuccess') {252 success = true;253 }254 });255 return success;256}257258export async function destroyCollectionExpectFailure(collectionId: number, senderSeed: string = '//Alice') {259 await usingApi(async (api) => {260 // Run the DestroyCollection transaction261 const alicePrivateKey = privateKey(senderSeed);262 const tx = api.tx.nft.destroyCollection(collectionId);263 await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;264 });265}266267export async function destroyCollectionExpectSuccess(collectionId: number, senderSeed: string = '//Alice') {268 await usingApi(async (api) => {269 // Run the DestroyCollection transaction270 const alicePrivateKey = privateKey(senderSeed);271 const tx = api.tx.nft.destroyCollection(collectionId);272 const events = await submitTransactionAsync(alicePrivateKey, tx);273 const result = getDestroyResult(events);274275 // Get the collection276 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();277278 // What to expect279 expect(result).to.be.true;280 expect(collection).to.be.not.null;281 expect(collection.Owner).to.be.equal(nullPublicKey);282 });283}284285export async function setCollectionSponsorExpectSuccess(collectionId: number, sponsor: string) {286 await usingApi(async (api) => {287288 // Run the transaction289 const alicePrivateKey = privateKey('//Alice');290 const tx = api.tx.nft.setCollectionSponsor(collectionId, sponsor);291 const events = await submitTransactionAsync(alicePrivateKey, tx);292 const result = getGenericResult(events);293294 // Get the collection295 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();296297 // What to expect298 expect(result.success).to.be.true;299 expect(collection.Sponsor.toString()).to.be.equal(sponsor.toString());300 expect(collection.SponsorConfirmed).to.be.false;301 });302}303304export async function removeCollectionSponsorExpectSuccess(collectionId: number) {305 await usingApi(async (api) => {306307 // Run the transaction308 const alicePrivateKey = privateKey('//Alice');309 const tx = api.tx.nft.removeCollectionSponsor(collectionId);310 const events = await submitTransactionAsync(alicePrivateKey, tx);311 const result = getGenericResult(events);312313 // Get the collection314 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();315316 // What to expect317 expect(result.success).to.be.true;318 expect(collection.Sponsor).to.be.equal(nullPublicKey);319 expect(collection.SponsorConfirmed).to.be.false;320 });321}322323export async function removeCollectionSponsorExpectFailure(collectionId: number) {324 await usingApi(async (api) => {325326 // Run the transaction327 const alicePrivateKey = privateKey('//Alice');328 const tx = api.tx.nft.removeCollectionSponsor(collectionId);329 await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;330 });331}332333export async function setCollectionSponsorExpectFailure(collectionId: number, sponsor: string, senderSeed: string = '//Alice') {334 await usingApi(async (api) => {335336 // Run the transaction337 const alicePrivateKey = privateKey(senderSeed);338 const tx = api.tx.nft.setCollectionSponsor(collectionId, sponsor);339 await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;340 });341}342343export async function confirmSponsorshipExpectSuccess(collectionId: number, senderSeed: string = '//Alice') {344 await usingApi(async (api) => {345346 // Run the transaction347 const sender = privateKey(senderSeed);348 const tx = api.tx.nft.confirmSponsorship(collectionId);349 const events = await submitTransactionAsync(sender, tx);350 const result = getGenericResult(events);351352 // Get the collection353 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();354355 // What to expect356 expect(result.success).to.be.true;357 expect(collection.Sponsor).to.be.equal(sender.address);358 expect(collection.SponsorConfirmed).to.be.true;359 });360}361362export async function confirmSponsorshipExpectFailure(collectionId: number, senderSeed: string = '//Alice') {363 await usingApi(async (api) => {364365 // Run the transaction366 const sender = privateKey(senderSeed);367 const tx = api.tx.nft.confirmSponsorship(collectionId);368 await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;369 });370}371372export async function enableContractSponsoringExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, enable: boolean) {373 await usingApi(async (api) => {374 const tx = api.tx.nft.enableContractSponsoring(contractAddress, enable);375 const events = await submitTransactionAsync(sender, tx);376 const result = getGenericResult(events);377378 expect(result.success).to.be.true;379 });380}381382export async function enableContractSponsoringExpectFailure(sender: IKeyringPair, contractAddress: AccountId | string, enable: boolean) {383 await usingApi(async (api) => {384 const tx = api.tx.nft.enableContractSponsoring(contractAddress, enable);385 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;386 const result = getGenericResult(events);387388 expect(result.success).to.be.false;389 });390}391392export async function setContractSponsoringRateLimitExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, rateLimit: number) {393 await usingApi(async (api) => {394 const tx = api.tx.nft.setContractSponsoringRateLimit(contractAddress, rateLimit);395 const events = await submitTransactionAsync(sender, tx);396 const result = getGenericResult(events);397398 expect(result.success).to.be.true;399 });400}401402export async function setContractSponsoringRateLimitExpectFailure(sender: IKeyringPair, contractAddress: AccountId | string, rateLimit: number) {403 await usingApi(async (api) => {404 const tx = api.tx.nft.setContractSponsoringRateLimit(contractAddress, rateLimit);405 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;406 const result = getGenericResult(events);407408 expect(result.success).to.be.false;409 });410}411412export async function toggleContractWhitelistExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, enabled: boolean) {413 await usingApi(async (api) => {414 const tx = api.tx.nft.toggleContractWhiteList(contractAddress, true);415 const events = await submitTransactionAsync(sender, tx);416 const result = getGenericResult(events);417418 expect(result.success).to.be.true;419 });420}421422export async function isWhitelistedInContract(contractAddress: AccountId | string, user: string) {423 let whitelisted: boolean = false;424 await usingApi(async (api) => {425 whitelisted = (await api.query.nft.contractWhiteList(contractAddress, user)).toJSON() as boolean;426 });427 return whitelisted;428}429430export async function addToContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: string) {431 await usingApi(async (api) => {432 const tx = api.tx.nft.addToContractWhiteList(contractAddress, user);433 const events = await submitTransactionAsync(sender, tx);434 const result = getGenericResult(events);435436 expect(result.success).to.be.true;437 });438}439440export async function removeFromContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: string) {441 await usingApi(async (api) => {442 const tx = api.tx.nft.removeFromContractWhiteList(contractAddress, user);443 const events = await submitTransactionAsync(sender, tx);444 const result = getGenericResult(events);445446 expect(result.success).to.be.true;447 });448}449450export async function removeFromContractWhiteListExpectFailure(sender: IKeyringPair, contractAddress: AccountId | string, user: string) {451 await usingApi(async (api) => {452 const tx = api.tx.nft.removeFromContractWhiteList(contractAddress, user);453 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;454 const result = getGenericResult(events);455456 expect(result.success).to.be.false;457 });458}459460export async function setVariableMetaDataExpectSuccess(sender: IKeyringPair, collectionId: number, itemId: number, data: number[]) {461 await usingApi(async (api) => {462 const tx = api.tx.nft.setVariableMetaData(collectionId, itemId, '0x' + Buffer.from(data).toString('hex'));463 const events = await submitTransactionAsync(sender, tx);464 const result = getGenericResult(events);465466 expect(result.success).to.be.true;467 });468}469470export async function setVariableMetaDataExpectFailure(sender: IKeyringPair, collectionId: number, itemId: number, data: number[]) {471 await usingApi(async (api) => {472 const tx = api.tx.nft.setVariableMetaData(collectionId, itemId, '0x' + Buffer.from(data).toString('hex'));473 await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;474 });475}476477export interface CreateFungibleData extends Struct {478 readonly value: u128;479}480481export interface CreateReFungibleData extends Struct {}482export interface CreateNftData extends Struct {}483484export interface CreateItemData extends Enum {485 NFT: CreateNftData;486 Fungible: CreateFungibleData;487 ReFungible: CreateReFungibleData;488}489490export async function burnItemExpectSuccess(owner: IKeyringPair, collectionId: number, tokenId: number, value = 0) {491 await usingApi(async (api) => {492 const tx = api.tx.nft.burnItem(collectionId, tokenId, value);493 const events = await submitTransactionAsync(owner, tx);494 const result = getGenericResult(events);495 // Get the item496 const item: any = (await api.query.nft.nftItemList(collectionId, tokenId)).toJSON();497 // What to expect498 // tslint:disable-next-line:no-unused-expression499 expect(result.success).to.be.true;500 // tslint:disable-next-line:no-unused-expression501 expect(item).to.be.not.null;502 expect(item.Owner).to.be.equal(nullPublicKey);503 });504}505506export async function507approveExpectSuccess(collectionId: number,508 tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number = 1) {509 await usingApi(async (api: ApiPromise) => {510 const allowanceBefore =511 await api.query.nft.allowances(collectionId, [tokenId, owner.address, approved.address]) as unknown as BN;512 const approveNftTx = await api.tx.nft.approve(approved.address, collectionId, tokenId, amount);513 const events = await submitTransactionAsync(owner, approveNftTx);514 const result = getCreateItemResult(events);515 // tslint:disable-next-line:no-unused-expression516 expect(result.success).to.be.true;517 const allowanceAfter =518 await api.query.nft.allowances(collectionId, [tokenId, owner.address, approved.address]) as unknown as BN;519 expect(allowanceAfter.toNumber() - allowanceBefore.toNumber()).to.be.equal(amount);520 });521}522523export async function524transferFromExpectSuccess(collectionId: number,525 tokenId: number,526 accountApproved: IKeyringPair,527 accountFrom: IKeyringPair,528 accountTo: IKeyringPair,529 value: number = 1,530 type: string = 'NFT') {531 await usingApi(async (api: ApiPromise) => {532 let balanceBefore = new BN(0);533 if (type === 'Fungible') {534 balanceBefore = await api.query.nft.balance(collectionId, accountTo.address) as unknown as BN;535 }536 const transferFromTx = await api.tx.nft.transferFrom(537 accountFrom.address, accountTo.address, collectionId, tokenId, value);538 const events = await submitTransactionAsync(accountApproved, transferFromTx);539 const result = getCreateItemResult(events);540 // tslint:disable-next-line:no-unused-expression541 expect(result.success).to.be.true;542 if (type === 'NFT') {543 const nftItemData = await api.query.nft.nftItemList(collectionId, tokenId) as unknown as ITokenDataType;544 expect(nftItemData.Owner.toString()).to.be.equal(accountTo.address);545 }546 if (type === 'Fungible') {547 const balanceAfter = await api.query.nft.balance(collectionId, accountTo.address) as unknown as BN;548 expect(balanceAfter.sub(balanceBefore).toNumber()).to.be.equal(value);549 }550 if (type === 'ReFungible') {551 const nftItemData =552 await api.query.nft.reFungibleItemList(collectionId, tokenId) as unknown as IReFungibleTokenDataType;553 expect(nftItemData.Owner[0].Owner.toString()).to.be.equal(accountTo.address);554 expect(nftItemData.Owner[0].Fraction.toNumber()).to.be.equal(value);555 }556 });557}558559export async function560transferFromExpectFail(collectionId: number,561 tokenId: number,562 accountApproved: IKeyringPair,563 accountFrom: IKeyringPair,564 accountTo: IKeyringPair,565 value: number = 1) {566 await usingApi(async (api: ApiPromise) => {567 const transferFromTx = await api.tx.nft.transferFrom(568 accountFrom.address, accountTo.address, collectionId, tokenId, value);569 const events = await expect(submitTransactionExpectFailAsync(accountApproved, transferFromTx)).to.be.rejected;570 const result = getCreateCollectionResult(events);571 // tslint:disable-next-line:no-unused-expression572 expect(result.success).to.be.false;573 });574}575576export async function577transferExpectSuccess(collectionId: number,578 tokenId: number,579 sender: IKeyringPair,580 recipient: IKeyringPair,581 value: number = 1,582 type: string = 'NFT') {583 await usingApi(async (api: ApiPromise) => {584 let balanceBefore = new BN(0);585 if (type === 'Fungible') {586 balanceBefore = await api.query.nft.balance(collectionId, recipient.address) as unknown as BN;587 }588 const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);589 const events = await submitTransactionAsync(sender, transferTx);590 const result = getCreateItemResult(events);591 // tslint:disable-next-line:no-unused-expression592 expect(result.success).to.be.true;593 if (type === 'NFT') {594 const nftItemData = await api.query.nft.nftItemList(collectionId, tokenId) as unknown as ITokenDataType;595 expect(nftItemData.Owner.toString()).to.be.equal(recipient.address);596 }597 if (type === 'Fungible') {598 const balanceAfter = await api.query.nft.balance(collectionId, recipient.address) as unknown as BN;599 expect(balanceAfter.sub(balanceBefore).toNumber()).to.be.equal(value);600 }601 if (type === 'ReFungible') {602 const nftItemData =603 await api.query.nft.reFungibleItemList(collectionId, tokenId) as unknown as IReFungibleTokenDataType;604 expect(nftItemData.Owner[0].Owner.toString()).to.be.equal(recipient.address);605 expect(nftItemData.Owner[0].Fraction.toNumber()).to.be.equal(value);606 }607 });608}609610export async function611transferExpectFail(collectionId: number,612 tokenId: number,613 sender: IKeyringPair,614 recipient: IKeyringPair,615 value: number = 1,616 type: string = 'NFT') {617 await usingApi(async (api: ApiPromise) => {618 const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);619 const events = await expect(submitTransactionExpectFailAsync(sender, transferTx)).to.be.rejected;620 if (events && Array.isArray(events)) {621 const result = getCreateCollectionResult(events);622 // tslint:disable-next-line:no-unused-expression623 expect(result.success).to.be.false;624 }625 });626}627628export async function629approveExpectFail(collectionId: number,630 tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number = 1) {631 await usingApi(async (api: ApiPromise) => {632 const approveNftTx = await api.tx.nft.approve(approved.address, collectionId, tokenId, amount);633 const events = await expect(submitTransactionExpectFailAsync(owner, approveNftTx)).to.be.rejected;634 const result = getCreateCollectionResult(events);635 // tslint:disable-next-line:no-unused-expression636 expect(result.success).to.be.false;637 });638}639640export async function createItemExpectSuccess(641 sender: IKeyringPair, collectionId: number, createMode: string, owner: string = '') {642 let newItemId: number = 0;643 await usingApi(async (api) => {644 const AItemCount = parseInt((await api.query.nft.itemListIndex(collectionId)).toString(), 10);645 const Aitem: any = (await api.query.nft.fungibleItemList(collectionId, owner)).toJSON();646 const AItemBalance = new BigNumber(Aitem.Value);647648 if (owner === '') {649 owner = sender.address;650 }651652 let tx;653 if (createMode === 'Fungible') {654 const createData = {fungible: {value: 10}};655 tx = api.tx.nft.createItem(collectionId, owner, createData);656 } else if (createMode === 'ReFungible') {657 const createData = {refungible: {const_data: [], variable_data: [], pieces: 100}};658 tx = api.tx.nft.createItem(collectionId, owner, createData);659 } else {660 tx = api.tx.nft.createItem(collectionId, owner, createMode);661 }662 const events = await submitTransactionAsync(sender, tx);663 const result = getCreateItemResult(events);664665 const BItemCount = parseInt((await api.query.nft.itemListIndex(collectionId)).toString(), 10);666 const Bitem: any = (await api.query.nft.fungibleItemList(collectionId, owner)).toJSON();667 const BItemBalance = new BigNumber(Bitem.Value);668669 // What to expect670 // tslint:disable-next-line:no-unused-expression671 expect(result.success).to.be.true;672 if (createMode === 'Fungible') {673 expect(BItemBalance.minus(AItemBalance).toNumber()).to.be.equal(10);674 } else {675 expect(BItemCount).to.be.equal(AItemCount + 1);676 }677 expect(collectionId).to.be.equal(result.collectionId);678 expect(BItemCount).to.be.equal(result.itemId);679 newItemId = result.itemId;680 });681 return newItemId;682}683684export async function createItemExpectFailure(685 sender: IKeyringPair, collectionId: number, createMode: string, owner: string = sender.address) {686 await usingApi(async (api) => {687 const tx = api.tx.nft.createItem(collectionId, owner, createMode);688 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;689 const result = getCreateItemResult(events);690691 expect(result.success).to.be.false;692 });693}694695export async function setPublicAccessModeExpectSuccess(696 sender: IKeyringPair, collectionId: number,697 accessMode: 'Normal' | 'WhiteList',698) {699 await usingApi(async (api) => {700701 // Run the transaction702 const tx = api.tx.nft.setPublicAccessMode(collectionId, accessMode);703 const events = await submitTransactionAsync(sender, tx);704 const result = getGenericResult(events);705706 // Get the collection707 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();708709 // What to expect710 // tslint:disable-next-line:no-unused-expression711 expect(result.success).to.be.true;712 expect(collection.Access).to.be.equal(accessMode);713 });714}715716export async function enableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {717 await setPublicAccessModeExpectSuccess(sender, collectionId, 'WhiteList');718}719720export async function disableWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number) {721 await setPublicAccessModeExpectSuccess(sender, collectionId, 'Normal');722}723724export async function setMintPermissionExpectSuccess(sender: IKeyringPair, collectionId: number, enabled: boolean) {725 await usingApi(async (api) => {726727 // Run the transaction728 const tx = api.tx.nft.setMintPermission(collectionId, enabled);729 const events = await submitTransactionAsync(sender, tx);730 const result = getGenericResult(events);731732 // Get the collection733 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();734735 // What to expect736 // tslint:disable-next-line:no-unused-expression737 expect(result.success).to.be.true;738 expect(collection.MintMode).to.be.equal(enabled);739 });740}741742export async function enablePublicMintingExpectSuccess(sender: IKeyringPair, collectionId: number) {743 await setMintPermissionExpectSuccess(sender, collectionId, true);744}745746export async function setMintPermissionExpectFailure(sender: IKeyringPair, collectionId: number, enabled: boolean) {747 await usingApi(async (api) => {748 // Run the transaction749 const tx = api.tx.nft.setMintPermission(collectionId, enabled);750 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;751 const result = getCreateCollectionResult(events);752 // tslint:disable-next-line:no-unused-expression753 expect(result.success).to.be.false;754 });755}756757export async function isWhitelisted(collectionId: number, address: string) {758 let whitelisted: boolean = false;759 await usingApi(async (api) => {760 whitelisted = (await api.query.nft.whiteList(collectionId, address)).toJSON() as unknown as boolean;761 });762 return whitelisted;763}764765export async function addToWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: string) {766 await usingApi(async (api) => {767768 const whiteListedBefore = (await api.query.nft.whiteList(collectionId, address)).toJSON();769770 // Run the transaction771 const tx = api.tx.nft.addToWhiteList(collectionId, address);772 const events = await submitTransactionAsync(sender, tx);773 const result = getGenericResult(events);774775 const whiteListedAfter = (await api.query.nft.whiteList(collectionId, address)).toJSON();776777 // What to expect778 // tslint:disable-next-line:no-unused-expression779 expect(result.success).to.be.true;780 // tslint:disable-next-line: no-unused-expression781 expect(whiteListedBefore).to.be.false;782 // tslint:disable-next-line: no-unused-expression783 expect(whiteListedAfter).to.be.true;784 });785}786787export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: string) {788 await usingApi(async (api) => {789 // Run the transaction790 const tx = api.tx.nft.removeFromWhiteList(collectionId, address);791 const events = await submitTransactionAsync(sender, tx);792 const result = getGenericResult(events);793794 // What to expect795 // tslint:disable-next-line:no-unused-expression796 expect(result.success).to.be.true;797 });798}799800export async function removeFromWhiteListExpectFailure(sender: IKeyringPair, collectionId: number, address: string) {801 await usingApi(async (api) => {802 // Run the transaction803 const tx = api.tx.nft.removeFromWhiteList(collectionId, address);804 const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;805 const result = getGenericResult(events);806807 // What to expect808 // tslint:disable-next-line:no-unused-expression809 expect(result.success).to.be.false;810 });811}812813export const getDetailedCollectionInfo = async (api: ApiPromise, collectionId: number)814 : Promise<ICollectionInterface | null> => {815 return await api.query.nft.collection(collectionId) as unknown as ICollectionInterface;816};817818export const getCreatedCollectionCount = async (api: ApiPromise): Promise<number> => {819 // set global object - collectionsCount820 return (await api.query.nft.createdCollectionCount() as unknown as BN).toNumber();821};