difftreelog
Merge pull request #156 from usetech-llc/feature/NFTPAR-366_insert_ethereum_pallets_parachain
in: master
Implement parachain support for frontier
80 files changed
.devcontainer/Dockerfilediffbeforeafterboth--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -11,8 +11,10 @@
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash && \
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
- nvm install v12.20.1 && \
- rustup toolchain install nightly-2021-03-01 && \
- rustup default nightly-2021-03-01 && \
+ nvm install v16.2.0 && \
+ npm install -g yarn && \
+ rustup toolchain install nightly-2021-05-30 && \
+ rustup default nightly-2021-05-30 && \
rustup target add wasm32-unknown-unknown && \
- cargo install cargo-contract
+ rustup component add rustfmt clippy && \
+ cargo install cargo-expand cargo-edit cargo-contract
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18,10 +18,19 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7"
dependencies = [
- "gimli",
+ "gimli 0.23.0",
]
[[package]]
+name = "addr2line"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a"
+dependencies = [
+ "gimli 0.24.0",
+]
+
+[[package]]
name = "adler"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -89,22 +98,11 @@
[[package]]
name = "aho-corasick"
-version = "0.7.15"
+version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
dependencies = [
"memchr",
-]
-
-[[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]]
@@ -133,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",
]
@@ -178,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"
@@ -217,16 +215,16 @@
[[package]]
name = "async-executor"
-version = "1.4.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb877970c7b440ead138f6321a3b5395d6061183af779340b65e20c0fede9146"
+checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965"
dependencies = [
"async-task",
"concurrent-queue",
"fastrand",
"futures-lite",
"once_cell",
- "vec-arena",
+ "slab",
]
[[package]]
@@ -247,29 +245,29 @@
[[package]]
name = "async-io"
-version = "1.3.1"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9315f8f07556761c3e48fec2e6b276004acf426e6dc068b2c2251854d65ee0fd"
+checksum = "4bbfd5cf2794b1e908ea8457e6c45f8f8f1f6ec5f74617bf4662623f47503c3b"
dependencies = [
"concurrent-queue",
"fastrand",
"futures-lite",
"libc",
"log",
- "nb-connect",
"once_cell",
"parking",
"polling",
- "vec-arena",
+ "slab",
+ "socket2 0.4.0",
"waker-fn",
"winapi 0.3.9",
]
[[package]]
name = "async-lock"
-version = "2.3.0"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1996609732bde4a9988bc42125f55f2af5f3c36370e27c778d5191a4a1b63bfb"
+checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b"
dependencies = [
"event-listener",
]
@@ -285,15 +283,16 @@
[[package]]
name = "async-process"
-version = "1.0.2"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef37b86e2fa961bae5a4d212708ea0154f904ce31d1a4a7f47e1bbc33a0c040b"
+checksum = "a8f38756dd9ac84671c428afbf7c9f7495feff9ec5b0710f17100098e5b354ac"
dependencies = [
"async-io",
"blocking",
"cfg-if 1.0.0",
"event-listener",
"futures-lite",
+ "libc",
"once_cell",
"signal-hook",
"winapi 0.3.9",
@@ -311,7 +310,7 @@
"async-io",
"async-lock",
"async-process",
- "crossbeam-utils 0.8.3",
+ "crossbeam-utils 0.8.5",
"futures-channel",
"futures-core",
"futures-io",
@@ -330,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",
@@ -350,9 +349,9 @@
[[package]]
name = "async-trait"
-version = "0.1.49"
+version = "0.1.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589652ce7ccb335d1e7ecb3be145425702b290dbcb7029bbeaae263fc1d87b48"
+checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722"
dependencies = [
"proc-macro2",
"quote",
@@ -419,15 +418,16 @@
[[package]]
name = "backtrace"
-version = "0.3.56"
+version = "0.3.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc"
+checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282"
dependencies = [
- "addr2line",
+ "addr2line 0.15.2",
+ "cc",
"cfg-if 1.0.0",
"libc",
"miniz_oxide",
- "object",
+ "object 0.25.3",
"rustc-demangle",
]
@@ -467,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",
@@ -496,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",
@@ -515,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",
@@ -534,26 +534,21 @@
[[package]]
name = "bindgen"
-version = "0.54.0"
+version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36"
+checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d"
dependencies = [
"bitflags",
"cexpr",
- "cfg-if 0.1.10",
"clang-sys",
- "clap",
- "env_logger 0.7.1",
"lazy_static",
"lazycell",
- "log",
"peeking_take_while",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
- "which 3.1.1",
]
[[package]]
@@ -564,12 +559,22 @@
[[package]]
name = "bitvec"
-version = "0.20.2"
+version = "0.17.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f682656975d3a682daff957be4ddeb65d6ad656737cd821f2d00685ae466af1"
+checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c"
dependencies = [
+ "either",
+ "radium 0.3.0",
+]
+
+[[package]]
+name = "bitvec"
+version = "0.20.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848"
+dependencies = [
"funty",
- "radium",
+ "radium 0.6.2",
"tap",
"wyz",
]
@@ -619,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",
@@ -699,7 +704,7 @@
dependencies = [
"finality-grandpa",
"frame-support",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-finality-grandpa",
@@ -715,7 +720,7 @@
"bp-runtime",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-std",
]
@@ -728,7 +733,7 @@
"bp-runtime",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-core",
"sp-runtime",
@@ -745,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",
@@ -760,7 +765,7 @@
"frame-support",
"hash-db",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -777,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",
@@ -793,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",
@@ -808,9 +813,9 @@
[[package]]
name = "bstr"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d"
+checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279"
dependencies = [
"memchr",
]
@@ -826,9 +831,15 @@
[[package]]
name = "bumpalo"
-version = "3.6.1"
+version = "3.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"
+
+[[package]]
+name = "byte-slice-cast"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe"
+checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3"
[[package]]
name = "byte-slice-cast"
@@ -901,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",
]
@@ -1002,13 +1013,13 @@
[[package]]
name = "clang-sys"
-version = "0.29.3"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a"
+checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c"
dependencies = [
"glob",
"libc",
- "libloading",
+ "libloading 0.7.0",
]
[[package]]
@@ -1020,7 +1031,7 @@
"ansi_term 0.11.0",
"atty",
"bitflags",
- "strsim",
+ "strsim 0.8.0",
"textwrap",
"unicode-width",
"vec_map",
@@ -1083,10 +1094,13 @@
]
[[package]]
-name = "cpuid-bool"
-version = "0.1.2"
+name = "cpufeatures"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
+checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8"
+dependencies = [
+ "libc",
+]
[[package]]
name = "cpuid-bool"
@@ -1114,7 +1128,7 @@
"cranelift-codegen-meta",
"cranelift-codegen-shared",
"cranelift-entity",
- "gimli",
+ "gimli 0.23.0",
"log",
"regalloc",
"serde",
@@ -1182,7 +1196,7 @@
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
- "itertools 0.10.0",
+ "itertools 0.10.1",
"log",
"serde",
"smallvec 1.6.1",
@@ -1206,7 +1220,7 @@
checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
dependencies = [
"cfg-if 1.0.0",
- "crossbeam-utils 0.8.3",
+ "crossbeam-utils 0.8.5",
]
[[package]]
@@ -1227,8 +1241,8 @@
checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
dependencies = [
"cfg-if 1.0.0",
- "crossbeam-epoch 0.9.3",
- "crossbeam-utils 0.8.3",
+ "crossbeam-epoch 0.9.5",
+ "crossbeam-utils 0.8.5",
]
[[package]]
@@ -1248,14 +1262,14 @@
[[package]]
name = "crossbeam-epoch"
-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",
+ "crossbeam-utils 0.8.5",
"lazy_static",
- "memoffset 0.6.3",
+ "memoffset 0.6.4",
"scopeguard",
]
@@ -1283,11 +1297,10 @@
[[package]]
name = "crossbeam-utils"
-version = "0.8.3"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49"
+checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
dependencies = [
- "autocfg",
"cfg-if 1.0.0",
"lazy_static",
]
@@ -1366,8 +1379,8 @@
"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",
@@ -1390,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",
@@ -1419,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",
@@ -1442,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",
@@ -1466,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",
@@ -1476,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",
@@ -1495,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",
@@ -1523,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",
@@ -1540,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",
@@ -1564,7 +1577,7 @@
"log",
"memory-db",
"pallet-balances",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"serde",
"sp-core",
@@ -1588,7 +1601,7 @@
"cumulus-primitives-core",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-io",
"sp-runtime",
@@ -1605,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",
@@ -1620,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",
@@ -1639,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",
@@ -1659,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",
@@ -1697,6 +1710,41 @@
]
[[package]]
+name = "darling"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "757c0ded2af11d8e739c4daea1ac623dd1624b06c844cf3f5a39f1bdbd99bb12"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c34d8efb62d0c2d7f60ece80f75e5c63c1588ba68032740494b0b9a996466e3"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim 0.10.0",
+ "syn",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ade7bff147130fe5e6d39f089c6bd49ec0250f35d70b2eebf72afdfc919f15cc"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "data-encoding"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1704,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",
@@ -1714,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",
@@ -1735,9 +1783,9 @@
[[package]]
name = "derive_more"
-version = "0.99.13"
+version = "0.99.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6"
+checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320"
dependencies = [
"convert_case",
"proc-macro2",
@@ -1765,9 +1813,9 @@
[[package]]
name = "directories"
-version = "3.0.1"
+version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8fed639d60b58d0f53498ab13d26f621fd77569cc6edb031f4cc36a2ad9da0f"
+checksum = "e69600ff1703123957937708eb27f7a564e48885c537782722ed0ba3189ce1d7"
dependencies = [
"dirs-sys",
]
@@ -1784,12 +1832,12 @@
[[package]]
name = "dirs-sys"
-version = "0.3.5"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
+checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
dependencies = [
"libc",
- "redox_users 0.3.5",
+ "redox_users",
"winapi 0.3.9",
]
@@ -1800,7 +1848,7 @@
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
- "redox_users 0.4.0",
+ "redox_users",
"winapi 0.3.9",
]
@@ -1843,9 +1891,9 @@
[[package]]
name = "ed25519"
-version = "1.0.3"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef"
+checksum = "8d0860415b12243916284c67a9be413e044ee6668247b99ba26d94b2bc06c8f6"
dependencies = [
"signature",
]
@@ -1860,7 +1908,7 @@
"ed25519",
"rand 0.7.3",
"serde",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"zeroize",
]
@@ -1928,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",
@@ -1947,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",
]
@@ -1977,29 +2025,92 @@
[[package]]
name = "ethbloom"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71a6567e6fd35589fea0c63b94b4cf2e55573e413901bdbe60ab15cf0e25e5df"
+dependencies = [
+ "crunchy",
+ "fixed-hash 0.6.1",
+ "impl-rlp 0.2.1",
+ "impl-serde",
+ "tiny-keccak",
+]
+
+[[package]]
+name = "ethbloom"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "779864b9c7f7ead1f092972c3257496c6a84b46dba2ce131dd8a282cb2cc5972"
dependencies = [
"crunchy",
- "fixed-hash",
- "impl-rlp",
+ "fixed-hash 0.7.0",
+ "impl-codec 0.5.0",
+ "impl-rlp 0.3.0",
"impl-serde",
"tiny-keccak",
]
[[package]]
+name = "ethereum"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567ce064a8232c16e2b2c2173a936b91fbe35c2f2c5278871f5a1a31688b42e9"
+dependencies = [
+ "ethereum-types 0.11.0",
+ "funty",
+ "hash-db",
+ "hash256-std-hasher",
+ "parity-scale-codec 2.1.3",
+ "rlp 0.5.0",
+ "rlp-derive",
+ "serde",
+ "sha3 0.9.1",
+ "triehash",
+]
+
+[[package]]
+name = "ethereum-tx-sign"
+version = "3.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdcbb5f48282fa71ba2864818a442d0ee0ca04ebc9ef9eb1837c48298c3b8cbf"
+dependencies = [
+ "ethereum-types 0.9.2",
+ "num-traits",
+ "rlp 0.4.6",
+ "secp256k1",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "tiny-keccak",
+]
+
+[[package]]
name = "ethereum-types"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "473aecff686bd8e7b9db0165cbbb53562376b39bf35b427f0c60446a9e1634b0"
+dependencies = [
+ "ethbloom 0.9.2",
+ "fixed-hash 0.6.1",
+ "impl-rlp 0.2.1",
+ "impl-serde",
+ "primitive-types 0.7.3",
+ "uint 0.8.5",
+]
+
+[[package]]
+name = "ethereum-types"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd"
dependencies = [
- "ethbloom",
- "fixed-hash",
- "impl-rlp",
+ "ethbloom 0.11.0",
+ "fixed-hash 0.7.0",
+ "impl-codec 0.5.0",
+ "impl-rlp 0.3.0",
"impl-serde",
- "primitive-types",
- "uint",
+ "primitive-types 0.9.0",
+ "uint 0.9.0",
]
[[package]]
@@ -2009,12 +2120,87 @@
checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
[[package]]
+name = "evm"
+version = "0.27.0"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
+dependencies = [
+ "environmental",
+ "ethereum",
+ "evm-core",
+ "evm-gasometer",
+ "evm-runtime",
+ "log",
+ "parity-scale-codec 2.1.3",
+ "primitive-types 0.9.0",
+ "rlp 0.5.0",
+ "serde",
+ "sha3 0.8.2",
+]
+
+[[package]]
+name = "evm-coder"
+version = "0.1.0"
+dependencies = [
+ "ethereum",
+ "evm-coder-macros",
+ "hex",
+ "hex-literal",
+ "primitive-types 0.9.0",
+]
+
+[[package]]
+name = "evm-coder-macros"
+version = "0.1.0"
+dependencies = [
+ "Inflector",
+ "darling",
+ "hex",
+ "proc-macro2",
+ "quote",
+ "sha3 0.9.1",
+ "syn",
+]
+
+[[package]]
+name = "evm-core"
+version = "0.27.1"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
+dependencies = [
+ "funty",
+ "parity-scale-codec 2.1.3",
+ "primitive-types 0.9.0",
+ "serde",
+]
+
+[[package]]
+name = "evm-gasometer"
+version = "0.27.0"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
+dependencies = [
+ "environmental",
+ "evm-core",
+ "evm-runtime",
+ "primitive-types 0.9.0",
+]
+
+[[package]]
+name = "evm-runtime"
+version = "0.27.0"
+source = "git+https://github.com/usetech-llc/evm.git?branch=precompile-output-parachain#e13990a627375f327ca7da3c85d9bdfa0a9e903b"
+dependencies = [
+ "environmental",
+ "evm-core",
+ "primitive-types 0.9.0",
+ "sha3 0.8.2",
+]
+
+[[package]]
name = "exit-future"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
]
[[package]]
@@ -2053,14 +2239,127 @@
[[package]]
name = "fastrand"
-version = "1.4.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca5faf057445ce5c9d4329e382b2ce7ca38550ef3b73a5348362d5f24e0c7fe3"
+checksum = "77b705829d1e87f762c2df6da140b26af5839e1033aa84aa5f56bb688e4e1bdb"
dependencies = [
"instant",
]
[[package]]
+name = "fc-consensus"
+version = "2.0.0-dev"
+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.3",
+ "sc-client-api",
+ "sp-api",
+ "sp-block-builder",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-core",
+ "sp-inherents",
+ "sp-runtime",
+ "sp-timestamp",
+ "substrate-prometheus-endpoint",
+]
+
+[[package]]
+name = "fc-db"
+version = "1.0.0"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
+dependencies = [
+ "kvdb",
+ "kvdb-rocksdb",
+ "parity-scale-codec 2.1.3",
+ "parking_lot 0.11.1",
+ "sp-core",
+ "sp-database",
+ "sp-runtime",
+]
+
+[[package]]
+name = "fc-mapping-sync"
+version = "2.0.0-dev"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
+dependencies = [
+ "fc-consensus",
+ "fc-db",
+ "fp-consensus",
+ "fp-rpc",
+ "futures 0.3.15",
+ "futures-timer 3.0.2",
+ "log",
+ "sc-client-api",
+ "sp-api",
+ "sp-blockchain",
+ "sp-runtime",
+]
+
+[[package]]
+name = "fc-rpc"
+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",
+ "fc-consensus",
+ "fc-db",
+ "fc-rpc-core",
+ "fp-consensus",
+ "fp-evm",
+ "fp-rpc",
+ "fp-storage",
+ "futures 0.3.15",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 14.2.0",
+ "jsonrpc-derive 14.2.2",
+ "jsonrpc-pubsub 15.1.0",
+ "libsecp256k1",
+ "log",
+ "pallet-ethereum",
+ "pallet-evm",
+ "parity-scale-codec 2.1.3",
+ "rand 0.7.3",
+ "rlp 0.5.0",
+ "rustc-hex",
+ "sc-client-api",
+ "sc-network",
+ "sc-rpc",
+ "sc-service",
+ "sha3 0.8.2",
+ "sp-api",
+ "sp-blockchain",
+ "sp-io",
+ "sp-runtime",
+ "sp-storage",
+ "sp-transaction-pool",
+]
+
+[[package]]
+name = "fc-rpc-core"
+version = "1.1.0-dev"
+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",
+ "jsonrpc-core-client 14.2.0",
+ "jsonrpc-derive 14.2.2",
+ "jsonrpc-pubsub 15.1.0",
+ "rustc-hex",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
name = "fdlimit"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2081,27 +2380,39 @@
[[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",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"log",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
]
[[package]]
name = "fixed-hash"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c"
+dependencies = [
+ "byteorder",
+ "rand 0.7.3",
+ "rustc-hex",
+ "static_assertions",
+]
+
+[[package]]
+name = "fixed-hash"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
dependencies = [
"byteorder",
- "rand 0.8.3",
+ "rand 0.8.4",
"rustc-hex",
"static_assertions",
]
@@ -2152,7 +2463,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",
]
[[package]]
@@ -2166,6 +2477,54 @@
]
[[package]]
+name = "fp-consensus"
+version = "1.0.0"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
+dependencies = [
+ "ethereum",
+ "parity-scale-codec 2.1.3",
+ "rlp 0.5.0",
+ "sha3 0.8.2",
+ "sp-core",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
+name = "fp-evm"
+version = "2.0.0"
+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.3",
+ "serde",
+ "sp-core",
+ "sp-std",
+]
+
+[[package]]
+name = "fp-rpc"
+version = "2.0.0"
+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.3",
+ "sp-api",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
+name = "fp-storage"
+version = "1.0.1"
+source = "git+https://github.com/usetech-llc/frontier.git?branch=injected-transactions-parachain#48676fa655fdfb6ceb16fc67d7250d8e618a5843"
+
+[[package]]
name = "frame-benchmarking"
version = "3.1.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
@@ -2174,7 +2533,7 @@
"frame-system",
"linregress",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"paste",
"sp-api",
"sp-io",
@@ -2193,7 +2552,7 @@
"chrono",
"frame-benchmarking",
"handlebars",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-cli",
"sc-client-db",
"sc-executor",
@@ -2214,7 +2573,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
"sp-npos-elections",
"sp-std",
@@ -2227,7 +2586,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -2240,7 +2599,7 @@
version = "13.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-core",
"sp-std",
@@ -2254,10 +2613,10 @@
"bitflags",
"frame-metadata",
"frame-support-procedural",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"log",
"once_cell",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"paste",
"serde",
"smallvec 1.6.1",
@@ -2312,9 +2671,9 @@
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",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -2331,7 +2690,7 @@
"frame-benchmarking",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-runtime",
"sp-std",
@@ -2342,7 +2701,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",
]
@@ -2352,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",
@@ -2360,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"
@@ -2372,7 +2731,7 @@
dependencies = [
"lazy_static",
"libc",
- "libloading",
+ "libloading 0.5.2",
"winapi 0.3.9",
]
@@ -2422,9 +2781,9 @@
[[package]]
name = "futures"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9d5813545e459ad3ca1bff9915e9ad7f1a47dc6a91b627ce321d5863b7dd253"
+checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27"
dependencies = [
"futures-channel",
"futures-core",
@@ -2437,9 +2796,9 @@
[[package]]
name = "futures-channel"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce79c6a52a299137a6013061e0cf0e688fce5d7f1bc60125f520912fdb29ec25"
+checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2"
dependencies = [
"futures-core",
"futures-sink",
@@ -2447,9 +2806,9 @@
[[package]]
name = "futures-core"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "098cd1c6dda6ca01650f1a37a794245eb73181d0d4d4e955e2f3c37db7af1815"
+checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1"
[[package]]
name = "futures-cpupool"
@@ -2468,7 +2827,7 @@
checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9"
dependencies = [
"futures 0.1.31",
- "futures 0.3.14",
+ "futures 0.3.15",
"lazy_static",
"log",
"parking_lot 0.9.0",
@@ -2479,9 +2838,9 @@
[[package]]
name = "futures-executor"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10f6cb7042eda00f0049b1d2080aa4b93442997ee507eb3828e8bd7577f94c9d"
+checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79"
dependencies = [
"futures-core",
"futures-task",
@@ -2491,15 +2850,15 @@
[[package]]
name = "futures-io"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "365a1a1fb30ea1c03a830fdb2158f5236833ac81fa0ad12fe35b29cddc35cb04"
+checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1"
[[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",
@@ -2512,10 +2871,11 @@
[[package]]
name = "futures-macro"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b"
+checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121"
dependencies = [
+ "autocfg",
"proc-macro-hack",
"proc-macro2",
"quote",
@@ -2529,21 +2889,21 @@
checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b"
dependencies = [
"futures-io",
- "rustls 0.19.0",
+ "rustls 0.19.1",
"webpki",
]
[[package]]
name = "futures-sink"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c5629433c555de3d82861a7a4e3794a4c40040390907cfbfd7143a92a426c23"
+checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282"
[[package]]
name = "futures-task"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba7aa51095076f3ba6d9a1f702f74bd05ec65f555d70d2033d55ba8d69f581bc"
+checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae"
[[package]]
name = "futures-timer"
@@ -2559,10 +2919,11 @@
[[package]]
name = "futures-util"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c144ad54d60f23927f0a6b6d816e4271278b64f005ad65e4e35291d2de9c025"
+checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967"
dependencies = [
+ "autocfg",
"futures 0.1.31",
"futures-channel",
"futures-core",
@@ -2595,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"
@@ -2625,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",
@@ -2656,6 +3008,12 @@
]
[[package]]
+name = "gimli"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
+
+[[package]]
name = "glob"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2663,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",
@@ -2765,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",
]
@@ -2887,9 +3245,9 @@
[[package]]
name = "httparse"
-version = "1.3.6"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589"
+checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68"
[[package]]
name = "httpdate"
@@ -2958,7 +3316,7 @@
"httparse",
"httpdate",
"itoa",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"socket2 0.3.19",
"tokio 0.2.25",
"tower-service",
@@ -2985,6 +3343,12 @@
]
[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
name = "idna"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2997,9 +3361,9 @@
[[package]]
name = "idna"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21"
+checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
dependencies = [
"matches",
"unicode-bidi",
@@ -3029,12 +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",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-lite",
"if-addrs",
"ipnet",
@@ -3045,11 +3409,29 @@
[[package]]
name = "impl-codec"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53"
+dependencies = [
+ "parity-scale-codec 1.3.7",
+]
+
+[[package]]
+name = "impl-codec"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df170efa359aebdd5cb7fe78edcc67107748e4737bdca8a8fb40d15ea7a877ed"
dependencies = [
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
+]
+
+[[package]]
+name = "impl-rlp"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5"
+dependencies = [
+ "rlp 0.4.6",
]
[[package]]
@@ -3058,7 +3440,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808"
dependencies = [
- "rlp",
+ "rlp 0.5.0",
]
[[package]]
@@ -3072,6 +3454,17 @@
[[package]]
name = "impl-trait-for-tuples"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "impl-trait-for-tuples"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee"
@@ -3122,7 +3515,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 2.0.2",
]
@@ -3155,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"
@@ -3170,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",
]
@@ -3185,32 +3578,48 @@
[[package]]
name = "jobserver"
-version = "0.1.21"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
+checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
-version = "0.3.50"
+version = "0.3.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c"
+checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "jsonrpc-client-transports"
+version = "14.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2773fa94a2a1fd51efb89a8f45b8861023dbb415d18d3c9235ae9388d780f9ec"
+dependencies = [
+ "failure",
+ "futures 0.1.31",
+ "jsonrpc-core 14.2.0",
+ "jsonrpc-pubsub 14.2.0",
+ "log",
+ "serde",
+ "serde_json",
+ "url 1.7.2",
+]
+
+[[package]]
+name = "jsonrpc-client-transports"
version = "15.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "489b9c612e60c766f751ab40fcb43cbb55a1e10bb44a9b4307ed510ca598cbd7"
dependencies = [
"failure",
"futures 0.1.31",
- "jsonrpc-core",
- "jsonrpc-pubsub",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-pubsub 15.1.0",
"log",
"serde",
"serde_json",
@@ -3219,6 +3628,19 @@
[[package]]
name = "jsonrpc-core"
+version = "14.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62"
+dependencies = [
+ "futures 0.1.31",
+ "log",
+ "serde",
+ "serde_derive",
+ "serde_json",
+]
+
+[[package]]
+name = "jsonrpc-core"
version = "15.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa"
@@ -3232,15 +3654,36 @@
[[package]]
name = "jsonrpc-core-client"
+version = "14.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34221123bc79b66279a3fde2d3363553835b43092d629b34f2e760c44dc94713"
+dependencies = [
+ "jsonrpc-client-transports 14.2.1",
+]
+
+[[package]]
+name = "jsonrpc-core-client"
version = "15.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f764902d7b891344a0acb65625f32f6f7c6db006952143bd650209fbe7d94db"
dependencies = [
- "jsonrpc-client-transports",
+ "jsonrpc-client-transports 15.1.0",
]
[[package]]
name = "jsonrpc-derive"
+version = "14.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0e77e8812f02155b85a677a96e1d16b60181950c0636199bc4528524fba98dc"
+dependencies = [
+ "proc-macro-crate 0.1.5",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "jsonrpc-derive"
version = "15.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3"
@@ -3258,7 +3701,7 @@
checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7"
dependencies = [
"hyper 0.12.36",
- "jsonrpc-core",
+ "jsonrpc-core 15.1.0",
"jsonrpc-server-utils",
"log",
"net2",
@@ -3272,7 +3715,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf50e53e4eea8f421a7316c5f63e395f7bc7c4e786a6dc54d76fab6ff7aa7ce7"
dependencies = [
- "jsonrpc-core",
+ "jsonrpc-core 15.1.0",
"jsonrpc-server-utils",
"log",
"parity-tokio-ipc",
@@ -3282,11 +3725,24 @@
[[package]]
name = "jsonrpc-pubsub"
+version = "14.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d44f5602a11d657946aac09357956d2841299ed422035edf140c552cb057986"
+dependencies = [
+ "jsonrpc-core 14.2.0",
+ "log",
+ "parking_lot 0.10.2",
+ "rand 0.7.3",
+ "serde",
+]
+
+[[package]]
+name = "jsonrpc-pubsub"
version = "15.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77"
dependencies = [
- "jsonrpc-core",
+ "jsonrpc-core 15.1.0",
"log",
"parking_lot 0.10.2",
"rand 0.7.3",
@@ -3301,7 +3757,7 @@
dependencies = [
"bytes 0.4.12",
"globset",
- "jsonrpc-core",
+ "jsonrpc-core 15.1.0",
"lazy_static",
"log",
"tokio 0.1.22",
@@ -3315,7 +3771,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22"
dependencies = [
- "jsonrpc-core",
+ "jsonrpc-core 15.1.0",
"jsonrpc-server-utils",
"log",
"parity-ws",
@@ -3339,7 +3795,7 @@
"serde",
"serde_json",
"thiserror",
- "url 2.2.1",
+ "url 2.2.2",
]
[[package]]
@@ -3404,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",
@@ -3446,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",
@@ -3509,9 +3965,9 @@
[[package]]
name = "kvdb-rocksdb"
-version = "0.11.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34446c373ccc494c2124439281c198c7636ccdc2752c06722bbffd56d459c1e4"
+checksum = "94b27cdb788bf1c8ade782289f9dbee626940be2961fd75c7cde993fa2f1ded1"
dependencies = [
"fs-swap",
"kvdb",
@@ -3545,9 +4001,9 @@
[[package]]
name = "libc"
-version = "0.2.93"
+version = "0.2.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41"
+checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
[[package]]
name = "libloading"
@@ -3560,6 +4016,16 @@
]
[[package]]
+name = "libloading"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a"
+dependencies = [
+ "cfg-if 1.0.0",
+ "winapi 0.3.9",
+]
+
+[[package]]
name = "libm"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3573,7 +4039,7 @@
dependencies = [
"atomic",
"bytes 1.0.1",
- "futures 0.3.14",
+ "futures 0.3.15",
"lazy_static",
"libp2p-core",
"libp2p-deflate",
@@ -3599,23 +4065,23 @@
"libp2p-yamux",
"parity-multiaddr",
"parking_lot 0.11.1",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"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",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"lazy_static",
"libsecp256k1",
@@ -3624,13 +4090,13 @@
"multistream-select",
"parity-multiaddr",
"parking_lot 0.11.1",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"prost",
"prost-build",
"rand 0.7.3",
"ring",
"rw-stream-sink",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"smallvec 1.6.1",
"thiserror",
"unsigned-varint 0.7.0",
@@ -3645,7 +4111,7 @@
checksum = "a2181a641cd15f9b6ba71b1335800f309012a0a97a29ffaabbbf40e9d3d58f08"
dependencies = [
"flate2",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
]
@@ -3656,7 +4122,7 @@
checksum = "62e63dab8b5ff35e0c101a3e51e843ba782c07bbb1682f5fd827622e0d02b98b"
dependencies = [
"async-std-resolver",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"log",
"smallvec 1.6.1",
@@ -3671,7 +4137,7 @@
dependencies = [
"cuckoofilter",
"fnv",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -3692,7 +4158,7 @@
"byteorder",
"bytes 1.0.1",
"fnv",
- "futures 0.3.14",
+ "futures 0.3.15",
"hex_fmt",
"libp2p-core",
"libp2p-swarm",
@@ -3701,7 +4167,7 @@
"prost-build",
"rand 0.7.3",
"regex",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"smallvec 1.6.1",
"unsigned-varint 0.7.0",
"wasm-timer",
@@ -3713,7 +4179,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f668f00efd9883e8b7bcc582eaf0164615792608f886f6577da18bcbeea0a46"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -3734,16 +4200,16 @@
"bytes 1.0.1",
"either",
"fnv",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"libp2p-swarm",
"log",
"prost",
"prost-build",
"rand 0.7.3",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"smallvec 1.6.1",
- "uint",
+ "uint 0.9.0",
"unsigned-varint 0.7.0",
"void",
"wasm-timer",
@@ -3751,20 +4217,20 @@
[[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",
- "futures 0.3.14",
+ "futures 0.3.15",
"if-watch",
"lazy_static",
"libp2p-core",
"libp2p-swarm",
"log",
- "rand 0.8.3",
+ "rand 0.8.4",
"smallvec 1.6.1",
"socket2 0.4.0",
"void",
@@ -3778,7 +4244,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"log",
"nohash-hasher",
@@ -3796,14 +4262,14 @@
dependencies = [
"bytes 1.0.1",
"curve25519-dalek 3.1.0",
- "futures 0.3.14",
+ "futures 0.3.15",
"lazy_static",
"libp2p-core",
"log",
"prost",
"prost-build",
"rand 0.7.3",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"snow",
"static_assertions",
"x25519-dalek",
@@ -3816,7 +4282,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf4bfaffac63bf3c7ec11ed9d8879d455966ddea7e78ee14737f0b6dce0d1cd1"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -3833,7 +4299,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"log",
"prost",
@@ -3848,12 +4314,12 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"log",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"rand 0.7.3",
"salsa20",
- "sha3",
+ "sha3 0.9.1",
]
[[package]]
@@ -3864,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",
@@ -3887,7 +4353,7 @@
dependencies = [
"async-trait",
"bytes 1.0.1",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -3906,7 +4372,7 @@
checksum = "1e04d8e1eef675029ec728ba14e8d0da7975d84b6679b699b4ae91a1de9c3a92"
dependencies = [
"either",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"log",
"rand 0.7.3",
@@ -3932,7 +4398,7 @@
checksum = "2b1a27d21c477951799e99d5c105d78868258502ce092988040a808d5a19bbd9"
dependencies = [
"async-io",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"if-watch",
"ipnet",
@@ -3949,18 +4415,18 @@
checksum = "ffd6564bb3b7ff203661ccbb69003c2b551e34cef974f2d6c6a28306a12170b5"
dependencies = [
"async-std",
- "futures 0.3.14",
+ "futures 0.3.15",
"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 = [
- "futures 0.3.14",
+ "futures 0.3.15",
"js-sys",
"libp2p-core",
"parity-send-wrapper",
@@ -3975,14 +4441,14 @@
checksum = "cace60995ef6f637e4752cccbb2590f6bc358e8741a0d066307636c69a4b3a74"
dependencies = [
"either",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-rustls",
"libp2p-core",
"log",
"quicksink",
"rw-stream-sink",
"soketto",
- "url 2.2.1",
+ "url 2.2.2",
"webpki-roots",
]
@@ -3992,7 +4458,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f35da42cfc6d5cb0dcf3ad6881bc68d146cdf38f98655e09e33fbba4d13eabc4"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p-core",
"parking_lot 0.11.1",
"thiserror",
@@ -4001,9 +4467,9 @@
[[package]]
name = "librocksdb-sys"
-version = "6.11.4"
+version = "6.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb5b56f651c204634b936be2f92dbb42c36867e00ff7fe2405591f3b9fa66f09"
+checksum = "5da125e1c0f22c7cae785982115523a0738728498547f415c9054cb17c7e89f9"
dependencies = [
"bindgen",
"cc",
@@ -4029,9 +4495,9 @@
[[package]]
name = "libz-sys"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
+checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
dependencies = [
"cc",
"pkg-config",
@@ -4055,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",
]
@@ -4074,9 +4540,9 @@
[[package]]
name = "lock_api"
-version = "0.4.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3c91c24eae6777794bb1997ad98bbb87daf92890acab859f7eaa4320333176"
+checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb"
dependencies = [
"scopeguard",
]
@@ -4147,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"
@@ -4171,15 +4628,15 @@
[[package]]
name = "memchr"
-version = "2.3.4"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
+checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
[[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",
]
@@ -4195,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",
]
@@ -4246,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",
]
@@ -4256,7 +4713,7 @@
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",
]
@@ -4395,18 +4852,18 @@
"digest 0.9.0",
"generic-array 0.14.4",
"multihash-derive",
- "sha2 0.9.3",
- "sha3",
+ "sha2 0.9.5",
+ "sha3 0.9.1",
"unsigned-varint 0.5.1",
]
[[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",
@@ -4427,65 +4884,64 @@
checksum = "7d91ec0a2440aaff5f78ec35631a7027d50386c6163aa975f7caa0d5da4b6ff8"
dependencies = [
"bytes 1.0.1",
- "futures 0.3.14",
+ "futures 0.3.15",
"log",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"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",
+ "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",
+ "simba 0.5.1",
"typenum",
]
[[package]]
-name = "names"
-version = "0.11.0"
+name = "nalgebra-macros"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da"
+checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218"
dependencies = [
- "rand 0.3.23",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
-name = "nb-connect"
-version = "1.1.0"
+name = "names"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a19900e7eee95eb2b3c2e26d12a874cc80aaf750e31be6fcbe743ead369fa45d"
+checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da"
dependencies = [
- "libc",
- "socket2 0.4.0",
+ "rand 0.3.23",
]
[[package]]
@@ -4511,18 +4967,27 @@
"cumulus-client-service",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
+ "fc-consensus",
+ "fc-db",
+ "fc-mapping-sync",
+ "fc-rpc",
+ "fc-rpc-core",
"flexi_logger",
+ "fp-rpc",
"frame-benchmarking",
"frame-benchmarking-cli",
- "futures 0.3.14",
- "jsonrpc-core",
+ "futures 0.3.15",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-pubsub 15.1.0",
"log",
"nft-data-structs",
+ "nft-rpc",
"nft-runtime",
"pallet-contracts",
"pallet-contracts-rpc",
+ "pallet-ethereum",
"pallet-transaction-payment-rpc",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"polkadot-cli",
"polkadot-parachain",
@@ -4575,13 +5040,58 @@
"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 = [
@@ -4592,6 +5102,7 @@
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-utility",
+ "fp-rpc",
"frame-benchmarking",
"frame-executive",
"frame-support",
@@ -4605,6 +5116,8 @@
"pallet-contracts",
"pallet-contracts-primitives",
"pallet-contracts-rpc-runtime-api",
+ "pallet-ethereum",
+ "pallet-evm",
"pallet-inflation",
"pallet-nft",
"pallet-nft-charge-transaction",
@@ -4619,7 +5132,7 @@
"pallet-vesting",
"pallet-xcm",
"parachain-info",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"polkadot-parachain",
"serde",
"smallvec 1.6.1",
@@ -4677,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",
]
@@ -4728,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"
@@ -4758,10 +5281,19 @@
]
[[package]]
+name = "object"
+version = "0.25.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
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",
]
@@ -4780,9 +5312,9 @@
[[package]]
name = "openssl-probe"
-version = "0.1.2"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
+checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
[[package]]
name = "ordered-float"
@@ -4811,7 +5343,7 @@
"frame-system",
"pallet-session",
"pallet-timestamp",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-consensus-aura",
"sp-runtime",
@@ -4826,7 +5358,7 @@
"frame-support",
"frame-system",
"pallet-session",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-authority-discovery",
"sp-runtime",
@@ -4840,8 +5372,8 @@
dependencies = [
"frame-support",
"frame-system",
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"sp-authorship",
"sp-runtime",
"sp-std",
@@ -4859,7 +5391,7 @@
"pallet-authorship",
"pallet-session",
"pallet-timestamp",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-consensus-babe",
"sp-consensus-vrf",
@@ -4879,7 +5411,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-runtime",
"sp-std",
]
@@ -4893,7 +5425,7 @@
"frame-support",
"frame-system",
"pallet-session",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -4907,7 +5439,7 @@
"frame-support",
"frame-system",
"pallet-treasury",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-runtime",
"sp-std",
]
@@ -4925,7 +5457,7 @@
"frame-system",
"log",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-finality-grandpa",
"sp-runtime",
@@ -4941,7 +5473,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -4958,7 +5490,7 @@
"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",
@@ -4977,7 +5509,7 @@
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",
"sp-runtime",
@@ -4999,12 +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",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-blockchain",
@@ -5019,7 +5551,7 @@
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",
"sp-runtime",
"sp-std",
@@ -5033,7 +5565,7 @@
"frame-benchmarking",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-io",
"sp-runtime",
@@ -5049,7 +5581,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
"sp-core",
"sp-io",
@@ -5067,7 +5599,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-npos-elections",
@@ -5076,6 +5608,60 @@
]
[[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"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
@@ -5083,7 +5669,7 @@
"frame-benchmarking",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-arithmetic",
"sp-runtime",
"sp-std",
@@ -5100,7 +5686,7 @@
"log",
"pallet-authorship",
"pallet-session",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-core",
"sp-finality-grandpa",
@@ -5119,7 +5705,7 @@
"frame-benchmarking",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -5134,7 +5720,7 @@
"frame-system",
"log",
"pallet-authorship",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-application-crypto",
"sp-core",
"sp-io",
@@ -5150,7 +5736,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-keyring",
@@ -5168,7 +5754,7 @@
"pallet-balances",
"pallet-randomness-collective-flip",
"pallet-timestamp",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-core",
"sp-io",
@@ -5185,7 +5771,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -5201,7 +5787,7 @@
"frame-support",
"frame-system",
"pallet-mmr-primitives",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -5216,7 +5802,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-core",
@@ -5229,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",
@@ -5249,7 +5835,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -5260,17 +5846,27 @@
name = "pallet-nft"
version = "3.0.0"
dependencies = [
+ "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",
@@ -5292,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",
@@ -5314,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",
@@ -5329,7 +5925,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -5344,7 +5940,7 @@
"frame-system",
"log",
"pallet-balances",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-staking",
@@ -5358,7 +5954,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -5372,7 +5968,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"safe-mix",
"sp-runtime",
"sp-std",
@@ -5386,7 +5982,7 @@
"enumflags2",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -5404,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",
@@ -5422,7 +6018,7 @@
"frame-support",
"frame-system",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -5435,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",
@@ -5454,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",
@@ -5471,7 +6067,7 @@
"log",
"pallet-authorship",
"pallet-session",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"paste",
"serde",
"sp-application-crypto",
@@ -5509,7 +6105,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-io",
"sp-runtime",
"sp-std",
@@ -5523,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",
@@ -5541,7 +6137,7 @@
"frame-support",
"frame-system",
"pallet-treasury",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -5554,7 +6150,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"smallvec 1.6.1",
"sp-core",
@@ -5568,11 +6164,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-transaction-payment-rpc-runtime-api",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-blockchain",
"sp-core",
@@ -5586,7 +6182,7 @@
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",
]
@@ -5598,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",
@@ -5613,7 +6209,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-io",
"sp-runtime",
@@ -5628,7 +6224,7 @@
"enumflags2",
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-runtime",
"sp-std",
]
@@ -5640,7 +6236,7 @@
dependencies = [
"frame-support",
"frame-system",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -5656,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",
@@ -5674,7 +6270,7 @@
"log",
"memmap2",
"parking_lot 0.11.1",
- "rand 0.8.3",
+ "rand 0.8.4",
]
[[package]]
@@ -5692,29 +6288,41 @@
"serde",
"static_assertions",
"unsigned-varint 0.7.0",
- "url 2.2.1",
+ "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"
+version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0f518afaa5a47d0d6386229b0a6e01e86427291d643aa4cabb4992219f504f8"
+checksum = "b310f220c335f9df1b3d2e9fbe3890bbfeef5030dad771620f48c5c229877cd3"
dependencies = [
- "arrayvec 0.7.0",
- "bitvec",
- "byte-slice-cast",
+ "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",
@@ -5752,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",
]
@@ -5810,7 +6418,7 @@
"rand 0.7.3",
"sha-1 0.8.2",
"slab",
- "url 2.2.1",
+ "url 2.2.2",
]
[[package]]
@@ -5847,7 +6455,7 @@
checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
dependencies = [
"instant",
- "lock_api 0.4.3",
+ "lock_api 0.4.4",
"parking_lot_core 0.8.3",
]
@@ -5889,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",
]
@@ -6007,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]]
@@ -6027,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",
@@ -6071,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",
@@ -6085,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",
@@ -6098,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",
@@ -6108,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",
@@ -6121,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",
]
@@ -6141,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",
@@ -6161,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",
@@ -6180,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",
@@ -6192,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",
@@ -6206,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",
@@ -6222,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",
@@ -6241,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",
@@ -6259,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",
@@ -6288,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",
@@ -6308,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",
@@ -6326,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",
@@ -6341,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",
@@ -6357,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",
@@ -6374,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",
@@ -6388,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",
@@ -6405,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",
@@ -6424,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",
@@ -6448,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",
@@ -6470,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",
@@ -6484,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",
@@ -6499,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",
@@ -6524,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",
@@ -6552,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",
@@ -6580,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",
@@ -6598,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",
@@ -6612,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",
@@ -6665,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",
@@ -6697,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",
@@ -6735,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",
@@ -6767,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",
@@ -6784,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",
@@ -6808,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",
@@ -6821,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",
@@ -6849,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",
@@ -6938,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",
@@ -6958,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",
]
@@ -6969,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",
@@ -6994,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",
@@ -7028,7 +7636,7 @@
"frame-benchmarking",
"frame-system",
"futures 0.1.31",
- "futures 0.3.14",
+ "futures 0.3.15",
"hex",
"pallet-balances",
"pallet-staking",
@@ -7043,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",
@@ -7074,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",
]
@@ -7091,7 +7699,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8"
dependencies = [
- "cpuid-bool 0.2.0",
+ "cpuid-bool",
"universal-hash",
]
@@ -7101,7 +7709,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd"
dependencies = [
- "cpuid-bool 0.2.0",
+ "cpuid-bool",
"opaque-debug 0.3.0",
"universal-hash",
]
@@ -7114,15 +7722,28 @@
[[package]]
name = "primitive-types"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809"
+dependencies = [
+ "fixed-hash 0.6.1",
+ "impl-codec 0.4.2",
+ "impl-rlp 0.2.1",
+ "impl-serde",
+ "uint 0.8.5",
+]
+
+[[package]]
+name = "primitive-types"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace"
dependencies = [
- "fixed-hash",
- "impl-codec",
- "impl-rlp",
+ "fixed-hash 0.7.0",
+ "impl-codec 0.5.0",
+ "impl-rlp 0.3.0",
"impl-serde",
- "uint",
+ "uint 0.9.0",
]
[[package]]
@@ -7182,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",
]
@@ -7228,7 +7849,7 @@
"prost",
"prost-types",
"tempfile",
- "which 4.1.0",
+ "which",
]
[[package]]
@@ -7256,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",
]
@@ -7319,6 +7940,12 @@
[[package]]
name = "radium"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac"
+
+[[package]]
+name = "radium"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb"
@@ -7362,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]]
@@ -7384,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]]
@@ -7418,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]]
@@ -7445,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]]
@@ -7469,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",
@@ -7481,13 +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",
- "crossbeam-utils 0.8.3",
+ "crossbeam-utils 0.8.5",
"lazy_static",
"num_cpus",
]
@@ -7509,32 +8137,21 @@
[[package]]
name = "redox_syscall"
-version = "0.2.6"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8270314b5ccceb518e7e578952f0b72b88222d02e8f77f5ecf7abbb673539041"
+checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee"
dependencies = [
"bitflags",
]
[[package]]
name = "redox_users"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
-dependencies = [
- "getrandom 0.1.16",
- "redox_syscall 0.1.57",
- "rust-argon2",
-]
-
-[[package]]
-name = "redox_users"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
- "getrandom 0.2.2",
- "redox_syscall 0.2.6",
+ "getrandom 0.2.3",
+ "redox_syscall 0.2.9",
]
[[package]]
@@ -7545,7 +8162,7 @@
dependencies = [
"derive_more",
"fs-err",
- "itertools 0.10.0",
+ "itertools 0.10.1",
"static_init",
"thiserror",
]
@@ -7584,9 +8201,9 @@
[[package]]
name = "regex"
-version = "1.4.5"
+version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19"
+checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
dependencies = [
"aho-corasick",
"memchr",
@@ -7595,19 +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"
-version = "0.6.23"
+version = "0.6.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548"
+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
[[package]]
name = "region"
@@ -7626,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",
@@ -7658,9 +8274,9 @@
[[package]]
name = "retain_mut"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53552c6c49e1e13f1a203ef0080ab3bbef0beb570a528993e83df057a9d9bba1"
+checksum = "e9c17925a9027d298a4603d286befe3f9dc0e8ed02523141914eb628798d6e5b"
[[package]]
name = "ring"
@@ -7679,6 +8295,15 @@
[[package]]
name = "rlp"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1190dcc8c3a512f1eef5d09bb8c84c7f39e1054e174d1795482e18f5272f2e73"
+dependencies = [
+ "rustc-hex",
+]
+
+[[package]]
+name = "rlp"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e54369147e3e7796c9b885c7304db87ca3d09a0a98f72843d532868675bbfba8"
@@ -7688,10 +8313,21 @@
]
[[package]]
+name = "rlp-derive"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "rocksdb"
-version = "0.15.0"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6"
+checksum = "c749134fda8bfc90d0de643d59bfc841dcb3ac8a1062e12b6754bd60235c48b3"
dependencies = [
"libc",
"librocksdb-sys",
@@ -7735,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",
@@ -7771,25 +8407,13 @@
dependencies = [
"libc",
"winapi 0.3.9",
-]
-
-[[package]]
-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]]
name = "rustc-demangle"
-version = "0.1.18"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232"
+checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce"
[[package]]
name = "rustc-hash"
@@ -7827,9 +8451,9 @@
[[package]]
name = "rustls"
-version = "0.19.0"
+version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b"
+checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
dependencies = [
"base64 0.13.0",
"log",
@@ -7866,7 +8490,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"pin-project 0.4.28",
"static_assertions",
]
@@ -7912,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",
@@ -7938,10 +8562,10 @@
version = "0.9.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-block-builder",
"sc-client-api",
"sc-proposer-metrics",
@@ -7961,7 +8585,7 @@
version = "0.9.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",
"sc-client-api",
"sp-api",
"sp-block-builder",
@@ -7977,8 +8601,8 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"sc-chain-spec-derive",
"sc-consensus-babe",
"sc-consensus-epochs",
@@ -8011,12 +8635,12 @@
dependencies = [
"chrono",
"fdlimit",
- "futures 0.3.14",
+ "futures 0.3.15",
"hex",
"libp2p",
"log",
"names",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"rand 0.7.3",
"regex",
"rpassword",
@@ -8049,12 +8673,12 @@
dependencies = [
"derive_more",
"fnv",
- "futures 0.3.14",
+ "futures 0.3.15",
"hash-db",
"kvdb",
"lazy_static",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sc-executor",
"sp-api",
@@ -8089,7 +8713,7 @@
"linked-hash-map",
"log",
"parity-db",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
"sc-client-api",
@@ -8125,10 +8749,10 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-block-builder",
"sc-client-api",
"sc-consensus-slots",
@@ -8157,14 +8781,14 @@
"async-trait",
"derive_more",
"fork-tree",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"log",
"merlin",
"num-bigint",
"num-rational 0.2.4",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"pdqselect",
"rand 0.7.3",
@@ -8201,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",
@@ -8225,7 +8849,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"fork-tree",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-consensus",
"sp-blockchain",
@@ -8238,11 +8862,11 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-telemetry",
"sp-api",
@@ -8280,7 +8904,7 @@
"lazy_static",
"libsecp256k1",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-wasm 0.41.0",
"parking_lot 0.11.1",
"sc-executor-common",
@@ -8306,7 +8930,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"derive_more",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-wasm 0.41.0",
"pwasm-utils 0.14.0",
"sp-allocator",
@@ -8324,7 +8948,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-executor-common",
"sp-allocator",
"sp-core",
@@ -8339,7 +8963,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-wasm 0.41.0",
"pwasm-utils 0.14.0",
"sc-executor-common",
@@ -8361,13 +8985,13 @@
"dyn-clone",
"finality-grandpa",
"fork-tree",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"linked-hash-map",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"rand 0.7.3",
"sc-block-builder",
"sc-client-api",
@@ -8398,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",
@@ -8421,10 +9045,10 @@
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",
"sc-client-api",
@@ -8442,7 +9066,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"ansi_term 0.12.1",
- "futures 0.3.14",
+ "futures 0.3.15",
"log",
"parity-util-mem",
"sc-client-api",
@@ -8461,7 +9085,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-util",
"hex",
"merlin",
@@ -8481,7 +9105,7 @@
dependencies = [
"hash-db",
"lazy_static",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sc-client-api",
"sc-executor",
@@ -8510,7 +9134,7 @@
"erased-serde",
"fnv",
"fork-tree",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"hex",
"ip_network",
@@ -8520,9 +9144,9 @@
"log",
"lru",
"nohash-hasher",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"prost",
"prost-build",
"rand 0.7.3",
@@ -8551,7 +9175,7 @@
version = "0.9.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"libp2p",
"log",
@@ -8570,14 +9194,14 @@
dependencies = [
"bytes 0.5.6",
"fnv",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"hex",
"hyper 0.13.10",
"hyper-rustls",
"log",
"num_cpus",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"rand 0.7.3",
"sc-client-api",
@@ -8596,7 +9220,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",
"libp2p",
"log",
"serde_json",
@@ -8618,12 +9242,12 @@
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",
"hash-db",
- "jsonrpc-core",
- "jsonrpc-pubsub",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-pubsub 15.1.0",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sc-block-builder",
"sc-client-api",
@@ -8654,13 +9278,13 @@
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",
+ "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",
"parking_lot 0.11.1",
"serde",
"serde_json",
@@ -8679,10 +9303,10 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"futures 0.1.31",
- "jsonrpc-core",
+ "jsonrpc-core 15.1.0",
"jsonrpc-http-server",
"jsonrpc-ipc-server",
- "jsonrpc-pubsub",
+ "jsonrpc-pubsub 15.1.0",
"jsonrpc-ws-server",
"log",
"serde",
@@ -8700,17 +9324,17 @@
"directories",
"exit-future",
"futures 0.1.31",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"hash-db",
- "jsonrpc-core",
- "jsonrpc-pubsub",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-pubsub 15.1.0",
"lazy_static",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"rand 0.7.3",
"sc-block-builder",
"sc-chain-spec",
@@ -8761,7 +9385,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parity-util-mem-derive",
"parking_lot 0.11.1",
@@ -8775,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",
@@ -8796,11 +9420,11 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"chrono",
- "futures 0.3.14",
+ "futures 0.3.15",
"libp2p",
"log",
"parking_lot 0.11.1",
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"rand 0.7.3",
"serde",
"serde_json",
@@ -8864,7 +9488,7 @@
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",
"linked-hash-map",
"log",
"parity-util-mem",
@@ -8885,11 +9509,11 @@
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",
"futures-diagnose",
"intervalier",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
"sc-client-api",
@@ -8978,6 +9602,24 @@
]
[[package]]
+name = "secp256k1"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6179428c22c73ac0fbb7b5579a56353ce78ba29759b3b8575183336ea74cdfb"
+dependencies = [
+ "secp256k1-sys",
+]
+
+[[package]]
+name = "secp256k1-sys"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11553d210db090930f4432bea123b31f70bbf693ace14504ea2a35e796c28dd2"
+dependencies = [
+ "cc",
+]
+
+[[package]]
name = "secrecy"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9054,18 +9696,18 @@
[[package]]
name = "serde"
-version = "1.0.125"
+version = "1.0.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171"
+checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.125"
+version = "1.0.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d"
+checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
dependencies = [
"proc-macro2",
"quote",
@@ -9097,13 +9739,13 @@
[[package]]
name = "sha-1"
-version = "0.9.4"
+version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfebf75d25bd900fd1e7d11501efab59bc846dbc76196839663e6637bba9f25f"
+checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16"
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
- "cpuid-bool 0.1.2",
+ "cpufeatures",
"digest 0.9.0",
"opaque-debug 0.3.0",
]
@@ -9122,19 +9764,32 @@
[[package]]
name = "sha2"
-version = "0.9.3"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de"
+checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12"
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
- "cpuid-bool 0.1.2",
+ "cpufeatures",
"digest 0.9.0",
"opaque-debug 0.3.0",
]
[[package]]
name = "sha3"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf"
+dependencies = [
+ "block-buffer 0.7.3",
+ "byte-tools",
+ "digest 0.8.1",
+ "keccak",
+ "opaque-debug 0.2.3",
+]
+
+[[package]]
+name = "sha3"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809"
@@ -9162,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",
@@ -9172,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",
]
@@ -9198,10 +9853,22 @@
]
[[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.2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
+checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527"
[[package]]
name = "slog"
@@ -9218,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",
@@ -9261,7 +9928,7 @@
"rand_core 0.5.1",
"ring",
"rustc_version",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"subtle 2.4.0",
"x25519-dalek",
]
@@ -9296,11 +9963,11 @@
"base64 0.12.3",
"bytes 0.5.6",
"flate2",
- "futures 0.3.14",
+ "futures 0.3.15",
"httparse",
"log",
"rand 0.7.3",
- "sha-1 0.9.4",
+ "sha-1 0.9.6",
]
[[package]]
@@ -9322,7 +9989,7 @@
dependencies = [
"hash-db",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api-proc-macro",
"sp-core",
"sp-runtime",
@@ -9349,7 +10016,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-core",
"sp-io",
@@ -9363,7 +10030,7 @@
dependencies = [
"integer-sqrt",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-debug-derive",
"sp-std",
@@ -9375,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",
@@ -9388,7 +10055,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-inherents",
"sp-runtime",
"sp-std",
@@ -9399,7 +10066,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-inherents",
"sp-runtime",
@@ -9411,10 +10078,10 @@
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",
"log",
"lru",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sp-api",
"sp-consensus",
@@ -9439,11 +10106,11 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "futures 0.3.14",
+ "futures 0.3.15",
"futures-timer 3.0.2",
"libp2p",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"serde",
"sp-api",
@@ -9466,7 +10133,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-application-crypto",
"sp-consensus",
@@ -9484,7 +10151,7 @@
dependencies = [
"async-trait",
"merlin",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-application-crypto",
@@ -9504,7 +10171,7 @@
version = "0.9.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-arithmetic",
"sp-runtime",
]
@@ -9514,7 +10181,7 @@
version = "0.9.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",
"schnorrkel",
"sp-core",
"sp-runtime",
@@ -9531,7 +10198,7 @@
"byteorder",
"dyn-clonable",
"ed25519-dalek",
- "futures 0.3.14",
+ "futures 0.3.15",
"hash-db",
"hash256-std-hasher",
"hex",
@@ -9541,16 +10208,16 @@
"log",
"merlin",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"parking_lot 0.11.1",
- "primitive-types",
+ "primitive-types 0.9.0",
"rand 0.7.3",
"regex",
"schnorrkel",
"secrecy",
"serde",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"sp-debug-derive",
"sp-externalities",
"sp-runtime-interface",
@@ -9590,7 +10257,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"environmental",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-std",
"sp-storage",
]
@@ -9602,7 +10269,7 @@
dependencies = [
"finality-grandpa",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-application-crypto",
@@ -9618,8 +10285,8 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"async-trait",
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-runtime",
"sp-std",
@@ -9631,11 +10298,11 @@
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",
"hash-db",
"libsecp256k1",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"sp-core",
"sp-externalities",
@@ -9669,9 +10336,9 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.14",
+ "futures 0.3.15",
"merlin",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"schnorrkel",
"serde",
@@ -9693,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",
@@ -9748,9 +10415,9 @@
dependencies = [
"either",
"hash256-std-hasher",
- "impl-trait-for-tuples",
+ "impl-trait-for-tuples 0.2.1",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parity-util-mem",
"paste",
"rand 0.7.3",
@@ -9767,9 +10434,9 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "impl-trait-for-tuples",
- "parity-scale-codec",
- "primitive-types",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
+ "primitive-types 0.9.0",
"sp-externalities",
"sp-runtime-interface-proc-macro",
"sp-std",
@@ -9796,7 +10463,7 @@
version = "0.9.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-core",
"sp-io",
"sp-std",
@@ -9818,7 +10485,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-core",
"sp-runtime",
@@ -9831,7 +10498,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-runtime",
"sp-std",
]
@@ -9844,7 +10511,7 @@
"hash-db",
"log",
"num-traits",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.11.1",
"rand 0.7.3",
"smallvec 1.6.1",
@@ -9870,7 +10537,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"impl-serde",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"ref-cast",
"serde",
"sp-debug-derive",
@@ -9898,7 +10565,7 @@
"async-trait",
"futures-timer 3.0.2",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-api",
"sp-inherents",
"sp-runtime",
@@ -9914,7 +10581,7 @@
dependencies = [
"erased-serde",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"parking_lot 0.10.2",
"serde",
"serde_json",
@@ -9931,9 +10598,9 @@
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",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-api",
"sp-blockchain",
@@ -9948,7 +10615,7 @@
dependencies = [
"hash-db",
"memory-db",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sp-core",
"sp-std",
"trie-db",
@@ -9960,7 +10627,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",
"futures-core",
"futures-timer 3.0.2",
"lazy_static",
@@ -9973,7 +10640,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"impl-serde",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"serde",
"sp-runtime",
"sp-std",
@@ -9985,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",
@@ -9997,8 +10664,8 @@
version = "3.0.0"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
- "impl-trait-for-tuples",
- "parity-scale-codec",
+ "impl-trait-for-tuples 0.2.1",
+ "parity-scale-codec 2.1.3",
"sp-std",
"wasmi",
]
@@ -10048,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]]
@@ -10094,6 +10764,12 @@
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
name = "structopt"
version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -10165,12 +10841,12 @@
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",
+ "futures 0.3.15",
+ "jsonrpc-core 15.1.0",
+ "jsonrpc-core-client 15.1.0",
+ "jsonrpc-derive 15.1.0",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"sc-client-api",
"sc-rpc-api",
"serde",
@@ -10203,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",
@@ -10230,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",
]
@@ -10291,9 +10967,9 @@
[[package]]
name = "syn"
-version = "1.0.69"
+version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48fe99c6bd8b1cc636890bcc071842de909d902c81ac7dab53ba33c421ab8ffb"
+checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
dependencies = [
"proc-macro2",
"quote",
@@ -10338,8 +11014,8 @@
dependencies = [
"cfg-if 1.0.0",
"libc",
- "rand 0.8.3",
- "redox_syscall 0.2.6",
+ "rand 0.8.4",
+ "redox_syscall 0.2.9",
"remove_dir_all",
"winapi 0.3.9",
]
@@ -10364,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",
@@ -10436,7 +11112,7 @@
"pbkdf2 0.4.0",
"rand 0.7.3",
"rustc-hash",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"thiserror",
"unicode-normalization",
"zeroize",
@@ -10758,9 +11434,9 @@
[[package]]
name = "tracing"
-version = "0.1.25"
+version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f"
+checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
dependencies = [
"cfg-if 1.0.0",
"log",
@@ -10782,9 +11458,9 @@
[[package]]
name = "tracing-core"
-version = "0.1.17"
+version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
+checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052"
dependencies = [
"lazy_static",
]
@@ -10795,7 +11471,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
dependencies = [
- "pin-project 1.0.6",
+ "pin-project 1.0.7",
"tracing",
]
@@ -10822,9 +11498,9 @@
[[package]]
name = "tracing-subscriber"
-version = "0.2.17"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "705096c6f83bf68ea5d357a6aa01829ddbdac531b357b45abeca842938085baa"
+checksum = "aa5553bf0883ba7c9cbe493b085c29926bd41b66afc31ff72cf17ff4fb60dcd5"
dependencies = [
"ansi_term 0.12.1",
"chrono",
@@ -10844,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",
@@ -10865,10 +11541,20 @@
]
[[package]]
+name = "triehash"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c"
+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",
@@ -10877,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",
@@ -10920,7 +11606,7 @@
dependencies = [
"frame-try-runtime",
"log",
- "parity-scale-codec",
+ "parity-scale-codec 2.1.3",
"remote-externalities",
"sc-cli",
"sc-client-api",
@@ -10960,6 +11646,18 @@
[[package]]
name = "uint"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177"
+dependencies = [
+ "byteorder",
+ "crunchy",
+ "rustc-hex",
+ "static_assertions",
+]
+
+[[package]]
+name = "uint"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e11fe9a9348741cf134085ad57c249508345fe16411b3d7fb4ff2da2f1d6382e"
@@ -10990,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",
]
@@ -11011,9 +11709,9 @@
[[package]]
name = "unicode-xid"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
[[package]]
name = "universal-hash"
@@ -11074,36 +11772,31 @@
[[package]]
name = "url"
-version = "2.2.1"
+version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b"
+checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
dependencies = [
"form_urlencoded",
- "idna 0.2.2",
+ "idna 0.2.3",
"matches",
"percent-encoding 2.1.0",
]
[[package]]
name = "value-bag"
-version = "1.0.0-alpha.6"
+version = "1.0.0-alpha.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b676010e055c99033117c2343b33a40a30b91fecd6c49055ac9cd2d6c305ab1"
+checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae"
dependencies = [
"ctor",
+ "version_check",
]
[[package]]
name = "vcpkg"
-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"
+checksum = "70455df2fdf4e9bf580a92e443f1eb0303c390d682e2ea817312c9e81f8c3399"
[[package]]
name = "vec_map"
@@ -11175,9 +11868,9 @@
[[package]]
name = "wasm-bindgen"
-version = "0.2.73"
+version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9"
+checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd"
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen-macro",
@@ -11185,9 +11878,9 @@
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.73"
+version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae"
+checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900"
dependencies = [
"bumpalo",
"lazy_static",
@@ -11200,9 +11893,9 @@
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.23"
+version = "0.4.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81b8b767af23de6ac18bf2168b690bed2902743ddf0fb39252e36f9e2bfc63ea"
+checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1"
dependencies = [
"cfg-if 1.0.0",
"js-sys",
@@ -11212,9 +11905,9 @@
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.73"
+version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f"
+checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -11222,9 +11915,9 @@
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.73"
+version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c"
+checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97"
dependencies = [
"proc-macro2",
"quote",
@@ -11235,9 +11928,9 @@
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.73"
+version = "0.2.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489"
+checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f"
[[package]]
name = "wasm-gc-api"
@@ -11256,7 +11949,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"js-sys",
"parking_lot 0.11.1",
"pin-utils",
@@ -11349,7 +12042,7 @@
"libc",
"log",
"serde",
- "sha2 0.9.3",
+ "sha2 0.9.5",
"toml",
"winapi 0.3.9",
"zstd",
@@ -11376,9 +12069,9 @@
checksum = "382eecd6281c6c1d1f3c904c3c143e671fc1a9573820cbfa777fba45ce2eda9c"
dependencies = [
"anyhow",
- "gimli",
+ "gimli 0.23.0",
"more-asserts",
- "object",
+ "object 0.23.0",
"target-lexicon",
"thiserror",
"wasmparser",
@@ -11396,7 +12089,7 @@
"cranelift-codegen",
"cranelift-entity",
"cranelift-wasm",
- "gimli",
+ "gimli 0.23.0",
"indexmap",
"log",
"more-asserts",
@@ -11422,7 +12115,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b5f649623859a12d361fe4cc4793de44f7c3ff34c322c5714289787e89650bb"
dependencies = [
- "addr2line",
+ "addr2line 0.14.1",
"anyhow",
"cfg-if 1.0.0",
"cranelift-codegen",
@@ -11430,10 +12123,10 @@
"cranelift-frontend",
"cranelift-native",
"cranelift-wasm",
- "gimli",
+ "gimli 0.23.0",
"log",
"more-asserts",
- "object",
+ "object 0.23.0",
"rayon",
"region",
"serde",
@@ -11457,7 +12150,7 @@
dependencies = [
"anyhow",
"more-asserts",
- "object",
+ "object 0.23.0",
"target-lexicon",
"wasmtime-debug",
"wasmtime-environ",
@@ -11471,10 +12164,10 @@
dependencies = [
"anyhow",
"cfg-if 1.0.0",
- "gimli",
+ "gimli 0.23.0",
"lazy_static",
"libc",
- "object",
+ "object 0.23.0",
"scroll",
"serde",
"target-lexicon",
@@ -11495,7 +12188,7 @@
"lazy_static",
"libc",
"log",
- "memoffset 0.6.3",
+ "memoffset 0.6.4",
"more-asserts",
"psm",
"region",
@@ -11506,27 +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"
-version = "0.3.50"
+version = "0.3.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be"
+checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -11552,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",
]
@@ -11566,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",
@@ -11606,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",
@@ -11639,15 +12332,6 @@
[[package]]
name = "which"
-version = "3.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "which"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe"
@@ -11747,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]]
@@ -11758,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",
@@ -11776,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",
@@ -11793,11 +12477,11 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107"
dependencies = [
- "futures 0.3.14",
+ "futures 0.3.15",
"log",
"nohash-hasher",
"parking_lot 0.11.1",
- "rand 0.8.3",
+ "rand 0.8.4",
"static_assertions",
]
@@ -11809,18 +12493,18 @@
[[package]]
name = "zeroize"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36"
+checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd"
dependencies = [
"zeroize_derive",
]
[[package]]
name = "zeroize_derive"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16"
+checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1"
dependencies = [
"proc-macro2",
"quote",
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,10 +1,12 @@
[workspace]
+resolver = "2"
members = [
- 'node',
+ 'node/*',
'pallets/*',
'primitives',
'runtime',
+ 'crates/evm-coder',
+ 'crates/evm-coder-macros',
]
-resolver = "2"
[profile.release]
panic = 'unwind'
crates/evm-coder-macros/Cargo.tomldiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder-macros/Cargo.toml
@@ -0,0 +1,16 @@
+[package]
+name = "evm-coder-macros"
+version = "0.1.0"
+edition = "2018"
+
+[lib]
+proc-macro = true
+
+[dependencies]
+sha3 = "0.9.1"
+quote = "1.0"
+proc-macro2 = "1.0"
+syn = { version = "1.0", features = ["full"] }
+hex = "0.4.3"
+Inflector = "0.11.4"
+darling = "0.13.0"
\ No newline at end of file
crates/evm-coder-macros/src/lib.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder-macros/src/lib.rs
@@ -0,0 +1,224 @@
+use darling::FromMeta;
+use inflector::cases;
+use proc_macro::TokenStream;
+use quote::quote;
+use sha3::{Digest, Keccak256};
+use syn::{
+ AttributeArgs, DeriveInput, GenericArgument, Ident, ItemTrait, Pat, Path, PathArguments,
+ PathSegment, Type, parse_macro_input, spanned::Spanned,
+};
+
+mod solidity_interface;
+mod to_log;
+
+fn fn_selector_str(input: &str) -> u32 {
+ let mut hasher = Keccak256::new();
+ hasher.update(input.as_bytes());
+ let result = hasher.finalize();
+
+ let mut selector_bytes = [0; 4];
+ selector_bytes.copy_from_slice(&result[0..4]);
+
+ u32::from_be_bytes(selector_bytes)
+}
+
+/// Returns solidity function selector (first 4 bytes of hash) by its
+/// textual representation
+///
+/// ```rs
+/// use evm_coder_macros::fn_selector;
+///
+/// assert_eq!(fn_selector!(transfer(address, uint256)), 0xa9059cbb);
+/// ```
+#[proc_macro]
+pub fn fn_selector(input: TokenStream) -> TokenStream {
+ let input = input.to_string().replace(' ', "");
+ let selector = fn_selector_str(&input);
+
+ (quote! {
+ #selector
+ })
+ .into()
+}
+
+fn event_selector_str(input: &str) -> [u8; 32] {
+ let mut hasher = Keccak256::new();
+ hasher.update(input.as_bytes());
+ let result = hasher.finalize();
+
+ let mut selector_bytes = [0; 32];
+ selector_bytes.copy_from_slice(&result[0..32]);
+ selector_bytes
+}
+
+/// Returns solidity topic (hash) by its textual representation
+///
+/// ```rs
+/// use evm_coder_macros::event_topic;
+///
+/// assert_eq!(
+/// format!("{:x}", event_topic!(Transfer(address, address, uint256))),
+/// "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
+/// );
+/// ```
+#[proc_macro]
+pub fn event_topic(stream: TokenStream) -> TokenStream {
+ let input = stream.to_string().replace(' ', "");
+ let selector_bytes = event_selector_str(&input);
+
+ (quote! {
+ ::primitive_types::H256([#(
+ #selector_bytes,
+ )*])
+ })
+ .into()
+}
+
+fn parse_path(ty: &Type) -> syn::Result<&Path> {
+ match &ty {
+ syn::Type::Path(pat) => {
+ if let Some(qself) = &pat.qself {
+ return Err(syn::Error::new(qself.ty.span(), "no receiver expected"));
+ }
+ Ok(&pat.path)
+ }
+ _ => Err(syn::Error::new(ty.span(), "expected ty to be path")),
+ }
+}
+
+fn parse_path_segment(path: &Path) -> syn::Result<&PathSegment> {
+ if path.segments.len() != 1 {
+ return Err(syn::Error::new(
+ path.span(),
+ "expected path to have only segment",
+ ));
+ }
+ let last_segment = &path.segments.last().unwrap();
+ Ok(last_segment)
+}
+
+fn parse_ident_from_pat(pat: &Pat) -> syn::Result<&Ident> {
+ match pat {
+ Pat::Ident(i) => Ok(&i.ident),
+ _ => Err(syn::Error::new(pat.span(), "expected pat ident")),
+ }
+}
+
+fn parse_ident_from_segment(segment: &PathSegment) -> syn::Result<&Ident> {
+ if segment.arguments != PathArguments::None {
+ return Err(syn::Error::new(
+ segment.arguments.span(),
+ "unexpected generic type",
+ ));
+ }
+ Ok(&segment.ident)
+}
+
+fn parse_ident_from_path(path: &Path) -> syn::Result<&Ident> {
+ let segment = parse_path_segment(path)?;
+ parse_ident_from_segment(segment)
+}
+
+fn parse_ident_from_type(ty: &Type) -> syn::Result<&Ident> {
+ let path = parse_path(ty)?;
+ parse_ident_from_path(path)
+}
+
+// Gets T out of Result<T>
+fn parse_result_ok(ty: &Type) -> syn::Result<&Ident> {
+ let path = parse_path(ty)?;
+ let segment = parse_path_segment(path)?;
+
+ if segment.ident != "Result" {
+ return Err(syn::Error::new(
+ ty.span(),
+ "expected Result as return type (no renamed aliases allowed)",
+ ));
+ }
+ let args = match &segment.arguments {
+ PathArguments::AngleBracketed(e) => e,
+ _ => {
+ return Err(syn::Error::new(
+ segment.arguments.span(),
+ "missing Result generics",
+ ))
+ }
+ };
+
+ let args = &args.args;
+ let arg = args.first().unwrap();
+
+ let ty = match arg {
+ GenericArgument::Type(ty) => ty,
+ _ => {
+ return Err(syn::Error::new(
+ arg.span(),
+ "expected first generic to be type",
+ ))
+ }
+ };
+
+ parse_ident_from_type(ty)
+}
+
+fn pascal_ident_to_call(ident: &Ident) -> Ident {
+ let name = format!("{}Call", ident);
+ Ident::new(&name, ident.span())
+}
+fn snake_ident_to_pascal(ident: &Ident) -> Ident {
+ let name = ident.to_string();
+ let name = cases::pascalcase::to_pascal_case(&name);
+ Ident::new(&name, ident.span())
+}
+fn snake_ident_to_screaming(ident: &Ident) -> Ident {
+ let name = ident.to_string();
+ let name = cases::screamingsnakecase::to_screaming_snake_case(&name);
+ Ident::new(&name, ident.span())
+}
+fn pascal_ident_to_snake_call(ident: &Ident) -> Ident {
+ let name = ident.to_string();
+ let name = cases::snakecase::to_snake_case(&name);
+ let name = format!("call_{}", name);
+ Ident::new(&name, ident.span())
+}
+
+fn format_ty(ty: &Ident) -> String {
+ if ty == "string" {
+ format!("{} memory", ty)
+ } else {
+ ty.to_string()
+ }
+}
+
+#[proc_macro_attribute]
+pub fn solidity_interface(args: TokenStream, stream: TokenStream) -> TokenStream {
+ let args = parse_macro_input!(args as AttributeArgs);
+ let args = solidity_interface::InterfaceInfo::from_list(&args).unwrap();
+
+ let input: ItemTrait = match syn::parse(stream) {
+ Ok(t) => t,
+ Err(e) => return e.to_compile_error().into(),
+ };
+
+ match solidity_interface::SolidityInterface::try_from(args, &input) {
+ Ok(v) => v.expand(),
+ Err(e) => e.to_compile_error(),
+ }
+ .into()
+}
+
+#[proc_macro_attribute]
+pub fn solidity(_args: TokenStream, stream: TokenStream) -> TokenStream {
+ stream
+}
+
+#[proc_macro_derive(ToLog, attributes(indexed))]
+pub fn to_log(value: TokenStream) -> TokenStream {
+ let input = parse_macro_input!(value as DeriveInput);
+
+ match to_log::Events::try_from(&input) {
+ Ok(e) => e.expand(),
+ Err(e) => e.to_compile_error(),
+ }
+ .into()
+}
crates/evm-coder-macros/src/solidity_interface.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder-macros/src/solidity_interface.rs
@@ -0,0 +1,569 @@
+use quote::quote;
+use darling::FromMeta;
+use inflector::cases;
+use std::fmt::Write;
+use syn::{
+ FnArg, Ident, ItemTrait, Meta, NestedMeta, PatType, Path, ReturnType, TraitItem,
+ TraitItemMethod, Visibility, spanned::Spanned,
+};
+
+use crate::{
+ fn_selector_str, format_ty, parse_ident_from_pat, parse_ident_from_path, parse_ident_from_type,
+ parse_result_ok, pascal_ident_to_call, pascal_ident_to_snake_call, snake_ident_to_pascal,
+ snake_ident_to_screaming,
+};
+
+struct Is {
+ name: Ident,
+ pascal_call_name: Ident,
+ snake_call_name: Ident,
+}
+impl Is {
+ fn try_from(path: &Path) -> syn::Result<Self> {
+ let name = parse_ident_from_path(path)?.clone();
+ Ok(Self {
+ pascal_call_name: pascal_ident_to_call(&name),
+ snake_call_name: pascal_ident_to_snake_call(&name),
+ name,
+ })
+ }
+
+ fn expand_call_def(&self) -> proc_macro2::TokenStream {
+ let name = &self.name;
+ let pascal_call_name = &self.pascal_call_name;
+ quote! {
+ #name(#pascal_call_name)
+ }
+ }
+
+ fn expand_interface_id(&self) -> proc_macro2::TokenStream {
+ let pascal_call_name = &self.pascal_call_name;
+ quote! {
+ interface_id ^= #pascal_call_name::interface_id();
+ }
+ }
+
+ fn expand_supports_interface(&self) -> proc_macro2::TokenStream {
+ let pascal_call_name = &self.pascal_call_name;
+ quote! {
+ #pascal_call_name::supports_interface(interface_id)
+ }
+ }
+
+ fn expand_variant_call(&self) -> proc_macro2::TokenStream {
+ let name = &self.name;
+ let snake_call_name = &self.snake_call_name;
+ quote! {
+ InternalCall::#name(call) => return self.#snake_call_name(Msg {
+ call,
+ caller: c.caller,
+ value: c.value,
+ })
+ }
+ }
+
+ fn expand_call_inner(&self) -> proc_macro2::TokenStream {
+ let snake_call_name = &self.snake_call_name;
+ let pascal_call_name = &self.pascal_call_name;
+ quote! {
+ fn #snake_call_name(&mut self, c: Msg<#pascal_call_name>) -> ::core::result::Result<::evm_coder::abi::AbiWriter, Self::Error>;
+ }
+ }
+
+ fn expand_parse(&self) -> proc_macro2::TokenStream {
+ let name = &self.name;
+ let pascal_call_name = &self.pascal_call_name;
+ quote! {
+ if let Some(parsed_call) = #pascal_call_name::parse(method_id, reader)? {
+ return Ok(Some(Self::#name(parsed_call)))
+ }
+ }
+ }
+}
+
+#[derive(Default)]
+struct IsList(Vec<Is>);
+impl FromMeta for IsList {
+ fn from_list(items: &[NestedMeta]) -> darling::Result<Self> {
+ let mut out = Vec::new();
+ for item in items {
+ match item {
+ NestedMeta::Meta(Meta::Path(path)) => out.push(Is::try_from(path)?),
+ _ => return Err(syn::Error::new(item.span(), "expected path").into()),
+ }
+ }
+ Ok(Self(out))
+ }
+}
+
+#[derive(FromMeta)]
+pub struct InterfaceInfo {
+ #[darling(default)]
+ is: IsList,
+ #[darling(default)]
+ inline_is: IsList,
+ #[darling(default)]
+ events: IsList,
+}
+
+#[derive(FromMeta)]
+struct MethodInfo {
+ #[darling(default)]
+ rename_selector: Option<String>,
+}
+
+struct MethodArg {
+ name: Ident,
+ ty: Ident,
+}
+impl MethodArg {
+ fn try_from(value: &PatType) -> syn::Result<Self> {
+ Ok(Self {
+ name: parse_ident_from_pat(&value.pat)?.clone(),
+ ty: parse_ident_from_type(&value.ty)?.clone(),
+ })
+ }
+ fn is_value(&self) -> bool {
+ self.ty == "value"
+ }
+ fn is_caller(&self) -> bool {
+ self.ty == "caller"
+ }
+ fn is_special(&self) -> bool {
+ self.is_value() || self.is_caller()
+ }
+ fn selector_ty(&self) -> &Ident {
+ assert!(!self.is_special());
+ &self.ty
+ }
+
+ fn expand_call_def(&self) -> proc_macro2::TokenStream {
+ assert!(!self.is_special());
+ let name = &self.name;
+ let ty = &self.ty;
+
+ quote! {
+ #name: #ty
+ }
+ }
+
+ fn expand_parse(&self) -> proc_macro2::TokenStream {
+ assert!(!self.is_special());
+ let name = &self.name;
+ quote! {
+ #name: reader.abi_read()?
+ }
+ }
+
+ fn expand_call_arg(&self) -> proc_macro2::TokenStream {
+ if self.is_value() {
+ quote! {
+ c.value.clone()
+ }
+ } else if self.is_caller() {
+ quote! {
+ c.caller.clone()
+ }
+ } else {
+ let name = &self.name;
+ quote! {
+ #name
+ }
+ }
+ }
+
+ fn solidity_def(&self) -> String {
+ assert!(!self.is_special());
+ format!("{} {}", format_ty(&self.ty), self.name)
+ }
+}
+
+#[derive(PartialEq)]
+enum Mutability {
+ Mutable,
+ View,
+ Pure,
+}
+
+struct Method {
+ name: Ident,
+ camel_name: String,
+ pascal_name: Ident,
+ screaming_name: Ident,
+ selector_str: String,
+ selector: u32,
+ args: Vec<MethodArg>,
+ has_normal_args: bool,
+ mutability: Mutability,
+ result: Ident,
+}
+impl Method {
+ fn try_from(value: &TraitItemMethod) -> syn::Result<Self> {
+ let mut info = MethodInfo {
+ rename_selector: None,
+ };
+ for attr in &value.attrs {
+ let ident = parse_ident_from_path(&attr.path)?;
+ if ident == "solidity" {
+ let args = attr.parse_meta().unwrap();
+ info = MethodInfo::from_meta(&args).unwrap();
+ } else if ident == "doc" {
+ // TODO: Add docs to evm interfaces
+ }
+ }
+ let ident = &value.sig.ident;
+ let ident_str = ident.to_string();
+ if !cases::snakecase::is_snake_case(&ident_str) {
+ return Err(syn::Error::new(ident.span(), "method name should be snake_cased\nif alternative solidity name needs to be set - use #[solidity] attribute"));
+ }
+
+ let mut mutability = Mutability::Pure;
+
+ if let Some(FnArg::Receiver(receiver)) = value
+ .sig
+ .inputs
+ .iter()
+ .find(|arg| matches!(arg, FnArg::Receiver(_)))
+ {
+ if receiver.reference.is_none() {
+ return Err(syn::Error::new(
+ receiver.span(),
+ "receiver should be by ref",
+ ));
+ }
+ if receiver.mutability.is_some() {
+ mutability = Mutability::Mutable;
+ } else {
+ mutability = Mutability::View;
+ }
+ }
+ let mut args = Vec::new();
+ for typ in value
+ .sig
+ .inputs
+ .iter()
+ .filter(|arg| matches!(arg, FnArg::Typed(_)))
+ {
+ let typ = match typ {
+ FnArg::Typed(typ) => typ,
+ _ => unreachable!(),
+ };
+ args.push(MethodArg::try_from(typ)?);
+ }
+
+ if mutability != Mutability::Mutable && args.iter().any(|arg| arg.is_value()) {
+ return Err(syn::Error::new(
+ args.iter().find(|arg| arg.is_value()).unwrap().ty.span(),
+ "payable function should be mutable",
+ ));
+ }
+
+ let result = match &value.sig.output {
+ ReturnType::Type(_, ty) => ty,
+ _ => return Err(syn::Error::new(value.sig.output.span(), "interface method should return Result<value>\nif there is no value to return - specify void (which is alias to unit)")),
+ };
+ let result = parse_result_ok(&result)?;
+
+ let camel_name = info
+ .rename_selector
+ .unwrap_or_else(|| cases::camelcase::to_camel_case(&ident.to_string()));
+ let mut selector_str = camel_name.clone();
+ selector_str.push('(');
+ let mut has_normal_args = false;
+ for (i, arg) in args.iter().filter(|arg| !arg.is_special()).enumerate() {
+ if i != 0 {
+ selector_str.push(',');
+ }
+ write!(selector_str, "{}", arg.selector_ty()).unwrap();
+ has_normal_args = true;
+ }
+ selector_str.push(')');
+ let selector = fn_selector_str(&selector_str);
+
+ Ok(Self {
+ name: ident.clone(),
+ camel_name,
+ pascal_name: snake_ident_to_pascal(&ident),
+ screaming_name: snake_ident_to_screaming(&ident),
+ selector_str,
+ selector,
+ args,
+ has_normal_args,
+ mutability,
+ result: result.clone(),
+ })
+ }
+ fn expand_call_def(&self) -> proc_macro2::TokenStream {
+ let defs = self
+ .args
+ .iter()
+ .filter(|a| !a.is_special())
+ .map(|a| a.expand_call_def());
+ let pascal_name = &self.pascal_name;
+
+ if self.has_normal_args {
+ quote! {
+ #pascal_name {
+ #(
+ #defs,
+ )*
+ }
+ }
+ } else {
+ quote! {#pascal_name}
+ }
+ }
+
+ fn expand_const(&self) -> proc_macro2::TokenStream {
+ let screaming_name = &self.screaming_name;
+ let selector = self.selector;
+ let selector_str = &self.selector_str;
+ quote! {
+ #[doc = #selector_str]
+ const #screaming_name: u32 = #selector;
+ }
+ }
+
+ fn expand_interface_id(&self) -> proc_macro2::TokenStream {
+ let screaming_name = &self.screaming_name;
+ quote! {
+ interface_id ^= Self::#screaming_name;
+ }
+ }
+
+ fn expand_parse(&self) -> proc_macro2::TokenStream {
+ let pascal_name = &self.pascal_name;
+ let screaming_name = &self.screaming_name;
+ if self.has_normal_args {
+ let parsers = self
+ .args
+ .iter()
+ .filter(|a| !a.is_special())
+ .map(|a| a.expand_parse());
+ quote! {
+ Self::#screaming_name => return Ok(Some(Self::#pascal_name {
+ #(
+ #parsers,
+ )*
+ }))
+ }
+ } else {
+ quote! { Self::#screaming_name => return Ok(Some(Self::#pascal_name)) }
+ }
+ }
+
+ fn expand_variant_call(&self) -> proc_macro2::TokenStream {
+ let pascal_name = &self.pascal_name;
+ let name = &self.name;
+
+ let matcher = if self.has_normal_args {
+ let names = self
+ .args
+ .iter()
+ .filter(|a| !a.is_special())
+ .map(|a| &a.name);
+
+ quote! {{
+ #(
+ #names,
+ )*
+ }}
+ } else {
+ quote! {}
+ };
+
+ let receiver = match self.mutability {
+ Mutability::Mutable | Mutability::View => quote! {self.},
+ Mutability::Pure => quote! {Self::},
+ };
+ let args = self.args.iter().map(|a| a.expand_call_arg());
+
+ quote! {
+ InternalCall::#pascal_name #matcher => {
+ let result = #receiver #name(
+ #(
+ #args,
+ )*
+ )?;
+ (&result).abi_write(&mut writer);
+ }
+ }
+ }
+
+ fn solidity_def(&self) -> String {
+ let mut out = format!("function {}(", self.camel_name);
+ for (i, arg) in self.args.iter().filter(|a| !a.is_special()).enumerate() {
+ if i != 0 {
+ out.push_str(", ");
+ }
+ out.push_str(&arg.solidity_def());
+ }
+ out.push(')');
+ match self.mutability {
+ Mutability::Mutable => {}
+ Mutability::View => write!(out, " view").unwrap(),
+ Mutability::Pure => write!(out, " pure").unwrap(),
+ }
+ if self.result != "void" {
+ write!(out, " returns ({})", format_ty(&self.result)).unwrap();
+ }
+ out.push(';');
+ out
+ }
+}
+
+pub struct SolidityInterface {
+ vis: Visibility,
+ name: Ident,
+ info: InterfaceInfo,
+ methods: Vec<Method>,
+ items: Vec<TraitItem>,
+}
+impl SolidityInterface {
+ pub fn try_from(info: InterfaceInfo, value: &ItemTrait) -> syn::Result<Self> {
+ let mut found_error = false;
+ let mut methods = Vec::new();
+
+ for item in &value.items {
+ match item {
+ TraitItem::Type(ty) => {
+ if ty.ident == "Error" {
+ found_error = true;
+ }
+ }
+ TraitItem::Method(method) => methods.push(Method::try_from(&method)?),
+ _ => {}
+ }
+ }
+ if !found_error {
+ return Err(syn::Error::new(
+ value.span(),
+ "expected associated type called Error, which should implement From<&str>",
+ ));
+ }
+ Ok(Self {
+ vis: value.vis.clone(),
+ name: value.ident.clone(),
+ info,
+ methods,
+ items: value.items.clone(),
+ })
+ }
+ pub fn expand(self) -> proc_macro2::TokenStream {
+ let vis = self.vis;
+ let name = self.name;
+ let items = self.items;
+
+ let call_name = pascal_ident_to_call(&name);
+
+ let call_sub = self
+ .info
+ .inline_is
+ .0
+ .iter()
+ .chain(self.info.is.0.iter())
+ .map(Is::expand_call_def);
+ let call_inner = self
+ .info
+ .inline_is
+ .0
+ .iter()
+ .chain(self.info.is.0.iter())
+ .map(Is::expand_call_inner);
+ let call_parse = self
+ .info
+ .inline_is
+ .0
+ .iter()
+ .chain(self.info.is.0.iter())
+ .map(Is::expand_parse);
+ let call_variants = self
+ .info
+ .inline_is
+ .0
+ .iter()
+ .chain(self.info.is.0.iter())
+ .map(Is::expand_variant_call);
+
+ let inline_interface_id = self.info.inline_is.0.iter().map(Is::expand_interface_id);
+ let supports_interface = self.info.is.0.iter().map(Is::expand_supports_interface);
+
+ let calls = self.methods.iter().map(Method::expand_call_def);
+ let consts = self.methods.iter().map(Method::expand_const);
+ let interface_id = self.methods.iter().map(Method::expand_interface_id);
+ let parsers = self.methods.iter().map(Method::expand_parse);
+ let call_variants_this = self.methods.iter().map(Method::expand_variant_call);
+
+ // let methods = self.methods.iter().map(Method::solidity_def);
+
+ quote! {
+ #[derive(Debug)]
+ #vis enum #call_name {
+ #(
+ #calls,
+ )*
+ #(
+ #call_sub,
+ )*
+ }
+ impl #call_name {
+ #(
+ #consts
+ )*
+ pub fn parse(method_id: u32, reader: &mut ::evm_coder::abi::AbiReader) -> ::evm_coder::abi::Result<Option<Self>> {
+ use ::evm_coder::abi::AbiRead;
+ match method_id {
+ #(
+ #parsers,
+ )*
+ _ => {},
+ }
+ #(
+ #call_parse
+ )else*
+ return Ok(None);
+ }
+ pub const fn interface_id() -> u32 {
+ let mut interface_id = 0;
+ #(#interface_id)*
+ #(#inline_interface_id)*
+ interface_id
+ }
+ pub fn supports_interface(interface_id: u32) -> bool {
+ interface_id != 0xffffff && (
+ interface_id == Self::interface_id()
+ #(
+ || #supports_interface
+ )*
+ )
+ }
+ }
+ #vis trait #name {
+ #(
+ #items
+ )*
+ #(
+ #call_inner
+ )*
+ fn call(&mut self, c: Msg<#call_name>) -> ::core::result::Result<::evm_coder::abi::AbiWriter, Self::Error> {
+ use ::evm_coder::abi::AbiWrite;
+ type InternalCall = #call_name;
+ match c.call {
+ #(
+ #call_variants,
+ )*
+ _ => {},
+ }
+ let mut writer = ::evm_coder::abi::AbiWriter::default();
+ match c.call {
+ #(
+ #call_variants_this,
+ )*
+ _ => unreachable!()
+ }
+ Ok(writer)
+ }
+ }
+ }
+ }
+}
crates/evm-coder-macros/src/to_log.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder-macros/src/to_log.rs
@@ -0,0 +1,170 @@
+use syn::{Data, DeriveInput, Field, Fields, Ident, Variant, spanned::Spanned};
+use std::fmt::Write;
+use quote::quote;
+
+use crate::{parse_ident_from_path, parse_ident_from_type, snake_ident_to_screaming};
+
+struct EventField {
+ name: Ident,
+ ty: Ident,
+ indexed: bool,
+}
+
+impl EventField {
+ fn try_from(field: &Field) -> syn::Result<Self> {
+ let name = field.ident.as_ref().unwrap();
+ let ty = parse_ident_from_type(&field.ty)?;
+ let mut indexed = false;
+ for attr in &field.attrs {
+ if let Ok(ident) = parse_ident_from_path(&attr.path) {
+ if ident == "indexed" {
+ indexed = true;
+ }
+ }
+ }
+ Ok(Self {
+ name: name.to_owned(),
+ ty: ty.to_owned(),
+ indexed,
+ })
+ }
+}
+
+struct Event {
+ name: Ident,
+ name_screaming: Ident,
+ fields: Vec<EventField>,
+ selector: [u8; 32],
+ selector_str: String,
+}
+
+impl Event {
+ fn try_from(variant: &Variant) -> syn::Result<Self> {
+ let name = &variant.ident;
+ let name_screaming = snake_ident_to_screaming(&name);
+
+ let named = match &variant.fields {
+ Fields::Named(named) => named,
+ _ => {
+ return Err(syn::Error::new(
+ variant.fields.span(),
+ "expected named fields",
+ ))
+ }
+ };
+ let mut fields = Vec::new();
+ for field in &named.named {
+ fields.push(EventField::try_from(&field)?);
+ }
+ let mut selector_str = format!("{}(", name);
+ for (i, arg) in fields.iter().enumerate() {
+ if i != 0 {
+ write!(selector_str, ",").unwrap();
+ }
+ write!(selector_str, "{}", arg.ty).unwrap();
+ }
+ selector_str.push(')');
+ let selector = crate::event_selector_str(&selector_str);
+
+ Ok(Self {
+ name: name.to_owned(),
+ name_screaming,
+ fields,
+ selector,
+ selector_str,
+ })
+ }
+
+ fn expand_serializers(&self) -> proc_macro2::TokenStream {
+ let name = &self.name;
+ let name_screaming = &self.name_screaming;
+ let fields = self.fields.iter().map(|f| &f.name);
+
+ let indexed = self.fields.iter().filter(|f| f.indexed).map(|f| &f.name);
+ let plain = self.fields.iter().filter(|f| !f.indexed).map(|f| &f.name);
+
+ quote! {
+ Self::#name {#(
+ #fields,
+ )*} => {
+ topics.push(topic::from(Self::#name_screaming));
+ #(
+ topics.push(#indexed.to_topic());
+ )*
+ #(
+ #plain.abi_write(&mut writer);
+ )*
+ }
+ }
+ }
+
+ fn expand_consts(&self) -> proc_macro2::TokenStream {
+ let name_screaming = &self.name_screaming;
+ let selector_str = &self.selector_str;
+ let selector = &self.selector;
+
+ quote! {
+ #[doc = #selector_str]
+ const #name_screaming: [u8; 32] = [#(
+ #selector,
+ )*];
+ }
+ }
+}
+
+pub struct Events {
+ name: Ident,
+ events: Vec<Event>,
+}
+
+impl Events {
+ pub fn try_from(data: &DeriveInput) -> syn::Result<Self> {
+ let name = &data.ident;
+ let en = match &data.data {
+ Data::Enum(en) => en,
+ _ => return Err(syn::Error::new(data.span(), "expected enum")),
+ };
+ let mut events = Vec::new();
+ for variant in &en.variants {
+ events.push(Event::try_from(variant)?);
+ }
+ Ok(Self {
+ name: name.to_owned(),
+ events,
+ })
+ }
+ pub fn expand(&self) -> proc_macro2::TokenStream {
+ let name = &self.name;
+
+ let consts = self.events.iter().map(Event::expand_consts);
+ let serializers = self.events.iter().map(Event::expand_serializers);
+
+ quote! {
+ impl #name {
+ #(
+ #consts
+ )*
+ }
+
+ #[automatically_derived]
+ impl ::evm_coder::events::ToLog for #name {
+ fn to_log(&self, contract: address) -> ::ethereum::Log {
+ use ::evm_coder::events::ToTopic;
+ use ::evm_coder::abi::AbiWrite;
+ let mut writer = ::evm_coder::abi::AbiWriter::new();
+ let mut topics = Vec::new();
+ match self {
+ #(
+ #serializers,
+ )*
+ }
+ ::ethereum::Log {
+ address: contract,
+ topics,
+ data: writer.finish(),
+ }
+ }
+ }
+ }
+ }
+}
crates/evm-coder/Cargo.tomldiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/Cargo.toml
@@ -0,0 +1,17 @@
+[package]
+name = "evm-coder"
+version = "0.1.0"
+edition = "2018"
+
+[dependencies]
+evm-coder-macros = { path = "../evm-coder-macros" }
+primitive-types = { version = "0.9", default-features = false }
+hex-literal = "0.3"
+ethereum = { version = "0.7.1", default-features = false }
+
+[dev-dependencies]
+hex = "0.4.3"
+
+[features]
+default = ["std"]
+std = ["ethereum/std", "primitive-types/std"]
\ No newline at end of file
crates/evm-coder/src/abi.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/src/abi.rs
@@ -0,0 +1,311 @@
+//! TODO: I misunterstood therminology, abi IS rlp encoded, so
+//! this module should be replaced with rlp crate
+
+#![allow(dead_code)]
+
+#[cfg(not(feature = "std"))]
+use alloc::{
+ string::{String, ToString},
+ vec::Vec,
+};
+use primitive_types::{H160, U256};
+
+use crate::types::string;
+
+const ABI_ALIGNMENT: usize = 32;
+
+pub type Result<T> = core::result::Result<T, &'static str>;
+
+#[derive(Clone)]
+pub struct AbiReader<'i> {
+ buf: &'i [u8],
+ offset: usize,
+}
+impl<'i> AbiReader<'i> {
+ pub fn new(buf: &'i [u8]) -> Self {
+ Self { buf, offset: 0 }
+ }
+ pub fn new_call(buf: &'i [u8]) -> Result<(u32, Self)> {
+ if buf.len() < 4 {
+ return Err("missing method id");
+ }
+ let mut method_id = [0; 4];
+ method_id.copy_from_slice(&buf[0..4]);
+
+ Ok((u32::from_be_bytes(method_id), Self { buf, offset: 4 }))
+ }
+
+ fn read_padleft<const S: usize>(&mut self) -> Result<[u8; S]> {
+ if self.buf.len() - self.offset < 32 {
+ return Err("missing padding");
+ }
+ let mut block = [0; S];
+ // Verify padding is empty
+ if !self.buf[self.offset..self.offset + ABI_ALIGNMENT - S]
+ .iter()
+ .all(|&v| v == 0)
+ {
+ return Err("non zero padding (wrong types?)");
+ }
+ block.copy_from_slice(
+ &self.buf[self.offset + ABI_ALIGNMENT - S..self.offset + ABI_ALIGNMENT],
+ );
+ self.offset += ABI_ALIGNMENT;
+ Ok(block)
+ }
+
+ pub fn address(&mut self) -> Result<H160> {
+ Ok(H160(self.read_padleft()?))
+ }
+
+ pub fn bool(&mut self) -> Result<bool> {
+ let data: [u8; 1] = self.read_padleft()?;
+ match data[0] {
+ 0 => Ok(false),
+ 1 => Ok(true),
+ _ => Err("wrong bool value"),
+ }
+ }
+
+ pub fn bytes4(&mut self) -> Result<[u8; 4]> {
+ self.read_padleft()
+ }
+
+ pub fn bytes(&mut self) -> Result<Vec<u8>> {
+ let mut subresult = self.subresult()?;
+ let length = subresult.read_usize()?;
+ if subresult.buf.len() <= subresult.offset + length {
+ return Err("bytes out of bounds");
+ }
+ Ok(subresult.buf[subresult.offset..subresult.offset + length].into())
+ }
+
+ pub fn uint32(&mut self) -> Result<u32> {
+ Ok(u32::from_be_bytes(self.read_padleft()?))
+ }
+
+ pub fn uint128(&mut self) -> Result<u128> {
+ Ok(u128::from_be_bytes(self.read_padleft()?))
+ }
+
+ pub fn uint256(&mut self) -> Result<U256> {
+ let buf: [u8; 32] = self.read_padleft()?;
+ Ok(U256::from_big_endian(&buf))
+ }
+
+ pub fn uint64(&mut self) -> Result<u64> {
+ Ok(u64::from_be_bytes(self.read_padleft()?))
+ }
+
+ pub fn read_usize(&mut self) -> Result<usize> {
+ Ok(usize::from_be_bytes(self.read_padleft()?))
+ }
+
+ fn subresult(&mut self) -> Result<AbiReader<'i>> {
+ let offset = self.read_usize()?;
+ Ok(AbiReader {
+ buf: &self.buf,
+ offset: offset + self.offset,
+ })
+ }
+
+ pub fn is_finished(&self) -> bool {
+ self.buf.len() == self.offset
+ }
+}
+
+#[derive(Default)]
+pub struct AbiWriter {
+ static_part: Vec<u8>,
+ dynamic_part: Vec<(usize, AbiWriter)>,
+}
+impl AbiWriter {
+ pub fn new() -> Self {
+ Self::default()
+ }
+ pub fn new_call(method_id: u32) -> Self {
+ let mut val = Self::new();
+ val.static_part.extend(&method_id.to_be_bytes());
+ val
+ }
+
+ fn write_padleft(&mut self, block: &[u8]) {
+ assert!(block.len() <= ABI_ALIGNMENT);
+ self.static_part
+ .extend(&[0; ABI_ALIGNMENT][0..ABI_ALIGNMENT - block.len()]);
+ self.static_part.extend(block);
+ }
+
+ fn write_padright(&mut self, bytes: &[u8]) {
+ assert!(bytes.len() <= ABI_ALIGNMENT);
+ self.static_part.extend(bytes);
+ self.static_part
+ .extend(&[0; ABI_ALIGNMENT][0..ABI_ALIGNMENT - bytes.len()]);
+ }
+
+ pub fn address(&mut self, address: &H160) {
+ self.write_padleft(&address.0)
+ }
+
+ pub fn bool(&mut self, value: &bool) {
+ self.write_padleft(&[if *value { 1 } else { 0 }])
+ }
+
+ pub fn uint8(&mut self, value: &u8) {
+ self.write_padleft(&[*value])
+ }
+
+ pub fn uint32(&mut self, value: &u32) {
+ self.write_padleft(&u32::to_be_bytes(*value))
+ }
+
+ pub fn uint128(&mut self, value: &u128) {
+ self.write_padleft(&u128::to_be_bytes(*value))
+ }
+
+ /// This method writes u128, and exists only for convenience, because there is
+ /// no u256 support in rust
+ pub fn uint256(&mut self, value: &U256) {
+ let mut out = [0; 32];
+ value.to_big_endian(&mut out);
+ self.write_padleft(&out)
+ }
+
+ pub fn write_usize(&mut self, value: &usize) {
+ self.write_padleft(&usize::to_be_bytes(*value))
+ }
+
+ pub fn write_subresult(&mut self, result: Self) {
+ self.dynamic_part.push((self.static_part.len(), result));
+ // Empty block, to be filled later
+ self.write_padleft(&[]);
+ }
+
+ pub fn memory(&mut self, value: &[u8]) {
+ let mut sub = Self::new();
+ sub.write_usize(&value.len());
+ for chunk in value.chunks(ABI_ALIGNMENT) {
+ sub.write_padright(chunk);
+ }
+ self.write_subresult(sub);
+ }
+
+ pub fn string(&mut self, value: &str) {
+ self.memory(value.as_bytes())
+ }
+
+ pub fn finish(mut self) -> Vec<u8> {
+ for (static_offset, part) in self.dynamic_part {
+ let part_offset = self.static_part.len();
+
+ let encoded_dynamic_offset = usize::to_be_bytes(part_offset - static_offset);
+ self.static_part[static_offset + ABI_ALIGNMENT - encoded_dynamic_offset.len()
+ ..static_offset + ABI_ALIGNMENT]
+ .copy_from_slice(&encoded_dynamic_offset);
+ self.static_part.extend(part.finish())
+ }
+ self.static_part
+ }
+}
+
+pub trait AbiRead<T> {
+ fn abi_read(&mut self) -> Result<T>;
+}
+
+macro_rules! impl_abi_readable {
+ ($ty:ty, $method:ident) => {
+ impl AbiRead<$ty> for AbiReader<'_> {
+ fn abi_read(&mut self) -> Result<$ty> {
+ self.$method()
+ }
+ }
+ };
+}
+
+impl_abi_readable!(u32, uint32);
+impl_abi_readable!(u128, uint128);
+impl_abi_readable!(U256, uint256);
+impl_abi_readable!(H160, address);
+impl_abi_readable!(Vec<u8>, bytes);
+impl_abi_readable!(bool, bool);
+
+pub trait AbiWrite {
+ fn abi_write(&self, writer: &mut AbiWriter);
+}
+
+macro_rules! impl_abi_writeable {
+ ($ty:ty, $method:ident) => {
+ impl AbiWrite for $ty {
+ fn abi_write(&self, writer: &mut AbiWriter) {
+ writer.$method(&self)
+ }
+ }
+ };
+}
+
+impl_abi_writeable!(u8, uint8);
+impl_abi_writeable!(u32, uint32);
+impl_abi_writeable!(u128, uint128);
+impl_abi_writeable!(U256, uint256);
+impl_abi_writeable!(H160, address);
+impl_abi_writeable!(bool, bool);
+impl_abi_writeable!(&str, string);
+impl AbiWrite for &string {
+ fn abi_write(&self, writer: &mut AbiWriter) {
+ writer.string(&self)
+ }
+}
+
+impl AbiWrite for () {
+ fn abi_write(&self, _writer: &mut AbiWriter) {}
+}
+
+/// Error, which can be constructed from any ToString type
+/// Encoded to Abi as Error(string)
+#[derive(Debug)]
+pub struct StringError(String);
+
+impl<E> From<E> for StringError
+where
+ E: ToString,
+{
+ fn from(e: E) -> Self {
+ Self(e.to_string())
+ }
+}
+
+impl From<StringError> for AbiWriter {
+ fn from(v: StringError) -> Self {
+ let mut out = AbiWriter::new_call(crate::fn_selector!(Error(string)));
+ out.string(&v.0);
+ out
+ }
+}
+
+#[macro_export]
+macro_rules! abi_decode {
+ ($reader:expr, $($name:ident: $typ:ident),+ $(,)?) => {
+ $(
+ let $name = $reader.$typ()?;
+ )+
+ }
+}
+#[macro_export]
+macro_rules! abi_encode {
+ ($($typ:ident($value:expr)),* $(,)?) => {{
+ #[allow(unused_mut)]
+ let mut writer = ::evm_coder::abi::AbiWriter::new();
+ $(
+ writer.$typ($value);
+ )*
+ writer
+ }};
+ (call $val:expr; $($typ:ident($value:expr)),* $(,)?) => {{
+ #[allow(unused_mut)]
+ let mut writer = ::evm_coder::abi::AbiWriter::new_call($val);
+ $(
+ writer.$typ($value);
+ )*
+ writer
+ }}
+}
crates/evm-coder/src/events.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/src/events.rs
@@ -0,0 +1,42 @@
+use ethereum::Log;
+use primitive_types::{H160, H256};
+
+use crate::types::*;
+
+pub trait ToLog {
+ fn to_log(&self, contract: H160) -> Log;
+}
+
+pub trait ToTopic {
+ fn to_topic(&self) -> H256;
+}
+
+impl ToTopic for H256 {
+ fn to_topic(&self) -> H256 {
+ *self
+ }
+}
+
+impl ToTopic for uint256 {
+ fn to_topic(&self) -> H256 {
+ let mut out = [0u8; 32];
+ self.to_big_endian(&mut out);
+ H256(out)
+ }
+}
+
+impl ToTopic for address {
+ fn to_topic(&self) -> H256 {
+ let mut out = [0u8; 32];
+ out[12..32].copy_from_slice(&self.0);
+ H256(out)
+ }
+}
+
+impl ToTopic for uint32 {
+ fn to_topic(&self) -> H256 {
+ let mut out = [0u8; 32];
+ out[28..32].copy_from_slice(&self.to_be_bytes());
+ H256(out)
+ }
+}
crates/evm-coder/src/lib.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/src/lib.rs
@@ -0,0 +1,69 @@
+#![cfg_attr(not(feature = "std"), no_std)]
+#[cfg(not(feature = "std"))]
+extern crate alloc;
+
+pub use evm_coder_macros::{event_topic, fn_selector, solidity_interface, solidity, ToLog};
+pub mod abi;
+pub mod events;
+pub use events::ToLog;
+
+/// Solidity type definitions
+pub mod types {
+ #![allow(non_camel_case_types)]
+
+ #[cfg(not(feature = "std"))]
+ use alloc::{vec::Vec};
+ use primitive_types::{U256, H160, H256};
+
+ pub type address = H160;
+
+ pub type uint8 = u8;
+ pub type uint16 = u16;
+ pub type uint32 = u32;
+ pub type uint64 = u64;
+ pub type uint128 = u128;
+ pub type uint256 = U256;
+
+ pub type bytes4 = u32;
+
+ pub type topic = H256;
+
+ #[cfg(not(feature = "std"))]
+ pub type string = ::alloc::string::String;
+ #[cfg(feature = "std")]
+ pub type string = ::std::string::String;
+ pub type bytes = Vec<u8>;
+
+ pub type void = ();
+
+ //#region Special types
+ /// Makes function payable
+ pub type value = U256;
+ /// Makes function caller-sensitive
+ pub type caller = address;
+ //#endregion
+
+ pub struct Msg<C> {
+ pub call: C,
+ pub caller: H160,
+ pub value: U256,
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn function_selector_generation() {
+ assert_eq!(fn_selector!(transfer(address, uint256)), 0xa9059cbb);
+ }
+
+ #[test]
+ fn event_topic_generation() {
+ assert_eq!(
+ hex::encode(&event_topic!(Transfer(address, address, uint256))[..]),
+ "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
+ );
+ }
+}
crates/evm-coder/tests/a.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/evm-coder/tests/a.rs
@@ -0,0 +1,69 @@
+use evm_coder::{solidity_interface, types::*, ToLog};
+use evm_coder_macros::solidity;
+
+#[solidity_interface]
+trait OurInterface {
+ type Error;
+ fn fn_a(&self, input: uint256) -> Result<bool, Self::Error>;
+}
+
+#[solidity_interface]
+trait OurInterface1 {
+ type Error;
+ fn fn_b(&self, input: uint128) -> Result<uint32, Self::Error>;
+}
+
+#[solidity_interface(is(OurInterface), inline_is(OurInterface1), events(ERC721Log))]
+trait OurInterface2 {
+ type Error;
+ #[solidity(rename_selector = "fnK")]
+ fn fn_c(&self, input: uint32) -> Result<uint8, Self::Error>;
+ fn fn_d(&self, value: uint32) -> Result<uint32, Self::Error>;
+
+ fn caller_sensitive(&self, caller: caller) -> Result<uint8, Self::Error>;
+ fn payable(&mut self, value: value) -> Result<uint8, Self::Error>;
+}
+
+#[derive(ToLog)]
+enum ERC721Log {
+ Transfer {
+ #[indexed]
+ from: address,
+ #[indexed]
+ to: address,
+ value: uint256,
+ },
+ Eee {
+ #[indexed]
+ aaa: address,
+ bbb: uint256,
+ },
+}
+
+#[solidity_interface]
+trait ERC20 {
+ type Error;
+
+ fn decimals(&self) -> Result<uint8, Self::Error>;
+ fn balance_of(&self, owner: address) -> Result<uint256, Self::Error>;
+ fn transfer(
+ &mut self,
+ caller: caller,
+ to: address,
+ value: uint256,
+ ) -> Result<bool, Self::Error>;
+ fn transfer_from(
+ &mut self,
+ caller: caller,
+ from: address,
+ to: address,
+ value: uint256,
+ ) -> Result<bool, Self::Error>;
+ fn approve(
+ &mut self,
+ caller: caller,
+ spender: address,
+ value: uint256,
+ ) -> Result<bool, Self::Error>;
+ fn allowance(&self, owner: address, spender: address) -> Result<uint256, Self::Error>;
+}
node/Cargo.tomldiffbeforeafterboth--- a/node/Cargo.toml
+++ /dev/null
@@ -1,320 +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'
-
-[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,219 +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(),
- }
-}
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,458 +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 (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/inflation/Cargo.tomldiffbeforeafterboth--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -83,6 +83,7 @@
version = '3.0.0'
[dependencies.serde]
+default-features = false
features = ['derive']
version = '1.0.119'
pallets/inflation/src/lib.rsdiffbeforeafterboth--- a/pallets/inflation/src/lib.rs
+++ b/pallets/inflation/src/lib.rs
@@ -10,8 +10,7 @@
#[cfg(feature = "std")]
pub use std::*;
-#[cfg(feature = "std")]
-pub use serde::*;
+pub use serde::{Serialize, Deserialize};
#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;
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
@@ -23,14 +23,23 @@
'frame-support/std',
'frame-system/std',
'pallet-balances/std',
+ 'pallet-evm/std',
'pallet-timestamp/std',
'pallet-contracts/std',
'pallet-randomness-collective-flip/std',
'pallet-transaction-payment/std',
+ 'fp-evm/std',
'nft-data-structs/std',
'sp-std/std',
+ 'sp-api/std',
'sp-runtime/std',
'frame-benchmarking/std',
+ 'ethereum/std',
+ 'rlp/std',
+
+ 'ethereum-tx-sign',
+ 'primitive-types/std',
+ 'evm-coder/std',
]
################################################################################
@@ -98,6 +107,7 @@
version = '3.0.0'
[dependencies.serde]
+default-features = false
features = ['derive']
version = '1.0.119'
@@ -119,10 +129,26 @@
branch = 'polkadot-v0.9.3'
version = '3.0.0'
+
################################################################################
# Local Dependencies
[dependencies.nft-data-structs]
default-features = false
path = '../../primitives'
-version = '0.9.0'
\ No newline at end of file
+version = '0.9.0'
+
+
+[dependencies]
+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/eth/account.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/account.rs
@@ -0,0 +1,135 @@
+use crate::Config;
+use codec::{Encode, EncodeLike, Decode};
+use sp_core::crypto::AccountId32;
+use primitive_types::H160;
+use core::cmp::Ordering;
+use serde::{Serialize, Deserialize};
+use pallet_evm::AddressMapping;
+use sp_std::vec::Vec;
+use sp_std::clone::Clone;
+
+pub trait CrossAccountId<AccountId>:
+ Encode + EncodeLike + Decode +
+ Clone + PartialEq + Ord + core::fmt::Debug // +
+ // Serialize + Deserialize<'static>
+{
+ fn as_sub(&self) -> &AccountId;
+ fn as_eth(&self) -> &H160;
+
+ fn from_sub(account: AccountId) -> Self;
+ fn from_eth(account: H160) -> Self;
+}
+
+#[derive(Eq)]
+#[derive(Serialize, Deserialize)]
+pub struct BasicCrossAccountId<T: Config> {
+ /// If true - then ethereum is canonical encoding
+ from_ethereum: bool,
+ substrate: T::AccountId,
+ ethereum: H160,
+}
+
+impl<T: Config> core::fmt::Debug for BasicCrossAccountId<T> {
+ fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
+ if self.from_ethereum {
+ fmt.debug_tuple("CrossAccountId::Ethereum")
+ .field(&self.ethereum)
+ .finish()
+ } else {
+ fmt.debug_tuple("CrossAccountId::Substrate")
+ .field(&self.substrate)
+ .finish()
+ }
+ }
+}
+
+impl<T: Config> PartialOrd for BasicCrossAccountId<T> {
+ fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+ Some(self.substrate.cmp(&other.substrate))
+ }
+}
+
+impl<T: Config> Ord for BasicCrossAccountId<T> {
+ fn cmp(&self, other: &Self) -> Ordering {
+ self.partial_cmp(other).expect("substrate account is total ordered")
+ }
+}
+
+impl<T: Config> PartialEq for BasicCrossAccountId<T> {
+ fn eq(&self, other: &Self) -> bool {
+ if self.from_ethereum == other.from_ethereum {
+ self.substrate == other.substrate && self.ethereum == other.ethereum
+ } else if self.from_ethereum {
+ // ethereum is canonical encoding, but we need to compare derived address
+ self.substrate == other.substrate
+ } else {
+ self.ethereum == other.ethereum
+ }
+ }
+}
+impl<T: Config> Clone for BasicCrossAccountId<T> {
+ fn clone(&self) -> Self {
+ Self {
+ from_ethereum: self.from_ethereum,
+ substrate: self.substrate.clone(),
+ ethereum: self.ethereum,
+ }
+ }
+}
+impl<T: Config> Encode for BasicCrossAccountId<T> {
+ fn encode(&self) -> Vec<u8> {
+ let as_result = if !self.from_ethereum {
+ Ok(self.substrate.clone())
+ } else {
+ Err(self.ethereum)
+ };
+ as_result.encode()
+ }
+}
+impl<T: Config> EncodeLike for BasicCrossAccountId<T> {}
+impl<T: Config> Decode for BasicCrossAccountId<T> {
+ fn decode<I>(input: &mut I) -> Result<Self, codec::Error>
+ where I: codec::Input
+ {
+ Ok(match <Result<T::AccountId, H160>>::decode(input)? {
+ Ok(s) => Self::from_sub(s),
+ Err(e) => Self::from_eth(e),
+ })
+ }
+}
+impl<T: Config> CrossAccountId<T::AccountId> for BasicCrossAccountId<T> {
+ fn as_sub(&self) -> &T::AccountId {
+ &self.substrate
+ }
+ fn as_eth(&self) -> &H160 {
+ &self.ethereum
+ }
+ fn from_sub(substrate: T::AccountId) -> Self {
+ Self {
+ ethereum: T::EvmBackwardsAddressMapping::from_account_id(substrate.clone()),
+ substrate,
+ from_ethereum: false,
+ }
+ }
+ fn from_eth(ethereum: H160) -> Self {
+ Self {
+ ethereum,
+ substrate: T::EvmAddressMapping::into_account_id(ethereum),
+ from_ethereum: true,
+ }
+ }
+}
+
+pub trait EvmBackwardsAddressMapping<AccountId> {
+ fn from_account_id(account_id: AccountId) -> H160;
+}
+
+/// Should have same mapping as EnsureAddressTruncated
+pub struct MapBackwardsAddressTruncated;
+impl EvmBackwardsAddressMapping<AccountId32> for MapBackwardsAddressTruncated {
+ fn from_account_id(account_id: AccountId32) -> H160 {
+ let mut out = [0; 20];
+ out.copy_from_slice(&(account_id.as_ref() as &[u8])[0..20]);
+ H160(out)
+ }
+}
\ No newline at end of file
pallets/nft/src/eth/erc.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/erc.rs
@@ -0,0 +1,134 @@
+use evm_coder::{solidity_interface, solidity, types::*, ToLog};
+use sp_std::vec::Vec;
+
+#[solidity_interface]
+pub trait InlineNameSymbol {
+ type Error;
+
+ fn name(&self) -> Result<string, Self::Error>;
+ fn symbol(&self) -> Result<string, Self::Error>;
+}
+
+#[solidity_interface]
+pub trait InlineTotalSupply {
+ type Error;
+
+ fn total_supply(&self) -> Result<uint256, Self::Error>;
+}
+
+#[solidity_interface]
+pub trait ERC165 {
+ type Error;
+
+ fn supports_interface(&self, interface_id: bytes4) -> Result<bool, Self::Error>;
+}
+
+#[solidity_interface(inline_is(InlineNameSymbol))]
+pub trait ERC721Metadata {
+ type Error;
+
+ #[solidity(rename_selector = "tokenURI")]
+ fn token_uri(&self, token_id: uint256) -> Result<string, Self::Error>;
+}
+
+#[solidity_interface(inline_is(InlineTotalSupply))]
+pub trait ERC721Enumerable {
+ type Error;
+
+ fn token_by_index(&self, index: uint256) -> Result<uint256, Self::Error>;
+ fn token_of_owner_by_index(&self, owner: address, index: uint256) -> Result<uint256, Self::Error>;
+}
+
+
+#[derive(ToLog)]
+pub enum ERC721Events {
+ Transfer {
+ #[indexed] from: address,
+ #[indexed] to: address,
+ #[indexed] token_id: uint256,
+ },
+ Approval {
+ #[indexed] owner: address,
+ #[indexed] approved: address,
+ #[indexed] token_id: uint256,
+ },
+ #[allow(dead_code)]
+ ApprovalForAll {
+ #[indexed] owner: address,
+ #[indexed] operator: address,
+ approved: bool,
+ }
+}
+
+#[solidity_interface(is(ERC165), events(ERC721Events))]
+pub trait ERC721 {
+ type Error;
+
+ fn balance_of(&self, owner: address) -> Result<uint256, Self::Error>;
+ fn owner_of(&self, token_id: uint256) -> Result<address, Self::Error>;
+
+ #[solidity(rename_selector = "safeTransferFrom")]
+ fn safe_transfer_from_with_data(&mut self, from: address, to: address, token_id: uint256, data: bytes, value: value) -> Result<void, Self::Error>;
+ fn safe_transfer_from(&mut self, from: address, to: address, token_id: uint256, value: value) -> Result<void, Self::Error>;
+
+ fn transfer_from(&mut self, caller: caller, from: address, to: address, token_id: uint256, value: value) -> Result<void, Self::Error>;
+ fn approve(&mut self, caller: caller, approved: address, token_id: uint256, value: value) -> Result<void, Self::Error>;
+ fn set_approval_for_all(&mut self, caller: caller, operator: address, approved: bool) -> Result<void, Self::Error>;
+
+ fn get_approved(&self, token_id: uint256) -> Result<address, Self::Error>;
+ fn is_approved_for_all(&self, owner: address, operator: address) -> Result<address, Self::Error>;
+}
+
+#[solidity_interface]
+pub trait ERC721UniqueExtensions {
+ type Error;
+
+ fn transfer(&mut self, caller: caller, to: address, token_id: uint256, value: value) -> Result<void, Self::Error>;
+}
+
+#[solidity_interface(is(ERC165, ERC721, ERC721Metadata, ERC721Enumerable, ERC721UniqueExtensions))]
+pub trait UniqueNFT {
+ type Error;
+}
+
+#[derive(ToLog)]
+pub enum ERC20Events {
+ Transfer {
+ #[indexed] from: address,
+ #[indexed] to: address,
+ value: uint256,
+ },
+ Approval {
+ #[indexed] owner: address,
+ #[indexed] spender: address,
+ value: uint256,
+ }
+}
+
+#[solidity_interface(inline_is(InlineNameSymbol, InlineTotalSupply), events(ERC20Events))]
+pub trait ERC20 {
+ type Error;
+
+ fn decimals(&self) -> Result<uint8, Self::Error>;
+ fn balance_of(&self, owner: address) -> Result<uint256, Self::Error>;
+ fn transfer(&mut self, caller: caller, to: address, value: uint256) -> Result<bool, Self::Error>;
+ fn transfer_from(&mut self, caller: caller, from: address, to: address, value: uint256) -> Result<bool, Self::Error>;
+ fn approve(&mut self, caller: caller, spender: address, value: uint256) -> Result<bool, Self::Error>;
+ fn allowance(&self, owner: address, spender: address) -> Result<uint256, Self::Error>;
+}
+
+#[solidity_interface(is(ERC165, ERC20))]
+pub trait UniqueFungible {
+ type Error;
+}
+
+/// Runtime metadata like helpers for evm
+#[solidity_interface]
+trait UniqueHelpers {
+ type Error;
+
+ /// Returns interface for NFT collections
+ fn nft_interface(&self) -> Result<string, Self::Error>;
+ /// Returns interface for Fungible collections
+ fn fungible_interface(&self) -> Result<string, Self::Error>;
+}
\ No newline at end of file
pallets/nft/src/eth/erc_impl.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/erc_impl.rs
@@ -0,0 +1,283 @@
+use core::char::{decode_utf16, REPLACEMENT_CHARACTER};
+use evm_coder::{
+ abi::{AbiWriter, StringError},
+ types::*,
+};
+use core::convert::TryInto;
+use alloc::format;
+use crate::{Allowances, Module, Balance, CollectionHandle, CollectionMode, Config, NftItemList};
+use frame_support::storage::StorageDoubleMap;
+use pallet_evm::AddressMapping;
+use super::erc::*;
+use super::account::CrossAccountId;
+
+type Result<T> = core::result::Result<T, StringError>;
+
+impl<T: Config> InlineNameSymbol for CollectionHandle<T> {
+ type Error = StringError;
+
+ fn name(&self) -> Result<string> {
+ Ok(decode_utf16(self.name.iter().copied())
+ .map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))
+ .collect::<string>())
+ }
+
+ fn symbol(&self) -> Result<string> {
+ Ok(string::from_utf8_lossy(&self.token_prefix).into())
+ }
+}
+
+impl<T: Config> InlineTotalSupply for CollectionHandle<T> {
+ type Error = StringError;
+
+ fn total_supply(&self) -> Result<uint256> {
+ // TODO: we do not track total amount of all tokens
+ Ok(0.into())
+ }
+}
+
+impl<T: Config> ERC721Metadata for CollectionHandle<T> {
+ type Error = StringError;
+
+ fn token_uri(&self, token_id: uint256) -> Result<string> {
+ // TODO: We should standartize url prefix, maybe via offchain schema?
+ Ok(format!("unique.network/{}/{}", self.id, token_id))
+ }
+
+ fn call_inline_name_symbol(&mut self, c: Msg<InlineNameSymbolCall>) -> Result<AbiWriter> {
+ <Self as InlineNameSymbol>::call(self, c)
+ }
+}
+
+impl<T: Config> ERC721Enumerable for CollectionHandle<T> {
+ type Error = StringError;
+
+ fn token_by_index(&self, index: uint256) -> Result<uint256> {
+ Ok(index)
+ }
+
+ fn token_of_owner_by_index(&self, owner: address, index: uint256) -> Result<uint256> {
+ // TODO: Not implemetable
+ Err("not implemented".into())
+ }
+
+ fn call_inline_total_supply(&mut self, c: Msg<InlineTotalSupplyCall>) -> Result<AbiWriter> {
+ <Self as InlineTotalSupply>::call(self, c)
+ }
+}
+
+impl<T: Config> ERC721 for CollectionHandle<T> {
+ type Error = StringError;
+
+ fn balance_of(&self, owner: address) -> Result<uint256> {
+ let owner = T::EvmAddressMapping::into_account_id(owner);
+ let balance = <Balance<T>>::get(self.id, owner);
+ Ok(balance.into())
+ }
+ fn owner_of(&self, token_id: uint256) -> Result<address> {
+ let token_id: u32 = token_id.try_into().map_err(|_| "token id overflow")?;
+ let token = <NftItemList<T>>::get(self.id, token_id).ok_or("unknown token")?;
+ Ok(token.owner.as_eth().clone())
+ }
+ fn safe_transfer_from_with_data(
+ &mut self,
+ _from: address,
+ _to: address,
+ _token_id: uint256,
+ _data: bytes,
+ _value: value,
+ ) -> Result<void> {
+ // TODO: Not implemetable
+ Err("not implemented".into())
+ }
+ fn safe_transfer_from(
+ &mut self,
+ _from: address,
+ _to: address,
+ _token_id: uint256,
+ _value: value,
+ ) -> Result<void> {
+ // TODO: Not implemetable
+ Err("not implemented".into())
+ }
+
+ fn transfer_from(
+ &mut self,
+ caller: caller,
+ from: address,
+ to: address,
+ token_id: uint256,
+ _value: value,
+ ) -> Result<void> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let from = T::CrossAccountId::from_eth(from);
+ let to = T::CrossAccountId::from_eth(to);
+ let token_id = token_id.try_into().map_err(|_| "token_id overflow")?;
+
+ <Module<T>>::transfer_from_internal(&caller, &from, &to, &self, token_id, 1)
+ .map_err(|_| "transferFrom error")?;
+ Ok(())
+ }
+
+ fn approve(
+ &mut self,
+ caller: caller,
+ approved: address,
+ token_id: uint256,
+ _value: value,
+ ) -> Result<void> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let approved = T::CrossAccountId::from_eth(approved);
+ let token_id = token_id.try_into().map_err(|_| "token_id overflow")?;
+
+ <Module<T>>::approve_internal(&caller, &approved, &self, token_id, 1)
+ .map_err(|_| "approve internal")?;
+ Ok(())
+ }
+
+ fn set_approval_for_all(
+ &mut self,
+ _caller: caller,
+ _operator: address,
+ _approved: bool,
+ ) -> Result<void> {
+ // TODO: Not implemetable
+ Err("not implemented".into())
+ }
+
+ fn get_approved(&self, _token_id: uint256) -> Result<address> {
+ // TODO: Not implemetable
+ Err("not implemented".into())
+ }
+
+ fn is_approved_for_all(&self, _owner: address, _operator: address) -> Result<address> {
+ // TODO: Not implemetable
+ Err("not implemented".into())
+ }
+
+ fn call_erc165(&mut self, c: Msg<ERC165Call>) -> Result<AbiWriter> {
+ let ERC165Call::SupportsInterface { interface_id } = c.call;
+ Ok(evm_coder::abi_encode!(bool(
+ &ERC721Call::supports_interface(interface_id)
+ )))
+ }
+}
+
+impl<T: Config> ERC721UniqueExtensions for CollectionHandle<T> {
+ type Error = StringError;
+ fn transfer(
+ &mut self,
+ caller: caller,
+ to: address,
+ token_id: uint256,
+ value: value,
+ ) -> Result<void> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let to = T::CrossAccountId::from_eth(to);
+ let token_id = token_id.try_into().map_err(|_| "amount overflow")?;
+
+ <Module<T>>::transfer_internal(&caller, &to, &self, token_id, 1)
+ .map_err(|_| "transfer error")?;
+ Ok(())
+ }
+}
+
+impl<T: Config> UniqueNFT for CollectionHandle<T> {
+ type Error = StringError;
+ fn call_erc165(&mut self, c: Msg<ERC165Call>) -> Result<AbiWriter> {
+ let ERC165Call::SupportsInterface { interface_id } = c.call;
+ Ok(evm_coder::abi_encode!(bool(
+ &UniqueNFTCall::supports_interface(interface_id)
+ )))
+ }
+ fn call_erc721(&mut self, c: Msg<ERC721Call>) -> Result<AbiWriter> {
+ <Self as ERC721>::call(self, c)
+ }
+ fn call_erc721_metadata(&mut self, c: Msg<ERC721MetadataCall>) -> Result<AbiWriter> {
+ <Self as ERC721Metadata>::call(self, c)
+ }
+ fn call_erc721_enumerable(&mut self, c: Msg<ERC721EnumerableCall>) -> Result<AbiWriter> {
+ <Self as ERC721Enumerable>::call(self, c)
+ }
+ fn call_erc721_unique_extensions(
+ &mut self,
+ c: Msg<ERC721UniqueExtensionsCall>,
+ ) -> Result<AbiWriter> {
+ <Self as ERC721UniqueExtensions>::call(self, c)
+ }
+}
+
+impl<T: Config> ERC20 for CollectionHandle<T> {
+ type Error = StringError;
+ fn decimals(&self) -> Result<uint8> {
+ Ok(if let CollectionMode::Fungible(decimals) = &self.mode {
+ *decimals
+ } else {
+ unreachable!()
+ })
+ }
+ fn balance_of(&self, owner: address) -> Result<uint256> {
+ let owner = T::EvmAddressMapping::into_account_id(owner);
+ let balance = <Balance<T>>::get(self.id, owner);
+ Ok(balance.into())
+ }
+ fn transfer(&mut self, caller: caller, to: address, amount: uint256) -> Result<bool> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let to = T::CrossAccountId::from_eth(to);
+ let amount = amount.try_into().map_err(|_| "amount overflow")?;
+
+ <Module<T>>::transfer_internal(&caller, &to, &self, 1, amount)
+ .map_err(|_| "transfer error")?;
+ Ok(true)
+ }
+ fn transfer_from(
+ &mut self,
+ caller: caller,
+ from: address,
+ to: address,
+ amount: uint256,
+ ) -> Result<bool> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let from = T::CrossAccountId::from_eth(from);
+ let to = T::CrossAccountId::from_eth(to);
+ let amount = amount.try_into().map_err(|_| "amount overflow")?;
+
+ <Module<T>>::transfer_from_internal(&caller, &from, &to, &self, 1, amount)
+ .map_err(|_| "transferFrom error")?;
+ Ok(true)
+ }
+ fn approve(&mut self, caller: caller, spender: address, amount: uint256) -> Result<bool> {
+ let caller = T::CrossAccountId::from_eth(caller);
+ let spender = T::CrossAccountId::from_eth(spender);
+ let amount = amount.try_into().map_err(|_| "amount overflow")?;
+
+ <Module<T>>::approve_internal(&caller, &spender, &self, 1, amount)
+ .map_err(|_| "approve internal")?;
+ Ok(true)
+ }
+ fn allowance(&self, owner: address, spender: address) -> Result<uint256> {
+ let owner = T::CrossAccountId::from_eth(owner);
+ let spender = T::CrossAccountId::from_eth(spender);
+
+ Ok(<Allowances<T>>::get(self.id, (1, owner.as_sub(), spender.as_sub())).into())
+ }
+ fn call_inline_name_symbol(&mut self, c: Msg<InlineNameSymbolCall>) -> Result<AbiWriter> {
+ <Self as InlineNameSymbol>::call(self, c)
+ }
+ fn call_inline_total_supply(&mut self, c: Msg<InlineTotalSupplyCall>) -> Result<AbiWriter> {
+ <Self as InlineTotalSupply>::call(self, c)
+ }
+}
+
+impl<T: Config> UniqueFungible for CollectionHandle<T> {
+ type Error = StringError;
+ fn call_erc165(&mut self, c: Msg<ERC165Call>) -> Result<AbiWriter> {
+ let ERC165Call::SupportsInterface { interface_id } = c.call;
+ Ok(evm_coder::abi_encode!(bool(
+ &UniqueNFTCall::supports_interface(interface_id)
+ )))
+ }
+ fn call_erc20(&mut self, c: Msg<ERC20Call>) -> Result<AbiWriter> {
+ <Self as ERC20>::call(self, c)
+ }
+}
pallets/nft/src/eth/log.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/log.rs
@@ -0,0 +1,19 @@
+use sp_std::cell::RefCell;
+use sp_std::vec::Vec;
+use sp_core::{H160, H256};
+use ethereum::Log;
+
+#[derive(Default)]
+pub struct LogRecorder(RefCell<Vec<Log>>);
+
+impl LogRecorder {
+ pub fn is_empty(&self) -> bool {
+ self.0.borrow().is_empty()
+ }
+ pub fn log(&self, log: Log) {
+ self.0.borrow_mut().push(log);
+ }
+ pub fn retrieve_logs(self) -> Vec<Log> {
+ self.0.into_inner()
+ }
+}
pallets/nft/src/eth/mod.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/mod.rs
@@ -0,0 +1,188 @@
+pub mod account;
+pub mod erc;
+mod erc_impl;
+pub mod log;
+pub mod sponsoring;
+
+use evm_coder::abi::AbiWriter;
+use evm_coder::abi::StringError;
+use sp_std::prelude::*;
+use sp_std::borrow::ToOwned;
+use sp_std::vec::Vec;
+
+use pallet_evm::{PrecompileOutput, ExitReason, ExitRevert, ExitSucceed};
+use sp_core::{H160, U256};
+use frame_support::storage::StorageMap;
+
+use crate::{Config, CollectionById, CollectionHandle, CollectionId, CollectionMode};
+
+use erc::{UniqueFungible, UniqueFungibleCall, UniqueNFT, UniqueNFTCall};
+use evm_coder::{types::*, abi::AbiReader};
+
+pub struct NftErcSupport<T: Config>(core::marker::PhantomData<T>);
+
+// 0x17c4e6453Cc49AAAaEACA894e6D9683e00000001 - collection
+// TODO: Unhardcode prefix
+const ETH_ACCOUNT_PREFIX: [u8; 16] = [
+ 0x17, 0xc4, 0xe6, 0x45, 0x3c, 0xc4, 0x9a, 0xaa, 0xae, 0xac, 0xa8, 0x94, 0xe6, 0xd9, 0x68, 0x3e,
+];
+
+fn map_eth_to_id(eth: &H160) -> Option<CollectionId> {
+ if ð[0..16] != ETH_ACCOUNT_PREFIX {
+ return None;
+ }
+ let mut id_bytes = [0; 4];
+ id_bytes.copy_from_slice(ð[16..20]);
+ Some(u32::from_be_bytes(id_bytes))
+}
+pub fn collection_id_to_address(id: u32) -> H160 {
+ let mut out = [0; 20];
+ out[0..16].copy_from_slice(Ð_ACCOUNT_PREFIX);
+ out[16..20].copy_from_slice(&u32::to_be_bytes(id));
+ H160(out)
+}
+
+fn call_internal<T: Config>(
+ collection: &mut CollectionHandle<T>,
+ caller: caller,
+ method_id: u32,
+ mut input: AbiReader,
+ value: U256,
+) -> Result<Option<AbiWriter>, evm_coder::abi::StringError> {
+ match collection.mode.clone() {
+ CollectionMode::Fungible(_) => {
+ #[cfg(feature = "std")]
+ {
+ println!("Parse fungible call {:x}", method_id);
+ }
+ let call = match UniqueFungibleCall::parse(method_id, &mut input)? {
+ Some(v) => v,
+ None => {
+ #[cfg(feature = "std")]
+ {
+ println!("Method not found");
+ }
+ return Ok(None);
+ }
+ };
+ #[cfg(feature = "std")]
+ {
+ dbg!(&call);
+ }
+ Ok(Some(<CollectionHandle<T> as UniqueFungible>::call(
+ collection,
+ Msg {
+ call,
+ caller,
+ value,
+ },
+ )?))
+ }
+ CollectionMode::NFT => {
+ let call = match UniqueNFTCall::parse(method_id, &mut input)? {
+ Some(v) => v,
+ None => return Ok(None),
+ };
+ Ok(Some(<CollectionHandle<T> as UniqueNFT>::call(
+ collection,
+ Msg {
+ call,
+ caller,
+ value,
+ },
+ )?))
+ }
+ _ => {
+ return Err(StringError::from(
+ "erc calls only supported to fungible and nft collections for now",
+ )
+ .into())
+ }
+ }
+}
+
+impl<T: Config> pallet_evm::OnMethodCall<T> for NftErcSupport<T> {
+ fn is_reserved(target: &H160) -> bool {
+ map_eth_to_id(target).is_some()
+ }
+ fn is_used(target: &H160) -> bool {
+ map_eth_to_id(target)
+ .map(<CollectionById<T>>::contains_key)
+ .unwrap_or(false)
+ }
+ fn get_code(target: &H160) -> Option<Vec<u8>> {
+ map_eth_to_id(&target)
+ .and_then(<CollectionById<T>>::get)
+ .map(|collection| {
+ match collection.mode {
+ CollectionMode::NFT => include_bytes!("stubs/ERC721.bin") as &[u8],
+ CollectionMode::Fungible(_) => include_bytes!("stubs/ERC20.bin") as &[u8],
+ CollectionMode::ReFungible => include_bytes!("stubs/ERC1633.bin") as &[u8],
+ CollectionMode::Invalid => include_bytes!("stubs/Invalid.bin") as &[u8],
+ }
+ .to_owned()
+ })
+ }
+ fn call(
+ source: &H160,
+ target: &H160,
+ gas_limit: u64,
+ input: &[u8],
+ value: U256,
+ ) -> Option<PrecompileOutput> {
+ let mut collection = map_eth_to_id(&target)
+ .and_then(|id| <CollectionHandle<T>>::get_with_gas_limit(id, gas_limit))?;
+ let (method_id, input) = AbiReader::new_call(input).unwrap();
+ let result = call_internal(&mut collection, *source, method_id, input, value);
+ let cost = gas_limit - collection.gas_left();
+ let logs = collection.logs.retrieve_logs();
+ match result {
+ Ok(Some(v)) => Some(PrecompileOutput {
+ exit_status: ExitReason::Succeed(ExitSucceed::Returned),
+ cost,
+ logs,
+ output: v.finish(),
+ }),
+ Ok(None) => None,
+ Err(e) => Some(PrecompileOutput {
+ exit_status: ExitReason::Revert(ExitRevert::Reverted),
+ cost: 0,
+ logs: Default::default(),
+ output: AbiWriter::from(e).finish(),
+ }),
+ }
+ }
+}
+
+// TODO: This function is slow, and output can be memoized
+pub fn generate_transaction(collection_id: u32, chain_id: u64) -> ethereum::Transaction {
+ let contract = collection_id_to_address(collection_id);
+
+ // FIXME: Can be done on wasm runtime with https://github.com/paritytech/substrate/pull/8728
+ #[cfg(feature = "std")]
+ {
+ let signed = ethereum_tx_sign::RawTransaction {
+ nonce: 0.into(),
+ to: Some(contract.0.into()),
+ value: 0.into(),
+ gas_price: 0.into(),
+ gas: 0.into(),
+ // zero selector, this transaction always have same sender, so all data should be acquired from logs
+ data: Vec::from([0, 0, 0, 0]),
+ }
+ .sign(
+ // TODO: move to pallet config
+ // 0xF70631E55faff9f3FD3681545aa6c724226a3853
+ // 9dbaef9b3ebc00e53f67c6a77bcfbf2c4f2aebe4d70d94af4f2df01744b7a91a
+ &hex_literal::hex!("9dbaef9b3ebc00e53f67c6a77bcfbf2c4f2aebe4d70d94af4f2df01744b7a91a")
+ .into(),
+ &chain_id,
+ );
+ rlp::decode::<ethereum::Transaction>(&signed)
+ .expect("transaction is just created, it can't be broken")
+ }
+ #[cfg(not(feature = "std"))]
+ {
+ panic!("transaction generation not yet supported by wasm runtime")
+ }
+}
pallets/nft/src/eth/sponsoring.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/sponsoring.rs
@@ -0,0 +1,142 @@
+//! Implements EVM sponsoring logic via OnChargeEVMTransaction
+
+use crate::{Collection, ChainLimit, CollectionById, Config, NftTransferBasket, FungibleTransferBasket, eth::account::EvmBackwardsAddressMapping};
+use evm_coder::abi::AbiReader;
+use frame_support::{storage::{StorageMap, StorageDoubleMap, StorageValue}, traits::Currency};
+use pallet_evm::{EVMCurrencyAdapter, WithdrawReason};
+use sp_core::{H160, U256};
+use sp_std::prelude::*;
+use super::{account::CrossAccountId, erc::{UniqueFungibleCall, UniqueNFTCall, ERC721Call, ERC20Call, ERC721UniqueExtensionsCall}};
+use core::convert::TryInto;
+
+type NegativeImbalanceOf<C, T> =
+ <C as Currency<<T as frame_system::Config>::AccountId>>::NegativeImbalance;
+
+pub struct ChargeEvmTransaction;
+pub struct ChargeEvmLiquidityInfo<T>
+where
+ T: Config,
+ T: pallet_evm::Config,
+{
+ who: H160,
+ negative_imbalance: NegativeImbalanceOf<<T as Config>::Currency, T>,
+}
+
+struct AnyError;
+
+fn try_sponsor<T: Config>(caller: &H160, collection_id: u32, collection: &Collection<T>, call: &[u8]) -> Result<(), AnyError> {
+ let (method_id, mut reader) = AbiReader::new_call(call).map_err(|_| AnyError)?;
+ match &collection.mode {
+ crate::CollectionMode::NFT => {
+ let call: UniqueNFTCall = UniqueNFTCall::parse(method_id, &mut reader).map_err(|_| AnyError)?.ok_or(AnyError)?;
+ match call {
+ UniqueNFTCall::ERC721UniqueExtensions(ERC721UniqueExtensionsCall::Transfer {token_id, ..}) | UniqueNFTCall::ERC721(ERC721Call::TransferFrom {token_id, ..}) => {
+ let token_id: u32 = token_id.try_into().map_err(|_| AnyError)?;
+ let block_number = <frame_system::Module<T>>::block_number() as T::BlockNumber;
+ let collection_limits = &collection.limits;
+ let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {
+ collection_limits.sponsor_transfer_timeout
+ } else {
+ ChainLimit::get().nft_sponsor_transfer_timeout
+ };
+
+ let mut sponsor = true;
+ if <NftTransferBasket<T>>::contains_key(collection_id, token_id) {
+ let last_tx_block = <NftTransferBasket<T>>::get(collection_id, token_id);
+ let limit_time = last_tx_block + limit.into();
+ if block_number <= limit_time {
+ sponsor = false;
+ }
+ }
+ if sponsor {
+ <NftTransferBasket<T>>::insert(collection_id, token_id, block_number);
+ return Ok(())
+ }
+ },
+ _ => {},
+ }
+ },
+ crate::CollectionMode::Fungible(_) => {
+ let call: UniqueFungibleCall = UniqueFungibleCall::parse(method_id, &mut reader).map_err(|_| AnyError)?.ok_or(AnyError)?;
+ match call {
+ UniqueFungibleCall::ERC20(ERC20Call::Transfer {..}) => {
+ let who = T::CrossAccountId::from_eth(caller.clone());
+ let collection_limits = &collection.limits;
+ let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {
+ collection_limits.sponsor_transfer_timeout
+ } else {
+ ChainLimit::get().fungible_sponsor_transfer_timeout
+ };
+
+ let block_number = <frame_system::Module<T>>::block_number() as T::BlockNumber;
+ let mut sponsored = true;
+ if <FungibleTransferBasket<T>>::contains_key(collection_id, who.as_sub()) {
+ let last_tx_block = <FungibleTransferBasket<T>>::get(collection_id, who.as_sub());
+ let limit_time = last_tx_block + limit.into();
+ if block_number <= limit_time {
+ sponsored = false;
+ }
+ }
+ if sponsored {
+ <FungibleTransferBasket<T>>::insert(collection_id, who.as_sub(), block_number);
+ return Ok(())
+ }
+ },
+ _ => {},
+ }
+ },
+ _ => {},
+ }
+ return Err(AnyError)
+}
+
+impl<T> pallet_evm::OnChargeEVMTransaction<T> for ChargeEvmTransaction
+where
+ T: Config,
+ T: pallet_evm::Config,
+{
+ type LiquidityInfo = Option<ChargeEvmLiquidityInfo<T>>;
+
+ fn withdraw_fee(
+ who: &H160,
+ reason: WithdrawReason,
+ fee: U256,
+ ) -> Result<Self::LiquidityInfo, pallet_evm::Error<T>> {
+ let mut who_pays_fee = *who;
+ if let WithdrawReason::Call { target, input } = &reason {
+ if let Some(collection_id) = crate::eth::map_eth_to_id(&target) {
+ if let Some(collection) = <CollectionById<T>>::get(collection_id) {
+ if let Some(sponsor) = collection.sponsorship.sponsor() {
+ if try_sponsor(who, collection_id, &collection, &input).is_ok() {
+ who_pays_fee =
+ T::EvmBackwardsAddressMapping::from_account_id(sponsor.clone());
+ }
+ }
+ }
+ }
+ }
+
+ // TODO: Pay fee from substrate address
+ let negative_imbalance = EVMCurrencyAdapter::<<T as Config>::Currency, ()>::withdraw_fee(
+ &who_pays_fee,
+ reason,
+ fee,
+ )?;
+ Ok(negative_imbalance.map(|i| ChargeEvmLiquidityInfo {
+ who: who_pays_fee,
+ negative_imbalance: i,
+ }))
+ }
+
+ fn correct_and_deposit_fee(
+ who: &H160,
+ corrected_fee: U256,
+ already_withdrawn: Self::LiquidityInfo,
+ ) -> Result<(), pallet_evm::Error<T>> {
+ EVMCurrencyAdapter::<<T as Config>::Currency, ()>::correct_and_deposit_fee(
+ &already_withdrawn.as_ref().map(|e| e.who).unwrap_or(*who),
+ corrected_fee,
+ already_withdrawn.map(|e| e.negative_imbalance),
+ )
+ }
+}
pallets/nft/src/eth/stubs/ERC1633.bindiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/stubs/ERC1633.bin
@@ -0,0 +1 @@
+TODO
\ No newline at end of file
pallets/nft/src/eth/stubs/ERC20.bindiffbeforeafterbothbinary blob — no preview
pallets/nft/src/eth/stubs/ERC20.soldiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/stubs/ERC20.sol
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: OTHER
+
+pragma solidity >=0.8.0 <0.9.0;
+
+contract ERC20 {
+ uint8 _dummy = 0;
+ string stub_error = "this contract does not exists, code for collections is implemented at pallet side";
+
+ // 0x18160ddd
+ function totalSupply() external view returns (uint256) {
+ require(false, stub_error);
+ _dummy;
+ return 0;
+ }
+
+ // 0x70a08231
+ function balanceOf(address account) external view returns (uint256) {
+ require(false, stub_error);
+ account;
+ _dummy;
+ return 0;
+ }
+
+ // 0xa9059cbb
+ function transfer(address recipient, uint256 amount) external returns (bool) {
+ require(false, stub_error);
+ recipient;
+ amount;
+ _dummy = 0;
+ return false;
+ }
+
+ // 0xdd62ed3e
+ function allowance(address owner, address spender) external view returns (uint256) {
+ require(false, stub_error);
+ owner;
+ spender;
+ return _dummy;
+ }
+
+ // 0x095ea7b3
+ function approve(address spender, uint256 amount) external returns (bool) {
+ require(false, stub_error);
+ spender;
+ amount;
+ _dummy = 0;
+ return false;
+ }
+
+ // 0x23b872dd
+ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) {
+ require(false, stub_error);
+ sender;
+ recipient;
+ amount;
+ _dummy = 0;
+ return false;
+ }
+
+ // While ERC165 is not required by spec of ERC20, better implement it
+ // 0x01ffc9a7
+ function supportsInterface(bytes4 interfaceID) public pure returns (bool) {
+ return
+ // ERC20
+ interfaceID == 0x36372b07 ||
+ // ERC165
+ interfaceID == 0x01ffc9a7;
+ }
+}
\ No newline at end of file
pallets/nft/src/eth/stubs/ERC721.bindiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/stubs/ERC721.bin
@@ -0,0 +1 @@
+0x608060405260008060006101000a81548160ff021916908360ff16021790555060008060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180608001604052806051815260200162000cd6605191396001908051906020019061008f9291906100a2565b5034801561009c57600080fd5b506101a6565b8280546100ae90610145565b90600052602060002090601f0160209004810192826100d05760008555610117565b82601f106100e957805160ff1916838001178555610117565b82800160010185558215610117579182015b828111156101165782518255916020019190600101906100fb565b5b5090506101249190610128565b5090565b5b80821115610141576000816000905550600101610129565b5090565b6000600282049050600182168061015d57607f821691505b6020821081141561017157610170610177565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b610b2080620001b66000396000f3fe6080604052600436106100915760003560e01c80636352211e116100595780636352211e1461016457806370a08231146101a1578063a22cb465146101de578063b88d4fde14610207578063e985e9c51461022357610091565b806301ffc9a714610096578063081812fc146100d3578063095ea7b31461011057806323b872dd1461012c57806342842e0e14610148575b600080fd5b3480156100a257600080fd5b506100bd60048036038101906100b89190610821565b610260565b6040516100ca919061093b565b60405180910390f35b3480156100df57600080fd5b506100fa60048036038101906100f5919061084a565b6102c2565b6040516101079190610920565b60405180910390f35b61012a600480360381019061012591906107e5565b610333565b005b610146600480360381019061014191906106da565b61037d565b005b610162600480360381019061015d91906106da565b6103c8565b005b34801561017057600080fd5b5061018b6004803603810190610186919061084a565b610413565b6040516101989190610920565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190610675565b610484565b6040516101d59190610978565b60405180910390f35b3480156101ea57600080fd5b50610205600480360381019061020091906107a9565b6104d4565b005b610221600480360381019061021c9190610729565b610539565b005b34801561022f57600080fd5b5061024a6004803603810190610245919061069e565b610586565b604051610257919061093b565b60405180910390f35b60006380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102bb57506301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600080600190610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ff9190610956565b60405180910390fd5b50600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600190610378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036f9190610956565b60405180910390fd5b505050565b60006001906103c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b99190610956565b60405180910390fd5b50505050565b600060019061040d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104049190610956565b60405180910390fd5b50505050565b600080600190610459576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104509190610956565b60405180910390fd5b50600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000806001906104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c19190610956565b60405180910390fd5b5060009050919050565b6000600190610519576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105109190610956565b60405180910390fd5b5060008060006101000a81548160ff021916908360ff1602179055505050565b600060019061057e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105759190610956565b60405180910390fd5b505050505050565b6000806001906105cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c39190610956565b60405180910390fd5b506000905092915050565b6000813590506105e681610a8e565b92915050565b6000813590506105fb81610aa5565b92915050565b60008135905061061081610abc565b92915050565b60008083601f84011261062857600080fd5b8235905067ffffffffffffffff81111561064157600080fd5b60208301915083600182028301111561065957600080fd5b9250929050565b60008135905061066f81610ad3565b92915050565b60006020828403121561068757600080fd5b6000610695848285016105d7565b91505092915050565b600080604083850312156106b157600080fd5b60006106bf858286016105d7565b92505060206106d0858286016105d7565b9150509250929050565b6000806000606084860312156106ef57600080fd5b60006106fd868287016105d7565b935050602061070e868287016105d7565b925050604061071f86828701610660565b9150509250925092565b60008060008060006080868803121561074157600080fd5b600061074f888289016105d7565b9550506020610760888289016105d7565b945050604061077188828901610660565b935050606086013567ffffffffffffffff81111561078e57600080fd5b61079a88828901610616565b92509250509295509295909350565b600080604083850312156107bc57600080fd5b60006107ca858286016105d7565b92505060206107db858286016105ec565b9150509250929050565b600080604083850312156107f857600080fd5b6000610806858286016105d7565b925050602061081785828601610660565b9150509250929050565b60006020828403121561083357600080fd5b600061084184828501610601565b91505092915050565b60006020828403121561085c57600080fd5b600061086a84828501610660565b91505092915050565b61087c816109b9565b82525050565b61088b816109cb565b82525050565b6000815461089e81610a2d565b6108a881866109a8565b945060018216600081146108c357600181146108d557610908565b60ff1983168652602086019350610908565b6108de85610993565b60005b83811015610900578154818901526001820191506020810190506108e1565b808801955050505b50505092915050565b61091a81610a23565b82525050565b60006020820190506109356000830184610873565b92915050565b60006020820190506109506000830184610882565b92915050565b600060208201905081810360008301526109708184610891565b905092915050565b600060208201905061098d6000830184610911565b92915050565b60008190508160005260206000209050919050565b600082825260208201905092915050565b60006109c482610a03565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006002820490506001821680610a4557607f821691505b60208210811415610a5957610a58610a5f565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b610a97816109b9565b8114610aa257600080fd5b50565b610aae816109cb565b8114610ab957600080fd5b50565b610ac5816109d7565b8114610ad057600080fd5b50565b610adc81610a23565b8114610ae757600080fd5b5056fea26469706673582212206e53fcc41e6b23f5bd49a262462ecf5ff647f480649658ee8b67c91a8f733ba864736f6c634300080100337468697320636f6e747261637420646f6573206e6f74206578697374732c20636f646520666f7220636f6c6c656374696f6e7320697320696d706c656d656e7465642061742070616c6c65742073696465
\ No newline at end of file
pallets/nft/src/eth/stubs/ERC721.soldiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/stubs/ERC721.sol
@@ -0,0 +1,163 @@
+// SPDX-License-Identifier: OTHER
+
+pragma solidity >=0.8.0 <0.9.0;
+
+contract ERC721 {
+ uint8 _dummy = 0;
+ address _dummy_addr = 0x0000000000000000000000000000000000000000;
+ string _dummy_string = "";
+ string stub_error =
+ "this contract does not exists, code for collections is implemented at pallet side";
+
+ event Transfer(
+ address indexed from,
+ address indexed to,
+ uint256 indexed tokenId
+ );
+
+ event Approval(
+ address indexed owner,
+ address indexed approved,
+ uint256 indexed tokenId
+ );
+
+ event ApprovalForAll(
+ address indexed owner,
+ address indexed operator,
+ bool approved
+ );
+
+ // 0x18160ddd
+ function totalSupply() external view returns (uint256) {
+ require(false, stub_error);
+ return 0;
+ }
+
+ function name() external view returns (string memory res_name) {
+ require(false, stub_error);
+ res_name = _dummy_string;
+ }
+
+ function symbol() external view returns (string memory res_symbol) {
+ require(false, stub_error);
+ res_symbol = _dummy_string;
+ }
+
+ function tokenURI(uint256 tokenId) external view returns (string memory) {
+ require(false, stub_error);
+ tokenId;
+ return _dummy_string;
+ }
+
+ function tokenByIndex(uint256 index) external view returns (uint256) {
+ require(false, stub_error);
+ index;
+ return 0;
+ }
+
+ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256) {
+ require(false, stub_error);
+ owner;
+ index;
+ return 0;
+ }
+
+ // 0x70a08231
+ function balanceOf(address owner) external view returns (uint256) {
+ require(false, stub_error);
+ owner;
+ return 0;
+ }
+
+ // 0x6352211e
+ function ownerOf(uint256 tokenId) external view returns (address) {
+ require(false, stub_error);
+ tokenId;
+ return _dummy_addr;
+ }
+
+ // 0xb88d4fde
+ function safeTransferFrom(
+ address from,
+ address to,
+ uint256 tokenId,
+ bytes calldata data
+ ) external payable {
+ require(false, stub_error);
+ from;
+ to;
+ tokenId;
+ data;
+ }
+
+ // 0x42842e0e
+ function safeTransferFrom(
+ address from,
+ address to,
+ uint256 tokenId
+ ) external payable {
+ require(false, stub_error);
+ from;
+ to;
+ tokenId;
+ }
+
+ // 0x23b872dd
+ function transferFrom(
+ address from,
+ address to,
+ uint256 tokenId
+ ) external payable {
+ require(false, stub_error);
+ from;
+ to;
+ tokenId;
+ }
+
+ // 0x095ea7b3
+ function approve(address approved, uint256 tokenId) external payable {
+ require(false, stub_error);
+ approved;
+ tokenId;
+ }
+
+ // 0xa22cb465
+ function setApprovalForAll(address operator, bool approved) external {
+ require(false, stub_error);
+ operator;
+ approved;
+ _dummy = 0;
+ }
+
+ // 0x081812fc
+ function getApproved(uint256 tokenId) external view returns (address) {
+ require(false, stub_error);
+ tokenId;
+ return _dummy_addr;
+ }
+
+ // 0xe985e9c5
+ function isApprovedForAll(address owner, address operator)
+ external
+ view
+ returns (bool)
+ {
+ require(false, stub_error);
+ owner;
+ operator;
+ return false;
+ }
+
+ // 0x01ffc9a7
+ function supportsInterface(bytes4 interfaceID) public pure returns (bool) {
+ return
+ // ERC721
+ interfaceID == 0x80ac58cd ||
+ // ERC721Metadata
+ interfaceID == 0x5b5e139f ||
+ // ERC721Enumerable
+ interfaceID == 0x780e9d63 ||
+ // ERC165
+ interfaceID == 0x01ffc9a7;
+ }
+}
pallets/nft/src/eth/stubs/Invalid.bindiffbeforeafterboth--- /dev/null
+++ b/pallets/nft/src/eth/stubs/Invalid.bin
@@ -0,0 +1 @@
+TODO
\ 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)]910#[cfg(feature = "std")]11pub use std::*;1213#[cfg(feature = "std")]14pub use serde::*;1516pub use frame_support::{17 construct_runtime, decl_event, decl_module, decl_storage, decl_error,18 dispatch::DispatchResult,19 ensure, fail, parameter_types,20 traits::{21 Currency, ExistenceRequirement, Get, Imbalance, KeyOwnerProofSystem, OnUnbalanced,22 Randomness, IsSubType, WithdrawReasons,23 },24 weights::{25 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},26 DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,27 WeightToFeePolynomial, DispatchClass,28 },29 StorageValue,30 transactional,31};3233use frame_system::{self as system, ensure_signed, ensure_root};34use sp_runtime::sp_std::prelude::Vec;35use core::ops::{Deref, DerefMut};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};4344#[cfg(test)]45mod mock;4647#[cfg(test)]48mod tests;4950mod default_weights;5152#[cfg(feature = "runtime-benchmarks")]53mod benchmarking;5455pub trait WeightInfo {56 fn create_collection() -> Weight;57 fn destroy_collection() -> Weight;58 fn add_to_white_list() -> Weight;59 fn remove_from_white_list() -> Weight;60 fn set_public_access_mode() -> Weight;61 fn set_mint_permission() -> Weight;62 fn change_collection_owner() -> Weight;63 fn add_collection_admin() -> Weight;64 fn remove_collection_admin() -> Weight;65 fn set_collection_sponsor() -> Weight;66 fn confirm_sponsorship() -> Weight;67 fn remove_collection_sponsor() -> Weight;68 fn create_item(s: usize) -> Weight;69 fn burn_item() -> Weight;70 fn transfer() -> Weight;71 fn approve() -> Weight;72 fn transfer_from() -> Weight;73 fn set_offchain_schema() -> Weight;74 fn set_const_on_chain_schema() -> Weight;75 fn set_variable_on_chain_schema() -> Weight;76 fn set_variable_meta_data() -> Weight;77 fn enable_contract_sponsoring() -> Weight;78 fn set_schema_version() -> Weight;79 fn set_chain_limits() -> Weight;80 fn set_contract_sponsoring_rate_limit() -> Weight;81 fn set_variable_meta_data_sponsoring_rate_limit() -> Weight;82 fn toggle_contract_white_list() -> Weight;83 fn add_to_contract_white_list() -> Weight;84 fn remove_from_contract_white_list() -> Weight;85 fn set_collection_limits() -> Weight;86}8788decl_error! {89 /// Error for non-fungible-token module.90 pub enum Error for Module<T: Config> {91 /// Total collections bound exceeded.92 TotalCollectionsLimitExceeded,93 /// Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.94 CollectionDecimalPointLimitExceeded, 95 /// Collection name can not be longer than 63 char.96 CollectionNameLimitExceeded, 97 /// Collection description can not be longer than 255 char.98 CollectionDescriptionLimitExceeded, 99 /// Token prefix can not be longer than 15 char.100 CollectionTokenPrefixLimitExceeded,101 /// This collection does not exist.102 CollectionNotFound,103 /// Item not exists.104 TokenNotFound,105 /// Admin not found106 AdminNotFound,107 /// Arithmetic calculation overflow.108 NumOverflow, 109 /// Account already has admin role.110 AlreadyAdmin, 111 /// You do not own this collection.112 NoPermission,113 /// This address is not set as sponsor, use setCollectionSponsor first.114 ConfirmUnsetSponsorFail,115 /// Collection is not in mint mode.116 PublicMintingNotAllowed,117 /// Sender parameter and item owner must be equal.118 MustBeTokenOwner,119 /// Item balance not enough.120 TokenValueTooLow,121 /// Size of item is too large.122 NftSizeLimitExceeded,123 /// No approve found124 ApproveNotFound,125 /// Requested value more than approved.126 TokenValueNotEnough,127 /// Only approved addresses can call this method.128 ApproveRequired,129 /// Address is not in white list.130 AddresNotInWhiteList,131 /// Number of collection admins bound exceeded.132 CollectionAdminsLimitExceeded,133 /// Owned tokens by a single address bound exceeded.134 AddressOwnershipLimitExceeded,135 /// Length of items properties must be greater than 0.136 EmptyArgument,137 /// const_data exceeded data limit.138 TokenConstDataLimitExceeded,139 /// variable_data exceeded data limit.140 TokenVariableDataLimitExceeded,141 /// Not NFT item data used to mint in NFT collection.142 NotNftDataUsedToMintNftCollectionToken,143 /// Not Fungible item data used to mint in Fungible collection.144 NotFungibleDataUsedToMintFungibleCollectionToken,145 /// Not Re Fungible item data used to mint in Re Fungible collection.146 NotReFungibleDataUsedToMintReFungibleCollectionToken,147 /// Unexpected collection type.148 UnexpectedCollectionType,149 /// Can't store metadata in fungible tokens.150 CantStoreMetadataInFungibleTokens,151 /// Collection token limit exceeded152 CollectionTokenLimitExceeded,153 /// Account token limit exceeded per collection154 AccountTokenLimitExceeded,155 /// Collection limit bounds per collection exceeded156 CollectionLimitBoundsExceeded,157 /// Tried to enable permissions which are only permitted to be disabled158 OwnerPermissionsCantBeReverted,159 /// Schema data size limit bound exceeded160 SchemaDataLimitExceeded,161 /// Maximum refungibility exceeded162 WrongRefungiblePieces,163 /// createRefungible should be called with one owner164 BadCreateRefungibleCall,165 }166}167168pub struct CollectionHandle<T: system::Config> {169 pub id: CollectionId,170 pub collection: Collection<T>,171}172173impl<T: frame_system::Config> Deref for CollectionHandle<T> {174 type Target = Collection<T>;175176 fn deref(&self) -> &Self::Target {177 &self.collection178 }179}180181impl<T: frame_system::Config> DerefMut for CollectionHandle<T> {182 fn deref_mut(&mut self) -> &mut Self::Target {183 &mut self.collection184 }185}186187pub trait Config: system::Config + Sized {188 type Event: From<Event<Self>> + Into<<Self as system::Config>::Event>;189190 /// Weight information for extrinsics in this pallet.191 type WeightInfo: WeightInfo;192193 type Currency: Currency<Self::AccountId>;194 type CollectionCreationPrice: Get<<<Self as Config>::Currency as Currency<Self::AccountId>>::Balance>;195 type TreasuryAccountId: Get<Self::AccountId>;196}197198// # Used definitions199//200// ## User control levels201//202// chain-controlled - key is uncontrolled by user203// i.e autoincrementing index204// can use non-cryptographic hash205// real - key is controlled by user206// but it is hard to generate enough colliding values, i.e owner of signed txs207// can use non-cryptographic hash208// controlled - key is completly controlled by users209// i.e maps with mutable keys210// should use cryptographic hash211//212// ## User control level downgrade reasons213//214// ?1 - chain-controlled -> controlled215// collections/tokens can be destroyed, resulting in massive holes216// ?2 - chain-controlled -> controlled217// same as ?1, but can be only added, resulting in easier exploitation218// ?3 - real -> controlled219// no confirmation required, so addresses can be easily generated220decl_storage! {221 trait Store for Module<T: Config> as Nft {222223 //#region Private members224 /// Id of next collection225 CreatedCollectionCount: u32;226 /// Used for migrations227 ChainVersion: u64;228 /// Id of last collection token229 /// Collection id (controlled?1)230 ItemListIndex: map hasher(blake2_128_concat) CollectionId => TokenId;231 //#endregion232233 //#region Chain limits struct234 pub ChainLimit get(fn chain_limit) config(): ChainLimits;235 //#endregion236237 //#region Bound counters238 /// Amount of collections destroyed, used for total amount tracking with239 /// CreatedCollectionCount240 DestroyedCollectionCount: u32;241 /// Total amount of account owned tokens (NFTs + RFTs + unique fungibles)242 /// Account id (real)243 pub AccountItemCount get(fn account_item_count): map hasher(twox_64_concat) T::AccountId => u32;244 //#endregion245246 //#region Basic collections247 /// Collection info248 /// Collection id (controlled?1)249 pub CollectionById get(fn collection_id) config(): map hasher(blake2_128_concat) CollectionId => Option<Collection<T>> = None;250 /// List of collection admins251 /// Collection id (controlled?2)252 pub AdminList get(fn admin_list_collection): map hasher(blake2_128_concat) CollectionId => Vec<T::AccountId>;253 /// Whitelisted collection users254 /// Collection id (controlled?2), user id (controlled?3)255 pub WhiteList get(fn white_list): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => bool;256 //#endregion257258 /// How many of collection items user have259 /// Collection id (controlled?2), account id (real)260 pub Balance get(fn balance_count): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => u128;261262 /// Amount of items which spender can transfer out of owners account (via transferFrom)263 /// Collection id (controlled?2), (token id (controlled ?2) + owner account id (real) + spender account id (controlled?3))264 /// TODO: Off chain worker should remove from this map when token gets removed265 pub Allowances get(fn approved): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) (TokenId, T::AccountId, T::AccountId) => u128;266267 //#region Item collections268 /// Collection id (controlled?2), token id (controlled?1)269 pub NftItemList get(fn nft_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<NftItemType<T::AccountId>>;270 /// Collection id (controlled?2), owner (controlled?2)271 pub FungibleItemList get(fn fungible_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => FungibleItemType;272 /// Collection id (controlled?2), token id (controlled?1)273 pub ReFungibleItemList get(fn refungible_item_id) config(): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<ReFungibleItemType<T::AccountId>>;274 //#endregion275276 //#region Index list277 /// Collection id (controlled?2), tokens owner (controlled?2)278 pub AddressTokens get(fn address_tokens): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) T::AccountId => Vec<TokenId>;279 //#endregion280281 //#region Tokens transfer rate limit baskets282 /// (Collection id (controlled?2), who created (real))283 /// TODO: Off chain worker should remove from this map when collection gets removed284 pub CreateItemBasket get(fn create_item_basket): map hasher(blake2_128_concat) (CollectionId, T::AccountId) => T::BlockNumber;285 /// Collection id (controlled?2), token id (controlled?2)286 pub NftTransferBasket get(fn nft_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => T::BlockNumber;287 /// Collection id (controlled?2), owning user (real)288 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => T::BlockNumber;289 /// Collection id (controlled?2), token id (controlled?2)290 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => T::BlockNumber;291 //#endregion292293 /// Variable metadata sponsoring294 /// Collection id (controlled?2), token id (controlled?2)295 pub VariableMetaDataBasket get(fn variable_meta_data_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber> = None;296 297 //#region Contract Sponsorship and Ownership298 /// Contract address (real)299 pub ContractOwner get(fn contract_owner): map hasher(twox_64_concat) T::AccountId => Option<T::AccountId>;300 /// Contract address (real)301 pub ContractSelfSponsoring get(fn contract_self_sponsoring): map hasher(twox_64_concat) T::AccountId => bool;302 /// (Contract address(real), caller (real))303 pub ContractSponsorBasket get(fn contract_sponsor_basket): map hasher(twox_64_concat) (T::AccountId, T::AccountId) => T::BlockNumber;304 /// Contract address (real)305 pub ContractSponsoringRateLimit get(fn contract_sponsoring_rate_limit): map hasher(twox_64_concat) T::AccountId => T::BlockNumber;306 /// Contract address (real)307 pub ContractWhiteListEnabled get(fn contract_white_list_enabled): map hasher(twox_64_concat) T::AccountId => bool; 308 /// Contract address (real) => Whitelisted user (controlled?3)309 pub ContractWhiteList get(fn contract_white_list): double_map hasher(twox_64_concat) T::AccountId, hasher(blake2_128_concat) T::AccountId => bool; 310 //#endregion311 }312 add_extra_genesis {313 build(|config: &GenesisConfig<T>| {314 // Modification of storage315 for (_num, _c) in &config.collection_id {316 <Module<T>>::init_collection(_c);317 }318319 for (_num, _c, _i) in &config.nft_item_id {320 <Module<T>>::init_nft_token(*_c, _i);321 }322323 for (collection_id, account_id, fungible_item) in &config.fungible_item_id {324 <Module<T>>::init_fungible_token(*collection_id, account_id, fungible_item);325 }326327 for (_num, _c, _i) in &config.refungible_item_id {328 <Module<T>>::init_refungible_token(*_c, _i);329 }330 })331 }332}333334decl_event!(335 pub enum Event<T>336 where337 AccountId = <T as system::Config>::AccountId,338 {339 /// New collection was created340 /// 341 /// # Arguments342 /// 343 /// * collection_id: Globally unique identifier of newly created collection.344 /// 345 /// * mode: [CollectionMode] converted into u8.346 /// 347 /// * account_id: Collection owner.348 CollectionCreated(CollectionId, u8, AccountId),349350 /// New item was created.351 /// 352 /// # Arguments353 /// 354 /// * collection_id: Id of the collection where item was created.355 /// 356 /// * item_id: Id of an item. Unique within the collection.357 ///358 /// * recipient: Owner of newly created item 359 ItemCreated(CollectionId, TokenId, AccountId),360361 /// Collection item was burned.362 /// 363 /// # Arguments364 /// 365 /// collection_id.366 /// 367 /// item_id: Identifier of burned NFT.368 ItemDestroyed(CollectionId, TokenId),369370 /// Item was transferred371 ///372 /// * collection_id: Id of collection to which item is belong373 ///374 /// * item_id: Id of an item375 ///376 /// * sender: Original owner of item377 ///378 /// * recipient: New owner of item379 ///380 /// * amount: Always 1 for NFT381 Transfer(CollectionId, TokenId, AccountId, AccountId, u128),382383 /// * collection_id384 ///385 /// * item_id386 ///387 /// * sender388 ///389 /// * spender390 ///391 /// * amount392 Approved(CollectionId, TokenId, AccountId, AccountId, u128),393 }394);395396decl_module! {397 pub struct Module<T: Config> for enum Call 398 where 399 origin: T::Origin400 {401 fn deposit_event() = default;402 type Error = Error<T>;403404 fn on_initialize(_now: T::BlockNumber) -> Weight {405 0406 }407408 /// 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.409 /// 410 /// # Permissions411 /// 412 /// * Anyone.413 /// 414 /// # Arguments415 /// 416 /// * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.417 /// 418 /// * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.419 /// 420 /// * token_prefix: UTF-8 string with token prefix.421 /// 422 /// * mode: [CollectionMode] collection type and type dependent data.423 // returns collection ID424 #[weight = <T as Config>::WeightInfo::create_collection()]425 #[transactional]426 pub fn create_collection(origin,427 collection_name: Vec<u16>,428 collection_description: Vec<u16>,429 token_prefix: Vec<u8>,430 mode: CollectionMode) -> DispatchResult {431432 // Anyone can create a collection433 let who = ensure_signed(origin)?;434435 // Take a (non-refundable) deposit of collection creation436 let mut imbalance = <<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();437 imbalance.subsume(<<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(438 &T::TreasuryAccountId::get(),439 T::CollectionCreationPrice::get(),440 ));441 <T as Config>::Currency::settle(442 &who,443 imbalance,444 WithdrawReasons::TRANSFER,445 ExistenceRequirement::KeepAlive,446 ).map_err(|_| Error::<T>::NoPermission)?;447448 let decimal_points = match mode {449 CollectionMode::Fungible(points) => points,450 _ => 0451 };452453 let chain_limit = ChainLimit::get();454455 let created_count = CreatedCollectionCount::get();456 let destroyed_count = DestroyedCollectionCount::get();457458 // bound Total number of collections459 ensure!(created_count - destroyed_count < chain_limit.collection_numbers_limit, Error::<T>::TotalCollectionsLimitExceeded);460461 // check params462 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);463 ensure!(collection_name.len() <= 64, Error::<T>::CollectionNameLimitExceeded);464 ensure!(collection_description.len() <= 256, Error::<T>::CollectionDescriptionLimitExceeded);465 ensure!(token_prefix.len() <= 16, Error::<T>::CollectionTokenPrefixLimitExceeded);466467 // Generate next collection ID468 let next_id = created_count469 .checked_add(1)470 .ok_or(Error::<T>::NumOverflow)?;471472 CreatedCollectionCount::put(next_id);473474 let limits = CollectionLimits {475 sponsored_data_size: chain_limit.custom_data_limit,476 ..Default::default()477 };478479 // Create new collection480 let new_collection = Collection {481 owner: who.clone(),482 name: collection_name,483 mode: mode.clone(),484 mint_mode: false,485 access: AccessMode::Normal,486 description: collection_description,487 decimal_points: decimal_points,488 token_prefix: token_prefix,489 offchain_schema: Vec::new(),490 schema_version: SchemaVersion::ImageURL,491 sponsorship: SponsorshipState::Disabled,492 variable_on_chain_schema: Vec::new(),493 const_on_chain_schema: Vec::new(),494 limits,495 };496497 // Add new collection to map498 <CollectionById<T>>::insert(next_id, new_collection);499500 // call event501 Self::deposit_event(RawEvent::CollectionCreated(next_id, mode.into(), who.clone()));502503 Ok(())504 }505506 /// **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.507 /// 508 /// # Permissions509 /// 510 /// * Collection Owner.511 /// 512 /// # Arguments513 /// 514 /// * collection_id: collection to destroy.515 #[weight = <T as Config>::WeightInfo::destroy_collection()]516 #[transactional]517 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {518519 let sender = ensure_signed(origin)?;520 let collection = Self::get_collection(collection_id)?;521 Self::check_owner_permissions(&collection, sender)?;522 if !collection.limits.owner_can_destroy {523 fail!(Error::<T>::NoPermission);524 }525526 <AddressTokens<T>>::remove_prefix(collection_id);527 <Allowances<T>>::remove_prefix(collection_id);528 <Balance<T>>::remove_prefix(collection_id);529 <ItemListIndex>::remove(collection_id);530 <AdminList<T>>::remove(collection_id);531 <CollectionById<T>>::remove(collection_id);532 <WhiteList<T>>::remove_prefix(collection_id);533534 <NftItemList<T>>::remove_prefix(collection_id);535 <FungibleItemList<T>>::remove_prefix(collection_id);536 <ReFungibleItemList<T>>::remove_prefix(collection_id);537538 <NftTransferBasket<T>>::remove_prefix(collection_id);539 <FungibleTransferBasket<T>>::remove_prefix(collection_id);540 <ReFungibleTransferBasket<T>>::remove_prefix(collection_id);541542 <VariableMetaDataBasket<T>>::remove_prefix(collection_id);543544 DestroyedCollectionCount::put(DestroyedCollectionCount::get()545 .checked_add(1)546 .ok_or(Error::<T>::NumOverflow)?);547548 Ok(())549 }550551 /// Add an address to white list.552 /// 553 /// # Permissions554 /// 555 /// * Collection Owner556 /// * Collection Admin557 /// 558 /// # Arguments559 /// 560 /// * collection_id.561 /// 562 /// * address.563 #[weight = <T as Config>::WeightInfo::add_to_white_list()]564 #[transactional]565 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::AccountId) -> DispatchResult{566567 let sender = ensure_signed(origin)?;568 let collection = Self::get_collection(collection_id)?;569570 Self::toggle_white_list_internal(571 &sender,572 &collection,573 &address,574 true,575 )?;576577 Ok(())578 }579580 /// Remove an address from white list.581 /// 582 /// # Permissions583 /// 584 /// * Collection Owner585 /// * Collection Admin586 /// 587 /// # Arguments588 /// 589 /// * collection_id.590 /// 591 /// * address.592 #[weight = <T as Config>::WeightInfo::remove_from_white_list()]593 #[transactional]594 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::AccountId) -> DispatchResult{595596 let sender = ensure_signed(origin)?;597 let collection = Self::get_collection(collection_id)?;598599 Self::toggle_white_list_internal(600 &sender,601 &collection,602 &address,603 false,604 )?;605606 Ok(())607 }608609 /// Toggle between normal and white list access for the methods with access for `Anyone`.610 /// 611 /// # Permissions612 /// 613 /// * Collection Owner.614 /// 615 /// # Arguments616 /// 617 /// * collection_id.618 /// 619 /// * mode: [AccessMode]620 #[weight = <T as Config>::WeightInfo::set_public_access_mode()]621 #[transactional]622 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult623 {624 let sender = ensure_signed(origin)?;625626 let mut target_collection = Self::get_collection(collection_id)?;627 Self::check_owner_permissions(&target_collection, sender)?;628 target_collection.access = mode;629 Self::save_collection(target_collection);630631 Ok(())632 }633634 /// Allows Anyone to create tokens if:635 /// * White List is enabled, and636 /// * Address is added to white list, and637 /// * This method was called with True parameter638 /// 639 /// # Permissions640 /// * Collection Owner641 ///642 /// # Arguments643 /// 644 /// * collection_id.645 /// 646 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.647 #[weight = <T as Config>::WeightInfo::set_mint_permission()]648 #[transactional]649 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult650 {651 let sender = ensure_signed(origin)?;652653 let mut target_collection = Self::get_collection(collection_id)?;654 Self::check_owner_permissions(&target_collection, sender)?;655 target_collection.mint_mode = mint_permission;656 Self::save_collection(target_collection);657658 Ok(())659 }660661 /// Change the owner of the collection.662 /// 663 /// # Permissions664 /// 665 /// * Collection Owner.666 /// 667 /// # Arguments668 /// 669 /// * collection_id.670 /// 671 /// * new_owner.672 #[weight = <T as Config>::WeightInfo::change_collection_owner()]673 #[transactional]674 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {675676 let sender = ensure_signed(origin)?;677 let mut target_collection = Self::get_collection(collection_id)?;678 Self::check_owner_permissions(&target_collection, sender)?;679 target_collection.owner = new_owner;680 Self::save_collection(target_collection);681682 Ok(())683 }684685 /// Adds an admin of the Collection.686 /// 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. 687 /// 688 /// # Permissions689 /// 690 /// * Collection Owner.691 /// * Collection Admin.692 /// 693 /// # Arguments694 /// 695 /// * collection_id: ID of the Collection to add admin for.696 /// 697 /// * new_admin_id: Address of new admin to add.698 #[weight = <T as Config>::WeightInfo::add_collection_admin()]699 #[transactional]700 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::AccountId) -> DispatchResult {701702 let sender = ensure_signed(origin)?;703 let collection = Self::get_collection(collection_id)?;704 Self::check_owner_or_admin_permissions(&collection, sender)?;705 let mut admin_arr = <AdminList<T>>::get(collection_id);706707 match admin_arr.binary_search(&new_admin_id) {708 Ok(_) => {},709 Err(idx) => {710 let limits = ChainLimit::get();711 ensure!(admin_arr.len() < limits.collections_admins_limit as usize, Error::<T>::CollectionAdminsLimitExceeded);712 admin_arr.insert(idx, new_admin_id);713 <AdminList<T>>::insert(collection_id, admin_arr);714 }715 }716 Ok(())717 }718719 /// 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.720 ///721 /// # Permissions722 /// 723 /// * Collection Owner.724 /// * Collection Admin.725 /// 726 /// # Arguments727 /// 728 /// * collection_id: ID of the Collection to remove admin for.729 /// 730 /// * account_id: Address of admin to remove.731 #[weight = <T as Config>::WeightInfo::remove_collection_admin()]732 #[transactional]733 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::AccountId) -> DispatchResult {734735 let sender = ensure_signed(origin)?;736 let collection = Self::get_collection(collection_id)?;737 Self::check_owner_or_admin_permissions(&collection, sender)?;738 let mut admin_arr = <AdminList<T>>::get(collection_id);739740 match admin_arr.binary_search(&account_id) {741 Ok(idx) => {742 admin_arr.remove(idx);743 <AdminList<T>>::insert(collection_id, admin_arr);744 },745 Err(_) => {}746 }747 Ok(())748 }749750 /// # Permissions751 /// 752 /// * Collection Owner753 /// 754 /// # Arguments755 /// 756 /// * collection_id.757 /// 758 /// * new_sponsor.759 #[weight = <T as Config>::WeightInfo::set_collection_sponsor()]760 #[transactional]761 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {762763 let sender = ensure_signed(origin)?;764 let mut target_collection = Self::get_collection(collection_id)?;765 Self::check_owner_permissions(&target_collection, sender)?;766767 target_collection.sponsorship = SponsorshipState::Unconfirmed(new_sponsor);768 Self::save_collection(target_collection);769770 Ok(())771 }772773 /// # Permissions774 /// 775 /// * Sponsor.776 /// 777 /// # Arguments778 /// 779 /// * collection_id.780 #[weight = <T as Config>::WeightInfo::confirm_sponsorship()]781 #[transactional]782 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {783784 let sender = ensure_signed(origin)?;785786 let mut target_collection = Self::get_collection(collection_id)?;787 ensure!(788 target_collection.sponsorship.pending_sponsor() == Some(&sender),789 Error::<T>::ConfirmUnsetSponsorFail790 );791792 target_collection.sponsorship = SponsorshipState::Confirmed(sender);793 Self::save_collection(target_collection);794795 Ok(())796 }797798 /// Switch back to pay-per-own-transaction model.799 ///800 /// # Permissions801 ///802 /// * Collection owner.803 /// 804 /// # Arguments805 /// 806 /// * collection_id.807 #[weight = <T as Config>::WeightInfo::remove_collection_sponsor()]808 #[transactional]809 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {810811 let sender = ensure_signed(origin)?;812813 let mut target_collection = Self::get_collection(collection_id)?;814 Self::check_owner_permissions(&target_collection, sender)?;815816 target_collection.sponsorship = SponsorshipState::Disabled;817 Self::save_collection(target_collection);818819 Ok(())820 }821822 /// This method creates a concrete instance of NFT Collection created with CreateCollection method.823 /// 824 /// # Permissions825 /// 826 /// * Collection Owner.827 /// * Collection Admin.828 /// * Anyone if829 /// * White List is enabled, and830 /// * Address is added to white list, and831 /// * MintPermission is enabled (see SetMintPermission method)832 /// 833 /// # Arguments834 /// 835 /// * collection_id: ID of the collection.836 /// 837 /// * owner: Address, initial owner of the NFT.838 ///839 /// * data: Token data to store on chain.840 // #[weight =841 // (130_000_000 as Weight)842 // .saturating_add((2135 as Weight).saturating_mul((properties.len() as u64) as Weight))843 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))844 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]845846 #[weight = <T as Config>::WeightInfo::create_item(data.len())]847 #[transactional]848 pub fn create_item(origin, collection_id: CollectionId, owner: T::AccountId, data: CreateItemData) -> DispatchResult {849 let sender = ensure_signed(origin)?;850 Self::create_item_internal(sender, collection_id, owner, data)851 }852853 /// This method creates multiple items in a collection created with CreateCollection method.854 /// 855 /// # Permissions856 /// 857 /// * Collection Owner.858 /// * Collection Admin.859 /// * Anyone if860 /// * White List is enabled, and861 /// * Address is added to white list, and862 /// * MintPermission is enabled (see SetMintPermission method)863 /// 864 /// # Arguments865 /// 866 /// * collection_id: ID of the collection.867 /// 868 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].869 /// 870 /// * owner: Address, initial owner of the NFT.871 #[weight = <T as Config>::WeightInfo::create_item(items_data.into_iter()872 .map(|data| { data.len() })873 .sum())]874 #[transactional]875 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::AccountId, items_data: Vec<CreateItemData>) -> DispatchResult {876877 ensure!(items_data.len() > 0, Error::<T>::EmptyArgument);878 let sender = ensure_signed(origin)?;879880 let target_collection = Self::get_collection(collection_id)?;881882 Self::can_create_items_in_collection(&target_collection, &sender, &owner, items_data.len() as u32)?;883884 for data in &items_data {885 Self::validate_create_item_args(&target_collection, data)?;886 }887 for data in &items_data {888 Self::create_item_no_validation(&target_collection, owner.clone(), data.clone())?;889 }890891 Ok(())892 }893894 /// Destroys a concrete instance of NFT.895 /// 896 /// # Permissions897 /// 898 /// * Collection Owner.899 /// * Collection Admin.900 /// * Current NFT Owner.901 /// 902 /// # Arguments903 /// 904 /// * collection_id: ID of the collection.905 /// 906 /// * item_id: ID of NFT to burn.907 #[weight = <T as Config>::WeightInfo::burn_item()]908 #[transactional]909 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {910911 let sender = ensure_signed(origin)?;912913 // Transfer permissions check914 let target_collection = Self::get_collection(collection_id)?;915 ensure!(916 Self::is_item_owner(sender.clone(), &target_collection, item_id) ||917 (918 target_collection.limits.owner_can_transfer &&919 Self::is_owner_or_admin_permissions(&target_collection, sender.clone())920 ),921 Error::<T>::NoPermission922 );923924 if target_collection.access == AccessMode::WhiteList {925 Self::check_white_list(&target_collection, &sender)?;926 }927928 match target_collection.mode929 {930 CollectionMode::NFT => Self::burn_nft_item(&target_collection, item_id)?,931 CollectionMode::Fungible(_) => Self::burn_fungible_item(&sender, &target_collection, value)?,932 CollectionMode::ReFungible => Self::burn_refungible_item(&target_collection, item_id, &sender)?,933 _ => ()934 };935936 // call event937 Self::deposit_event(RawEvent::ItemDestroyed(target_collection.id, item_id));938939 Ok(())940 }941942 /// Change ownership of the token.943 /// 944 /// # Permissions945 /// 946 /// * Collection Owner947 /// * Collection Admin948 /// * Current NFT owner949 ///950 /// # Arguments951 /// 952 /// * recipient: Address of token recipient.953 /// 954 /// * collection_id.955 /// 956 /// * item_id: ID of the item957 /// * Non-Fungible Mode: Required.958 /// * Fungible Mode: Ignored.959 /// * Re-Fungible Mode: Required.960 /// 961 /// * value: Amount to transfer.962 /// * Non-Fungible Mode: Ignored963 /// * Fungible Mode: Must specify transferred amount964 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)965 #[weight = <T as Config>::WeightInfo::transfer()]966 #[transactional]967 pub fn transfer(origin, recipient: T::AccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {968 let sender = ensure_signed(origin)?;969 let collection = Self::get_collection(collection_id)?;970971 Self::transfer_internal(sender, recipient, &collection, item_id, value)972 }973974 /// Set, change, or remove approved address to transfer the ownership of the NFT.975 /// 976 /// # Permissions977 /// 978 /// * Collection Owner979 /// * Collection Admin980 /// * Current NFT owner981 /// 982 /// # Arguments983 /// 984 /// * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).985 /// 986 /// * collection_id.987 /// 988 /// * item_id: ID of the item.989 #[weight = <T as Config>::WeightInfo::approve()]990 #[transactional]991 pub fn approve(origin, spender: T::AccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResult {992993 let sender = ensure_signed(origin)?;994 let collection = Self::get_collection(collection_id)?;995996 Self::approve_internal(sender, spender, &collection, item_id, amount)?;997998 Ok(())999 }1000 1001 /// 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.1002 /// 1003 /// # Permissions1004 /// * Collection Owner1005 /// * Collection Admin1006 /// * Current NFT owner1007 /// * Address approved by current NFT owner1008 /// 1009 /// # Arguments1010 /// 1011 /// * from: Address that owns token.1012 /// 1013 /// * recipient: Address of token recipient.1014 /// 1015 /// * collection_id.1016 /// 1017 /// * item_id: ID of the item.1018 /// 1019 /// * value: Amount to transfer.1020 #[weight = <T as Config>::WeightInfo::transfer_from()]1021 #[transactional]1022 pub fn transfer_from(origin, from: T::AccountId, recipient: T::AccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResult {10231024 let sender = ensure_signed(origin)?;1025 let collection = Self::get_collection(collection_id)?;10261027 Self::transfer_from_internal(sender, from, recipient, &collection, item_id, value)?;10281029 Ok(())1030 }10311032 // #[weight = 0]1033 // pub fn safe_transfer_from(origin, collection_id: CollectionId, item_id: TokenId, new_owner: T::AccountId) -> DispatchResult {10341035 // // let no_perm_mes = "You do not have permissions to modify this collection";1036 // // ensure!(<ApprovedList<T>>::contains_key((collection_id, item_id)), no_perm_mes);1037 // // let list_itm = <ApprovedList<T>>::get((collection_id, item_id));1038 // // ensure!(list_itm.contains(&new_owner.clone()), no_perm_mes);10391040 // // // on_nft_received call10411042 // // Self::transfer(origin, collection_id, item_id, new_owner)?;10431044 // Ok(())1045 // }10461047 /// Set off-chain data schema.1048 /// 1049 /// # Permissions1050 /// 1051 /// * Collection Owner1052 /// * Collection Admin1053 /// 1054 /// # Arguments1055 /// 1056 /// * collection_id.1057 /// 1058 /// * schema: String representing the offchain data schema.1059 #[weight = <T as Config>::WeightInfo::set_variable_meta_data()]1060 #[transactional]1061 pub fn set_variable_meta_data (1062 origin,1063 collection_id: CollectionId,1064 item_id: TokenId,1065 data: Vec<u8>1066 ) -> DispatchResult {1067 let sender = ensure_signed(origin)?;1068 1069 let collection = Self::get_collection(collection_id)?;10701071 Self::set_variable_meta_data_internal(sender, &collection, item_id, data)?;10721073 Ok(())1074 }1075 1076 /// Set schema standard1077 /// ImageURL1078 /// Unique1079 /// 1080 /// # Permissions1081 /// 1082 /// * Collection Owner1083 /// * Collection Admin1084 /// 1085 /// # Arguments1086 /// 1087 /// * collection_id.1088 /// 1089 /// * schema: SchemaVersion: enum1090 #[weight = <T as Config>::WeightInfo::set_schema_version()]1091 #[transactional]1092 pub fn set_schema_version(1093 origin,1094 collection_id: CollectionId,1095 version: SchemaVersion1096 ) -> DispatchResult {1097 let sender = ensure_signed(origin)?;1098 let mut target_collection = Self::get_collection(collection_id)?;1099 Self::check_owner_or_admin_permissions(&target_collection, sender.clone())?;1100 target_collection.schema_version = version;1101 Self::save_collection(target_collection);11021103 Ok(())1104 }11051106 /// Set off-chain data schema.1107 /// 1108 /// # Permissions1109 /// 1110 /// * Collection Owner1111 /// * Collection Admin1112 /// 1113 /// # Arguments1114 /// 1115 /// * collection_id.1116 /// 1117 /// * schema: String representing the offchain data schema.1118 #[weight = <T as Config>::WeightInfo::set_offchain_schema()]1119 #[transactional]1120 pub fn set_offchain_schema(1121 origin,1122 collection_id: CollectionId,1123 schema: Vec<u8>1124 ) -> DispatchResult {1125 let sender = ensure_signed(origin)?;1126 let mut target_collection = Self::get_collection(collection_id)?;1127 Self::check_owner_or_admin_permissions(&target_collection, sender.clone())?;11281129 // check schema limit1130 ensure!(schema.len() as u32 <= ChainLimit::get().offchain_schema_limit, "");11311132 target_collection.offchain_schema = schema;1133 Self::save_collection(target_collection);11341135 Ok(())1136 }11371138 /// Set const on-chain data schema.1139 /// 1140 /// # Permissions1141 /// 1142 /// * Collection Owner1143 /// * Collection Admin1144 /// 1145 /// # Arguments1146 /// 1147 /// * collection_id.1148 /// 1149 /// * schema: String representing the const on-chain data schema.1150 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1151 #[transactional]1152 pub fn set_const_on_chain_schema (1153 origin,1154 collection_id: CollectionId,1155 schema: Vec<u8>1156 ) -> DispatchResult {1157 let sender = ensure_signed(origin)?;1158 let mut target_collection = Self::get_collection(collection_id)?;1159 Self::check_owner_or_admin_permissions(&target_collection, sender.clone())?;11601161 // check schema limit1162 ensure!(schema.len() as u32 <= ChainLimit::get().const_on_chain_schema_limit, "");11631164 target_collection.const_on_chain_schema = schema;1165 Self::save_collection(target_collection);11661167 Ok(())1168 }11691170 /// Set variable on-chain data schema.1171 /// 1172 /// # Permissions1173 /// 1174 /// * Collection Owner1175 /// * Collection Admin1176 /// 1177 /// # Arguments1178 /// 1179 /// * collection_id.1180 /// 1181 /// * schema: String representing the variable on-chain data schema.1182 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]1183 #[transactional]1184 pub fn set_variable_on_chain_schema (1185 origin,1186 collection_id: CollectionId,1187 schema: Vec<u8>1188 ) -> DispatchResult {1189 let sender = ensure_signed(origin)?;1190 let mut target_collection = Self::get_collection(collection_id)?;1191 Self::check_owner_or_admin_permissions(&target_collection, sender.clone())?;11921193 // check schema limit1194 ensure!(schema.len() as u32 <= ChainLimit::get().variable_on_chain_schema_limit, "");11951196 target_collection.variable_on_chain_schema = schema;1197 Self::save_collection(target_collection);11981199 Ok(())1200 }12011202 // Sudo permissions function1203 #[weight = <T as Config>::WeightInfo::set_chain_limits()]1204 #[transactional]1205 pub fn set_chain_limits(1206 origin,1207 limits: ChainLimits1208 ) -> DispatchResult {12091210 #[cfg(not(feature = "runtime-benchmarks"))]1211 ensure_root(origin)?;12121213 <ChainLimit>::put(limits);1214 Ok(())1215 }12161217 /// Enable smart contract self-sponsoring.1218 /// 1219 /// # Permissions1220 /// 1221 /// * Contract Owner1222 /// 1223 /// # Arguments1224 /// 1225 /// * contract address1226 /// * enable flag1227 /// 1228 #[weight = <T as Config>::WeightInfo::enable_contract_sponsoring()]1229 #[transactional]1230 pub fn enable_contract_sponsoring(1231 origin,1232 contract_address: T::AccountId,1233 enable: bool1234 ) -> DispatchResult {12351236 let sender = ensure_signed(origin)?;12371238 #[cfg(feature = "runtime-benchmarks")]1239 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());12401241 Self::ensure_contract_owned(sender, &contract_address)?;12421243 <ContractSelfSponsoring<T>>::insert(contract_address, enable);1244 Ok(())1245 }12461247 /// Set the rate limit for contract sponsoring to specified number of blocks.1248 /// 1249 /// If not set (has the default value of 0 blocks), the sponsoring will be disabled. 1250 /// If set to the number B (for blocks), the transactions will be sponsored with a rate 1251 /// limit of B, i.e. fees for every transaction sent to this smart contract will be paid 1252 /// from contract endowment if there are at least B blocks between such transactions. 1253 /// Nonetheless, if transactions are sent more frequently, the fees are paid by the sender.1254 /// 1255 /// # Permissions1256 /// 1257 /// * Contract Owner1258 /// 1259 /// # Arguments1260 /// 1261 /// -`contract_address`: Address of the contract to sponsor1262 /// -`rate_limit`: Number of blocks to wait until the next sponsored transaction is allowed1263 /// 1264 #[weight = <T as Config>::WeightInfo::set_contract_sponsoring_rate_limit()]1265 #[transactional]1266 pub fn set_contract_sponsoring_rate_limit(1267 origin,1268 contract_address: T::AccountId,1269 rate_limit: T::BlockNumber1270 ) -> DispatchResult {1271 let sender = ensure_signed(origin)?;12721273 #[cfg(feature = "runtime-benchmarks")]1274 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());12751276 Self::ensure_contract_owned(sender, &contract_address)?;1277 <ContractSponsoringRateLimit<T>>::insert(contract_address, rate_limit);1278 Ok(())1279 }12801281 /// Enable the white list for a contract. Only addresses added to the white list with addToContractWhiteList will be able to call this smart contract.1282 /// 1283 /// # Permissions1284 /// 1285 /// * Address that deployed smart contract.1286 /// 1287 /// # Arguments1288 /// 1289 /// -`contract_address`: Address of the contract.1290 /// 1291 /// - `enable`: . 1292 #[weight = <T as Config>::WeightInfo::toggle_contract_white_list()]1293 #[transactional]1294 pub fn toggle_contract_white_list(1295 origin,1296 contract_address: T::AccountId,1297 enable: bool1298 ) -> DispatchResult {1299 let sender = ensure_signed(origin)?;13001301 #[cfg(feature = "runtime-benchmarks")]1302 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());13031304 Self::ensure_contract_owned(sender, &contract_address)?;1305 if enable {1306 <ContractWhiteListEnabled<T>>::insert(contract_address, true);1307 } else {1308 <ContractWhiteListEnabled<T>>::remove(contract_address);1309 }1310 Ok(())1311 }1312 1313 /// Add an address to smart contract white list.1314 /// 1315 /// # Permissions1316 /// 1317 /// * Address that deployed smart contract.1318 /// 1319 /// # Arguments1320 /// 1321 /// -`contract_address`: Address of the contract.1322 ///1323 /// -`account_address`: Address to add.1324 #[weight = <T as Config>::WeightInfo::add_to_contract_white_list()]1325 #[transactional]1326 pub fn add_to_contract_white_list(1327 origin,1328 contract_address: T::AccountId,1329 account_address: T::AccountId1330 ) -> DispatchResult {1331 let sender = ensure_signed(origin)?;13321333 #[cfg(feature = "runtime-benchmarks")]1334 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());1335 1336 Self::ensure_contract_owned(sender, &contract_address)?; 1337 <ContractWhiteList<T>>::insert(contract_address, account_address, true);1338 Ok(())1339 }13401341 /// Remove an address from smart contract white list.1342 /// 1343 /// # Permissions1344 /// 1345 /// * Address that deployed smart contract.1346 /// 1347 /// # Arguments1348 /// 1349 /// -`contract_address`: Address of the contract.1350 ///1351 /// -`account_address`: Address to remove.1352 #[weight = <T as Config>::WeightInfo::remove_from_contract_white_list()]1353 #[transactional]1354 pub fn remove_from_contract_white_list(1355 origin,1356 contract_address: T::AccountId,1357 account_address: T::AccountId1358 ) -> DispatchResult {1359 let sender = ensure_signed(origin)?;13601361 #[cfg(feature = "runtime-benchmarks")]1362 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());13631364 Self::ensure_contract_owned(sender, &contract_address)?;1365 <ContractWhiteList<T>>::remove(contract_address, account_address);1366 Ok(())1367 }13681369 #[weight = <T as Config>::WeightInfo::set_collection_limits()]1370 #[transactional]1371 pub fn set_collection_limits(1372 origin,1373 collection_id: u32,1374 new_limits: CollectionLimits<T::BlockNumber>,1375 ) -> DispatchResult {1376 let sender = ensure_signed(origin)?;1377 let mut target_collection = Self::get_collection(collection_id)?;1378 Self::check_owner_permissions(&target_collection, sender.clone())?;1379 let old_limits = &target_collection.limits;1380 let chain_limits = ChainLimit::get();13811382 // collection bounds1383 ensure!(new_limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&1384 new_limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP && 1385 new_limits.sponsored_data_size <= chain_limits.custom_data_limit,1386 Error::<T>::CollectionLimitBoundsExceeded);13871388 // token_limit check prev1389 ensure!(old_limits.token_limit >= new_limits.token_limit, Error::<T>::CollectionTokenLimitExceeded);1390 ensure!(new_limits.token_limit > 0, Error::<T>::CollectionTokenLimitExceeded);13911392 ensure!(1393 (old_limits.owner_can_transfer || !new_limits.owner_can_transfer) &&1394 (old_limits.owner_can_destroy || !new_limits.owner_can_destroy),1395 Error::<T>::OwnerPermissionsCantBeReverted,1396 );13971398 target_collection.limits = new_limits;1399 Self::save_collection(target_collection);14001401 Ok(())1402 } 1403 }1404}14051406impl<T: Config> Module<T> {1407 pub fn create_item_internal(sender: T::AccountId, collection_id: CollectionId, owner: T::AccountId, data: CreateItemData) -> DispatchResult {1408 let target_collection = Self::get_collection(collection_id)?;14091410 Self::can_create_items_in_collection(&target_collection, &sender, &owner, 1)?;1411 Self::validate_create_item_args(&target_collection, &data)?;1412 Self::create_item_no_validation(&target_collection, owner, data)?;14131414 Ok(())1415 }14161417 pub fn transfer_internal(sender: T::AccountId, recipient: T::AccountId, target_collection: &CollectionHandle<T>, item_id: TokenId, value: u128) -> DispatchResult {1418 // Limits check1419 Self::is_correct_transfer(target_collection, &recipient)?;14201421 // Transfer permissions check1422 ensure!(Self::is_item_owner(sender.clone(), target_collection, item_id) ||1423 Self::is_owner_or_admin_permissions(target_collection, sender.clone()),1424 Error::<T>::NoPermission);14251426 if target_collection.access == AccessMode::WhiteList {1427 Self::check_white_list(target_collection, &sender)?;1428 Self::check_white_list(target_collection, &recipient)?;1429 }14301431 match target_collection.mode1432 {1433 CollectionMode::NFT => Self::transfer_nft(target_collection, item_id, sender.clone(), recipient.clone())?,1434 CollectionMode::Fungible(_) => Self::transfer_fungible(target_collection, value, &sender, &recipient)?,1435 CollectionMode::ReFungible => Self::transfer_refungible(target_collection, item_id, value, sender.clone(), recipient.clone())?,1436 _ => ()1437 };14381439 Self::deposit_event(RawEvent::Transfer(target_collection.id, item_id, sender, recipient, value));14401441 Ok(())1442 }14431444 pub fn approve_internal(1445 sender: T::AccountId,1446 spender: T::AccountId,1447 collection: &CollectionHandle<T>,1448 item_id: TokenId,1449 amount: u128,1450 ) -> DispatchResult {1451 Self::token_exists(&collection, item_id)?;14521453 // Transfer permissions check1454 let bypasses_limits = collection.limits.owner_can_transfer &&1455 Self::is_owner_or_admin_permissions(1456 &collection,1457 sender.clone(),1458 );14591460 let allowance_limit = if bypasses_limits {1461 None1462 } else if let Some(amount) = Self::owned_amount(1463 sender.clone(),1464 &collection,1465 item_id,1466 ) {1467 Some(amount)1468 } else {1469 fail!(Error::<T>::NoPermission);1470 };14711472 if collection.access == AccessMode::WhiteList {1473 Self::check_white_list(&collection, &sender)?;1474 Self::check_white_list(&collection, &spender)?;1475 }14761477 let allowance: u128 = amount1478 .checked_add(<Allowances<T>>::get(collection.id, (item_id, &sender, &spender)))1479 .ok_or(Error::<T>::NumOverflow)?;1480 if let Some(limit) = allowance_limit {1481 ensure!(limit >= allowance, Error::<T>::TokenValueTooLow);1482 }1483 <Allowances<T>>::insert(collection.id, (item_id, &sender, &spender), allowance);14841485 Self::deposit_event(RawEvent::Approved(collection.id, item_id, sender, spender, allowance));1486 Ok(())1487 }14881489 pub fn transfer_from_internal(1490 sender: T::AccountId,1491 from: T::AccountId,1492 recipient: T::AccountId,1493 collection: &CollectionHandle<T>,1494 item_id: TokenId,1495 amount: u128,1496 ) -> DispatchResult {1497 // Check approval1498 let approval: u128 = <Allowances<T>>::get(collection.id, (item_id, &from, &sender));14991500 // Limits check1501 Self::is_correct_transfer(&collection, &recipient)?;15021503 // Transfer permissions check1504 ensure!(1505 approval >= amount || 1506 (1507 collection.limits.owner_can_transfer &&1508 Self::is_owner_or_admin_permissions(&collection, sender.clone())1509 ),1510 Error::<T>::NoPermission1511 );15121513 if collection.access == AccessMode::WhiteList {1514 Self::check_white_list(&collection, &sender)?;1515 Self::check_white_list(&collection, &recipient)?;1516 }15171518 // Reduce approval by transferred amount or remove if remaining approval drops to 01519 let allowance = approval.saturating_sub(amount);1520 if allowance > 0 {1521 <Allowances<T>>::insert(collection.id, (item_id, &from, &sender), allowance);1522 } else {1523 <Allowances<T>>::remove(collection.id, (item_id, &from, &sender));1524 }15251526 match collection.mode {1527 CollectionMode::NFT => {1528 Self::transfer_nft(&collection, item_id, from.clone(), recipient.clone())?1529 }1530 CollectionMode::Fungible(_) => {1531 Self::transfer_fungible(&collection, amount, &from, &recipient)?1532 }1533 CollectionMode::ReFungible => {1534 Self::transfer_refungible(&collection, item_id, amount, from.clone(), recipient.clone())?1535 }1536 _ => ()1537 };15381539 Ok(())1540 }15411542 pub fn set_variable_meta_data_internal(1543 sender: T::AccountId,1544 collection: &CollectionHandle<T>, 1545 item_id: TokenId,1546 data: Vec<u8>,1547 ) -> DispatchResult {1548 Self::token_exists(&collection, item_id)?;15491550 ensure!(ChainLimit::get().custom_data_limit >= data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);15511552 // Modify permissions check1553 ensure!(Self::is_item_owner(sender.clone(), &collection, item_id) ||1554 Self::is_owner_or_admin_permissions(&collection, sender.clone()),1555 Error::<T>::NoPermission);15561557 match collection.mode1558 {1559 CollectionMode::NFT => Self::set_nft_variable_data(&collection, item_id, data)?,1560 CollectionMode::ReFungible => Self::set_re_fungible_variable_data(&collection, item_id, data)?,1561 CollectionMode::Fungible(_) => fail!(Error::<T>::CantStoreMetadataInFungibleTokens),1562 _ => fail!(Error::<T>::UnexpectedCollectionType)1563 };15641565 Ok(())1566 }15671568 pub fn create_multiple_items_internal(1569 sender: T::AccountId,1570 collection: &CollectionHandle<T>,1571 owner: T::AccountId,1572 items_data: Vec<CreateItemData>,1573 ) -> DispatchResult {1574 Self::can_create_items_in_collection(&collection, &sender, &owner, items_data.len() as u32)?;15751576 for data in &items_data {1577 Self::validate_create_item_args(&collection, data)?;1578 }1579 for data in &items_data {1580 Self::create_item_no_validation(&collection, owner.clone(), data.clone())?;1581 }15821583 Ok(())1584 }15851586 pub fn toggle_white_list_internal(1587 sender: &T::AccountId,1588 collection: &CollectionHandle<T>,1589 address: &T::AccountId,1590 whitelisted: bool,1591 ) -> DispatchResult {1592 Self::check_owner_or_admin_permissions(&collection, sender.clone())?;15931594 if whitelisted {1595 <WhiteList<T>>::insert(collection.id, address, true);1596 } else {1597 <WhiteList<T>>::remove(collection.id, address);1598 }15991600 Ok(())1601 }16021603 fn is_correct_transfer(collection: &CollectionHandle<T>, recipient: &T::AccountId) -> DispatchResult {1604 let collection_id = collection.id;16051606 // check token limit and account token limit1607 let account_items: u32 = <AddressTokens<T>>::get(collection_id, recipient).len() as u32;1608 ensure!(collection.limits.account_token_ownership_limit > account_items, Error::<T>::AccountTokenLimitExceeded);1609 1610 Ok(())1611 }16121613 fn can_create_items_in_collection(collection: &CollectionHandle<T>, sender: &T::AccountId, owner: &T::AccountId, amount: u32) -> DispatchResult {1614 let collection_id = collection.id;16151616 // check token limit and account token limit1617 let total_items: u32 = ItemListIndex::get(collection_id)1618 .checked_add(amount)1619 .ok_or(Error::<T>::CollectionTokenLimitExceeded)?;1620 let account_items: u32 = (<AddressTokens<T>>::get(collection_id, owner).len() as u32)1621 .checked_add(amount)1622 .ok_or(Error::<T>::AccountTokenLimitExceeded)?;1623 ensure!(collection.limits.token_limit >= total_items, Error::<T>::CollectionTokenLimitExceeded);1624 ensure!(collection.limits.account_token_ownership_limit >= account_items, Error::<T>::AccountTokenLimitExceeded);16251626 if !Self::is_owner_or_admin_permissions(collection, sender.clone()) {1627 ensure!(collection.mint_mode == true, Error::<T>::PublicMintingNotAllowed);1628 Self::check_white_list(collection, owner)?;1629 Self::check_white_list(collection, sender)?;1630 }16311632 Ok(())1633 }16341635 fn validate_create_item_args(target_collection: &CollectionHandle<T>, data: &CreateItemData) -> DispatchResult {1636 match target_collection.mode1637 {1638 CollectionMode::NFT => {1639 if let CreateItemData::NFT(data) = data {1640 // check sizes1641 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);1642 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);1643 } else {1644 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);1645 }1646 },1647 CollectionMode::Fungible(_) => {1648 if let CreateItemData::Fungible(_) = data {1649 } else {1650 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);1651 }1652 },1653 CollectionMode::ReFungible => {1654 if let CreateItemData::ReFungible(data) = data {16551656 // check sizes1657 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);1658 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);16591660 // Check refungibility limits1661 ensure!(data.pieces <= MAX_REFUNGIBLE_PIECES, Error::<T>::WrongRefungiblePieces);1662 ensure!(data.pieces > 0, Error::<T>::WrongRefungiblePieces);1663 } else {1664 fail!(Error::<T>::NotReFungibleDataUsedToMintReFungibleCollectionToken);1665 }1666 },1667 _ => { fail!(Error::<T>::UnexpectedCollectionType); }1668 };16691670 Ok(())1671 }16721673 fn create_item_no_validation(collection: &CollectionHandle<T>, owner: T::AccountId, data: CreateItemData) -> DispatchResult {1674 match data1675 {1676 CreateItemData::NFT(data) => {1677 let item = NftItemType {1678 owner: owner.clone(),1679 const_data: data.const_data,1680 variable_data: data.variable_data1681 };16821683 Self::add_nft_item(collection, item)?;1684 },1685 CreateItemData::Fungible(data) => {1686 Self::add_fungible_item(collection, &owner, data.value)?;1687 },1688 CreateItemData::ReFungible(data) => {1689 let mut owner_list = Vec::new();1690 owner_list.push(Ownership {owner: owner.clone(), fraction: data.pieces});16911692 let item = ReFungibleItemType {1693 owner: owner_list,1694 const_data: data.const_data,1695 variable_data: data.variable_data1696 };16971698 Self::add_refungible_item(collection, item)?;1699 }1700 };17011702 Ok(())1703 }17041705 fn add_fungible_item(collection: &CollectionHandle<T>, owner: &T::AccountId, value: u128) -> DispatchResult {1706 let collection_id = collection.id;17071708 // Does new owner already have an account?1709 let balance: u128 = <FungibleItemList<T>>::get(collection_id, owner).value;17101711 // Mint 1712 let item = FungibleItemType {1713 value: balance.checked_add(value).ok_or(Error::<T>::NumOverflow)?,1714 };1715 <FungibleItemList<T>>::insert(collection_id, (*owner).clone(), item);17161717 // Update balance1718 let new_balance = <Balance<T>>::get(collection_id, owner)1719 .checked_add(value)1720 .ok_or(Error::<T>::NumOverflow)?;1721 <Balance<T>>::insert(collection_id, (*owner).clone(), new_balance);17221723 Self::deposit_event(RawEvent::ItemCreated(collection_id, 0, owner.clone()));1724 Ok(())1725 }17261727 fn add_refungible_item(collection: &CollectionHandle<T>, item: ReFungibleItemType<T::AccountId>) -> DispatchResult {1728 let collection_id = collection.id;17291730 let current_index = <ItemListIndex>::get(collection_id)1731 .checked_add(1)1732 .ok_or(Error::<T>::NumOverflow)?;1733 let itemcopy = item.clone();17341735 ensure!(1736 item.owner.len() == 1,1737 Error::<T>::BadCreateRefungibleCall,1738 );1739 let item_owner = item.owner.first().expect("only one owner is defined");17401741 let value = item_owner.fraction;1742 let owner = item_owner.owner.clone();17431744 Self::add_token_index(collection_id, current_index, &owner)?;17451746 <ItemListIndex>::insert(collection_id, current_index);1747 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);17481749 // Update balance1750 let new_balance = <Balance<T>>::get(collection_id, &owner)1751 .checked_add(value)1752 .ok_or(Error::<T>::NumOverflow)?;1753 <Balance<T>>::insert(collection_id, owner.clone(), new_balance);17541755 Self::deposit_event(RawEvent::ItemCreated(collection_id, current_index, owner));1756 Ok(())1757 }17581759 fn add_nft_item(collection: &CollectionHandle<T>, item: NftItemType<T::AccountId>) -> DispatchResult {1760 let collection_id = collection.id;17611762 let current_index = <ItemListIndex>::get(collection_id)1763 .checked_add(1)1764 .ok_or(Error::<T>::NumOverflow)?;17651766 let item_owner = item.owner.clone();1767 Self::add_token_index(collection_id, current_index, &item.owner)?;17681769 <ItemListIndex>::insert(collection_id, current_index);1770 <NftItemList<T>>::insert(collection_id, current_index, item);17711772 // Update balance1773 let new_balance = <Balance<T>>::get(collection_id, item_owner.clone())1774 .checked_add(1)1775 .ok_or(Error::<T>::NumOverflow)?;1776 <Balance<T>>::insert(collection_id, item_owner.clone(), new_balance);17771778 Self::deposit_event(RawEvent::ItemCreated(collection_id, current_index, item_owner));1779 Ok(())1780 }17811782 fn burn_refungible_item(1783 collection: &CollectionHandle<T>,1784 item_id: TokenId,1785 owner: &T::AccountId,1786 ) -> DispatchResult {1787 let collection_id = collection.id;17881789 let mut token = <ReFungibleItemList<T>>::get(collection_id, item_id)1790 .ok_or(Error::<T>::TokenNotFound)?;1791 let rft_balance = token1792 .owner1793 .iter()1794 .find(|&i| i.owner == *owner)1795 .ok_or(Error::<T>::TokenNotFound)?;1796 Self::remove_token_index(collection_id, item_id, owner)?;17971798 // update balance1799 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.clone())1800 .checked_sub(rft_balance.fraction)1801 .ok_or(Error::<T>::NumOverflow)?;1802 <Balance<T>>::insert(collection_id, rft_balance.owner.clone(), new_balance);18031804 // Re-create owners list with sender removed1805 let index = token1806 .owner1807 .iter()1808 .position(|i| i.owner == *owner)1809 .expect("owned item is exists");1810 token.owner.remove(index);1811 let owner_count = token.owner.len();18121813 // Burn the token completely if this was the last (only) owner1814 if owner_count == 0 {1815 <ReFungibleItemList<T>>::remove(collection_id, item_id);1816 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);1817 }1818 else {1819 <ReFungibleItemList<T>>::insert(collection_id, item_id, token);1820 }18211822 Ok(())1823 }18241825 fn burn_nft_item(collection: &CollectionHandle<T>, item_id: TokenId) -> DispatchResult {1826 let collection_id = collection.id;18271828 let item = <NftItemList<T>>::get(collection_id, item_id)1829 .ok_or(Error::<T>::TokenNotFound)?;1830 Self::remove_token_index(collection_id, item_id, &item.owner)?;18311832 // update balance1833 let new_balance = <Balance<T>>::get(collection_id, &item.owner)1834 .checked_sub(1)1835 .ok_or(Error::<T>::NumOverflow)?;1836 <Balance<T>>::insert(collection_id, item.owner.clone(), new_balance);1837 <NftItemList<T>>::remove(collection_id, item_id);1838 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);18391840 Ok(())1841 }18421843 fn burn_fungible_item(owner: &T::AccountId, collection: &CollectionHandle<T>, value: u128) -> DispatchResult {1844 let collection_id = collection.id;18451846 let mut balance = <FungibleItemList<T>>::get(collection_id, owner);1847 ensure!(balance.value >= value, Error::<T>::TokenValueNotEnough);18481849 // update balance1850 let new_balance = <Balance<T>>::get(collection_id, owner)1851 .checked_sub(value)1852 .ok_or(Error::<T>::NumOverflow)?;1853 <Balance<T>>::insert(collection_id, (*owner).clone(), new_balance);18541855 if balance.value - value > 0 {1856 balance.value -= value;1857 <FungibleItemList<T>>::insert(collection_id, (*owner).clone(), balance);1858 }1859 else {1860 <FungibleItemList<T>>::remove(collection_id, owner);1861 }18621863 Ok(())1864 }18651866 pub fn get_collection(collection_id: CollectionId) -> Result<CollectionHandle<T>, sp_runtime::DispatchError> {1867 Ok(<CollectionById<T>>::get(collection_id)1868 .map(|collection| CollectionHandle {1869 id: collection_id,1870 collection1871 })1872 .ok_or(Error::<T>::CollectionNotFound)?)1873 }18741875 fn save_collection(collection: CollectionHandle<T>) {1876 <CollectionById<T>>::insert(collection.id, collection.collection);1877 }18781879 fn check_owner_permissions(target_collection: &CollectionHandle<T>, subject: T::AccountId) -> DispatchResult {1880 ensure!(1881 subject == target_collection.owner,1882 Error::<T>::NoPermission1883 );18841885 Ok(())1886 }18871888 fn is_owner_or_admin_permissions(collection: &CollectionHandle<T>, subject: T::AccountId) -> bool {1889 subject == collection.owner || <AdminList<T>>::get(collection.id).contains(&subject)1890 }18911892 fn check_owner_or_admin_permissions(1893 collection: &CollectionHandle<T>,1894 subject: T::AccountId,1895 ) -> DispatchResult {1896 ensure!(Self::is_owner_or_admin_permissions(collection, subject), Error::<T>::NoPermission);18971898 Ok(())1899 }19001901 fn owned_amount(1902 subject: T::AccountId,1903 target_collection: &CollectionHandle<T>,1904 item_id: TokenId,1905 ) -> Option<u128> {1906 let collection_id = target_collection.id;19071908 match target_collection.mode {1909 CollectionMode::NFT => (<NftItemList<T>>::get(collection_id, item_id)?.owner == subject)1910 .then(|| 1),1911 CollectionMode::Fungible(_) => Some(<FungibleItemList<T>>::get(collection_id, &subject)1912 .value),1913 CollectionMode::ReFungible => <ReFungibleItemList<T>>::get(collection_id, item_id)?1914 .owner1915 .iter()1916 .find(|i| i.owner == subject)1917 .map(|i| i.fraction),1918 CollectionMode::Invalid => None,1919 }1920 }19211922 fn is_item_owner(subject: T::AccountId, target_collection: &CollectionHandle<T>, item_id: TokenId) -> bool {1923 match target_collection.mode {1924 CollectionMode::Fungible(_) => true,1925 _ => Self::owned_amount(subject, target_collection, item_id).is_some(),1926 }1927 }19281929 fn check_white_list(collection: &CollectionHandle<T>, address: &T::AccountId) -> DispatchResult {1930 let collection_id = collection.id;19311932 let mes = Error::<T>::AddresNotInWhiteList;1933 ensure!(<WhiteList<T>>::contains_key(collection_id, address), mes);19341935 Ok(())1936 }19371938 /// Check if token exists. In case of Fungible, check if there is an entry for 1939 /// the owner in fungible balances double map1940 fn token_exists(1941 target_collection: &CollectionHandle<T>,1942 item_id: TokenId,1943 ) -> DispatchResult {1944 let collection_id = target_collection.id;1945 let exists = match target_collection.mode1946 {1947 CollectionMode::NFT => <NftItemList<T>>::contains_key(collection_id, item_id),1948 CollectionMode::Fungible(_) => true,1949 CollectionMode::ReFungible => <ReFungibleItemList<T>>::contains_key(collection_id, item_id),1950 _ => false1951 };19521953 ensure!(exists == true, Error::<T>::TokenNotFound);1954 Ok(())1955 }19561957 fn transfer_fungible(1958 collection: &CollectionHandle<T>,1959 value: u128,1960 owner: &T::AccountId,1961 recipient: &T::AccountId,1962 ) -> DispatchResult {1963 let collection_id = collection.id;19641965 let mut balance = <FungibleItemList<T>>::get(collection_id, owner);1966 ensure!(balance.value >= value, Error::<T>::TokenValueTooLow);19671968 // Send balance to recipient (updates balanceOf of recipient)1969 Self::add_fungible_item(collection, recipient, value)?;19701971 // update balanceOf of sender1972 <Balance<T>>::insert(collection_id, (*owner).clone(), balance.value - value);19731974 // Reduce or remove sender1975 if balance.value == value {1976 <FungibleItemList<T>>::remove(collection_id, owner);1977 }1978 else {1979 balance.value -= value;1980 <FungibleItemList<T>>::insert(collection_id, (*owner).clone(), balance);1981 }19821983 Ok(())1984 }19851986 fn transfer_refungible(1987 collection: &CollectionHandle<T>,1988 item_id: TokenId,1989 value: u128,1990 owner: T::AccountId,1991 new_owner: T::AccountId,1992 ) -> DispatchResult {1993 let collection_id = collection.id;1994 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id)1995 .ok_or(Error::<T>::TokenNotFound)?;19961997 let item = full_item1998 .owner1999 .iter()2000 .filter(|i| i.owner == owner)2001 .next()2002 .ok_or(Error::<T>::TokenNotFound)?;2003 let amount = item.fraction;20042005 ensure!(amount >= value, Error::<T>::TokenValueTooLow);20062007 // update balance2008 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.clone())2009 .checked_sub(value)2010 .ok_or(Error::<T>::NumOverflow)?;2011 <Balance<T>>::insert(collection_id, item.owner.clone(), balance_old_owner);20122013 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.clone())2014 .checked_add(value)2015 .ok_or(Error::<T>::NumOverflow)?;2016 <Balance<T>>::insert(collection_id, new_owner.clone(), balance_new_owner);20172018 let old_owner = item.owner.clone();2019 let new_owner_has_account = full_item.owner.iter().any(|i| i.owner == new_owner);20202021 // transfer2022 if amount == value && !new_owner_has_account {2023 // change owner2024 // new owner do not have account2025 let mut new_full_item = full_item.clone();2026 new_full_item2027 .owner2028 .iter_mut()2029 .find(|i| i.owner == owner)2030 .expect("old owner does present in refungible")2031 .owner = new_owner.clone();2032 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);20332034 // update index collection2035 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;2036 } else {2037 let mut new_full_item = full_item.clone();2038 new_full_item2039 .owner2040 .iter_mut()2041 .find(|i| i.owner == owner)2042 .expect("old owner does present in refungible")2043 .fraction -= value;20442045 // separate amount2046 if new_owner_has_account {2047 // new owner has account2048 new_full_item2049 .owner2050 .iter_mut()2051 .find(|i| i.owner == new_owner)2052 .expect("new owner has account")2053 .fraction += value;2054 } else {2055 // new owner do not have account2056 new_full_item.owner.push(Ownership {2057 owner: new_owner.clone(),2058 fraction: value,2059 });2060 Self::add_token_index(collection_id, item_id, &new_owner)?;2061 }20622063 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2064 }20652066 Ok(())2067 }20682069 fn transfer_nft(2070 collection: &CollectionHandle<T>,2071 item_id: TokenId,2072 sender: T::AccountId,2073 new_owner: T::AccountId,2074 ) -> DispatchResult {2075 let collection_id = collection.id;2076 let mut item = <NftItemList<T>>::get(collection_id, item_id)2077 .ok_or(Error::<T>::TokenNotFound)?;20782079 ensure!(2080 sender == item.owner,2081 Error::<T>::MustBeTokenOwner2082 );20832084 // update balance2085 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.clone())2086 .checked_sub(1)2087 .ok_or(Error::<T>::NumOverflow)?;2088 <Balance<T>>::insert(collection_id, item.owner.clone(), balance_old_owner);20892090 let balancenew_owner = <Balance<T>>::get(collection_id, new_owner.clone())2091 .checked_add(1)2092 .ok_or(Error::<T>::NumOverflow)?;2093 <Balance<T>>::insert(collection_id, new_owner.clone(), balancenew_owner);20942095 // change owner2096 let old_owner = item.owner.clone();2097 item.owner = new_owner.clone();2098 <NftItemList<T>>::insert(collection_id, item_id, item);20992100 // update index collection2101 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;21022103 Ok(())2104 }2105 2106 fn set_re_fungible_variable_data(2107 collection: &CollectionHandle<T>,2108 item_id: TokenId,2109 data: Vec<u8>2110 ) -> DispatchResult {2111 let collection_id = collection.id;2112 let mut item = <ReFungibleItemList<T>>::get(collection_id, item_id)2113 .ok_or(Error::<T>::TokenNotFound)?;21142115 item.variable_data = data;21162117 <ReFungibleItemList<T>>::insert(collection_id, item_id, item);21182119 Ok(())2120 }21212122 fn set_nft_variable_data(2123 collection: &CollectionHandle<T>,2124 item_id: TokenId,2125 data: Vec<u8>2126 ) -> DispatchResult {2127 let collection_id = collection.id;2128 let mut item = <NftItemList<T>>::get(collection_id, item_id)2129 .ok_or(Error::<T>::TokenNotFound)?;2130 2131 item.variable_data = data;21322133 <NftItemList<T>>::insert(collection_id, item_id, item);2134 2135 Ok(())2136 }21372138 #[allow(dead_code)]2139 fn init_collection(item: &Collection<T>) {2140 // check params2141 assert!(2142 item.decimal_points <= MAX_DECIMAL_POINTS,2143 "decimal_points parameter must be lower than MAX_DECIMAL_POINTS"2144 );2145 assert!(2146 item.name.len() <= 64,2147 "Collection name can not be longer than 63 char"2148 );2149 assert!(2150 item.name.len() <= 256,2151 "Collection description can not be longer than 255 char"2152 );2153 assert!(2154 item.token_prefix.len() <= 16,2155 "Token prefix can not be longer than 15 char"2156 );21572158 // Generate next collection ID2159 let next_id = CreatedCollectionCount::get()2160 .checked_add(1)2161 .unwrap();21622163 CreatedCollectionCount::put(next_id);2164 }21652166 #[allow(dead_code)]2167 fn init_nft_token(collection_id: CollectionId, item: &NftItemType<T::AccountId>) {2168 let current_index = <ItemListIndex>::get(collection_id)2169 .checked_add(1)2170 .unwrap();21712172 let item_owner = item.owner.clone();2173 Self::add_token_index(collection_id, current_index, &item.owner).unwrap();21742175 <ItemListIndex>::insert(collection_id, current_index);21762177 // Update balance2178 let new_balance = <Balance<T>>::get(collection_id, &item_owner)2179 .checked_add(1)2180 .unwrap();2181 <Balance<T>>::insert(collection_id, item_owner.clone(), new_balance);2182 }21832184 #[allow(dead_code)]2185 fn init_fungible_token(collection_id: CollectionId, owner: &T::AccountId, item: &FungibleItemType) {2186 let current_index = <ItemListIndex>::get(collection_id)2187 .checked_add(1)2188 .unwrap();21892190 Self::add_token_index(collection_id, current_index, owner).unwrap();21912192 <ItemListIndex>::insert(collection_id, current_index);21932194 // Update balance2195 let new_balance = <Balance<T>>::get(collection_id, owner)2196 .checked_add(item.value)2197 .unwrap();2198 <Balance<T>>::insert(collection_id, (*owner).clone(), new_balance);2199 }22002201 #[allow(dead_code)]2202 fn init_refungible_token(collection_id: CollectionId, item: &ReFungibleItemType<T::AccountId>) {2203 let current_index = <ItemListIndex>::get(collection_id)2204 .checked_add(1)2205 .unwrap();22062207 let value = item.owner.first().unwrap().fraction;2208 let owner = item.owner.first().unwrap().owner.clone();22092210 Self::add_token_index(collection_id, current_index, &owner).unwrap();22112212 <ItemListIndex>::insert(collection_id, current_index);22132214 // Update balance2215 let new_balance = <Balance<T>>::get(collection_id, &owner)2216 .checked_add(value)2217 .unwrap();2218 <Balance<T>>::insert(collection_id, owner.clone(), new_balance);2219 }22202221 fn add_token_index(collection_id: CollectionId, item_index: TokenId, owner: &T::AccountId) -> DispatchResult {2222 // add to account limit2223 if <AccountItemCount<T>>::contains_key(owner) {22242225 // bound Owned tokens by a single address2226 let count = <AccountItemCount<T>>::get(owner);2227 ensure!(count < ChainLimit::get().account_token_ownership_limit, Error::<T>::AddressOwnershipLimitExceeded);22282229 <AccountItemCount<T>>::insert(owner.clone(), count2230 .checked_add(1)2231 .ok_or(Error::<T>::NumOverflow)?);2232 }2233 else {2234 <AccountItemCount<T>>::insert(owner.clone(), 1);2235 }22362237 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner);2238 if list_exists {2239 let mut list = <AddressTokens<T>>::get(collection_id, owner);2240 let item_contains = list.contains(&item_index.clone());22412242 if !item_contains {2243 list.push(item_index.clone());2244 }22452246 <AddressTokens<T>>::insert(collection_id, owner.clone(), list);2247 } else {2248 let mut itm = Vec::new();2249 itm.push(item_index.clone());2250 <AddressTokens<T>>::insert(collection_id, owner.clone(), itm);2251 }22522253 Ok(())2254 }22552256 fn remove_token_index(2257 collection_id: CollectionId,2258 item_index: TokenId,2259 owner: &T::AccountId,2260 ) -> DispatchResult {22612262 // update counter2263 <AccountItemCount<T>>::insert(owner.clone(), 2264 <AccountItemCount<T>>::get(owner)2265 .checked_sub(1)2266 .ok_or(Error::<T>::NumOverflow)?);226722682269 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner);2270 if list_exists {2271 let mut list = <AddressTokens<T>>::get(collection_id, owner);2272 let item_contains = list.contains(&item_index.clone());22732274 if item_contains {2275 list.retain(|&item| item != item_index);2276 <AddressTokens<T>>::insert(collection_id, owner.clone(), list);2277 }2278 }22792280 Ok(())2281 }22822283 fn move_token_index(2284 collection_id: CollectionId,2285 item_index: TokenId,2286 old_owner: &T::AccountId,2287 new_owner: &T::AccountId,2288 ) -> DispatchResult {2289 Self::remove_token_index(collection_id, item_index, old_owner)?;2290 Self::add_token_index(collection_id, item_index, new_owner)?;22912292 Ok(())2293 }2294 2295 fn ensure_contract_owned(account: T::AccountId, contract: &T::AccountId) -> DispatchResult {2296 ensure!(<ContractOwner<T>>::get(contract) == Some(account), Error::<T>::NoPermission);22972298 Ok(())2299 }2300}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,8 +1,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
-#[cfg(feature = "std")]
-pub use serde::*;
+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
@@ -53,6 +53,9 @@
'pallet-transaction-payment-rpc-runtime-api/std',
'pallet-treasury/std',
'pallet-vesting/std',
+ 'pallet-evm/std',
+ 'pallet-ethereum/std',
+ 'fp-rpc/std',
'parachain-info/std',
'serde',
'pallet-inflation/std',
@@ -130,6 +133,7 @@
version = '0.3.1'
[dependencies.serde]
+default-features = false
features = ['derive']
optional = true
version = '1.0.119'
@@ -373,9 +377,12 @@
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-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
[build-dependencies]
-substrate-wasm-builder = '4.0.0'
-
+substrate-wasm-builder = '4.0.0'
\ No newline at end of file
runtime/src/chain_extension.rsdiffbeforeafterboth--- a/runtime/src/chain_extension.rs
+++ b/runtime/src/chain_extension.rs
@@ -17,6 +17,7 @@
extern crate pallet_nft;
pub use pallet_nft::*;
+use pallet_nft::CrossAccountId;
use nft_data_structs::*;
use crate::Vec;
@@ -98,13 +99,14 @@
let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
pallet_nft::Module::<C>::transfer_internal(
- env.ext().address().clone(),
- input.recipient,
+ &C::CrossAccountId::from_sub(env.ext().address().clone()),
+ &C::CrossAccountId::from_sub(input.recipient),
&collection,
input.token_id,
input.amount,
)?;
-
+
+ pallet_nft::Module::<C>::submit_logs(collection)?;
Ok(RetVal::Converging(0))
},
1 => {
@@ -113,13 +115,16 @@
let input: NFTExtCreateItem<E> = env.read_as()?;
env.charge_weight(NftWeightInfoOf::<C>::create_item(input.data.len()))?;
+ let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
+
pallet_nft::Module::<C>::create_item_internal(
- env.ext().address().clone(),
- input.collection_id,
- input.owner,
+ &C::CrossAccountId::from_sub(env.ext().address().clone()),
+ &collection,
+ &C::CrossAccountId::from_sub(input.owner),
input.data,
)?;
-
+
+ pallet_nft::Module::<C>::submit_logs(collection)?;
Ok(RetVal::Converging(0))
},
2 => {
@@ -135,12 +140,13 @@
let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
pallet_nft::Module::<C>::create_multiple_items_internal(
- env.ext().address().clone(),
+ &C::CrossAccountId::from_sub(env.ext().address().clone()),
&collection,
- input.owner,
+ &C::CrossAccountId::from_sub(input.owner),
input.data,
)?;
-
+
+ pallet_nft::Module::<C>::submit_logs(collection)?;
Ok(RetVal::Converging(0))
},
3 => {
@@ -152,13 +158,14 @@
let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
pallet_nft::Module::<C>::approve_internal(
- env.ext().address().clone(),
- input.spender,
+ &C::CrossAccountId::from_sub(env.ext().address().clone()),
+ &C::CrossAccountId::from_sub(input.spender),
&collection,
input.item_id,
input.amount,
)?;
+ pallet_nft::Module::<C>::submit_logs(collection)?;
Ok(RetVal::Converging(0))
},
4 => {
@@ -170,14 +177,15 @@
let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
pallet_nft::Module::<C>::transfer_from_internal(
- env.ext().address().clone(),
- input.owner,
- input.recipient,
+ &C::CrossAccountId::from_sub(env.ext().address().clone()),
+ &C::CrossAccountId::from_sub(input.owner),
+ &C::CrossAccountId::from_sub(input.recipient),
&collection,
input.item_id,
input.amount
)?;
+ pallet_nft::Module::<C>::submit_logs(collection)?;
Ok(RetVal::Converging(0))
},
5 => {
@@ -189,12 +197,13 @@
let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
pallet_nft::Module::<C>::set_variable_meta_data_internal(
- env.ext().address().clone(),
+ &C::CrossAccountId::from_sub(env.ext().address().clone()),
&collection,
input.item_id,
input.data,
)?;
+ pallet_nft::Module::<C>::submit_logs(collection)?;
Ok(RetVal::Converging(0))
},
6 => {
@@ -206,12 +215,13 @@
let collection = pallet_nft::Module::<C>::get_collection(input.collection_id)?;
pallet_nft::Module::<C>::toggle_white_list_internal(
- &env.ext().address().clone(),
+ &C::CrossAccountId::from_sub(env.ext().address().clone()),
&collection,
- &input.address,
+ &C::CrossAccountId::from_sub(input.address),
input.whitelisted,
)?;
+ pallet_nft::Module::<C>::submit_logs(collection)?;
Ok(RetVal::Converging(0))
}
_ => {
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;
@@ -37,6 +37,7 @@
pub use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment, FeeDetails, RuntimeDispatchInfo};
// A few exports that help ease life for downstream crates.
pub use pallet_balances::Call as BalancesCall;
+pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};
pub use frame_support::{
construct_runtime,
match_type,
@@ -44,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},
@@ -63,7 +65,10 @@
};
use sp_arithmetic::{traits::{BaseArithmetic, Unsigned}};
use smallvec::smallvec;
-
+use codec::{Encode, Decode};
+use pallet_evm::{Account as EVMAccount, FeeCalculator, OnMethodCall};
+use fp_rpc::TransactionStatus;
+use sp_core::crypto::Public;
use sp_runtime::{
traits::{
Dispatchable,
@@ -95,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;
@@ -135,9 +140,9 @@
/// of data like extrinsics, allowing for them to continue syncing the network through upgrades
/// to even the core data structures.
pub mod opaque {
- use super::*;
+ use super::*;
- pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
+ pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
/// Opaque block type.
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
@@ -153,13 +158,13 @@
/// This runtime version.
pub const VERSION: RuntimeVersion = RuntimeVersion {
- spec_name: create_runtime_str!("nft"),
- impl_name: create_runtime_str!("nft"),
- authoring_version: 1,
- spec_version: 3,
- impl_version: 1,
- apis: RUNTIME_API_VERSIONS,
- transaction_version: 1,
+ spec_name: create_runtime_str!("nft"),
+ impl_name: create_runtime_str!("nft"),
+ authoring_version: 1,
+ spec_version: 3,
+ impl_version: 1,
+ apis: RUNTIME_API_VERSIONS,
+ transaction_version: 1,
};
pub const MILLISECS_PER_BLOCK: u64 = 12000;
@@ -180,10 +185,10 @@
/// The version information used to identify this runtime when compiled natively.
#[cfg(feature = "std")]
pub fn native_version() -> NativeVersion {
- NativeVersion {
- runtime_version: VERSION,
- can_author_with: Default::default(),
- }
+ NativeVersion {
+ runtime_version: VERSION,
+ can_author_with: Default::default(),
+ }
}
type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;
@@ -214,11 +219,11 @@
const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND;
parameter_types! {
- pub const BlockHashCount: BlockNumber = 2400;
+ pub const BlockHashCount: BlockNumber = 2400;
pub RuntimeBlockLength: BlockLength =
BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
- pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
- pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
+ pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
+ pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()
.base_block(BlockExecutionWeight::get())
.for_class(DispatchClass::all(), |weights| {
@@ -237,10 +242,56 @@
})
.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
.build_or_panic();
- pub const Version: RuntimeVersion = VERSION;
- pub const SS58Prefix: u8 = 42;
+ pub const Version: RuntimeVersion = VERSION;
+ pub const SS58Prefix: u8 = 42;
+}
+
+
+parameter_types! {
+ pub const ChainId: u64 = 8888;
+}
+
+impl pallet_evm::Config for Runtime {
+ type BlockGasLimit = BlockGasLimit;
+ type FeeCalculator = ();
+ type GasWeightMapping = ();
+ type CallOrigin = EnsureAddressTruncated;
+ type WithdrawOrigin = EnsureAddressTruncated;
+ type AddressMapping = HashedAddressMapping<Self::Hashing>;
+ type Precompiles = ();
+ type Currency = Balances;
+ type Event = Event;
+ type OnMethodCall = pallet_nft::NftErcSupport<Self>;
+ type ChainId = ChainId;
+ type Runner = pallet_evm::runner::stack::Runner<Self>;
+ type OnChargeTransaction = ();
+}
+
+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
+ I: 'a + IntoIterator<Item=(ConsensusEngineId, &'a [u8])>
+ {
+ if let Some(author_index) = F::find_author(digests) {
+ let authority_id = Aura::authorities()[author_index as usize].clone();
+ return Some(H160::from_slice(&authority_id.to_raw_vec()[4..24]));
+ }
+ None
+ }
+}
+
+parameter_types! {
+ pub BlockGasLimit: U256 = U256::from(u32::max_value());
}
+impl pallet_ethereum::Config for Runtime {
+ type Event = Event;
+ type FindAuthor = EthereumFindAuthor<Aura>;
+ type StateRoot = pallet_ethereum::IntermediateStateRoot;
+ type EvmSubmitLog = pallet_evm::Pallet<Runtime>;
+}
+
impl system::Config for Runtime {
/// The data to be stored in an account.
type AccountData = pallet_balances::AccountData<Balance>;
@@ -290,7 +341,7 @@
}
parameter_types! {
- pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
+ pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
}
impl pallet_timestamp::Config for Runtime {
@@ -302,8 +353,8 @@
}
parameter_types! {
- // pub const ExistentialDeposit: u128 = 500;
- pub const ExistentialDeposit: u128 = 0;
+ // pub const ExistentialDeposit: u128 = 500;
+ pub const ExistentialDeposit: u128 = 0;
pub const MaxLocks: u32 = 50;
}
@@ -325,7 +376,7 @@
pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
pub const fn deposit(items: u32, bytes: u32) -> Balance {
- items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE
+ items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE
}
parameter_types! {
@@ -341,7 +392,7 @@
pub const SignedClaimHandicap: u32 = 2;
pub const MaxDepth: u32 = 32;
pub const MaxValueSize: u32 = 16 * 1024;
- pub const MaxCodeSize: u32 = 1024 * 1024 * 25; // 25 Mb
+ pub const MaxCodeSize: u32 = 1024 * 1024 * 25; // 25 Mb
// The lazy deletion runs inside on_initialize.
pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *
RuntimeBlockWeights::get().max_block;
@@ -380,10 +431,10 @@
}
parameter_types! {
- pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer
+ pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer
}
-/// Linear implementor of `WeightToFeePolynomial`
+/// Linear implementor of `WeightToFeePolynomial`
pub struct LinearFee<T>(sp_std::marker::PhantomData<T>);
impl<T> WeightToFeePolynomial for LinearFee<T> where
@@ -445,8 +496,8 @@
}
impl pallet_sudo::Config for Runtime {
- type Event = Event;
- type Call = Call;
+ type Event = Event;
+ type Call = Call;
}
parameter_types! {
@@ -635,11 +686,20 @@
/// Used for the pallet nft in `./nft.rs`
impl pallet_nft::Config for Runtime {
- type Event = Event;
- type WeightInfo = nft_weights::WeightInfo;
+ type Event = Event;
+ type WeightInfo = nft_weights::WeightInfo;
+
+ type EvmWithdrawOrigin = EnsureAddressTruncated;
+ type EvmBackwardsAddressMapping = pallet_nft::MapBackwardsAddressTruncated;
+ type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
+ type CrossAccountId = pallet_nft::BasicCrossAccountId<Self>;
+
type Currency = Balances;
type CollectionCreationPrice = CollectionCreationPrice;
type TreasuryAccountId = TreasuryAccountId;
+
+ type EthereumChainId = ChainId;
+ type EthereumTransactionSender = pallet_ethereum::Module<Runtime>;
}
parameter_types! {
@@ -714,6 +774,10 @@
Aura: pallet_aura::{Pallet, Config<T>},
AuraExt: cumulus_pallet_aura_ext::{Pallet, Config},
+ // Frontier
+ 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,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,
@@ -730,6 +794,22 @@
}
);
+pub struct TransactionConverter;
+
+impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
+ fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
+ UncheckedExtrinsic::new_unsigned(pallet_ethereum::Call::<Runtime>::transact(transaction).into())
+ }
+}
+
+impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConverter {
+ fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> opaque::UncheckedExtrinsic {
+ let extrinsic = UncheckedExtrinsic::new_unsigned(pallet_ethereum::Call::<Runtime>::transact(transaction).into());
+ let encoded = extrinsic.encode();
+ opaque::UncheckedExtrinsic::decode(&mut &encoded[..]).expect("Encoded extrinsic is always valid")
+ }
+}
+
/// The address format for describing accounts.
pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
/// Block header type as expected by this runtime.
@@ -770,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
@@ -830,6 +918,116 @@
}
}
+ impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
+ fn chain_id() -> u64 {
+ <Runtime as pallet_evm::Config>::ChainId::get()
+ }
+
+ fn account_basic(address: H160) -> EVMAccount {
+ EVM::account_basic(&address)
+ }
+
+ fn gas_price() -> U256 {
+ <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price()
+ }
+
+ fn account_code_at(address: H160) -> Vec<u8> {
+ EVM::account_codes(address)
+ }
+
+ fn author() -> H160 {
+ <pallet_ethereum::Module<Runtime>>::find_author()
+ }
+
+ fn storage_at(address: H160, index: U256) -> H256 {
+ let mut tmp = [0u8; 32];
+ index.to_big_endian(&mut tmp);
+ EVM::account_storages(address, H256::from_slice(&tmp[..]))
+ }
+
+ fn call(
+ from: H160,
+ to: H160,
+ data: Vec<u8>,
+ value: U256,
+ gas_limit: U256,
+ gas_price: Option<U256>,
+ nonce: Option<U256>,
+ estimate: bool,
+ ) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
+ let config = if estimate {
+ let mut config = <Runtime as pallet_evm::Config>::config().clone();
+ config.estimate = true;
+ Some(config)
+ } else {
+ None
+ };
+
+ <Runtime as pallet_evm::Config>::Runner::call(
+ from,
+ to,
+ data,
+ value,
+ gas_limit.low_u64(),
+ gas_price,
+ nonce,
+ config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
+ ).map_err(|err| err.into())
+ }
+
+ fn create(
+ from: H160,
+ data: Vec<u8>,
+ value: U256,
+ gas_limit: U256,
+ gas_price: Option<U256>,
+ nonce: Option<U256>,
+ estimate: bool,
+ ) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
+ let config = if estimate {
+ let mut config = <Runtime as pallet_evm::Config>::config().clone();
+ config.estimate = true;
+ Some(config)
+ } else {
+ None
+ };
+
+ <Runtime as pallet_evm::Config>::Runner::create(
+ from,
+ data,
+ value,
+ gas_limit.low_u64(),
+ gas_price,
+ nonce,
+ config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
+ ).map_err(|err| err.into())
+ }
+
+ fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
+ Ethereum::current_transaction_statuses()
+ }
+
+ fn current_block() -> Option<pallet_ethereum::Block> {
+ Ethereum::current_block()
+ }
+
+ fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
+ Ethereum::current_receipts()
+ }
+
+ fn current_all() -> (
+ Option<pallet_ethereum::Block>,
+ Option<Vec<pallet_ethereum::Receipt>>,
+ Option<Vec<TransactionStatus>>
+ ) {
+ (
+ Ethereum::current_block(),
+ Ethereum::current_receipts(),
+ Ethereum::current_transaction_statuses()
+ )
+ }
+ }
+
impl sp_session::SessionKeys<Block> for Runtime {
fn decode_session_keys(
encoded: Vec<u8>,
@@ -930,7 +1128,7 @@
// hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
// // System Events
// hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
- ];
+ ];
let mut batches = Vec::<BenchmarkBatch>::new();
let params = (&config, &whitelist);
runtime_types.jsondiffbeforeafterboth--- a/runtime_types.json
+++ b/runtime_types.json
@@ -1,4 +1,10 @@
{
+ "CrossAccountId": {
+ "_enum": {
+ "substrate": "AccountId",
+ "ethereum": "H160"
+ }
+ },
"AccessMode": {
"_enum": [
"Normal",
@@ -15,27 +21,27 @@
}
},
"Ownership": {
- "Owner": "AccountId",
+ "Owner": "CrossAccountId",
"Fraction": "u128"
},
"FungibleItemType": {
"Value": "u128"
},
"NftItemType": {
- "Owner": "AccountId",
+ "Owner": "CrossAccountId",
"ConstData": "Vec<u8>",
"VariableData": "Vec<u8>"
},
"ReFungibleItemType": {
- "Owner": "Vec<Ownership<AccountId>>",
+ "Owner": "Vec<Ownership<CrossAccountId>>",
"ConstData": "Vec<u8>",
"VariableData": "Vec<u8>"
},
"SponsorshipState": {
"_enum": {
- "Disabled": null,
- "Unconfirmed": "AccountId",
- "Confirmed": "AccountId"
+ "disabled": null,
+ "unconfirmed": "AccountId",
+ "confirmed": "AccountId"
}
},
"Collection": {
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -8,17 +8,18 @@
"@polkadot/ts": "0.3.89",
"@polkadot/typegen": "4.13.2-5",
"@polkadot/util-crypto": "6.7.1",
- "@types/chai": "^4.2.12",
+ "@types/chai": "^4.2.17",
"@types/chai-as-promised": "^7.1.3",
- "@types/mocha": "^8.0.3",
- "chai": "^4.2.0",
- "mocha": "^8.1.1",
- "ts-node": "^9.0.0",
- "tslint": "^5.20.1",
- "typescript": "^3.9.7"
+ "@types/mocha": "^8.2.2",
+ "chai": "^4.3.4",
+ "mocha": "^8.3.2",
+ "ts-node": "^9.1.1",
+ "tslint": "^6.1.3",
+ "typescript": "^4.2.4"
},
"scripts": {
"test": "mocha --timeout 9999999 -r ts-node/register ./**/*.test.ts",
+ "testEth": "mocha --timeout 9999999 -r ts-node/register ./**/eth/**/*.test.ts",
"load": "mocha --timeout 9999999 -r ts-node/register ./**/*.load.ts",
"loadTransfer": "ts-node src/transfer.nload.ts",
"testCollision": "mocha --timeout 9999999 -r ts-node/register ./src/collision-tests/*.test.ts",
@@ -61,8 +62,10 @@
"dependencies": {
"@polkadot/api": "4.13.2-5",
"@polkadot/api-contract": "4.13.2-5",
- "bignumber.js": "^9.0.0",
- "chai-as-promised": "^7.1.1"
+ "@polkadot/util": "6.3.1",
+ "bignumber.js": "^9.0.1",
+ "chai-as-promised": "^7.1.1",
+ "web3": "^1.3.5"
},
"standard": {
"globals": [
tests/src/addCollectionAdmin.test.tsdiffbeforeafterboth--- a/tests/src/addCollectionAdmin.test.ts
+++ b/tests/src/addCollectionAdmin.test.ts
@@ -9,7 +9,7 @@
import chaiAsPromised from 'chai-as-promised';
import privateKey from './substrate/privateKey';
import { default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync } from './substrate/substrate-api';
-import {createCollectionExpectSuccess, destroyCollectionExpectSuccess} from './util/helpers';
+import {createCollectionExpectSuccess, destroyCollectionExpectSuccess, normalizeAccountId} from './util/helpers';
chai.use(chaiAsPromised);
const expect = chai.expect;
@@ -22,13 +22,13 @@
const bob = privateKey('//Bob');
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(alice.address));
- const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, bob.address);
+ const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(bob.address));
await submitTransactionAsync(alice, changeAdminTx);
const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
- expect(adminListAfterAddAdmin).to.be.contains(bob.address);
+ expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(bob.address));
});
});
@@ -40,19 +40,19 @@
const Charlie = privateKey('//CHARLIE');
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(Alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(Alice.address));
- const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+ const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
await submitTransactionAsync(Alice, changeAdminTx);
const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
- expect(adminListAfterAddAdmin).to.be.contains(Bob.address);
+ expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Bob.address));
- const changeAdminTxCharlie = api.tx.nft.addCollectionAdmin(collectionId, Charlie.address);
+ const changeAdminTxCharlie = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Charlie.address));
await submitTransactionAsync(Bob, changeAdminTxCharlie);
const adminListAfterAddNewAdmin: any = (await api.query.nft.adminList(collectionId));
- expect(adminListAfterAddNewAdmin).to.be.contains(Bob.address);
- expect(adminListAfterAddNewAdmin).to.be.contains(Charlie.address);
+ expect(adminListAfterAddNewAdmin).to.be.contains(normalizeAccountId(Bob.address));
+ expect(adminListAfterAddNewAdmin).to.be.contains(normalizeAccountId(Charlie.address));
});
});
});
@@ -64,11 +64,11 @@
const alice = privateKey('//Alice');
const nonOwner = privateKey('//Bob_stash');
- const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, alice.address);
+ const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(alice.address));
await expect(submitTransactionExpectFailAsync(nonOwner, changeAdminTx)).to.be.rejected;
const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
- expect(adminListAfterAddAdmin).not.to.be.contains(alice.address);
+ expect(adminListAfterAddAdmin).not.to.be.contains(normalizeAccountId(alice.address));
// Verifying that nothing bad happened (network is live, new collections can be created, etc.)
await createCollectionExpectSuccess();
@@ -81,7 +81,7 @@
const alice = privateKey('//Alice');
const bob = privateKey('//Bob');
- const changeOwnerTx = api.tx.nft.addCollectionAdmin(collectionId, bob.address);
+ const changeOwnerTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(bob.address));
await expect(submitTransactionExpectFailAsync(alice, changeOwnerTx)).to.be.rejected;
// Verifying that nothing bad happened (network is live, new collections can be created, etc.)
@@ -95,7 +95,7 @@
const Alice = privateKey('//Alice');
const Bob = privateKey('//Bob');
await destroyCollectionExpectSuccess(collectionId);
- const changeOwnerTx = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+ const changeOwnerTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
await expect(submitTransactionExpectFailAsync(Alice, changeOwnerTx)).to.be.rejected;
// Verifying that nothing bad happened (network is live, new collections can be created, etc.)
@@ -122,13 +122,13 @@
expect(chainAdminLimit).to.be.equal(5);
for (let i = 0; i < chainAdminLimit; i++) {
- const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, accounts[i]);
+ const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(accounts[i]));
await submitTransactionAsync(Alice, changeAdminTx);
const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
- expect(adminListAfterAddAdmin).to.be.contains(accounts[i]);
+ expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(accounts[i]));
}
- const tx = api.tx.nft.addCollectionAdmin(collectionId, accounts[chainAdminLimit]);
+ const tx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(accounts[chainAdminLimit]));
await expect(submitTransactionExpectFailAsync(Alice, tx)).to.be.rejected;
});
});
tests/src/addToContractWhiteList.test.tsdiffbeforeafterboth--- a/tests/src/addToContractWhiteList.test.ts
+++ b/tests/src/addToContractWhiteList.test.ts
@@ -11,7 +11,7 @@
deployFlipper
} from "./util/contracthelpers";
import {
- getGenericResult
+ getGenericResult, normalizeAccountId
} from "./util/helpers"
chai.use(chaiAsPromised);
tests/src/addToWhiteList.test.tsdiffbeforeafterboth--- a/tests/src/addToWhiteList.test.ts
+++ b/tests/src/addToWhiteList.test.ts
@@ -15,6 +15,7 @@
destroyCollectionExpectSuccess,
enablePublicMintingExpectSuccess,
enableWhiteListExpectSuccess,
+ normalizeAccountId,
} from './util/helpers';
chai.use(chaiAsPromised);
@@ -54,7 +55,7 @@
const collectionId = parseInt((await api.query.nft.createdCollectionCount()).toString()) + 1;
const Bob = privateKey('//Bob');
- const tx = api.tx.nft.addToWhiteList(collectionId, Bob.address);
+ const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(Bob.address));
await expect(submitTransactionExpectFailAsync(Alice, tx)).to.be.rejected;
});
});
@@ -66,7 +67,7 @@
// tslint:disable-next-line: no-bitwise
const collectionId = await createCollectionExpectSuccess();
await destroyCollectionExpectSuccess(collectionId);
- const tx = api.tx.nft.addToWhiteList(collectionId, Bob.address);
+ const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(Bob.address));
await expect(submitTransactionExpectFailAsync(Alice, tx)).to.be.rejected;
});
});
@@ -78,7 +79,7 @@
const collectionId = await createCollectionExpectSuccess();
await enableWhiteListExpectSuccess(Alice, collectionId);
await enablePublicMintingExpectSuccess(Alice, collectionId);
- const tx = api.tx.nft.createItem(collectionId, Ferdie.address, 'NFT');
+ const tx = api.tx.nft.createItem(collectionId, normalizeAccountId(Ferdie.address), 'NFT');
await expect(submitTransactionExpectFailAsync(Ferdie, tx)).to.be.rejected;
});
});
tests/src/burnItem.test.tsdiffbeforeafterboth--- a/tests/src/burnItem.test.ts
+++ b/tests/src/burnItem.test.ts
@@ -10,7 +10,8 @@
createCollectionExpectSuccess,
createItemExpectSuccess,
getGenericResult,
- destroyCollectionExpectSuccess
+ destroyCollectionExpectSuccess,
+ normalizeAccountId
} from './util/helpers';
import { nullPublicKey } from "./accounts";
@@ -99,7 +100,7 @@
await usingApi(async (api) => {
// Transfer 1/100 of the token to Bob
- const transfertx = api.tx.nft.transfer(bob.address, collectionId, tokenId, 1);
+ const transfertx = api.tx.nft.transfer(normalizeAccountId(bob.address), collectionId, tokenId, 1);
const events1 = await submitTransactionAsync(alice, transfertx);
const result1 = getGenericResult(events1);
@@ -119,9 +120,9 @@
expect(result1.success).to.be.true;
expect(balanceBefore).to.be.not.null;
expect(balanceBefore.Owner.length).to.be.equal(2);
- expect(balanceBefore.Owner[0].Owner).to.be.equal(alice.address);
+ expect(balanceBefore.Owner[0].Owner).to.be.deep.equal(normalizeAccountId(alice.address));
expect(balanceBefore.Owner[0].Fraction).to.be.equal(99);
- expect(balanceBefore.Owner[1].Owner).to.be.equal(bob.address);
+ expect(balanceBefore.Owner[1].Owner).to.be.deep.equal(normalizeAccountId(bob.address));
expect(balanceBefore.Owner[1].Fraction).to.be.equal(1);
// What to expect after burning
@@ -129,7 +130,7 @@
expect(balance).to.be.not.null;
expect(balance.Owner.length).to.be.equal(1);
expect(balance.Owner[0].Fraction).to.be.equal(99);
- expect(balance.Owner[0].Owner).to.be.equal(alice.address);
+ expect(balance.Owner[0].Owner).to.be.deep.equal(normalizeAccountId(alice.address));
});
});
@@ -203,7 +204,7 @@
const result1 = getGenericResult(events1);
expect(result1.success).to.be.true;
- const tx = api.tx.nft.transfer(bob.address, collectionId, tokenId, 0);
+ const tx = api.tx.nft.transfer(normalizeAccountId(bob.address), collectionId, tokenId, 0);
const badTransaction = async function () {
await submitTransactionExpectFailAsync(alice, tx);
};
tests/src/change-collection-owner.test.tsdiffbeforeafterboth--- a/tests/src/change-collection-owner.test.ts
+++ b/tests/src/change-collection-owner.test.ts
@@ -7,7 +7,7 @@
import chaiAsPromised from 'chai-as-promised';
import privateKey from './substrate/privateKey';
import { default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync } from "./substrate/substrate-api";
-import { createCollectionExpectSuccess, createCollectionExpectFailure } from "./util/helpers";
+import { createCollectionExpectSuccess, createCollectionExpectFailure, normalizeAccountId } from "./util/helpers";
chai.use(chaiAsPromised);
const expect = chai.expect;
@@ -20,13 +20,13 @@
const bob = privateKey('//Bob');
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(alice.address));
- const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, bob.address);
+ const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, normalizeAccountId(bob.address));
await submitTransactionAsync(alice, changeOwnerTx);
const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collectionAfterOwnerChange.Owner.toString()).to.be.eq(bob.address);
+ expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(normalizeAccountId(bob.address));
});
});
});
@@ -38,11 +38,11 @@
const alice = privateKey('//Alice');
const bob = privateKey('//Bob');
- const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, bob.address);
+ const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, normalizeAccountId(bob.address));
await expect(submitTransactionExpectFailAsync(bob, changeOwnerTx)).to.be.rejected;
const collectionAfterOwnerChange: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collectionAfterOwnerChange.Owner.toString()).to.be.eq(alice.address);
+ expect(collectionAfterOwnerChange.Owner).to.be.deep.eq(normalizeAccountId(alice.address));
// Verifying that nothing bad happened (network is live, new collections can be created, etc.)
await createCollectionExpectSuccess();
@@ -54,7 +54,7 @@
const alice = privateKey('//Alice');
const bob = privateKey('//Bob');
- const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, bob.address);
+ const changeOwnerTx = api.tx.nft.changeCollectionOwner(collectionId, normalizeAccountId(bob.address));
await expect(submitTransactionExpectFailAsync(alice, changeOwnerTx)).to.be.rejected;
// Verifying that nothing bad happened (network is live, new collections can be created, etc.)
tests/src/confirmSponsorship.test.tsdiffbeforeafterboth--- a/tests/src/confirmSponsorship.test.ts
+++ b/tests/src/confirmSponsorship.test.ts
@@ -19,6 +19,7 @@
enableWhiteListExpectSuccess,
enablePublicMintingExpectSuccess,
addToWhiteListExpectSuccess,
+ normalizeAccountId,
} from "./util/helpers";
import { Keyring } from "@polkadot/api";
import { IKeyringPair } from "@polkadot/types/types";
@@ -76,7 +77,7 @@
const itemId = await createItemExpectSuccess(alice, collectionId, 'NFT', zeroBalance.address);
// Transfer this tokens from unused address to Alice
- const zeroToAlice = api.tx.nft.transfer(zeroBalance.address, collectionId, itemId, 0);
+ const zeroToAlice = api.tx.nft.transfer(normalizeAccountId(zeroBalance.address), collectionId, itemId, 0);
const events = await submitTransactionAsync(zeroBalance, zeroToAlice);
const result = getGenericResult(events);
@@ -103,7 +104,7 @@
const itemId = await createItemExpectSuccess(alice, collectionId, 'Fungible', zeroBalance.address);
// Transfer this tokens from unused address to Alice
- const zeroToAlice = api.tx.nft.transfer(zeroBalance.address, collectionId, itemId, 1);
+ const zeroToAlice = api.tx.nft.transfer(normalizeAccountId(zeroBalance.address), collectionId, itemId, 1);
const events1 = await submitTransactionAsync(zeroBalance, zeroToAlice);
const result1 = getGenericResult(events1);
@@ -129,7 +130,7 @@
const itemId = await createItemExpectSuccess(alice, collectionId, 'ReFungible', zeroBalance.address);
// Transfer this tokens from unused address to Alice
- const zeroToAlice = api.tx.nft.transfer(zeroBalance.address, collectionId, itemId, 1);
+ const zeroToAlice = api.tx.nft.transfer(normalizeAccountId(zeroBalance.address), collectionId, itemId, 1);
const events1 = await submitTransactionAsync(zeroBalance, zeroToAlice);
const result1 = getGenericResult(events1);
@@ -184,13 +185,13 @@
// Transfer this token from Alice to unused address and back
// Alice to Zero gets sponsored
- const aliceToZero = api.tx.nft.transfer(zeroBalance.address, collectionId, itemId, 0);
+ const aliceToZero = api.tx.nft.transfer(normalizeAccountId(zeroBalance.address), collectionId, itemId, 0);
const events1 = await submitTransactionAsync(alice, aliceToZero);
const result1 = getGenericResult(events1);
// Second transfer should fail
const AsponsorBalance = new BigNumber((await api.query.system.account(bob.address)).data.free.toString());
- const zeroToAlice = api.tx.nft.transfer(alice.address, collectionId, itemId, 0);
+ const zeroToAlice = api.tx.nft.transfer(normalizeAccountId(alice.address), collectionId, itemId, 0);
const badTransaction = async function () {
await submitTransactionExpectFailAsync(zeroBalance, zeroToAlice);
};
@@ -222,7 +223,7 @@
const itemId = await createItemExpectSuccess(alice, collectionId, 'Fungible', zeroBalance.address);
// Transfer this tokens in parts from unused address to Alice
- const zeroToAlice = api.tx.nft.transfer(zeroBalance.address, collectionId, itemId, 1);
+ const zeroToAlice = api.tx.nft.transfer(normalizeAccountId(zeroBalance.address), collectionId, itemId, 1);
const events1 = await submitTransactionAsync(zeroBalance, zeroToAlice);
const result1 = getGenericResult(events1);
@@ -260,13 +261,13 @@
// Transfer this token from Alice to unused address and back
// Alice to Zero gets sponsored
- const aliceToZero = api.tx.nft.transfer(zeroBalance.address, collectionId, itemId, 1);
+ const aliceToZero = api.tx.nft.transfer(normalizeAccountId(zeroBalance.address), collectionId, itemId, 1);
const events1 = await submitTransactionAsync(alice, aliceToZero);
const result1 = getGenericResult(events1);
// Second transfer should fail
const AsponsorBalance = new BigNumber((await api.query.system.account(bob.address)).data.free.toString());
- const zeroToAlice = api.tx.nft.transfer(alice.address, collectionId, itemId, 1);
+ const zeroToAlice = api.tx.nft.transfer(normalizeAccountId(alice.address), collectionId, itemId, 1);
const badTransaction = async function () {
await submitTransactionExpectFailAsync(zeroBalance, zeroToAlice);
};
tests/src/contracts.test.tsdiffbeforeafterboth--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -23,6 +23,7 @@
enablePublicMintingExpectSuccess,
enableWhiteListExpectSuccess,
getGenericResult,
+ normalizeAccountId,
isWhitelisted,
transferFromExpectSuccess
} from "./util/helpers";
@@ -74,18 +75,18 @@
const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, contract.address);
await submitTransactionAsync(alice, changeAdminTx);
- const tokenBefore: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).unwrap();
+ const tokenBefore: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).toJSON();
// Transfer
const transferTx = contract.tx.transfer(value, gasLimit, bob.address, collectionId, tokenId, 1);
const events = await submitTransactionAsync(alice, transferTx);
const result = getGenericResult(events);
- const tokenAfter: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).unwrap();
+ const tokenAfter: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).toJSON();
// tslint:disable-next-line:no-unused-expression
expect(result.success).to.be.true;
- expect(tokenBefore.Owner.toString()).to.be.equal(alice.address);
- expect(tokenAfter.Owner.toString()).to.be.equal(bob.address);
+ expect(tokenBefore.Owner).to.be.deep.equal(normalizeAccountId(alice.address));
+ expect(tokenAfter.Owner).to.be.deep.equal(normalizeAccountId(bob.address));
});
});
@@ -169,7 +170,7 @@
const collectionId = await createCollectionExpectSuccess();
const [contract, deployer] = await deployTransferContract(api);
- const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', contract.address);
+ const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', contract.address.toString());
const transferTx = contract.tx.approve(value, gasLimit, bob.address, collectionId, tokenId, 1);
const events = await submitTransactionAsync(alice, transferTx);
@@ -207,7 +208,7 @@
const collectionId = await createCollectionExpectSuccess();
const [contract, deployer] = await deployTransferContract(api);
- const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', contract.address);
+ const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', contract.address.toString());
const transferTx = contract.tx.setVariableMetaData(value, gasLimit, collectionId, tokenId, '0x121314');
const events = await submitTransactionAsync(alice, transferTx);
tests/src/createMultipleItems.test.tsdiffbeforeafterboth--- a/tests/src/createMultipleItems.test.ts
+++ b/tests/src/createMultipleItems.test.ts
@@ -13,6 +13,7 @@
destroyCollectionExpectSuccess,
getGenericResult,
IReFungibleTokenDataType,
+ normalizeAccountId,
setCollectionLimitsExpectSuccess,
} from './util/helpers';
@@ -33,8 +34,8 @@
expect(itemsListIndexBefore.toNumber()).to.be.equal(0);
const Alice = privateKey('//Alice');
const args = [{ nft: ['0x31', '0x31'] }, { nft: ['0x32', '0x32'] }, { nft: ['0x33', '0x33'] }];
- const createMultipleItemsTx = await api.tx.nft
- .createMultipleItems(collectionId, Alice.address, args);
+ const createMultipleItemsTx = api.tx.nft
+ .createMultipleItems(collectionId, normalizeAccountId(Alice.address), args);
await submitTransactionAsync(Alice, createMultipleItemsTx);
const itemsListIndexAfter = await api.query.nft.itemListIndex(collectionId) as unknown as BN;
expect(itemsListIndexAfter.toNumber()).to.be.equal(3);
@@ -42,9 +43,9 @@
const token2Data = (await api.query.nft.nftItemList(collectionId, 2)).toJSON() as unknown as ITokenDataType;
const token3Data = (await api.query.nft.nftItemList(collectionId, 3)).toJSON() as unknown as ITokenDataType;
- expect(token1Data.Owner.toString()).to.be.equal(Alice.address);
- expect(token2Data.Owner.toString()).to.be.equal(Alice.address);
- expect(token3Data.Owner.toString()).to.be.equal(Alice.address);
+ expect(token1Data.Owner).to.be.deep.equal(normalizeAccountId(Alice.address));
+ expect(token2Data.Owner).to.be.deep.equal(normalizeAccountId(Alice.address));
+ expect(token3Data.Owner).to.be.deep.equal(normalizeAccountId(Alice.address));
expect(token1Data.ConstData.toString()).to.be.equal('0x31');
expect(token2Data.ConstData.toString()).to.be.equal('0x32');
@@ -67,23 +68,23 @@
{refungible: {const_data: [0x32], variable_data: [0x32], pieces: 1}},
{refungible: {const_data: [0x33], variable_data: [0x33], pieces: 1}},
];
- const createMultipleItemsTx = await api.tx.nft
- .createMultipleItems(collectionId, Alice.address, args);
+ const createMultipleItemsTx = api.tx.nft
+ .createMultipleItems(collectionId, normalizeAccountId(Alice.address), args);
await submitTransactionAsync(Alice, createMultipleItemsTx);
const itemsListIndexAfter = await api.query.nft.itemListIndex(collectionId) as unknown as BN;
expect(itemsListIndexAfter.toNumber()).to.be.equal(3);
- const token1Data = (await api.query.nft.reFungibleItemList(collectionId, 1) as any).unwrap() as unknown as IReFungibleTokenDataType;
- const token2Data = (await api.query.nft.reFungibleItemList(collectionId, 2) as any).unwrap() as unknown as IReFungibleTokenDataType;
- const token3Data = (await api.query.nft.reFungibleItemList(collectionId, 3) as any).unwrap() as unknown as IReFungibleTokenDataType;
+ const token1Data = (await api.query.nft.reFungibleItemList(collectionId, 1) as any).toJSON() as unknown as IReFungibleTokenDataType;
+ const token2Data = (await api.query.nft.reFungibleItemList(collectionId, 2) as any).toJSON() as unknown as IReFungibleTokenDataType;
+ const token3Data = (await api.query.nft.reFungibleItemList(collectionId, 3) as any).toJSON() as unknown as IReFungibleTokenDataType;
- expect(token1Data.Owner[0].Owner.toString()).to.be.equal(Alice.address);
- expect(token1Data.Owner[0].Fraction.toNumber()).to.be.equal(1);
+ expect(token1Data.Owner[0].Owner).to.be.deep.equal(normalizeAccountId(Alice.address));
+ expect(token1Data.Owner[0].Fraction).to.be.equal(1);
- expect(token2Data.Owner[0].Owner.toString()).to.be.equal(Alice.address);
- expect(token2Data.Owner[0].Fraction.toNumber()).to.be.equal(1);
+ expect(token2Data.Owner[0].Owner).to.be.deep.equal(normalizeAccountId(Alice.address));
+ expect(token2Data.Owner[0].Fraction).to.be.equal(1);
- expect(token3Data.Owner[0].Owner.toString()).to.be.equal(Alice.address);
- expect(token3Data.Owner[0].Fraction.toNumber()).to.be.equal(1);
+ expect(token3Data.Owner[0].Owner).to.be.deep.equal(normalizeAccountId(Alice.address));
+ expect(token3Data.Owner[0].Fraction).to.be.equal(1);
expect(token1Data.ConstData.toString()).to.be.equal('0x31');
expect(token2Data.ConstData.toString()).to.be.equal('0x32');
@@ -107,7 +108,7 @@
{ nft: ['A', 'A'] },
{ nft: ['B', 'B'] },
];
- const createMultipleItemsTx = api.tx.nft.createMultipleItems(collectionId, alice.address, args);
+ const createMultipleItemsTx = api.tx.nft.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
const events = await submitTransactionAsync(alice, createMultipleItemsTx);
const result = getGenericResult(events);
expect(result.success).to.be.true;
@@ -123,7 +124,7 @@
try {
const args = [{ invalid: null }, { invalid: null }, { invalid: null }];
const createMultipleItemsTx = await api.tx.nft
- .createMultipleItems(collectionId, Alice.address, args);
+ .createMultipleItems(collectionId, normalizeAccountId(Alice.address), args);
await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected;
} catch (e) {
// tslint:disable-next-line:no-unused-expression
@@ -136,8 +137,8 @@
await usingApi(async (api: ApiPromise) => {
const collectionId = parseInt((await api.query.nft.createdCollectionCount()).toString()) + 1;
const Alice = privateKey('//Alice');
- const createMultipleItemsTx = await api.tx.nft
- .createMultipleItems(collectionId, Alice.address, ['NFT', 'NFT', 'NFT']);
+ const createMultipleItemsTx = api.tx.nft
+ .createMultipleItems(collectionId, normalizeAccountId(Alice.address), ['NFT', 'NFT', 'NFT']);
await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected;
});
});
@@ -152,20 +153,20 @@
{ nft: ['B'.repeat(2049), 'B'.repeat(2049)] },
{ nft: ['C'.repeat(2049), 'C'.repeat(2049)] },
];
- const createMultipleItemsTx = await api.tx.nft
- .createMultipleItems(collectionId, Alice.address, args);
+ const createMultipleItemsTx = api.tx.nft
+ .createMultipleItems(collectionId, normalizeAccountId(Alice.address), args);
await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected;
// ReFungible
const collectionIdReFungible =
await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
const argsReFungible = [
- { ReFungible: ['1'.repeat(2049), '1'.repeat(2049)] },
- { ReFungible: ['2'.repeat(2049), '2'.repeat(2049)] },
- { ReFungible: ['3'.repeat(2049), '3'.repeat(2049)] },
+ { ReFungible: ['1'.repeat(2049), '1'.repeat(2049), 10] },
+ { ReFungible: ['2'.repeat(2049), '2'.repeat(2049), 10] },
+ { ReFungible: ['3'.repeat(2049), '3'.repeat(2049), 10] },
];
- const createMultipleItemsTxFungible = await api.tx.nft
- .createMultipleItems(collectionIdReFungible, Alice.address, argsReFungible);
+ const createMultipleItemsTxFungible = api.tx.nft
+ .createMultipleItems(collectionIdReFungible, normalizeAccountId(Alice.address), argsReFungible);
await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTxFungible)).to.be.rejected;
});
});
@@ -174,8 +175,8 @@
await usingApi(async (api: ApiPromise) => {
const collectionId = await createCollectionExpectSuccess();
const Alice = privateKey('//Alice');
- const createMultipleItemsTx = await api.tx.nft
- .createMultipleItems(collectionId, Alice.address, ['NFT', 'Fungible', 'ReFungible']);
+ const createMultipleItemsTx = api.tx.nft
+ .createMultipleItems(collectionId, normalizeAccountId(Alice.address), ['NFT', 'Fungible', 'ReFungible']);
await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected;
// garbage collection :-D
await destroyCollectionExpectSuccess(collectionId);
@@ -192,7 +193,7 @@
{ nft: ['C'.repeat(2049), 'C'] },
];
const createMultipleItemsTx = await api.tx.nft
- .createMultipleItems(collectionId, Alice.address, args);
+ .createMultipleItems(collectionId, normalizeAccountId(Alice.address), args);
await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected;
});
});
@@ -209,7 +210,7 @@
{ nft: ['A', 'A'] },
{ nft: ['B', 'B'] },
];
- const createMultipleItemsTx = api.tx.nft.createMultipleItems(collectionId, alice.address, args);
+ const createMultipleItemsTx = api.tx.nft.createMultipleItems(collectionId, normalizeAccountId(alice.address), args);
await expect(submitTransactionExpectFailAsync(alice, createMultipleItemsTx)).to.be.rejected;
});
});
tests/src/eth/fungible.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/fungible.test.ts
@@ -0,0 +1,289 @@
+import privateKey from "../substrate/privateKey";
+import { approveExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess } from "../util/helpers";
+import { collectionIdToAddress, createEthAccount, itWeb3, normalizeEvents, recordEvents, subToEth, transferBalanceToEth } from "./util/helpers"
+import fungibleAbi from './fungibleAbi.json';
+import { expect } from "chai";
+
+describe('Information getting', () => {
+ itWeb3('totalSupply', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ name: 'token name',
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { substrate: alice.address });
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+ const totalSupply = await contract.methods.totalSupply().call();
+
+ // FIXME: always equals to 0, because this method is not implemented
+ expect(totalSupply).to.equal('0');
+ });
+
+ itWeb3('balanceOf', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ name: 'token name',
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+
+ const caller = createEthAccount(web3);
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: caller });
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+ const balance = await contract.methods.balanceOf(caller).call();
+
+ expect(balance).to.equal('200');
+ });
+});
+
+describe('Plain calls', () => {
+ itWeb3('Can perform approve()', async ({ web3, api }) => {
+ const collection = await createCollectionExpectSuccess({
+ name: 'token name',
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+
+ const owner = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, owner, 999999999999999);
+
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });
+
+ const spender = createEthAccount(web3);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+
+ {
+ const result = await contract.methods.approve(spender, 100).send({ from: owner, gas: '0x1000000', gasPrice: '0x01' });
+ const events = normalizeEvents(result.events);
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Approval',
+ args: {
+ owner,
+ spender,
+ value: '100',
+ }
+ }
+ ]);
+ }
+
+ {
+ const allowance = await contract.methods.allowance(owner, spender).call();
+ expect(+allowance).to.equal(100);
+ }
+ });
+
+ itWeb3('Can perform transferFrom()', async ({ web3, api }) => {
+ const collection = await createCollectionExpectSuccess({
+ name: 'token name',
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+
+ const owner = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, owner, 999999999999999);
+
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });
+
+ const spender = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, spender, 999999999999999);
+
+ const receiver = createEthAccount(web3);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+
+ await contract.methods.approve(spender, 100).send({ from: owner, gas: '0x1000000', gasPrice: '0x01' });
+
+ {
+ const result = await contract.methods.transferFrom(owner, receiver, 49).send({ from: spender, gas: '0x1000000', gasPrice: '0x01' });
+ const events = normalizeEvents(result.events);
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: owner,
+ to: receiver,
+ value: '49',
+ }
+ },
+ {
+ address,
+ event: 'Approval',
+ args: {
+ owner,
+ spender,
+ value: '51',
+ }
+ }
+ ]);
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(receiver).call();
+ expect(+balance).to.equal(49);
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(owner).call();
+ expect(+balance).to.equal(151);
+ }
+ });
+
+ itWeb3('Can perform transfer()', async ({ web3, api }) => {
+ const collection = await createCollectionExpectSuccess({
+ name: 'token name',
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+
+ const owner = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, owner, 999999999999999);
+
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n }, { ethereum: owner });
+
+ const receiver = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, receiver, 999999999999999);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+
+ {
+ const result = await contract.methods.transfer(receiver, 50).send({ from: owner, gas: '0x1000000', gasPrice: '0x01' });
+ const events = normalizeEvents(result.events);
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: owner,
+ to: receiver,
+ value: '50',
+ }
+ },
+ ])
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(owner).call();
+ expect(+balance).to.equal(150);
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(receiver).call();
+ expect(+balance).to.equal(50);
+ }
+ });
+});
+
+describe('Substrate calls', () => {
+ itWeb3('Events emitted for approve()', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+
+ const receiver = createEthAccount(web3);
+
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n });
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+
+ const events = await recordEvents(contract, async () => {
+ await approveExpectSuccess(collection, 1, alice, { ethereum: receiver }, 100);
+ });
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Approval',
+ args: {
+ owner: subToEth(alice.address),
+ spender: receiver,
+ value: '100',
+ }
+ }
+ ]);
+ });
+
+ itWeb3('Events emitted for transferFrom()', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+ const bob = privateKey('//Bob');
+
+ const receiver = createEthAccount(web3);
+
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n });
+ await approveExpectSuccess(collection, 1, alice, bob, 100);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+
+ const events = await recordEvents(contract, async () => {
+ await transferFromExpectSuccess(collection, 1, bob, alice, { ethereum: receiver }, 51, 'Fungible');
+ });
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: subToEth(alice.address),
+ to: receiver,
+ value: '51',
+ }
+ },
+ {
+ address,
+ event: 'Approval',
+ args: {
+ owner: subToEth(alice.address),
+ spender: subToEth(bob.address),
+ value: '49',
+ }
+ }
+ ]);
+ });
+
+ itWeb3('Events emitted for transfer()', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'Fungible', decimalPoints: 0 }
+ });
+ const alice = privateKey('//Alice');
+
+ const receiver = createEthAccount(web3);
+
+ await createFungibleItemExpectSuccess(alice, collection, { Value: 200n });
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleAbi as any, address);
+
+ const events = await recordEvents(contract, async () => {
+ await transferExpectSuccess(collection, 1, alice, { ethereum: receiver }, 51, 'Fungible');
+ });
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: subToEth(alice.address),
+ to: receiver,
+ value: '51',
+ }
+ },
+ ]);
+ });
+});
\ No newline at end of file
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/fungibleAbi.json
@@ -0,0 +1,175 @@
+[
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_spender",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_from",
+ "type": "address"
+ },
+ {
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "_owner",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "name": "balance",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "_owner",
+ "type": "address"
+ },
+ {
+ "name": "_spender",
+ "type": "address"
+ }
+ ],
+ "name": "allowance",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ }
+]
\ No newline at end of file
tests/src/eth/fungibleMetadataAbi.jsondiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/fungibleMetadataAbi.json
@@ -0,0 +1,41 @@
+[
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "decimals",
+ "outputs": [
+ {
+ "internalType": "uint8",
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+]
\ No newline at end of file
tests/src/eth/metadata.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/metadata.test.ts
@@ -0,0 +1,53 @@
+import { expect } from "chai";
+import privateKey from "../substrate/privateKey";
+import { createCollectionExpectSuccess } from "../util/helpers";
+import { collectionIdToAddress, createEthAccount, itWeb3, transferBalanceToEth } from "./util/helpers";
+import fungibleMetadataAbi from './fungibleMetadataAbi.json';
+
+describe('Common metadata', () => {
+ itWeb3('Returns collection name', async ({ api, web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ name: 'token name',
+ mode: { type: 'NFT' }
+ });
+ const caller = createEthAccount(web3);
+ await transferBalanceToEth(api, privateKey('//Alice'), caller, 999999);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleMetadataAbi as any, address);
+ const name = await contract.methods.name().call({ from: caller });
+
+ expect(name).to.equal('token name');
+ });
+
+ itWeb3('Returns symbol name', async ({ api, web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ tokenPrefix: 'TOK',
+ mode: { type: 'NFT' }
+ });
+ const caller = createEthAccount(web3);
+ await transferBalanceToEth(api, privateKey('//Alice'), caller, 999999);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleMetadataAbi as any, address);
+ const symbol = await contract.methods.symbol().call({ from: caller });
+
+ expect(symbol).to.equal('TOK');
+ });
+});
+
+describe('Fungible metadata', () => {
+ itWeb3('Returns fungible decimals', async ({ api, web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'Fungible', decimalPoints: 6 }
+ });
+ const caller = createEthAccount(web3);
+ await transferBalanceToEth(api, privateKey('//Alice'), caller, 999999);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(fungibleMetadataAbi as any, address);
+ const decimals = await contract.methods.decimals().call({ from: caller });
+
+ expect(+decimals).to.equal(6);
+ })
+})
\ No newline at end of file
tests/src/eth/nonFungible.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/nonFungible.test.ts
@@ -0,0 +1,280 @@
+import privateKey from "../substrate/privateKey";
+import { approveExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, createItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess } from "../util/helpers";
+import { collectionIdToAddress, createEthAccount, itWeb3, normalizeEvents, recordEvents, subToEth, transferBalanceToEth } from "./util/helpers"
+import nonFungibleAbi from './nonFungibleAbi.json';
+import { expect } from "chai";
+
+describe('Information getting', () => {
+ itWeb3('totalSupply', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ await createItemExpectSuccess(alice, collection, 'NFT', { substrate: alice.address });
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+ const totalSupply = await contract.methods.totalSupply().call();
+
+ // FIXME: always equals to 0, because this method is not implemented
+ expect(totalSupply).to.equal('0');
+ });
+
+ itWeb3('balanceOf', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ const caller = createEthAccount(web3);
+ await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: caller });
+ await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: caller });
+ await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: caller });
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+ const balance = await contract.methods.balanceOf(caller).call();
+
+ expect(balance).to.equal('3');
+ });
+
+ itWeb3('ownerOf', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ const caller = createEthAccount(web3);
+ const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: caller });
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+ const owner = await contract.methods.ownerOf(tokenId).call();
+
+ expect(owner).to.equal(caller);
+ });
+});
+
+describe.only('Plain calls', () => {
+ itWeb3('Can perform approve()', async ({ web3, api }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ const owner = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, owner, 999999999999999);
+
+ const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });
+
+ const spender = createEthAccount(web3);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+
+ {
+ const result = await contract.methods.approve(spender, tokenId).send({ from: owner, gas: '0x1000000', gasPrice: '0x01' });
+ const events = normalizeEvents(result.events);
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Approval',
+ args: {
+ owner,
+ approved: spender,
+ tokenId: tokenId.toString(),
+ }
+ }
+ ]);
+ }
+ });
+
+ itWeb3('Can perform transferFrom()', async ({ web3, api }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ const owner = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, owner, 999999999999999);
+
+ const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });
+
+ const spender = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, spender, 999999999999999);
+
+ const receiver = createEthAccount(web3);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+
+ await contract.methods.approve(spender, tokenId).send({ from: owner, gas: '0x1000000', gasPrice: '0x01' });
+
+ {
+ const result = await contract.methods.transferFrom(owner, receiver, tokenId).send({ from: spender, gas: '0x1000000', gasPrice: '0x01' });
+ const events = normalizeEvents(result.events);
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: owner,
+ to: receiver,
+ tokenId: tokenId.toString(),
+ },
+ },
+ ]);
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(receiver).call();
+ expect(+balance).to.equal(1);
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(owner).call();
+ expect(+balance).to.equal(0);
+ }
+ });
+
+ itWeb3('Can perform transfer()', async ({ web3, api }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ const owner = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, owner, 999999999999999);
+
+ const tokenId = await createItemExpectSuccess(alice, collection, 'NFT', { ethereum: owner });
+
+ const receiver = createEthAccount(web3);
+ await transferBalanceToEth(api, alice, receiver, 999999999999999);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+
+ {
+ const result = await contract.methods.transfer(receiver, tokenId).send({ from: owner, gas: '0x1000000', gasPrice: '0x01' });
+ console.log(result);
+ const events = normalizeEvents(result.events);
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: owner,
+ to: receiver,
+ tokenId: tokenId.toString(),
+ }
+ },
+ ])
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(owner).call();
+ expect(+balance).to.equal(0);
+ }
+
+ {
+ const balance = await contract.methods.balanceOf(receiver).call();
+ expect(+balance).to.equal(1);
+ }
+ });
+});
+
+describe('Substrate calls', () => {
+ itWeb3('Events emitted for approve()', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ const receiver = createEthAccount(web3);
+
+ const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+
+ const events = await recordEvents(contract, async () => {
+ await approveExpectSuccess(collection, tokenId, alice, { ethereum: receiver }, 1);
+ });
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Approval',
+ args: {
+ owner: subToEth(alice.address),
+ approved: receiver,
+ tokenId: tokenId.toString(),
+ }
+ }
+ ]);
+ });
+
+ itWeb3('Events emitted for transferFrom()', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+ const bob = privateKey('//Bob');
+
+ const receiver = createEthAccount(web3);
+
+ const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');
+ await approveExpectSuccess(collection, tokenId, alice, bob, 1);
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+
+ const events = await recordEvents(contract, async () => {
+ await transferFromExpectSuccess(collection, tokenId, bob, alice, { ethereum: receiver }, 1, 'NFT');
+ });
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: subToEth(alice.address),
+ to: receiver,
+ tokenId: tokenId.toString(),
+ }
+ },
+ ]);
+ });
+
+ itWeb3('Events emitted for transfer()', async ({ web3 }) => {
+ const collection = await createCollectionExpectSuccess({
+ mode: { type: 'NFT' }
+ });
+ const alice = privateKey('//Alice');
+
+ const receiver = createEthAccount(web3);
+
+ const tokenId = await createItemExpectSuccess(alice, collection, 'NFT');
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address);
+
+ const events = await recordEvents(contract, async () => {
+ await transferExpectSuccess(collection, tokenId, alice, { ethereum: receiver }, 1, 'NFT');
+ });
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: subToEth(alice.address),
+ to: receiver,
+ tokenId: tokenId.toString(),
+ }
+ },
+ ]);
+ });
+});
\ No newline at end of file
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -0,0 +1,406 @@
+[
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "approved",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bool",
+ "name": "approved",
+ "type": "bool"
+ }
+ ],
+ "name": "ApprovalForAll",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "approved",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getApproved",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
+ }
+ ],
+ "name": "isApprovedForAll",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "res_name",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "ownerOf",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "safeTransferFrom",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "safeTransferFrom",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "approved",
+ "type": "bool"
+ }
+ ],
+ "name": "setApprovalForAll",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes4",
+ "name": "interfaceID",
+ "type": "bytes4"
+ }
+ ],
+ "name": "supportsInterface",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "res_symbol",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "index",
+ "type": "uint256"
+ }
+ ],
+ "name": "tokenByIndex",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "index",
+ "type": "uint256"
+ }
+ ],
+ "name": "tokenOfOwnerByIndex",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "tokenURI",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ }
+]
\ No newline at end of file
tests/src/eth/util/helpers.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/util/helpers.ts
@@ -0,0 +1,116 @@
+import { ApiPromise } from "@polkadot/api";
+import { addressToEvm, evmToAddress } from "@polkadot/util-crypto";
+import Web3 from "web3";
+import usingApi, { submitTransactionAsync } from "../../substrate/substrate-api";
+import { IKeyringPair } from '@polkadot/types/types';
+import { expect } from "chai";
+import { getGenericResult } from "../../util/helpers";
+
+let web3Connected = false;
+export async function usingWeb3<T>(cb: (web3: Web3) => Promise<T> | T): Promise<T> {
+ if (web3Connected) throw new Error('do not nest usingWeb3 calls');
+ web3Connected = true;
+
+ const provider = new Web3.providers.WebsocketProvider("http://localhost:9944");
+ const web3 = new Web3(provider);
+
+ try {
+ return await cb(web3);
+ } finally {
+ // provider.disconnect(3000, 'normal disconnect');
+ provider.connection.close();
+ web3Connected = false;
+ }
+}
+
+export function collectionIdToAddress(address: number): string {
+ if (address >= 0xffffffff || address < 0) throw new Error('id overflow');
+ const buf = Buffer.from([0x17, 0xc4, 0xe6, 0x45, 0x3c, 0xc4, 0x9a, 0xaa, 0xae, 0xac, 0xa8, 0x94, 0xe6, 0xd9, 0x68, 0x3e,
+ address >> 24,
+ (address >> 16) & 0xff,
+ (address >> 8) & 0xff,
+ address & 0xff,
+ ]);
+ return Web3.utils.toChecksumAddress('0x' + buf.toString('hex'));
+}
+
+export function createEthAccount(web3: Web3) {
+ const account = web3.eth.accounts.create();
+ web3.eth.accounts.wallet.add(account.privateKey);
+ return account.address;
+}
+
+export async function transferBalanceToEth(api: ApiPromise, source: IKeyringPair, target: string, amount: number) {
+ const tx = api.tx.balances.transfer(evmToAddress(target), amount);
+ const events = await submitTransactionAsync(source, tx);
+ const result = getGenericResult(events);
+ expect(result.success).to.be.true;
+}
+
+export async function itWeb3(name: string, cb: (apis: { web3: Web3, api: ApiPromise }) => any, opts: { only?: boolean, skip?: boolean } = {}) {
+ let i: any = it;
+ if (opts.only) i = i.only;
+ else if (opts.skip) i = i.skip;
+ i(name, async () => {
+ await usingApi(async api => {
+ await usingWeb3(async web3 => {
+ await cb({ api, web3 });
+ });
+ });
+ });
+}
+itWeb3.only = (name: string, cb: (apis: { web3: Web3, api: ApiPromise }) => any) => itWeb3(name, cb, { only: true });
+itWeb3.skip = (name: string, cb: (apis: { web3: Web3, api: ApiPromise }) => any) => itWeb3(name, cb, { skip: true });
+
+export async function generateSubstrateEthPair(web3: Web3) {
+ let account = web3.eth.accounts.create();
+ const evm = evmToAddress(account.address);
+}
+
+type NormalizedEvent = {
+ address: string,
+ event: string,
+ args: { [key: string]: string }
+};
+
+export function normalizeEvents(events: any): NormalizedEvent[] {
+ const output = [];
+ for (let key of Object.keys(events)) {
+ if (key.match(/^[0-9]+$/)) {
+ output.push(events[key]);
+ } else if (Array.isArray(events[key])) {
+ output.push(...events[key]);
+ } else {
+ output.push(events[key]);
+ }
+ }
+ output.sort((a, b) => a.logIndex - b.logIndex);
+ return output.map(({ address, event, returnValues }) => {
+ const args: { [key: string]: string } = {};
+ for (let key of Object.keys(returnValues)) {
+ if (!key.match(/^[0-9]+$/)) {
+ args[key] = returnValues[key];
+ }
+ }
+ return {
+ address,
+ event,
+ args,
+ };
+ });
+}
+
+export async function recordEvents(contract: any, action: () => Promise<void>): Promise<NormalizedEvent[]> {
+ const out: any = [];
+ contract.events.allEvents((_: any, event: any) => {
+ out.push(event);
+ });
+ await action();
+ return normalizeEvents(out);
+}
+
+export function subToEth(eth: string): string {
+ const bytes = addressToEvm(eth);
+ const string = '0x' + Buffer.from(bytes).toString('hex');
+ return Web3.utils.toChecksumAddress(string);
+}
\ No newline at end of file
tests/src/pallet-presence.test.tsdiffbeforeafterboth--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -13,7 +13,7 @@
// Pallets that must always be present
const requiredPallets = [
- 'nft', 'inflation', 'balances', 'contracts', 'randomnesscollectiveflip', 'system', 'timestamp', 'transactionpayment', 'treasury', 'vesting',
+ 'nft', 'inflation', 'balances', 'contracts', 'randomnesscollectiveflip', 'system', 'timestamp', 'transactionpayment', 'treasury', 'vesting', 'evm', 'ethereum',
'scheduler', 'nftpayment', 'charging'
];
tests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth--- a/tests/src/removeCollectionAdmin.test.ts
+++ b/tests/src/removeCollectionAdmin.test.ts
@@ -8,7 +8,7 @@
import chaiAsPromised from 'chai-as-promised';
import privateKey from './substrate/privateKey';
import { default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync } from './substrate/substrate-api';
-import {createCollectionExpectSuccess, destroyCollectionExpectSuccess} from './util/helpers';
+import {createCollectionExpectSuccess, destroyCollectionExpectSuccess, normalizeAccountId} from './util/helpers';
chai.use(chaiAsPromised);
const expect = chai.expect;
@@ -20,20 +20,20 @@
const Alice = privateKey('//Alice');
const Bob = privateKey('//Bob');
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(Alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(Alice.address));
// first - add collection admin Bob
- const addAdminTx = api.tx.nft.addCollectionAdmin(collectionId, Bob.address);
+ const addAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
await submitTransactionAsync(Alice, addAdminTx);
- const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
- expect(adminListAfterAddAdmin).to.be.contains(Bob.address);
+ const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON();
+ expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(Bob.address));
// then remove bob from admins of collection
- const removeAdminTx = api.tx.nft.removeCollectionAdmin(collectionId, Bob.address);
+ const removeAdminTx = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
await submitTransactionAsync(Alice, removeAdminTx);
- const adminListAfterRemoveAdmin: any = (await api.query.nft.adminList(collectionId));
- expect(adminListAfterRemoveAdmin).not.to.be.contains(Bob.address);
+ const adminListAfterRemoveAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON;
+ expect(adminListAfterRemoveAdmin).not.to.be.deep.contains(normalizeAccountId(Bob.address));
});
});
@@ -45,7 +45,7 @@
const adminListBeforeAddAdmin: any = (await api.query.nft.adminList(collectionId));
expect(adminListBeforeAddAdmin).to.have.lengthOf(0);
- const tx = api.tx.nft.removeCollectionAdmin(collectionId, Alice.address);
+ const tx = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(Alice.address));
await submitTransactionAsync(Alice, tx);
});
});
@@ -59,7 +59,7 @@
const alice = privateKey('//Alice');
const bob = privateKey('//Bob');
- const changeOwnerTx = api.tx.nft.removeCollectionAdmin(collectionId, bob.address);
+ const changeOwnerTx = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(bob.address));
await expect(submitTransactionExpectFailAsync(alice, changeOwnerTx)).to.be.rejected;
// Verifying that nothing bad happened (network is live, new collections can be created, etc.)
@@ -76,7 +76,7 @@
await destroyCollectionExpectSuccess(collectionId);
- const changeOwnerTx = api.tx.nft.removeCollectionAdmin(collectionId, Bob.address);
+ const changeOwnerTx = api.tx.nft.removeCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
await expect(submitTransactionExpectFailAsync(Alice, changeOwnerTx)).to.be.rejected;
// Verifying that nothing bad happened (network is live, new collections can be created, etc.)
tests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth--- a/tests/src/removeCollectionSponsor.test.ts
+++ b/tests/src/removeCollectionSponsor.test.ts
@@ -21,6 +21,7 @@
addToWhiteListExpectSuccess,
removeCollectionSponsorExpectSuccess,
removeCollectionSponsorExpectFailure,
+ normalizeAccountId,
} from "./util/helpers";
import { Keyring } from "@polkadot/api";
import { IKeyringPair } from "@polkadot/types/types";
@@ -60,7 +61,7 @@
// Transfer this tokens from unused address to Alice - should fail
const AsponsorBalance = new BigNumber((await api.query.system.account(bob.address)).data.free.toString());
- const zeroToAlice = api.tx.nft.transfer(alice.address, collectionId, itemId, 0);
+ const zeroToAlice = api.tx.nft.transfer(normalizeAccountId(alice.address), collectionId, itemId, 0);
const badTransaction = async function () {
await submitTransactionExpectFailAsync(zeroBalance, zeroToAlice);
};
tests/src/removeFromContractWhiteList.test.tsdiffbeforeafterboth--- a/tests/src/removeFromContractWhiteList.test.ts
+++ b/tests/src/removeFromContractWhiteList.test.ts
@@ -23,8 +23,8 @@
await usingApi(async (api) => {
const [flipper, deployer] = await deployFlipper(api);
- await addToContractWhiteListExpectSuccess(deployer, flipper.address, bob.address);
- await removeFromContractWhiteListExpectSuccess(deployer, flipper.address, bob.address);
+ await addToContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+ await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
expect(await isWhitelistedInContract(flipper.address, bob.address)).to.be.false;
});
@@ -33,12 +33,12 @@
it('user can\'t execute contract after removal', async () => {
await usingApi(async (api) => {
const [flipper, deployer] = await deployFlipper(api);
- await toggleContractWhitelistExpectSuccess(deployer, flipper.address, true);
+ await toggleContractWhitelistExpectSuccess(deployer, flipper.address.toString(), true);
- await addToContractWhiteListExpectSuccess(deployer, flipper.address, bob.address);
+ await addToContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
await toggleFlipValueExpectSuccess(bob, flipper);
- await removeFromContractWhiteListExpectSuccess(deployer, flipper.address, bob.address);
+ await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
await toggleFlipValueExpectFailure(bob, flipper);
});
});
@@ -47,9 +47,9 @@
await usingApi(async (api) => {
const [flipper, deployer] = await deployFlipper(api);
- await addToContractWhiteListExpectSuccess(deployer, flipper.address, bob.address);
- await removeFromContractWhiteListExpectSuccess(deployer, flipper.address, bob.address);
- await removeFromContractWhiteListExpectSuccess(deployer, flipper.address, bob.address);
+ await addToContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+ await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
+ await removeFromContractWhiteListExpectSuccess(deployer, flipper.address.toString(), bob.address);
});
});
});
@@ -75,7 +75,7 @@
await usingApi(async (api) => {
const [flipper, _] = await deployFlipper(api);
- await removeFromContractWhiteListExpectFailure(alice, flipper.address, bob.address);
+ await removeFromContractWhiteListExpectFailure(alice, flipper.address.toString(), bob.address);
});
});
});
tests/src/setConstOnChainSchema.test.tsdiffbeforeafterboth--- a/tests/src/setConstOnChainSchema.test.ts
+++ b/tests/src/setConstOnChainSchema.test.ts
@@ -11,6 +11,7 @@
import {
createCollectionExpectSuccess,
destroyCollectionExpectSuccess,
+ normalizeAccountId,
} from './util/helpers';
chai.use(chaiAsPromised);
@@ -37,7 +38,7 @@
await usingApi(async (api) => {
const collectionId = await createCollectionExpectSuccess();
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(Alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(Alice.address));
const setShema = api.tx.nft.setConstOnChainSchema(collectionId, Shema);
await submitTransactionAsync(Alice, setShema);
});
@@ -87,7 +88,7 @@
await usingApi(async (api) => {
const collectionId = await createCollectionExpectSuccess();
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(Alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(Alice.address));
const setShema = api.tx.nft.setConstOnChainSchema(collectionId, Shema);
await expect(submitTransactionExpectFailAsync(Bob, setShema)).to.be.rejected;
});
tests/src/setPublicAccessMode.test.tsdiffbeforeafterboth--- a/tests/src/setPublicAccessMode.test.ts
+++ b/tests/src/setPublicAccessMode.test.ts
@@ -17,6 +17,7 @@
destroyCollectionExpectSuccess,
enablePublicMintingExpectSuccess,
enableWhiteListExpectSuccess,
+ normalizeAccountId,
} from './util/helpers';
import { utf16ToStr } from './util/util';
@@ -49,7 +50,7 @@
const collectionId = await createCollectionExpectSuccess();
await enableWhiteListExpectSuccess(Alice, collectionId);
await enablePublicMintingExpectSuccess(Alice, collectionId);
- const tx = api.tx.nft.createItem(collectionId, Bob.address, 'NFT');
+ const tx = api.tx.nft.createItem(collectionId, normalizeAccountId(Bob.address), 'NFT');
await expect(submitTransactionExpectFailAsync(Bob, tx)).to.be.rejected;
});
});
tests/src/setVariableOnChainSchema.test.tsdiffbeforeafterboth--- a/tests/src/setVariableOnChainSchema.test.ts
+++ b/tests/src/setVariableOnChainSchema.test.ts
@@ -11,6 +11,7 @@
import {
createCollectionExpectSuccess,
destroyCollectionExpectSuccess,
+ normalizeAccountId,
} from './util/helpers';
chai.use(chaiAsPromised);
@@ -37,7 +38,7 @@
await usingApi(async (api) => {
const collectionId = await createCollectionExpectSuccess();
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(Alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(Alice.address));
const setSchema = api.tx.nft.setVariableOnChainSchema(collectionId, Schema);
await submitTransactionAsync(Alice, setSchema);
});
@@ -87,7 +88,7 @@
await usingApi(async (api) => {
const collectionId = await createCollectionExpectSuccess();
const collection: any = (await api.query.nft.collectionById(collectionId)).toJSON();
- expect(collection.Owner.toString()).to.be.eq(Alice.address);
+ expect(collection.Owner).to.be.deep.eq(normalizeAccountId(Alice.address));
const setSchema = api.tx.nft.setVariableOnChainSchema(collectionId, Schema);
await expect(submitTransactionExpectFailAsync(Bob, setSchema)).to.be.rejected;
});
tests/src/util/helpers.tsdiffbeforeafterboth--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -8,6 +8,7 @@
import type { AccountId, BlockNumber, Call, EventRecord } from '@polkadot/types/interfaces';
import { u128 } from '@polkadot/types/primitive';
import { IKeyringPair } from '@polkadot/types/types';
+import { evmToAddress } from '@polkadot/util-crypto';
import { BigNumber } from 'bignumber.js';
import BN from 'bn.js';
import chai from 'chai';
@@ -23,6 +24,31 @@
chai.use(chaiAsPromised);
const expect = chai.expect;
+export type CrossAccountId = {
+ substrate: string,
+} | {
+ ethereum: string,
+};
+export function normalizeAccountId(input: string | CrossAccountId | IKeyringPair): CrossAccountId {
+ if (typeof input === 'string')
+ return { substrate: input };
+ if ('address' in input) {
+ return { substrate: input.address };
+ }
+ if ('ethereum' in input) {
+ input.ethereum = input.ethereum.toLowerCase();
+ }
+ return input;
+}
+export function toSubstrateAddress(input: string | CrossAccountId | IKeyringPair): string {
+ input = normalizeAccountId(input);
+ if ('substrate' in input) {
+ return input.substrate;
+ } else {
+ return evmToAddress(input.ethereum);
+ }
+}
+
export const U128_MAX = (1n << 128n) - 1n;
type GenericResult = {
@@ -38,15 +64,15 @@
success: boolean;
collectionId: number;
itemId: number;
- recipient: string;
+ recipient?: CrossAccountId;
}
interface TransferResult {
success: boolean;
collectionId: number;
itemId: number;
- sender: string;
- recipient: string;
+ sender?: CrossAccountId;
+ recipient?: CrossAccountId;
value: bigint;
}
@@ -120,7 +146,7 @@
// console.log(` ${phase}: ${section}.${method}:: ${data}`);
if (method == 'ExtrinsicSuccess') {
success = true;
- } else if ((section == 'nft') && (method == 'CollectionCreated')) {
+ } else if ((section == 'nft') && (method == 'CollectionCreated')) {
collectionId = parseInt(data[0].toString());
}
});
@@ -135,7 +161,7 @@
let success = false;
let collectionId: number = 0;
let itemId: number = 0;
- let recipient: string = '';
+ let recipient;
events.forEach(({ phase, event: { data, method, section } }) => {
// console.log(` ${phase}: ${section}.${method}:: ${data}`);
if (method == 'ExtrinsicSuccess') {
@@ -143,7 +169,7 @@
} else if ((section == 'nft') && (method == 'ItemCreated')) {
collectionId = parseInt(data[0].toString());
itemId = parseInt(data[1].toString());
- recipient = data[2].toString();
+ recipient = data[2].toJSON();
}
});
const result: CreateItemResult = {
@@ -160,19 +186,17 @@
success: false,
collectionId: 0,
itemId: 0,
- sender: '',
- recipient: '',
value: 0n,
};
- events.forEach(({event: {data, method, section}}) => {
+ events.forEach(({ event: { data, method, section } }) => {
if (method === 'ExtrinsicSuccess') {
result.success = true;
} else if (section === 'nft' && method === 'Transfer') {
result.collectionId = +data[0].toString();
result.itemId = +data[1].toString();
- result.sender = data[2].toString();
- result.recipient = data[3].toString();
+ result.sender = data[2].toJSON() as CrossAccountId;
+ result.recipient = data[3].toJSON() as CrossAccountId;
result.value = BigInt(data[4].toString());
}
});
@@ -214,7 +238,7 @@
}
export async function createCollectionExpectSuccess(params: Partial<CreateCollectionParams> = {}): Promise<number> {
- const {name, description, mode, tokenPrefix } = {...defaultCreateCollectionParams, ...params};
+ const { name, description, mode, tokenPrefix } = { ...defaultCreateCollectionParams, ...params };
let collectionId: number = 0;
await usingApi(async (api) => {
@@ -226,13 +250,13 @@
let modeprm = {};
if (mode.type === 'NFT') {
- modeprm = {nft: null};
+ modeprm = { nft: null };
} else if (mode.type === 'Fungible') {
- modeprm = {fungible: mode.decimalPoints};
+ modeprm = { fungible: mode.decimalPoints };
} else if (mode.type === 'ReFungible') {
- modeprm = {refungible: null};
+ modeprm = { refungible: null };
} else if (mode.type === 'Invalid') {
- modeprm = {invalid: null};
+ modeprm = { invalid: null };
}
const tx = api.tx.nft.createCollection(strToUTF16(name), strToUTF16(description), strToUTF16(tokenPrefix), modeprm);
@@ -243,7 +267,7 @@
const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);
// Get the collection
- const collection: any = (await api.query.nft.collectionById(result.collectionId)).toJSON();
+ const collection: any = (await api.query.nft.collectionById(result.collectionId) as any).toJSON();
// What to expect
// tslint:disable-next-line:no-unused-expression
@@ -252,7 +276,7 @@
// tslint:disable-next-line:no-unused-expression
expect(collection).to.be.not.null;
expect(BcollectionCount).to.be.equal(AcollectionCount + 1, 'Error: NFT collection NOT created.');
- expect(collection.Owner).to.be.equal(alicesPublicKey);
+ expect(collection.Owner).to.be.equal(toSubstrateAddress(alicesPublicKey));
expect(utf16ToStr(collection.Name)).to.be.equal(name);
expect(utf16ToStr(collection.Description)).to.be.equal(description);
expect(hexToStr(collection.TokenPrefix)).to.be.equal(tokenPrefix);
@@ -264,17 +288,17 @@
}
export async function createCollectionExpectFailure(params: Partial<CreateCollectionParams> = {}) {
- const {name, description, mode, tokenPrefix } = {...defaultCreateCollectionParams, ...params};
+ const { name, description, mode, tokenPrefix } = { ...defaultCreateCollectionParams, ...params };
let modeprm = {};
if (mode.type === 'NFT') {
- modeprm = {nft: null};
+ modeprm = { nft: null };
} else if (mode.type === 'Fungible') {
- modeprm = {fungible: mode.decimalPoints};
+ modeprm = { fungible: mode.decimalPoints };
} else if (mode.type === 'ReFungible') {
- modeprm = {refungible: null};
+ modeprm = { refungible: null };
} else if (mode.type === 'Invalid') {
- modeprm = {invalid: null};
+ modeprm = { invalid: null };
}
await usingApi(async (api) => {
@@ -301,7 +325,7 @@
let bal = new BigNumber(0);
let unused;
do {
- const randomSeed = 'seed' + Math.floor(Math.random() * Math.floor(10000)) + seedAddition;
+ const randomSeed = 'seed' + Math.floor(Math.random() * Math.floor(10000)) + seedAddition;
const keyring = new Keyring({ type: 'sr25519' });
unused = keyring.addFromUri(`//${randomSeed}`);
bal = new BigNumber((await api.query.system.account(unused.address)).data.free.toString());
@@ -408,7 +432,7 @@
// What to expect
expect(result.success).to.be.true;
expect(collection.Sponsorship).to.deep.equal({
- Unconfirmed: sponsor.toString(),
+ unconfirmed: sponsor,
});
});
}
@@ -427,7 +451,7 @@
// What to expect
expect(result.success).to.be.true;
- expect(collection.Sponsorship).to.be.deep.equal({ Disabled: null });
+ expect(collection.Sponsorship).to.be.deep.equal({ disabled: null });
});
}
@@ -466,7 +490,7 @@
// What to expect
expect(result.success).to.be.true;
expect(collection.Sponsorship).to.be.deep.equal({
- Confirmed: sender.address,
+ confirmed: sender.address,
});
});
}
@@ -540,9 +564,9 @@
return whitelisted;
}
-export async function addToContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: string) {
+export async function addToContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
await usingApi(async (api) => {
- const tx = api.tx.nft.addToContractWhiteList(contractAddress, user);
+ const tx = api.tx.nft.addToContractWhiteList(contractAddress.toString(), user.toString());
const events = await submitTransactionAsync(sender, tx);
const result = getGenericResult(events);
@@ -550,9 +574,9 @@
});
}
-export async function removeFromContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: string) {
+export async function removeFromContractWhiteListExpectSuccess(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
await usingApi(async (api) => {
- const tx = api.tx.nft.removeFromContractWhiteList(contractAddress, user);
+ const tx = api.tx.nft.removeFromContractWhiteList(contractAddress.toString(), user.toString());
const events = await submitTransactionAsync(sender, tx);
const result = getGenericResult(events);
@@ -560,9 +584,9 @@
});
}
-export async function removeFromContractWhiteListExpectFailure(sender: IKeyringPair, contractAddress: AccountId | string, user: string) {
+export async function removeFromContractWhiteListExpectFailure(sender: IKeyringPair, contractAddress: AccountId | string, user: AccountId | string) {
await usingApi(async (api) => {
- const tx = api.tx.nft.removeFromContractWhiteList(contractAddress, user);
+ const tx = api.tx.nft.removeFromContractWhiteList(contractAddress.toString(), user.toString());
const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
const result = getGenericResult(events);
@@ -635,72 +659,70 @@
}
export async function
-approveExpectSuccess(collectionId: number,
- tokenId: number, owner: IKeyringPair, approved: IKeyringPair | string, amount: number | bigint = 1) {
- if (typeof approved !== 'string')
- approved = approved.address;
+ approveExpectSuccess(collectionId: number,
+ tokenId: number, owner: IKeyringPair, approved: IKeyringPair | CrossAccountId | string, amount: number | bigint = 1) {
await usingApi(async (api: ApiPromise) => {
+ approved = normalizeAccountId(approved);
const allowanceBefore =
- await api.query.nft.allowances(collectionId, [tokenId, owner.address, approved] as any) as unknown as BN;
- const approveNftTx = await api.tx.nft.approve(approved, collectionId, tokenId, amount);
+ await api.query.nft.allowances(collectionId, [tokenId, owner.address, toSubstrateAddress(approved)]) as unknown as BN;
+ const approveNftTx = api.tx.nft.approve(approved, collectionId, tokenId, amount);
const events = await submitTransactionAsync(owner, approveNftTx);
const result = getCreateItemResult(events);
// tslint:disable-next-line:no-unused-expression
expect(result.success).to.be.true;
const allowanceAfter =
- await api.query.nft.allowances(collectionId, [tokenId, owner.address, approved] as any) as unknown as BN;
+ await api.query.nft.allowances(collectionId, [tokenId, owner.address, toSubstrateAddress(approved)]) as unknown as BN;
expect(allowanceAfter.sub(allowanceBefore).toString()).to.be.equal(amount.toString());
});
}
export async function
-transferFromExpectSuccess(collectionId: number,
- tokenId: number,
- accountApproved: IKeyringPair,
- accountFrom: IKeyringPair | string,
- accountTo: IKeyringPair,
- value: number | bigint = 1,
- type: string = 'NFT') {
- if (typeof accountFrom !== 'string')
- accountFrom = accountFrom.address;
+ transferFromExpectSuccess(collectionId: number,
+ tokenId: number,
+ accountApproved: IKeyringPair,
+ accountFrom: IKeyringPair | CrossAccountId,
+ accountTo: IKeyringPair | CrossAccountId,
+ value: number | bigint = 1,
+ type: string = 'NFT') {
await usingApi(async (api: ApiPromise) => {
+ const to = normalizeAccountId(accountTo);
let balanceBefore = new BN(0);
if (type === 'Fungible') {
- balanceBefore = await api.query.nft.balance(collectionId, accountTo.address) as unknown as BN;
+ balanceBefore = await api.query.nft.balance(collectionId, toSubstrateAddress(to)) as unknown as BN;
}
- const transferFromTx = await api.tx.nft.transferFrom(
- accountFrom, accountTo.address, collectionId, tokenId, value);
+ const transferFromTx = api.tx.nft.transferFrom(
+ normalizeAccountId(accountFrom), to, collectionId, tokenId, value);
const events = await submitTransactionAsync(accountApproved, transferFromTx);
const result = getCreateItemResult(events);
// tslint:disable-next-line:no-unused-expression
expect(result.success).to.be.true;
if (type === 'NFT') {
- const nftItemData = (await api.query.nft.nftItemList(collectionId, tokenId) as any).unwrap() as ITokenDataType;
- expect(nftItemData.Owner.toString()).to.be.equal(accountTo.address);
+ const nftItemData = (await api.query.nft.nftItemList(collectionId, tokenId) as any).toJSON() as ITokenDataType;
+ expect(nftItemData.Owner).to.be.deep.equal(to);
}
if (type === 'Fungible') {
- const balanceAfter = (await api.query.nft.fungibleItemList(collectionId, accountTo.address) as any).Value as unknown as BN;
+ const balanceAfter = (await api.query.nft.fungibleItemList(collectionId, toSubstrateAddress(to)) as any).Value as unknown as BN;
expect(balanceAfter.sub(balanceBefore).toString()).to.be.equal(value.toString());
}
if (type === 'ReFungible') {
const nftItemData =
- (await api.query.nft.reFungibleItemList(collectionId, tokenId) as any).unwrap() as IReFungibleTokenDataType;
- expect(nftItemData.Owner[0].Owner.toString()).to.be.equal(accountTo.address);
- expect(nftItemData.Owner[0].Fraction.toNumber()).to.be.equal(value);
+ (await api.query.nft.reFungibleItemList(collectionId, tokenId) as any).toJSON() as IReFungibleTokenDataType;
+ expect(nftItemData.Owner[0].Owner).to.be.deep.equal(normalizeAccountId(to));
+ expect(nftItemData.Owner[0].Fraction).to.be.equal(value);
}
});
}
export async function
-transferFromExpectFail(collectionId: number,
- tokenId: number,
- accountApproved: IKeyringPair,
- accountFrom: IKeyringPair,
- accountTo: IKeyringPair,
- value: number | bigint = 1) {
+ transferFromExpectFail(collectionId: number,
+ tokenId: number,
+ accountApproved: IKeyringPair,
+ accountFrom: IKeyringPair,
+ accountTo: IKeyringPair,
+ value: number | bigint = 1) {
await usingApi(async (api: ApiPromise) => {
- const transferFromTx = await api.tx.nft.transferFrom(
- accountFrom.address, accountTo.address, collectionId, tokenId, value);
+ const transferFromTx = api.tx.nft.transferFrom(
+ normalizeAccountId(accountFrom.address), normalizeAccountId(accountTo.address), collectionId, tokenId, value);
const events = await expect(submitTransactionExpectFailAsync(accountApproved, transferFromTx)).to.be.rejected;
const result = getCreateCollectionResult(events);
// tslint:disable-next-line:no-unused-expression
@@ -757,53 +779,55 @@
export async function
-transferExpectSuccess(collectionId: number,
- tokenId: number,
- sender: IKeyringPair,
- recipient: IKeyringPair,
- value: number | bigint = 1,
- type: string = 'NFT') {
+ transferExpectSuccess(collectionId: number,
+ tokenId: number,
+ sender: IKeyringPair,
+ recipient: IKeyringPair | CrossAccountId,
+ value: number | bigint = 1,
+ type: string = 'NFT') {
await usingApi(async (api: ApiPromise) => {
+ const to = normalizeAccountId(recipient);
+
let balanceBefore = new BN(0);
if (type === 'Fungible') {
- balanceBefore = await api.query.nft.balance(collectionId, recipient.address) as unknown as BN;
+ balanceBefore = await api.query.nft.balance(collectionId, toSubstrateAddress(to)) as unknown as BN;
}
- const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);
+ const transferTx = api.tx.nft.transfer(to, collectionId, tokenId, value);
const events = await submitTransactionAsync(sender, transferTx);
const result = getTransferResult(events);
// tslint:disable-next-line:no-unused-expression
expect(result.success).to.be.true;
expect(result.collectionId).to.be.equal(collectionId);
expect(result.itemId).to.be.equal(tokenId);
- expect(result.sender).to.be.equal(sender.address);
- expect(result.recipient).to.be.equal(recipient.address);
+ expect(result.sender).to.be.deep.equal(normalizeAccountId(sender.address));
+ expect(result.recipient).to.be.deep.equal(to);
expect(result.value.toString()).to.be.equal(value.toString());
if (type === 'NFT') {
const nftItemData = (await api.query.nft.nftItemList(collectionId, tokenId)).toJSON() as unknown as ITokenDataType;
- expect(nftItemData.Owner.toString()).to.be.equal(recipient.address);
+ expect(nftItemData.Owner).to.be.deep.equal(to);
}
if (type === 'Fungible') {
- const balanceAfter = (await api.query.nft.fungibleItemList(collectionId, recipient.address) as any).Value as unknown as BN;
+ const balanceAfter = (await api.query.nft.fungibleItemList(collectionId, toSubstrateAddress(to)) as any).Value as unknown as BN;
expect(balanceAfter.sub(balanceBefore).toString()).to.be.equal(value.toString());
}
if (type === 'ReFungible') {
const nftItemData =
(await api.query.nft.reFungibleItemList(collectionId, tokenId)).toJSON() as unknown as IReFungibleTokenDataType;
- expect(nftItemData.Owner[0].Owner.toString()).to.be.equal(recipient.address);
+ expect(nftItemData.Owner[0].Owner).to.be.deep.equal(to);
expect(nftItemData.Owner[0].Fraction.toString()).to.be.equal(value.toString());
}
});
}
export async function
-transferExpectFail(collectionId: number,
- tokenId: number,
- sender: IKeyringPair,
- recipient: IKeyringPair,
- value: number | bigint = 1,
- type: string = 'NFT') {
+ transferExpectFail(collectionId: number,
+ tokenId: number,
+ sender: IKeyringPair,
+ recipient: IKeyringPair,
+ value: number | bigint = 1,
+ type: string = 'NFT') {
await usingApi(async (api: ApiPromise) => {
- const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);
+ const transferTx = api.tx.nft.transfer(normalizeAccountId(recipient.address), collectionId, tokenId, value);
const events = await expect(submitTransactionExpectFailAsync(sender, transferTx)).to.be.rejected;
if (events && Array.isArray(events)) {
const result = getCreateCollectionResult(events);
@@ -814,10 +838,10 @@
}
export async function
-approveExpectFail(collectionId: number,
- tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number | bigint = 1) {
+ approveExpectFail(collectionId: number,
+ tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number | bigint = 1) {
await usingApi(async (api: ApiPromise) => {
- const approveNftTx = await api.tx.nft.approve(approved.address, collectionId, tokenId, amount);
+ const approveNftTx = api.tx.nft.approve(normalizeAccountId(approved.address), collectionId, tokenId, amount);
const events = await expect(submitTransactionExpectFailAsync(owner, approveNftTx)).to.be.rejected;
const result = getCreateCollectionResult(events);
// tslint:disable-next-line:no-unused-expression
@@ -830,7 +854,7 @@
owner: string,
) {
return await usingApi(async (api) => {
- const response = (await api.query.nft.fungibleItemList(collectionId, owner)).toJSON() as unknown as {Value: string};
+ const response = (await api.query.nft.fungibleItemList(collectionId, owner)).toJSON() as unknown as { Value: string };
return BigInt(response.Value);
});
}
@@ -839,10 +863,10 @@
sender: IKeyringPair,
collectionId: number,
data: CreateFungibleData,
- owner: string = sender.address,
+ owner: CrossAccountId | string = sender.address,
) {
return await usingApi(async (api) => {
- const tx = api.tx.nft.createItem(collectionId, owner, { Fungible: data });
+ const tx = api.tx.nft.createItem(collectionId, normalizeAccountId(owner), { Fungible: data });
const events = await submitTransactionAsync(sender, tx);
const result = getCreateItemResult(events);
@@ -853,28 +877,30 @@
}
export async function createItemExpectSuccess(
- sender: IKeyringPair, collectionId: number, createMode: string, owner: string | AccountId = sender.address) {
+ sender: IKeyringPair, collectionId: number, createMode: string, owner: CrossAccountId | string = sender.address) {
let newItemId: number = 0;
await usingApi(async (api) => {
+ const to = normalizeAccountId(owner);
const AItemCount = parseInt((await api.query.nft.itemListIndex(collectionId)).toString(), 10);
- const Aitem: any = (await api.query.nft.fungibleItemList(collectionId, owner)).toJSON();
+ const Aitem: any = (await api.query.nft.fungibleItemList(collectionId, toSubstrateAddress(to))).toJSON();
const AItemBalance = new BigNumber(Aitem.Value);
let tx;
if (createMode === 'Fungible') {
- const createData = {fungible: {value: 10}};
- tx = api.tx.nft.createItem(collectionId, owner, createData);
+ const createData = { fungible: { value: 10 } };
+ tx = api.tx.nft.createItem(collectionId, to, createData);
} else if (createMode === 'ReFungible') {
- const createData = {refungible: {const_data: [], variable_data: [], pieces: 100}};
- tx = api.tx.nft.createItem(collectionId, owner, createData);
+ const createData = { refungible: { const_data: [], variable_data: [], pieces: 100 } };
+ tx = api.tx.nft.createItem(collectionId, to, createData);
} else {
- tx = api.tx.nft.createItem(collectionId, owner, createMode);
+ tx = api.tx.nft.createItem(collectionId, to, createMode);
}
+
const events = await submitTransactionAsync(sender, tx);
const result = getCreateItemResult(events);
const BItemCount = parseInt((await api.query.nft.itemListIndex(collectionId)).toString(), 10);
- const Bitem: any = (await api.query.nft.fungibleItemList(collectionId, owner)).toJSON();
+ const Bitem: any = (await api.query.nft.fungibleItemList(collectionId, toSubstrateAddress(to))).toJSON();
const BItemBalance = new BigNumber(Bitem.Value);
// What to expect
@@ -886,8 +912,8 @@
expect(BItemCount).to.be.equal(AItemCount + 1);
}
expect(collectionId).to.be.equal(result.collectionId);
- expect(BItemCount).to.be.equal(result.itemId);
- expect(owner.toString()).to.be.equal(result.recipient);
+ expect(BItemCount.toString()).to.be.equal(result.itemId.toString());
+ expect(to).to.be.deep.equal(result.recipient);
newItemId = result.itemId;
});
return newItemId;
@@ -896,7 +922,8 @@
export async function createItemExpectFailure(
sender: IKeyringPair, collectionId: number, createMode: string, owner: string = sender.address) {
await usingApi(async (api) => {
- const tx = api.tx.nft.createItem(collectionId, owner, createMode);
+ const tx = api.tx.nft.createItem(collectionId, normalizeAccountId(owner), createMode);
+
const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
const result = getCreateItemResult(events);
@@ -980,7 +1007,7 @@
const whiteListedBefore = (await api.query.nft.whiteList(collectionId, address)).toJSON();
// Run the transaction
- const tx = api.tx.nft.addToWhiteList(collectionId, address);
+ const tx = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(address));
const events = await submitTransactionAsync(sender, tx);
const result = getGenericResult(events);
@@ -996,10 +1023,10 @@
});
}
-export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: string) {
+export async function removeFromWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {
await usingApi(async (api) => {
// Run the transaction
- const tx = api.tx.nft.removeFromWhiteList(collectionId, address);
+ const tx = api.tx.nft.removeFromWhiteList(collectionId, normalizeAccountId(address));
const events = await submitTransactionAsync(sender, tx);
const result = getGenericResult(events);
@@ -1009,10 +1036,10 @@
});
}
-export async function removeFromWhiteListExpectFailure(sender: IKeyringPair, collectionId: number, address: string) {
+export async function removeFromWhiteListExpectFailure(sender: IKeyringPair, collectionId: number, address: CrossAccountId) {
await usingApi(async (api) => {
// Run the transaction
- const tx = api.tx.nft.removeFromWhiteList(collectionId, address);
+ const tx = api.tx.nft.removeFromWhiteList(collectionId, normalizeAccountId(address));
const events = await expect(submitTransactionExpectFailAsync(sender, tx)).to.be.rejected;
const result = getGenericResult(events);
tests/yarn.lockdiffbeforeafterboth--- a/tests/yarn.lock
+++ b/tests/yarn.lock
@@ -25,14 +25,7 @@
dependencies:
"@babel/highlight" "^7.10.4"
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658"
- integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==
- dependencies:
- "@babel/highlight" "^7.12.13"
-
-"@babel/code-frame@^7.14.5":
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb"
integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==
@@ -44,38 +37,17 @@
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.5.tgz#8ef4c18e58e801c5c95d3c1c0f2874a2680fadea"
integrity sha512-kixrYn4JwfAVPa0f2yfzc2AWti6WRRyO3XjWW5PJAvtE11qhSayrrcrEnee05KAtNaPC+EwehE8Qt1UedEVB8w==
-"@babel/core@^7.1.0", "@babel/core@^7.7.5":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.13.tgz#b73a87a3a3e7d142a66248bf6ad88b9ceb093425"
- integrity sha512-BQKE9kXkPlXHPeqissfxo0lySWJcYdEP0hdtJOH/iJfDdhOCcgtNCjftCJg3qqauB4h+lz2N6ixM++b9DN1Tcw==
- dependencies:
- "@babel/code-frame" "^7.12.13"
- "@babel/generator" "^7.12.13"
- "@babel/helper-module-transforms" "^7.12.13"
- "@babel/helpers" "^7.12.13"
- "@babel/parser" "^7.12.13"
- "@babel/template" "^7.12.13"
- "@babel/traverse" "^7.12.13"
- "@babel/types" "^7.12.13"
- convert-source-map "^1.7.0"
- debug "^4.1.0"
- gensync "^1.0.0-beta.1"
- json5 "^2.1.2"
- lodash "^4.17.19"
- semver "^5.4.1"
- source-map "^0.5.0"
-
-"@babel/core@^7.14.3", "@babel/core@^7.7.2":
- version "7.14.5"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.5.tgz#d281f46a9905f07d1b3bf71ead54d9c7d89cb1e3"
- integrity sha512-RN/AwP2DJmQTZSfiDaD+JQQ/J99KsIpOCfBE5pL+5jJSt7nI3nYGoAXZu+ffYSQ029NLs2DstZb+eR81uuARgg==
+"@babel/core@^7.1.0", "@babel/core@^7.14.3", "@babel/core@^7.7.2", "@babel/core@^7.7.5":
+ version "7.14.6"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab"
+ integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==
dependencies:
"@babel/code-frame" "^7.14.5"
"@babel/generator" "^7.14.5"
"@babel/helper-compilation-targets" "^7.14.5"
"@babel/helper-module-transforms" "^7.14.5"
- "@babel/helpers" "^7.14.5"
- "@babel/parser" "^7.14.5"
+ "@babel/helpers" "^7.14.6"
+ "@babel/parser" "^7.14.6"
"@babel/template" "^7.14.5"
"@babel/traverse" "^7.14.5"
"@babel/types" "^7.14.5"
@@ -86,15 +58,6 @@
semver "^6.3.0"
source-map "^0.5.0"
-"@babel/generator@^7.12.13":
- version "7.12.15"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.15.tgz#4617b5d0b25cc572474cc1aafee1edeaf9b5368f"
- integrity sha512-6F2xHxBiFXWNSGb7vyCUTBF8RCLY66rS0zEPcP8t/nQyXjha5EuK4z7H5o7fWG8B4M7y6mqVWq1J+1PuwRhecQ==
- dependencies:
- "@babel/types" "^7.12.13"
- jsesc "^2.5.1"
- source-map "^0.5.0"
-
"@babel/generator@^7.14.5", "@babel/generator@^7.7.2":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785"
@@ -104,14 +67,7 @@
jsesc "^2.5.1"
source-map "^0.5.0"
-"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab"
- integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==
- dependencies:
- "@babel/types" "^7.12.13"
-
-"@babel/helper-annotate-as-pure@^7.14.5":
+"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz#7bf478ec3b71726d56a8ca5775b046fc29879e61"
integrity sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==
@@ -136,10 +92,10 @@
browserslist "^4.16.6"
semver "^6.3.0"
-"@babel/helper-create-class-features-plugin@^7.14.5":
- version "7.14.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.5.tgz#8842ec495516dd1ed8f6c572be92ba78b1e9beef"
- integrity sha512-Uq9z2e7ZtcnDMirRqAGLRaLwJn+Lrh388v5ETrR3pALJnElVh2zqQmdbz4W2RUJYohAPh2mtyPUgyMHMzXMncQ==
+"@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.14.6":
+ version "7.14.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz#f114469b6c06f8b5c59c6c4e74621f5085362542"
+ integrity sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg==
dependencies:
"@babel/helper-annotate-as-pure" "^7.14.5"
"@babel/helper-function-name" "^7.14.5"
@@ -148,14 +104,6 @@
"@babel/helper-replace-supers" "^7.14.5"
"@babel/helper-split-export-declaration" "^7.14.5"
-"@babel/helper-create-regexp-features-plugin@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.13.tgz#0996d370a92896c612ae41a4215544bd152579c0"
- integrity sha512-XC+kiA0J3at6E85dL5UnCYfVOcIZ834QcAY0TIpgUVnz0zDzg+0TtvZTnJ4g9L1dPRGe30Qi03XCIS4tYCLtqw==
- dependencies:
- "@babel/helper-annotate-as-pure" "^7.12.13"
- regexpu-core "^4.7.1"
-
"@babel/helper-create-regexp-features-plugin@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4"
@@ -184,15 +132,6 @@
integrity sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==
dependencies:
"@babel/types" "^7.14.5"
-
-"@babel/helper-function-name@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a"
- integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==
- dependencies:
- "@babel/helper-get-function-arity" "^7.12.13"
- "@babel/template" "^7.12.13"
- "@babel/types" "^7.12.13"
"@babel/helper-function-name@^7.14.5":
version "7.14.5"
@@ -202,13 +141,6 @@
"@babel/helper-get-function-arity" "^7.14.5"
"@babel/template" "^7.14.5"
"@babel/types" "^7.14.5"
-
-"@babel/helper-get-function-arity@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583"
- integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==
- dependencies:
- "@babel/types" "^7.12.13"
"@babel/helper-get-function-arity@^7.14.5":
version "7.14.5"
@@ -224,13 +156,6 @@
dependencies:
"@babel/types" "^7.14.5"
-"@babel/helper-member-expression-to-functions@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.13.tgz#c5715695b4f8bab32660dbdcdc2341dec7e3df40"
- integrity sha512-B+7nN0gIL8FZ8SvMcF+EPyB21KnCcZHQZFczCxbiNGV/O0rsrSBlWGLzmtBJ3GMjSVMIm4lpFhR+VdVBuIsUcQ==
- dependencies:
- "@babel/types" "^7.12.13"
-
"@babel/helper-member-expression-to-functions@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.5.tgz#d5c70e4ad13b402c95156c7a53568f504e2fb7b8"
@@ -238,34 +163,12 @@
dependencies:
"@babel/types" "^7.14.5"
-"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0"
- integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==
- dependencies:
- "@babel/types" "^7.12.13"
-
-"@babel/helper-module-imports@^7.14.5":
+"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3"
integrity sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==
dependencies:
"@babel/types" "^7.14.5"
-
-"@babel/helper-module-transforms@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.13.tgz#01afb052dcad2044289b7b20beb3fa8bd0265bea"
- integrity sha512-acKF7EjqOR67ASIlDTupwkKM1eUisNAjaSduo5Cz+793ikfnpe7p4Q7B7EWU2PCoSTPWsQkR7hRUWEIZPiVLGA==
- dependencies:
- "@babel/helper-module-imports" "^7.12.13"
- "@babel/helper-replace-supers" "^7.12.13"
- "@babel/helper-simple-access" "^7.12.13"
- "@babel/helper-split-export-declaration" "^7.12.13"
- "@babel/helper-validator-identifier" "^7.12.11"
- "@babel/template" "^7.12.13"
- "@babel/traverse" "^7.12.13"
- "@babel/types" "^7.12.13"
- lodash "^4.17.19"
"@babel/helper-module-transforms@^7.14.5":
version "7.14.5"
@@ -280,13 +183,6 @@
"@babel/template" "^7.14.5"
"@babel/traverse" "^7.14.5"
"@babel/types" "^7.14.5"
-
-"@babel/helper-optimise-call-expression@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea"
- integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==
- dependencies:
- "@babel/types" "^7.12.13"
"@babel/helper-optimise-call-expression@^7.14.5":
version "7.14.5"
@@ -295,12 +191,7 @@
dependencies:
"@babel/types" "^7.14.5"
-"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.12.13.tgz#174254d0f2424d8aefb4dd48057511247b0a9eeb"
- integrity sha512-C+10MXCXJLiR6IeG9+Wiejt9jmtFpxUc3MQqCmPY8hfCjyUGl9kT+B2okzEZrtykiwrc4dbCPdDoz0A/HQbDaA==
-
-"@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5":
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9"
integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==
@@ -313,16 +204,6 @@
"@babel/helper-annotate-as-pure" "^7.14.5"
"@babel/helper-wrap-function" "^7.14.5"
"@babel/types" "^7.14.5"
-
-"@babel/helper-replace-supers@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.13.tgz#00ec4fb6862546bd3d0aff9aac56074277173121"
- integrity sha512-pctAOIAMVStI2TMLhozPKbf5yTEXc0OJa0eENheb4w09SrgOWEs+P4nTOZYJQCqs8JlErGLDPDJTiGIp3ygbLg==
- dependencies:
- "@babel/helper-member-expression-to-functions" "^7.12.13"
- "@babel/helper-optimise-call-expression" "^7.12.13"
- "@babel/traverse" "^7.12.13"
- "@babel/types" "^7.12.13"
"@babel/helper-replace-supers@^7.14.5":
version "7.14.5"
@@ -334,13 +215,6 @@
"@babel/traverse" "^7.14.5"
"@babel/types" "^7.14.5"
-"@babel/helper-simple-access@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4"
- integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==
- dependencies:
- "@babel/types" "^7.12.13"
-
"@babel/helper-simple-access@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4"
@@ -355,13 +229,6 @@
dependencies:
"@babel/types" "^7.14.5"
-"@babel/helper-split-export-declaration@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05"
- integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==
- dependencies:
- "@babel/types" "^7.12.13"
-
"@babel/helper-split-export-declaration@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz#22b23a54ef51c2b7605d851930c1976dd0bc693a"
@@ -369,11 +236,6 @@
dependencies:
"@babel/types" "^7.14.5"
-"@babel/helper-validator-identifier@^7.12.11":
- version "7.12.11"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed"
- integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
-
"@babel/helper-validator-identifier@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8"
@@ -394,19 +256,10 @@
"@babel/traverse" "^7.14.5"
"@babel/types" "^7.14.5"
-"@babel/helpers@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.13.tgz#3c75e993632e4dadc0274eae219c73eb7645ba47"
- integrity sha512-oohVzLRZ3GQEk4Cjhfs9YkJA4TdIDTObdBEZGrd6F/T0GPSnuV6l22eMcxlvcvzVIPH3VTtxbseudM1zIE+rPQ==
- dependencies:
- "@babel/template" "^7.12.13"
- "@babel/traverse" "^7.12.13"
- "@babel/types" "^7.12.13"
-
-"@babel/helpers@^7.14.5":
- version "7.14.5"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.5.tgz#4870f8d9a6fdbbd65e5674a3558b4ff7fef0d9b2"
- integrity sha512-xtcWOuN9VL6nApgVHtq3PPcQv5qFBJzoSZzJ/2c0QK/IP/gxVcoWSNQwFEGvmbQsuS9rhYqjILDGGXcTkA705Q==
+"@babel/helpers@^7.14.6":
+ version "7.14.6"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.6.tgz#5b58306b95f1b47e2a0199434fa8658fa6c21635"
+ integrity sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==
dependencies:
"@babel/template" "^7.14.5"
"@babel/traverse" "^7.14.5"
@@ -421,24 +274,10 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
-"@babel/highlight@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c"
- integrity sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==
- dependencies:
- "@babel/helper-validator-identifier" "^7.12.11"
- chalk "^2.0.0"
- js-tokens "^4.0.0"
-
-"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.12.13":
- version "7.12.15"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.15.tgz#2b20de7f0b4b332d9b119dd9c33409c538b8aacf"
- integrity sha512-AQBOU2Z9kWwSZMd6lNjCX0GUgFonL1wAM1db8L8PMk9UDaGsRCArBkU4Sc+UCM3AE4hjbXx+h58Lb3QT4oRmrA==
-
-"@babel/parser@^7.14.5", "@babel/parser@^7.7.2":
- version "7.14.5"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.5.tgz#4cd2f346261061b2518873ffecdf1612cb032829"
- integrity sha512-TM8C+xtH/9n1qzX+JNHi7AN2zHMTiPUtspO0ZdHflW8KaskkALhMmuMHb4bCmNdv9VAPzJX3/bXqkVLnAvsPfg==
+"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.6", "@babel/parser@^7.7.2":
+ version "7.14.6"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2"
+ integrity sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ==
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5":
version "7.14.5"
@@ -569,7 +408,7 @@
"@babel/helper-plugin-utils" "^7.14.5"
"@babel/plugin-syntax-private-property-in-object" "^7.14.5"
-"@babel/plugin-proposal-unicode-property-regex@^7.14.5":
+"@babel/plugin-proposal-unicode-property-regex@^7.14.5", "@babel/plugin-proposal-unicode-property-regex@^7.4.4":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8"
integrity sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==
@@ -577,14 +416,6 @@
"@babel/helper-create-regexp-features-plugin" "^7.14.5"
"@babel/helper-plugin-utils" "^7.14.5"
-"@babel/plugin-proposal-unicode-property-regex@^7.4.4":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz#bebde51339be829c17aaaaced18641deb62b39ba"
- integrity sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==
- dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.12.13"
- "@babel/helper-plugin-utils" "^7.12.13"
-
"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
@@ -697,14 +528,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.14.5"
-"@babel/plugin-syntax-top-level-await@^7.12.13", "@babel/plugin-syntax-top-level-await@^7.8.3":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz#c5f0fa6e249f5b739727f923540cf7a806130178"
- integrity sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==
- dependencies:
- "@babel/helper-plugin-utils" "^7.12.13"
-
-"@babel/plugin-syntax-top-level-await@^7.14.5":
+"@babel/plugin-syntax-top-level-await@^7.12.13", "@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c"
integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==
@@ -775,21 +599,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.14.5"
-"@babel/plugin-transform-dotall-regex@^7.14.5":
+"@babel/plugin-transform-dotall-regex@^7.14.5", "@babel/plugin-transform-dotall-regex@^7.4.4":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a"
integrity sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==
dependencies:
"@babel/helper-create-regexp-features-plugin" "^7.14.5"
"@babel/helper-plugin-utils" "^7.14.5"
-
-"@babel/plugin-transform-dotall-regex@^7.4.4":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz#3f1601cc29905bfcb67f53910f197aeafebb25ad"
- integrity sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==
- dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.12.13"
- "@babel/helper-plugin-utils" "^7.12.13"
"@babel/plugin-transform-duplicate-keys@^7.14.5":
version "7.14.5"
@@ -976,9 +792,9 @@
"@babel/helper-plugin-utils" "^7.14.5"
"@babel/plugin-transform-spread@^7.14.5":
- version "7.14.5"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.5.tgz#bd269fb4119754d2ce7f4cc39a96b4f71baae356"
- integrity sha512-/3iqoQdiWergnShZYl0xACb4ADeYCJ7X/RgmwtXshn6cIvautRPAFzhd58frQlokLO6Jb4/3JXvmm6WNTPtiTw==
+ version "7.14.6"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz#6bd40e57fe7de94aa904851963b5616652f73144"
+ integrity sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==
dependencies:
"@babel/helper-plugin-utils" "^7.14.5"
"@babel/helper-skip-transparent-expression-wrappers" "^7.14.5"
@@ -1005,11 +821,11 @@
"@babel/helper-plugin-utils" "^7.14.5"
"@babel/plugin-transform-typescript@^7.14.5":
- version "7.14.5"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.5.tgz#5b41b59072f765bd1ec1d0b694e08c7df0f6f8a0"
- integrity sha512-cFD5PKp4b8/KkwQ7h71FdPXFvz1RgwTFF9akRZwFldb9G0AHf7CgoPx96c4Q/ZVjh6V81tqQwW5YiHws16OzPg==
+ version "7.14.6"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.6.tgz#6e9c2d98da2507ebe0a883b100cde3c7279df36c"
+ integrity sha512-XlTdBq7Awr4FYIzqhmYY80WN0V0azF74DMPyFqVHBvf81ZUgc4X7ZOpx6O8eLDK6iM5cCQzeyJw0ynTaefixRA==
dependencies:
- "@babel/helper-create-class-features-plugin" "^7.14.5"
+ "@babel/helper-create-class-features-plugin" "^7.14.6"
"@babel/helper-plugin-utils" "^7.14.5"
"@babel/plugin-syntax-typescript" "^7.14.5"
@@ -1150,30 +966,14 @@
pirates "^4.0.0"
source-map-support "^0.5.16"
-"@babel/runtime@^7.13.9", "@babel/runtime@^7.14.0":
- version "7.14.5"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.5.tgz#665450911c6031af38f81db530f387ec04cd9a98"
- integrity sha512-121rumjddw9c3NCQ55KGkyE1h/nzWhU/owjhw0l4mQrkzz4x9SGS1X8gFLraHwX7td3Yo4QTL+qj0NcIzN87BA==
+"@babel/runtime@^7.13.17", "@babel/runtime@^7.13.9", "@babel/runtime@^7.14.0", "@babel/runtime@^7.14.5", "@babel/runtime@^7.8.4":
+ version "7.14.6"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.6.tgz#535203bc0892efc7dec60bdc27b2ecf6e409062d"
+ integrity sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==
dependencies:
regenerator-runtime "^0.13.4"
-"@babel/runtime@^7.8.4":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.13.tgz#0a21452352b02542db0ffb928ac2d3ca7cb6d66d"
- integrity sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==
- dependencies:
- regenerator-runtime "^0.13.4"
-
-"@babel/template@^7.12.13", "@babel/template@^7.3.3":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327"
- integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==
- dependencies:
- "@babel/code-frame" "^7.12.13"
- "@babel/parser" "^7.12.13"
- "@babel/types" "^7.12.13"
-
-"@babel/template@^7.14.5":
+"@babel/template@^7.14.5", "@babel/template@^7.3.3":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4"
integrity sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==
@@ -1182,22 +982,7 @@
"@babel/parser" "^7.14.5"
"@babel/types" "^7.14.5"
-"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.13":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.13.tgz#689f0e4b4c08587ad26622832632735fb8c4e0c0"
- integrity sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==
- dependencies:
- "@babel/code-frame" "^7.12.13"
- "@babel/generator" "^7.12.13"
- "@babel/helper-function-name" "^7.12.13"
- "@babel/helper-split-export-declaration" "^7.12.13"
- "@babel/parser" "^7.12.13"
- "@babel/types" "^7.12.13"
- debug "^4.1.0"
- globals "^11.1.0"
- lodash "^4.17.19"
-
-"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.7.2":
+"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.7.2":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.5.tgz#c111b0f58afab4fea3d3385a406f692748c59870"
integrity sha512-G3BiS15vevepdmFqmUc9X+64y0viZYygubAMO8SvBmKARuF6CPSZtH4Ng9vi/lrWlZFGe3FWdXNy835akH8Glg==
@@ -1212,16 +997,7 @@
debug "^4.1.0"
globals "^11.1.0"
-"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
- version "7.12.13"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.13.tgz#8be1aa8f2c876da11a9cf650c0ecf656913ad611"
- integrity sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ==
- dependencies:
- "@babel/helper-validator-identifier" "^7.12.11"
- lodash "^4.17.19"
- to-fast-properties "^2.0.0"
-
-"@babel/types@^7.14.5":
+"@babel/types@^7.0.0", "@babel/types@^7.14.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff"
integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==
@@ -1249,6 +1025,182 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"
+"@ethersproject/abi@5.0.7":
+ version "5.0.7"
+ resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b"
+ integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==
+ dependencies:
+ "@ethersproject/address" "^5.0.4"
+ "@ethersproject/bignumber" "^5.0.7"
+ "@ethersproject/bytes" "^5.0.4"
+ "@ethersproject/constants" "^5.0.4"
+ "@ethersproject/hash" "^5.0.4"
+ "@ethersproject/keccak256" "^5.0.3"
+ "@ethersproject/logger" "^5.0.5"
+ "@ethersproject/properties" "^5.0.3"
+ "@ethersproject/strings" "^5.0.4"
+
+"@ethersproject/abstract-provider@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.3.0.tgz#f4c0ae4a4cef9f204d7781de805fd44b72756c81"
+ integrity sha512-1+MLhGP1GwxBDBNwMWVmhCsvKwh4gK7oIfOrmlmePNeskg1NhIrYssraJBieaFNHUYfKEd/1DjiVZMw8Qu5Cxw==
+ dependencies:
+ "@ethersproject/bignumber" "^5.3.0"
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ "@ethersproject/networks" "^5.3.0"
+ "@ethersproject/properties" "^5.3.0"
+ "@ethersproject/transactions" "^5.3.0"
+ "@ethersproject/web" "^5.3.0"
+
+"@ethersproject/abstract-signer@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.3.0.tgz#05172b653e15b535ed5854ef5f6a72f4b441052d"
+ integrity sha512-w8IFwOYqiPrtvosPuArZ3+QPR2nmdVTRrVY8uJYL3NNfMmQfTy3V3l2wbzX47UUlNbPJY+gKvzJAyvK1onZxJg==
+ dependencies:
+ "@ethersproject/abstract-provider" "^5.3.0"
+ "@ethersproject/bignumber" "^5.3.0"
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ "@ethersproject/properties" "^5.3.0"
+
+"@ethersproject/address@^5.0.4", "@ethersproject/address@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.3.0.tgz#e53b69eacebf332e8175de814c5e6507d6932518"
+ integrity sha512-29TgjzEBK+gUEUAOfWCG7s9IxLNLCqvr+oDSk6L9TXD0VLvZJKhJV479tKQqheVA81OeGxfpdxYtUVH8hqlCvA==
+ dependencies:
+ "@ethersproject/bignumber" "^5.3.0"
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/keccak256" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ "@ethersproject/rlp" "^5.3.0"
+
+"@ethersproject/base64@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.3.0.tgz#b831fb35418b42ad24d943c557259062b8640824"
+ integrity sha512-JIqgtOmgKcbc2sjGWTXyXktqUhvFUDte8fPVsAaOrcPiJf6YotNF+nsrOYGC9pbHBEGSuSBp3QR0varkO8JHEw==
+ dependencies:
+ "@ethersproject/bytes" "^5.3.0"
+
+"@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.3.0.tgz#74ab2ec9c3bda4e344920565720a6ee9c794e9db"
+ integrity sha512-5xguJ+Q1/zRMgHgDCaqAexx/8DwDVLRemw2i6uR8KyGjwGdXI8f32QZZ1cKGucBN6ekJvpUpHy6XAuQnTv0mPA==
+ dependencies:
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ bn.js "^4.11.9"
+
+"@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.3.0.tgz#473e0da7f831d535b2002be05e6f4ca3729a1bc9"
+ integrity sha512-rqLJjdVqCcn7glPer7Fxh87PRqlnRScVAoxcIP3PmOUNApMWJ6yRdOFfo2KvPAdO7Le3yEI1o0YW+Yvr7XCYvw==
+ dependencies:
+ "@ethersproject/logger" "^5.3.0"
+
+"@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.3.0.tgz#a5d6d86c0eec2c64c3024479609493b9afb3fc77"
+ integrity sha512-4y1feNOwEpgjAfiCFWOHznvv6qUF/H6uI0UKp8xdhftb+H+FbKflXg1pOgH5qs4Sr7EYBL+zPyPb+YD5g1aEyw==
+ dependencies:
+ "@ethersproject/bignumber" "^5.3.0"
+
+"@ethersproject/hash@^5.0.4":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.3.0.tgz#f65e3bf3db3282df4da676db6cfa049535dd3643"
+ integrity sha512-gAFZSjUPQ32CIfoKSMtMEQ+IO0kQxqhwz9fCIFt2DtAq2u4pWt8mL9Z5P0r6KkLcQU8LE9FmuPPyd+JvBzmr1w==
+ dependencies:
+ "@ethersproject/abstract-signer" "^5.3.0"
+ "@ethersproject/address" "^5.3.0"
+ "@ethersproject/bignumber" "^5.3.0"
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/keccak256" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ "@ethersproject/properties" "^5.3.0"
+ "@ethersproject/strings" "^5.3.0"
+
+"@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.3.0.tgz#fb5cd36bdfd6fa02e2ea84964078a9fc6bd731be"
+ integrity sha512-Gv2YqgIUmRbYVNIibafT0qGaeGYLIA/EdWHJ7JcVxVSs2vyxafGxOJ5VpSBHWeOIsE6OOaCelYowhuuTicgdFQ==
+ dependencies:
+ "@ethersproject/bytes" "^5.3.0"
+ js-sha3 "0.5.7"
+
+"@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.3.0.tgz#7a69fa1d4ca0d4b7138da1627eb152f763d84dd0"
+ integrity sha512-8bwJ2gxJGkZZnpQSq5uSiZSJjyVTWmlGft4oH8vxHdvO1Asy4TwVepAhPgxIQIMxXZFUNMych1YjIV4oQ4I7dA==
+
+"@ethersproject/networks@^5.3.0":
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.3.1.tgz#78fe08324cee289ce239acf8c746121934b2ef61"
+ integrity sha512-6uQKHkYChlsfeiZhQ8IHIqGE/sQsf25o9ZxAYpMxi15dLPzz3IxOEF5KiSD32aHwsjXVBKBSlo+teAXLlYJybw==
+ dependencies:
+ "@ethersproject/logger" "^5.3.0"
+
+"@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.3.0.tgz#feef4c4babeb7c10a6b3449575016f4ad2c092b2"
+ integrity sha512-PaHxJyM5/bfusk6vr3yP//JMnm4UEojpzuWGTmtL5X4uNhNnFNvlYilZLyDr4I9cTkIbipCMsAuIcXWsmdRnEw==
+ dependencies:
+ "@ethersproject/logger" "^5.3.0"
+
+"@ethersproject/rlp@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.3.0.tgz#7cb93a7b5dfa69163894153c9d4b0d936f333188"
+ integrity sha512-oI0joYpsRanl9guDubaW+1NbcpK0vJ3F/6Wpcanzcnqq+oaW9O5E98liwkEDPcb16BUTLIJ+ZF8GPIHYxJ/5Pw==
+ dependencies:
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+
+"@ethersproject/signing-key@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.3.0.tgz#a96c88f8173e1abedfa35de32d3e5db7c48e5259"
+ integrity sha512-+DX/GwHAd0ok1bgedV1cKO0zfK7P/9aEyNoaYiRsGHpCecN7mhLqcdoUiUzE7Uz86LBsxm5ssK0qA1kBB47fbQ==
+ dependencies:
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ "@ethersproject/properties" "^5.3.0"
+ bn.js "^4.11.9"
+ elliptic "6.5.4"
+ hash.js "1.1.7"
+
+"@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.3.0.tgz#a6b640aab56a18e0909f657da798eef890968ff0"
+ integrity sha512-j/AzIGZ503cvhuF2ldRSjB0BrKzpsBMtCieDtn4TYMMZMQ9zScJn9wLzTQl/bRNvJbBE6TOspK0r8/Ngae/f2Q==
+ dependencies:
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/constants" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+
+"@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.3.0.tgz#49b86f2bafa4d0bdf8e596578fc795ee47c50458"
+ integrity sha512-cdfK8VVyW2oEBCXhURG0WQ6AICL/r6Gmjh0e4Bvbv6MCn/GBd8FeBH3rtl7ho+AW50csMKeGv3m3K1HSHB2jMQ==
+ dependencies:
+ "@ethersproject/address" "^5.3.0"
+ "@ethersproject/bignumber" "^5.3.0"
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/constants" "^5.3.0"
+ "@ethersproject/keccak256" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ "@ethersproject/properties" "^5.3.0"
+ "@ethersproject/rlp" "^5.3.0"
+ "@ethersproject/signing-key" "^5.3.0"
+
+"@ethersproject/web@^5.3.0":
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.3.0.tgz#7959c403f6476c61515008d8f92da51c553a8ee1"
+ integrity sha512-Ni6/DHnY6k/TD41LEkv0RQDx4jqWz5e/RZvrSecsxGYycF+MFy2z++T/yGc2peRunLOTIFwEksgEGGlbwfYmhQ==
+ dependencies:
+ "@ethersproject/base64" "^5.3.0"
+ "@ethersproject/bytes" "^5.3.0"
+ "@ethersproject/logger" "^5.3.0"
+ "@ethersproject/properties" "^5.3.0"
+ "@ethersproject/strings" "^5.3.0"
+
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
@@ -1261,9 +1213,9 @@
resolve-from "^5.0.0"
"@istanbuljs/schema@^0.1.2":
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd"
- integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"
+ integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==
"@jest/console@^27.0.2":
version "27.0.2"
@@ -1451,25 +1403,25 @@
readdirp "^2.2.1"
upath "^1.1.1"
-"@nodelib/fs.scandir@2.1.4":
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69"
- integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==
+"@nodelib/fs.scandir@2.1.5":
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
+ integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
dependencies:
- "@nodelib/fs.stat" "2.0.4"
+ "@nodelib/fs.stat" "2.0.5"
run-parallel "^1.1.9"
-"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2":
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655"
- integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==
+"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
+ integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
"@nodelib/fs.walk@^1.2.3":
- version "1.2.6"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063"
- integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz#94c23db18ee4653e129abd26fb06f870ac9e1ee2"
+ integrity sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA==
dependencies:
- "@nodelib/fs.scandir" "2.1.4"
+ "@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
"@octokit/auth-token@^2.4.4":
@@ -1479,101 +1431,99 @@
dependencies:
"@octokit/types" "^6.0.3"
-"@octokit/core@^3.2.3":
- version "3.2.5"
- resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.2.5.tgz#57becbd5fd789b0592b915840855f3a5f233d554"
- integrity sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg==
+"@octokit/core@^3.5.0":
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b"
+ integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==
dependencies:
"@octokit/auth-token" "^2.4.4"
"@octokit/graphql" "^4.5.8"
- "@octokit/request" "^5.4.12"
+ "@octokit/request" "^5.6.0"
+ "@octokit/request-error" "^2.0.5"
"@octokit/types" "^6.0.3"
- before-after-hook "^2.1.0"
+ before-after-hook "^2.2.0"
universal-user-agent "^6.0.0"
"@octokit/endpoint@^6.0.1":
- version "6.0.11"
- resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.11.tgz#082adc2aebca6dcefa1fb383f5efb3ed081949d1"
- integrity sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==
+ version "6.0.12"
+ resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658"
+ integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==
dependencies:
"@octokit/types" "^6.0.3"
is-plain-object "^5.0.0"
universal-user-agent "^6.0.0"
"@octokit/graphql@^4.5.8":
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.0.tgz#f9abca55f82183964a33439d5264674c701c3327"
- integrity sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ==
+ version "4.6.4"
+ resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.4.tgz#0c3f5bed440822182e972317122acb65d311a5ed"
+ integrity sha512-SWTdXsVheRmlotWNjKzPOb6Js6tjSqA2a8z9+glDJng0Aqjzti8MEWOtuT8ZSu6wHnci7LZNuarE87+WJBG4vg==
dependencies:
- "@octokit/request" "^5.3.0"
+ "@octokit/request" "^5.6.0"
"@octokit/types" "^6.0.3"
universal-user-agent "^6.0.0"
-"@octokit/openapi-types@^4.0.2":
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-4.0.2.tgz#4b2bb553a16ab9e0fdeb29bd453b1c88cf129929"
- integrity sha512-quqmeGTjcVks8YaatVGCpt7QpUTs2PK0D3mW5aEQqmFKOuIZ/CxwWrgnggPjqP3CNp6eALdQRgf0jUpcG8X1/Q==
+"@octokit/openapi-types@^7.3.2":
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-7.3.2.tgz#065ce49b338043ec7f741316ce06afd4d459d944"
+ integrity sha512-oJhK/yhl9Gt430OrZOzAl2wJqR0No9445vmZ9Ey8GjUZUpwuu/vmEFP0TDhDXdpGDoxD6/EIFHJEcY8nHXpDTA==
"@octokit/plugin-paginate-rest@^2.6.2":
- version "2.9.1"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.9.1.tgz#e9bb34a89b7ed5b801f1c976feeb9b0078ecd201"
- integrity sha512-8wnuWGjwDIEobbBet2xAjZwgiMVTgIer5wBsnGXzV3lJ4yqphLU2FEMpkhSrDx7y+WkZDfZ+V+1cFMZ1mAaFag==
+ version "2.13.5"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.5.tgz#e459f9b5dccbe0a53f039a355d5b80c0a2b0dc57"
+ integrity sha512-3WSAKBLa1RaR/7GG+LQR/tAZ9fp9H9waE9aPXallidyci9oZsfgsLn5M836d3LuDC6Fcym+2idRTBpssHZePVg==
dependencies:
- "@octokit/types" "^6.8.0"
+ "@octokit/types" "^6.13.0"
"@octokit/plugin-request-log@^1.0.2":
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d"
- integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ==
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85"
+ integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==
-"@octokit/plugin-rest-endpoint-methods@4.10.1":
- version "4.10.1"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.10.1.tgz#b7a9181d1f52fef70a13945c5b49cffa51862da1"
- integrity sha512-YGMiEidTORzgUmYZu0eH4q2k8kgQSHQMuBOBYiKxUYs/nXea4q/Ze6tDzjcRAPmHNJYXrENs1bEMlcdGKT+8ug==
+"@octokit/plugin-rest-endpoint-methods@5.3.1":
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.3.1.tgz#deddce769b4ec3179170709ab42e4e9e6195aaa9"
+ integrity sha512-3B2iguGmkh6bQQaVOtCsS0gixrz8Lg0v4JuXPqBcFqLKuJtxAUf3K88RxMEf/naDOI73spD+goJ/o7Ie7Cvdjg==
dependencies:
- "@octokit/types" "^6.8.2"
+ "@octokit/types" "^6.16.2"
deprecation "^2.3.1"
-"@octokit/request-error@^2.0.0":
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.5.tgz#72cc91edc870281ad583a42619256b380c600143"
- integrity sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==
+"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0":
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677"
+ integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==
dependencies:
"@octokit/types" "^6.0.3"
deprecation "^2.0.0"
once "^1.4.0"
-"@octokit/request@^5.3.0", "@octokit/request@^5.4.12":
- version "5.4.14"
- resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.14.tgz#ec5f96f78333bb2af390afa5ff66f114b063bc96"
- integrity sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==
+"@octokit/request@^5.6.0":
+ version "5.6.0"
+ resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.0.tgz#6084861b6e4fa21dc40c8e2a739ec5eff597e672"
+ integrity sha512-4cPp/N+NqmaGQwbh3vUsYqokQIzt7VjsgTYVXiwpUP2pxd5YiZB2XuTedbb0SPtv9XS7nzAKjAuQxmY8/aZkiA==
dependencies:
"@octokit/endpoint" "^6.0.1"
- "@octokit/request-error" "^2.0.0"
- "@octokit/types" "^6.7.1"
- deprecation "^2.0.0"
+ "@octokit/request-error" "^2.1.0"
+ "@octokit/types" "^6.16.1"
is-plain-object "^5.0.0"
node-fetch "^2.6.1"
- once "^1.4.0"
universal-user-agent "^6.0.0"
"@octokit/rest@^18.0.9":
- version "18.1.0"
- resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.1.0.tgz#9bf72604911a3433165bcc924263c9a706d32804"
- integrity sha512-YQfpTzWV3jdzDPyXQVO54f5I2t1zxk/S53Vbe+Aa5vQj6MdTx6sNEWzmUzUO8lSVowbGOnjcQHzW1A8ATr+/7g==
+ version "18.6.0"
+ resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.6.0.tgz#9a8457374c78c2773d3ab3f50aaffc62f3ed4f76"
+ integrity sha512-MdHuXHDJM7e5sUBe3K9tt7th0cs4csKU5Bb52LRi2oHAeIMrMZ4XqaTrEv660HoUPoM1iDlnj27Ab/Nh3MtwlA==
dependencies:
- "@octokit/core" "^3.2.3"
+ "@octokit/core" "^3.5.0"
"@octokit/plugin-paginate-rest" "^2.6.2"
"@octokit/plugin-request-log" "^1.0.2"
- "@octokit/plugin-rest-endpoint-methods" "4.10.1"
+ "@octokit/plugin-rest-endpoint-methods" "5.3.1"
-"@octokit/types@^6.0.3", "@octokit/types@^6.7.1", "@octokit/types@^6.8.0", "@octokit/types@^6.8.2":
- version "6.8.3"
- resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.8.3.tgz#1960951103c836ab2e55fe47a8da2bf76402824f"
- integrity sha512-ZNAy8z77ewKZ5LCX0KaUm4tWdgloWQ6FWJCh06qgahq/MH13sQefIPKSo0dBdPU3bcioltyZUcC0k8oHHfjvnQ==
+"@octokit/types@^6.0.3", "@octokit/types@^6.13.0", "@octokit/types@^6.16.1", "@octokit/types@^6.16.2":
+ version "6.16.4"
+ resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.16.4.tgz#d24f5e1bacd2fe96d61854b5bda0e88cf8288dfe"
+ integrity sha512-UxhWCdSzloULfUyamfOg4dJxV9B+XjgrIZscI0VCbp4eNrjmorGEw+4qdwcpTsu6DIrm9tQsFQS2pK5QkqQ04A==
dependencies:
- "@octokit/openapi-types" "^4.0.2"
- "@types/node" ">= 8"
+ "@octokit/openapi-types" "^7.3.2"
"@polkadot/api-contract@4.13.2-5":
version "4.13.2-5"
@@ -1685,13 +1635,13 @@
yargs "^17.0.1"
"@polkadot/keyring@^6.7.1":
- version "6.7.1"
- resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-6.7.1.tgz#6827ff42ace7eb2b78b35641cc9595ace69d598a"
- integrity sha512-SdIsKAL/iS1bJG4zVkB6khBUcbty4qt4K44mZBbI5xf7kPe7kRTnbqf/n+wdtA1P3eiQGygVNDPDLa7FncmEig==
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-6.8.1.tgz#8f81a1eb2418ac65b3bd8cefb90c913a5be792cb"
+ integrity sha512-V8G03yPtD1DZZ40sP5alFkyQ/de2eKazlDp3+6Y5xtGUjhMeecNG2p73lZXZ5k/Bzfvfnvujqrc6uFOv27EF1Q==
dependencies:
- "@babel/runtime" "^7.14.0"
- "@polkadot/util" "6.7.1"
- "@polkadot/util-crypto" "6.7.1"
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/util" "6.8.1"
+ "@polkadot/util-crypto" "6.8.1"
"@polkadot/metadata@4.13.2-5":
version "4.13.2-5"
@@ -1705,13 +1655,20 @@
"@polkadot/util-crypto" "^6.7.1"
bn.js "^4.11.9"
-"@polkadot/networks@6.7.1", "@polkadot/networks@^6.7.1":
+"@polkadot/networks@6.7.1":
version "6.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-6.7.1.tgz#7100b15f2f1e678aa5567afbe0c1ca1c690b9c83"
integrity sha512-9A2GX9Wyc6yoqRGjuxHAEDntsoiCJ9Jv9oocbmTF6/wVb3lK1Si0p4nLfsNCtIYXibbYP2jkyMj5rP10bY3bgw==
dependencies:
"@babel/runtime" "^7.14.0"
+"@polkadot/networks@6.8.1", "@polkadot/networks@^6.7.1":
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-6.8.1.tgz#3f8b4d77cf5543e49706c218b21086505deb5ba5"
+ integrity sha512-Hlng0DLoSkEuvCTnFHP7jBS/IzmiWQQ9NYPIq80geqbYLtofrVTwGb9Sm3Wa/HW83jZiWH66YPb2dXbaOffNog==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+
"@polkadot/rpc-core@4.13.2-5":
version "4.13.2-5"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-4.13.2-5.tgz#7fb29c70817d036ff81f7d0f19745833cdf26528"
@@ -1787,7 +1744,7 @@
"@types/bn.js" "^4.11.6"
bn.js "^4.11.9"
-"@polkadot/util-crypto@6.7.1", "@polkadot/util-crypto@^6.7.1":
+"@polkadot/util-crypto@6.7.1":
version "6.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-6.7.1.tgz#c30744ce809ac87120f417352108750b418be07a"
integrity sha512-lmZv+aHsC/VM/ixYx4xZtQRFrMX9wbWAXeXG4dBkJMmHAd59ug1PCetRFVHQDwjccu0RPldTZdsdVbreMD0T+g==
@@ -1809,7 +1766,42 @@
tweetnacl "^1.0.3"
xxhashjs "^0.2.2"
-"@polkadot/util@6.7.1", "@polkadot/util@^6.7.1":
+"@polkadot/util-crypto@6.8.1", "@polkadot/util-crypto@^6.7.1":
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-6.8.1.tgz#8983ab50c8d9bf0b799503c91fd9b8f13e3544c1"
+ integrity sha512-vtfZXQcnPu1h5UEJYYWWUPqoZnL7jttvI3m0hltdOna1jKQytVNDzdlU1im0xLli4Tax+4S+bZwNqi3ss7umRQ==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/networks" "6.8.1"
+ "@polkadot/util" "6.8.1"
+ "@polkadot/wasm-crypto" "^4.0.2"
+ "@polkadot/x-randomvalues" "6.8.1"
+ base-x "^3.0.8"
+ base64-js "^1.5.1"
+ blakejs "^1.1.0"
+ bn.js "^4.11.9"
+ create-hash "^1.2.0"
+ elliptic "^6.5.4"
+ hash.js "^1.1.7"
+ js-sha3 "^0.8.0"
+ scryptsy "^2.1.0"
+ tweetnacl "^1.0.3"
+ xxhashjs "^0.2.2"
+
+"@polkadot/util@6.3.1":
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-6.3.1.tgz#410ee362ddb37f9c67af8f5897d977a7fd950ebf"
+ integrity sha512-M9pGaXSB67DZPckdNQU29wq5W7BUOh6qeu5LonzxpUek+riJfbiF9JOgZQ2Q/aEFYbd1hqLbOMsLRZLhSmlbYw==
+ dependencies:
+ "@babel/runtime" "^7.13.17"
+ "@polkadot/x-textdecoder" "6.3.1"
+ "@polkadot/x-textencoder" "6.3.1"
+ "@types/bn.js" "^4.11.6"
+ bn.js "^4.11.9"
+ camelcase "^5.3.1"
+ ip-regex "^4.3.0"
+
+"@polkadot/util@6.7.1":
version "6.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-6.7.1.tgz#decedda8326fd9504cd051cae598670f2cb31d31"
integrity sha512-EH9oQ7s5DFat57GGac3B+sZK3Np+vCwheMX4EbrnjbQEn4DBRFoqndRD2BIrWMzfNL2c5MDjDsSpe+5IFsihDQ==
@@ -1822,6 +1814,19 @@
camelcase "^5.3.1"
ip-regex "^4.3.0"
+"@polkadot/util@6.8.1", "@polkadot/util@^6.7.1":
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-6.8.1.tgz#263fb6741a43471d48a4627b5698b7686a614e34"
+ integrity sha512-Dehgpee/xe6laI6j0dfDJqfC+zpEl4Wg41HzWKUQvSGhe9gNf5ajKZGHLr3DplKl07bX9YeL0F7xsj4gyVndHw==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/x-textdecoder" "6.8.1"
+ "@polkadot/x-textencoder" "6.8.1"
+ "@types/bn.js" "^4.11.6"
+ bn.js "^4.11.9"
+ camelcase "^5.3.1"
+ ip-regex "^4.3.0"
+
"@polkadot/wasm-crypto-asmjs@^4.0.2":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.0.2.tgz#f42c353a64e1243841daf90e4bd54eff01a4e3cf"
@@ -1846,16 +1851,25 @@
"@polkadot/wasm-crypto-wasm" "^4.0.2"
"@polkadot/x-fetch@^6.7.1":
- version "6.7.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-6.7.1.tgz#d5e80f3590e55ea267a14152777d15b3adfd1380"
- integrity sha512-8NHTMGbv66i7YkzsTKFCHbRWwg5Z7LyYPaQH91hDlE5/RvuM7lY1Uykjeg6oOhHkQPDgVjZxv2Lypoqx5rpkAQ==
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-6.8.1.tgz#41850e7301ec96971ce6b8796bfde6062f2bb8af"
+ integrity sha512-P/Xv1E94nwDw750sTLHQV9nsYLvEqknd7wa+6Vjg6aYl1RxRIiXevT3C5kivKjo0H7V2N7KJl7Shqh4dZto4qQ==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/x-global" "6.8.1"
+ "@types/node-fetch" "^2.5.10"
+ node-fetch "^2.6.1"
+
+"@polkadot/x-global@6.3.1":
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-6.3.1.tgz#cdb4883fa20e23411bdd5f50a5d5c92814a3106f"
+ integrity sha512-eFooGQdxJpiOsm3AKTSMInaecBKaQ/tqOUJNm/CpdJalCqTDMp/qzgj64Uflk9eUqGgk7jB7Q5FaQdyWsC0Mtg==
dependencies:
- "@babel/runtime" "^7.14.0"
- "@polkadot/x-global" "6.7.1"
+ "@babel/runtime" "^7.13.17"
"@types/node-fetch" "^2.5.10"
node-fetch "^2.6.1"
-"@polkadot/x-global@6.7.1", "@polkadot/x-global@^6.7.1":
+"@polkadot/x-global@6.7.1":
version "6.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-6.7.1.tgz#6a199b4e63a7497471d57efd57ca9271f1e3256f"
integrity sha512-rfzo5mG/Vc0Qiht1XMls7qpYHnTEI7z1Y08WUcZNGoBd6+dWnW+zTeKPCl4ouCF4TBD8pptjyn82ScSfw4X2IQ==
@@ -1864,6 +1878,15 @@
"@types/node-fetch" "^2.5.10"
node-fetch "^2.6.1"
+"@polkadot/x-global@6.8.1", "@polkadot/x-global@^6.7.1":
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-6.8.1.tgz#1c126de8f03cd1eea88224d14fa9171308805c4e"
+ integrity sha512-JVoXZdJXAEi3/Nwzm0pzVU8nbJrxjj8qiBD9zN+8/lP7HLgwLnb9YYg6QSFHTAgFi2DxAi9ICrg8Va9Qnh2RpQ==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+ "@types/node-fetch" "^2.5.10"
+ node-fetch "^2.6.1"
+
"@polkadot/x-randomvalues@6.7.1":
version "6.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-6.7.1.tgz#d68226ae00b3a6cf4e265f75b10a40ce386c26fc"
@@ -1872,14 +1895,30 @@
"@babel/runtime" "^7.14.0"
"@polkadot/x-global" "6.7.1"
+"@polkadot/x-randomvalues@6.8.1":
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-6.8.1.tgz#f086917d4860e8a090e94ca4225934bc18a9bf61"
+ integrity sha512-H/OS2ibhmKlBUXhf/GjwC2mF0sSxGqQ1rFvXrgnyDqMFlRWAxShUpe62AmMfrePbjCOHSUwvM2ccZpmye+YVrQ==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/x-global" "6.8.1"
+
"@polkadot/x-rxjs@^6.7.1":
- version "6.7.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-rxjs/-/x-rxjs-6.7.1.tgz#4a4832d1632978c933b235d25037bf2be776457f"
- integrity sha512-26h+QvluGtFIAcqyph4iPZd1vW7lDRTB46e3KKMbVl8j2qXGV2dDkt9x+zSU1h4cSgpOxahsb9SZEMGi4QaEdw==
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-rxjs/-/x-rxjs-6.8.1.tgz#73255daab02ffad1cfde6678e63cc1e756573cc6"
+ integrity sha512-CGSHcZsl01FbiwvH3Ac3GHT43YQrZ2TmeEDKR/aTALqSYlqDci2fwrBZ4cP1ahgkfGjekz1YR3s18T7QoQVaiw==
dependencies:
- "@babel/runtime" "^7.14.0"
+ "@babel/runtime" "^7.14.5"
rxjs "^6.6.7"
+"@polkadot/x-textdecoder@6.3.1":
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-6.3.1.tgz#ab0eec87d5df2d119480fa7a3657d8d72f583af8"
+ integrity sha512-lLb11yaAmyx2STw7ZmdgPtV7LI26U/5h1K527cM7QnxgTQgYggtAt4f9aLHiWsmOCvnT0U0PWsWSUbAJrLHLBA==
+ dependencies:
+ "@babel/runtime" "^7.13.17"
+ "@polkadot/x-global" "6.3.1"
+
"@polkadot/x-textdecoder@6.7.1":
version "6.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-6.7.1.tgz#75d91c159a7b15687072f099c9677c955eb5e091"
@@ -1888,6 +1927,22 @@
"@babel/runtime" "^7.14.0"
"@polkadot/x-global" "6.7.1"
+"@polkadot/x-textdecoder@6.8.1":
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-6.8.1.tgz#3660338a849692006a58650781db004136a1160c"
+ integrity sha512-ZWKpxSDmDwb9WV37xrnfOUn+ceA0B9X2ipeEbdOgx2Nc6ATNzP5AQrqIQCv7nTEeFZnDsUwD1MBN1bDRCmW4SQ==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/x-global" "6.8.1"
+
+"@polkadot/x-textencoder@6.3.1":
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-6.3.1.tgz#2277770650f5637698d7d8cd7ac0cfd5ca0dace2"
+ integrity sha512-7V5OuT43JPTm7rrwdBEMzXAF5nLg+t6q24ntZHNcFUH1pdkP/+2f3vGM3e9BK5k4wkQLoepod5gyY6Qbw9bsYQ==
+ dependencies:
+ "@babel/runtime" "^7.13.17"
+ "@polkadot/x-global" "6.3.1"
+
"@polkadot/x-textencoder@6.7.1":
version "6.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-6.7.1.tgz#fdc77abeeb8e83e6c67ffa189c4b7ff9bb69c1cb"
@@ -1896,13 +1951,21 @@
"@babel/runtime" "^7.14.0"
"@polkadot/x-global" "6.7.1"
+"@polkadot/x-textencoder@6.8.1":
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-6.8.1.tgz#c71459b6cd417620b5f3a41480d45c71dca44723"
+ integrity sha512-XnollArpiiQnQ3JdOz0bRohx2TrFerq/UvlKVjT1oPAqiXPfImNh5vn1QuYUcwmvw94/wBc6EO1cCw3JFrqv2Q==
+ dependencies:
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/x-global" "6.8.1"
+
"@polkadot/x-ws@^6.7.1":
- version "6.7.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-6.7.1.tgz#ba7047e77c16d7c8a8a21783870affc008f0fcc2"
- integrity sha512-oC/Q77uZVKueJSxTiLUPrmtJQ2U+DsHaddw0xSY2GU2JMoJWhte0aKOLNSUrtstakgEhOUc1iIgeY67pBJ6z7g==
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-6.8.1.tgz#2f2e4dc2e8fb3870d4dbdc8952b65dcccd764548"
+ integrity sha512-qt3HyrbTLMr3+BhsT8A1glFzO5dtImzM4eMVhbEmacdUnRD1rJ+yoYE3pPDA7IqRgv3toQkXIf6WedLbymhJUg==
dependencies:
- "@babel/runtime" "^7.14.0"
- "@polkadot/x-global" "6.7.1"
+ "@babel/runtime" "^7.14.5"
+ "@polkadot/x-global" "6.8.1"
"@types/websocket" "^1.0.2"
websocket "^1.0.34"
@@ -1917,9 +1980,9 @@
integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
"@sinonjs/commons@^1.7.0":
- version "1.8.2"
- resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b"
- integrity sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==
+ version "1.8.3"
+ resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d"
+ integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==
dependencies:
type-detect "4.0.8"
@@ -1942,18 +2005,7 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
-"@types/babel__core@^7.0.0":
- version "7.1.12"
- resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d"
- integrity sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ==
- dependencies:
- "@babel/parser" "^7.1.0"
- "@babel/types" "^7.0.0"
- "@types/babel__generator" "*"
- "@types/babel__template" "*"
- "@types/babel__traverse" "*"
-
-"@types/babel__core@^7.1.14":
+"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14":
version "7.1.14"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402"
integrity sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==
@@ -1980,13 +2032,13 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6":
- version "7.11.0"
- resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0"
- integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==
+ version "7.11.1"
+ resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.1.tgz#654f6c4f67568e24c23b367e947098c6206fa639"
+ integrity sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==
dependencies:
"@babel/types" "^7.3.0"
-"@types/bn.js@^4.11.6":
+"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5", "@types/bn.js@^4.11.6":
version "4.11.6"
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==
@@ -1994,16 +2046,16 @@
"@types/node" "*"
"@types/chai-as-promised@^7.1.3":
- version "7.1.3"
- resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.3.tgz#779166b90fda611963a3adbfd00b339d03b747bd"
- integrity sha512-FQnh1ohPXJELpKhzjuDkPLR2BZCAqed+a6xV4MI/T3XzHfd2FlarfUGUdZYgqYe8oxkYn0fchHEeHfHqdZ96sg==
+ version "7.1.4"
+ resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.4.tgz#caf64e76fb056b8c8ced4b761ed499272b737601"
+ integrity sha512-1y3L1cHePcIm5vXkh1DSGf/zQq5n5xDKG1fpCvf18+uOkpce0Z1ozNFPkyWsVswK7ntN1sZBw3oU6gmN+pDUcA==
dependencies:
"@types/chai" "*"
-"@types/chai@*", "@types/chai@^4.2.12":
- version "4.2.15"
- resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.15.tgz#b7a6d263c2cecf44b6de9a051cf496249b154553"
- integrity sha512-rYff6FI+ZTKAPkJUoyz7Udq3GaoDZnxYDEvdEdFZASiA7PoErltHezDishqQiSDWrGxvxmplH304jyzQmjp0AQ==
+"@types/chai@*", "@types/chai@^4.2.17":
+ version "4.2.18"
+ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.18.tgz#0c8e298dbff8205e2266606c1ea5fbdba29b46e4"
+ integrity sha512-rS27+EkB/RE1Iz3u0XtVL5q36MGDWbgYe7zWiodyKNUnthxY0rukK5V36eiUCtCisB7NN8zKYH6DO2M37qxFEQ==
"@types/chrome@^0.0.144":
version "0.0.144"
@@ -2014,28 +2066,28 @@
"@types/har-format" "*"
"@types/filesystem@*":
- version "0.0.29"
- resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.29.tgz#ee3748eb5be140dcf980c3bd35f11aec5f7a3748"
- integrity sha512-85/1KfRedmfPGsbK8YzeaQUyV1FQAvMPMTuWFQ5EkLd2w7szhNO96bk3Rh/SKmOfd9co2rCLf0Voy4o7ECBOvw==
+ version "0.0.30"
+ resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.30.tgz#a7373a2edf34d13e298baf7ee1101f738b2efb7e"
+ integrity sha512-NCoRgmGmLpTT9VFL6Bb6z0jQuqI3d0E5FGl7M0JOv/J5RQYo9s5aOItPYnpckx9MbYQk1APLXcF8f20Vqnf2yA==
dependencies:
"@types/filewriter" "*"
"@types/filewriter@*":
- version "0.0.28"
- resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.28.tgz#c054e8af4d9dd75db4e63abc76f885168714d4b3"
- integrity sha1-wFTor02d11205jq8dviFFocU1LM=
+ version "0.0.29"
+ resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.29.tgz#a48795ecadf957f6c0d10e0c34af86c098fa5bee"
+ integrity sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==
"@types/graceful-fs@^4.1.2":
- version "4.1.4"
- resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.4.tgz#4ff9f641a7c6d1a3508ff88bc3141b152772e753"
- integrity sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg==
+ version "4.1.5"
+ resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15"
+ integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==
dependencies:
"@types/node" "*"
"@types/har-format@*":
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.5.tgz#4f6648814d0fdcb6a510e3364a9db439a753c4b1"
- integrity sha512-IG8AE1m2pWtPqQ7wXhFhy6Q59bwwnLwO36v5Rit2FrbXCIp8Sk8E2PfUCreyrdo17STwFSKDAkitVuVYbpEHvQ==
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.6.tgz#471c83acdf6a2ea429620daee4c6dc1784a0e85f"
+ integrity sha512-TeZjp4COiAWPOeGx1tuFJETr/SBMx80lxqeqnCC36ZVn463f7ElCdA3X9RzDuo3BHjhN4apw41A5uoIw5FzgWA==
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
version "2.0.3"
@@ -2050,9 +2102,9 @@
"@types/istanbul-lib-coverage" "*"
"@types/istanbul-reports@^3.0.0":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821"
- integrity sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff"
+ integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==
dependencies:
"@types/istanbul-lib-report" "*"
@@ -2066,10 +2118,10 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
-"@types/mocha@^8.0.3":
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44"
- integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==
+"@types/mocha@^8.2.2":
+ version "8.2.2"
+ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.2.tgz#91daa226eb8c2ff261e6a8cbf8c7304641e095e0"
+ integrity sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==
"@types/node-fetch@^2.5.10":
version "2.5.10"
@@ -2079,15 +2131,34 @@
"@types/node" "*"
form-data "^3.0.0"
-"@types/node@*", "@types/node@>= 8":
- version "14.14.25"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.25.tgz#15967a7b577ff81383f9b888aa6705d43fbbae93"
- integrity sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==
+"@types/node@*":
+ version "15.12.2"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d"
+ integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==
+
+"@types/node@^12.12.6":
+ version "12.20.15"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.15.tgz#10ee6a6a3f971966fddfa3f6e89ef7a73ec622df"
+ integrity sha512-F6S4Chv4JicJmyrwlDkxUdGNSplsQdGwp1A0AJloEVDirWdZOAiRHhovDlsFkKUrquUXhz1imJhXHsf59auyAg==
+
+"@types/pbkdf2@^3.0.0":
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1"
+ integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==
+ dependencies:
+ "@types/node" "*"
"@types/prettier@^2.1.5":
- version "2.2.3"
- resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0"
- integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb"
+ integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw==
+
+"@types/secp256k1@^4.0.1":
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.2.tgz#20c29a87149d980f64464e56539bf4810fdb5d1d"
+ integrity sha512-QMg+9v0bbNJ2peLuHRWxzmy0HRJIG6gFZNhaRSp7S3ggSbCCxiqQB2/ybvhXyhHOCequpNkrx7OavNhrWOsW0A==
+ dependencies:
+ "@types/node" "*"
"@types/stack-utils@^2.0.0":
version "2.0.0"
@@ -2157,16 +2228,16 @@
"@typescript-eslint/types" "4.26.0"
"@typescript-eslint/visitor-keys" "4.26.0"
-"@typescript-eslint/types@4.15.0":
- version "4.15.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.0.tgz#3011ae1ac3299bb9a5ac56bdd297cccf679d3662"
- integrity sha512-su4RHkJhS+iFwyqyXHcS8EGPlUVoC+XREfy5daivjLur9JP8GhvTmDipuRpcujtGC4M+GYhUOJCPDE3rC5NJrg==
-
"@typescript-eslint/types@4.26.0":
version "4.26.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.26.0.tgz#7c6732c0414f0a69595f4f846ebe12616243d546"
integrity sha512-rADNgXl1kS/EKnDr3G+m7fB9yeJNnR9kF7xMiXL6mSIWpr3Wg5MhxyfEXy/IlYthsqwBqHOr22boFbf/u6O88A==
+"@typescript-eslint/types@4.27.0":
+ version "4.27.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.27.0.tgz#712b408519ed699baff69086bc59cd2fc13df8d8"
+ integrity sha512-I4ps3SCPFCKclRcvnsVA/7sWzh7naaM/b4pBO2hVxnM3wrU51Lveybdw5WoIktU/V4KfXrTt94V9b065b/0+wA==
+
"@typescript-eslint/typescript-estree@4.26.0":
version "4.26.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.26.0.tgz#aea17a40e62dc31c63d5b1bbe9a75783f2ce7109"
@@ -2181,25 +2252,17 @@
tsutils "^3.21.0"
"@typescript-eslint/typescript-estree@^4.8.2":
- version "4.15.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.0.tgz#402c86a7d2111c1f7a2513022f22a38a395b7f93"
- integrity sha512-jG6xTmcNbi6xzZq0SdWh7wQ9cMb2pqXaUp6bUZOMsIlu5aOlxGxgE/t6L/gPybybQGvdguajXGkZKSndZJpksA==
+ version "4.27.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.27.0.tgz#189a7b9f1d0717d5cccdcc17247692dedf7a09da"
+ integrity sha512-KH03GUsUj41sRLLEy2JHstnezgpS5VNhrJouRdmh6yNdQ+yl8w5LrSwBkExM+jWwCJa7Ct2c8yl8NdtNRyQO6g==
dependencies:
- "@typescript-eslint/types" "4.15.0"
- "@typescript-eslint/visitor-keys" "4.15.0"
- debug "^4.1.1"
- globby "^11.0.1"
+ "@typescript-eslint/types" "4.27.0"
+ "@typescript-eslint/visitor-keys" "4.27.0"
+ debug "^4.3.1"
+ globby "^11.0.3"
is-glob "^4.0.1"
- semver "^7.3.2"
- tsutils "^3.17.1"
-
-"@typescript-eslint/visitor-keys@4.15.0":
- version "4.15.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.0.tgz#2a07768df30c8a5673f1bce406338a07fdec38ca"
- integrity sha512-RnDtJwOwFucWFAMjG3ghCG/ikImFJFEg20DI7mn4pHEx3vC48lIAoyjhffvfHmErRDboUPC7p9Z2il4CLb7qxA==
- dependencies:
- "@typescript-eslint/types" "4.15.0"
- eslint-visitor-keys "^2.0.0"
+ semver "^7.3.5"
+ tsutils "^3.21.0"
"@typescript-eslint/visitor-keys@4.26.0":
version "4.26.0"
@@ -2209,21 +2272,29 @@
"@typescript-eslint/types" "4.26.0"
eslint-visitor-keys "^2.0.0"
+"@typescript-eslint/visitor-keys@4.27.0":
+ version "4.27.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.27.0.tgz#f56138b993ec822793e7ebcfac6ffdce0a60cb81"
+ integrity sha512-es0GRYNZp0ieckZ938cEANfEhsfHrzuLrePukLKtY3/KPXcq1Xd555Mno9/GOgXhKzn0QfkDLVgqWO3dGY80bg==
+ dependencies:
+ "@typescript-eslint/types" "4.27.0"
+ eslint-visitor-keys "^2.0.0"
+
"@ungap/promise-all-settled@1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==
"@vue/component-compiler-utils@^3.2.0":
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-3.2.0.tgz#8f85182ceed28e9b3c75313de669f83166d11e5d"
- integrity sha512-lejBLa7xAMsfiZfNp7Kv51zOzifnb29FwdnMLa96z26kXErPFioSf9BMcePVIQ6/Gc6/mC0UrPpxAWIHyae0vw==
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-3.2.2.tgz#2f7ed5feed82ff7f0284acc11d525ee7eff22460"
+ integrity sha512-rAYMLmgMuqJFWAOb3Awjqqv5X3Q3hVr4jH/kgrFJpiU0j3a90tnNBplqbj+snzrgZhC9W128z+dtgMifOiMfJg==
dependencies:
consolidate "^0.15.1"
hash-sum "^1.0.2"
lru-cache "^4.1.2"
merge-source-map "^1.1.0"
- postcss "^7.0.14"
+ postcss "^7.0.36"
postcss-selector-parser "^6.0.2"
source-map "~0.6.1"
vue-template-es2015-compiler "^1.9.0"
@@ -2235,6 +2306,14 @@
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==
+accepts@~1.3.7:
+ version "1.3.7"
+ resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
+ integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
+ dependencies:
+ mime-types "~2.1.24"
+ negotiator "0.6.2"
+
acorn-globals@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45"
@@ -2259,9 +2338,9 @@
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
acorn@^8.2.4:
- version "8.3.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.3.0.tgz#1193f9b96c4e8232f00b11a9edff81b2c8b98b88"
- integrity sha512-tqPKHZ5CaBJw0Xmy0ZZvLs1qTV+BNFSyvn77ASXkpBNfIRk8ev26fKrD9iLGwGA9zedPao52GSHzq8lyZG0NUw==
+ version "8.4.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.0.tgz#af53266e698d7cffa416714b503066a82221be60"
+ integrity sha512-ULr0LDaEqQrMFGyQ3bhJkLsbtrQ8QibAseGZeaSUiT/6zb9IvIkomWHJIvgvwad+hinRAgsI51JcWk2yvwyL+w==
agent-base@6:
version "6.0.2"
@@ -2303,11 +2382,11 @@
integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
ansi-escapes@^4.2.1:
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61"
- integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
+ version "4.3.2"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
+ integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==
dependencies:
- type-fest "^0.11.0"
+ type-fest "^0.21.3"
ansi-regex@^2.0.0:
version "2.1.1"
@@ -2329,7 +2408,7 @@
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
-ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
@@ -2356,10 +2435,10 @@
micromatch "^3.1.4"
normalize-path "^2.1.1"
-anymatch@^3.0.3, anymatch@~3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
- integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
+anymatch@^3.0.3, anymatch@~3.1.1, anymatch@~3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
+ integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
@@ -2400,6 +2479,11 @@
dependencies:
sprintf-js "~1.0.2"
+argparse@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
+
arr-diff@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
@@ -2415,18 +2499,12 @@
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
-array-includes@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.2.tgz#a8db03e0b88c8c6aeddc49cb132f9bcab4ebf9c8"
- integrity sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==
- dependencies:
- call-bind "^1.0.0"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.1"
- get-intrinsic "^1.0.1"
- is-string "^1.0.5"
+array-flatten@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
+ integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
-array-includes@^3.1.3:
+array-includes@^3.1.2, array-includes@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a"
integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==
@@ -2478,6 +2556,16 @@
es-abstract "^1.18.0-next.1"
function-bind "^1.1.1"
+asn1.js@^5.2.0:
+ version "5.4.1"
+ resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07"
+ integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==
+ dependencies:
+ bn.js "^4.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+ safer-buffer "^2.1.0"
+
asn1@~0.2.3:
version "0.2.4"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
@@ -2515,6 +2603,11 @@
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf"
integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==
+async-limiter@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
+ integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==
+
async@^2.6.1:
version "2.6.3"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
@@ -2537,6 +2630,11 @@
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+available-typed-arrays@^1.0.2:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9"
+ integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA==
+
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
@@ -2615,12 +2713,12 @@
semver "^6.1.1"
babel-plugin-polyfill-corejs3@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.2.tgz#7424a1682ee44baec817327710b1b094e5f8f7f5"
- integrity sha512-l1Cf8PKk12eEk5QP/NQ6TH8A1pee6wWDJ96WjxrMXFLHLOBFzYM4moG80HFgduVhTqAFez4alnZKEhP/bYHg0A==
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.3.tgz#72add68cf08a8bf139ba6e6dfc0b1d504098e57b"
+ integrity sha512-rCOFzEIJpJEAU14XCcV/erIf/wZQMmMT5l5vXOpL5uoznyOGfDIjPj6FVytMvtzaKSTSVKouOCTPJ5OMUZH30g==
dependencies:
"@babel/helper-define-polyfill-provider" "^0.2.2"
- core-js-compat "^3.9.1"
+ core-js-compat "^3.14.0"
babel-plugin-polyfill-regenerator@^0.2.2:
version "0.2.2"
@@ -2671,11 +2769,11 @@
babel-preset-current-node-syntax "^1.0.0"
balanced-match@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
- integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
-base-x@^3.0.8:
+base-x@^3.0.2, base-x@^3.0.8:
version "3.0.8"
resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d"
integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==
@@ -2707,12 +2805,12 @@
dependencies:
tweetnacl "^0.14.3"
-before-after-hook@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.1.tgz#99ae36992b5cfab4a83f6bee74ab27835f28f405"
- integrity sha512-5ekuQOvO04MDj7kYZJaMab2S8SPjGJbotVNyv7QYFCOAwrGZs/YnoDNlh1U+m5hl7H2D/+n0taaAV/tfyd3KMA==
+before-after-hook@^2.2.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e"
+ integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==
-bignumber.js@^9.0.0:
+bignumber.js@^9.0.0, bignumber.js@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5"
integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==
@@ -2727,7 +2825,7 @@
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
-bl@^4.0.3, bl@^4.1.0:
+bl@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==
@@ -2741,20 +2839,46 @@
resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5"
integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U=
-bluebird@^3.1.1:
+bluebird@^3.1.1, bluebird@^3.5.0:
version "3.7.2"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
-bn.js@^4.11.9:
- version "4.11.9"
- resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828"
- integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==
+bn.js@4.11.6:
+ version "4.11.6"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215"
+ integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU=
+
+bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.9:
+ version "4.12.0"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
+ integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==
+
+bn.js@^5.0.0, bn.js@^5.1.1:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002"
+ integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==
+
+body-parser@1.19.0, body-parser@^1.16.0:
+ version "1.19.0"
+ resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
+ integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==
+ dependencies:
+ bytes "3.1.0"
+ content-type "~1.0.4"
+ debug "2.6.9"
+ depd "~1.1.2"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ on-finished "~2.3.0"
+ qs "6.7.0"
+ raw-body "2.4.0"
+ type-is "~1.6.17"
boxen@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.0.tgz#64fe9b16066af815f51057adcc800c3730120854"
- integrity sha512-5bvsqw+hhgUi3oYGK0Vf4WpIkyemp60WBInn7+WNfoISzAqk/HX4L7WNROq38E6UR/y3YADpv6pEm4BfkeEAdA==
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.1.tgz#657528bdd3f59a772b8279b831f27ec2c744664b"
+ integrity sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA==
dependencies:
ansi-align "^3.0.0"
camelcase "^6.2.0"
@@ -2796,7 +2920,7 @@
dependencies:
fill-range "^7.0.1"
-brorand@^1.1.0:
+brorand@^1.0.1, brorand@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
@@ -2811,6 +2935,60 @@
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
+browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48"
+ integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==
+ dependencies:
+ buffer-xor "^1.0.3"
+ cipher-base "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.3"
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+browserify-cipher@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0"
+ integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==
+ dependencies:
+ browserify-aes "^1.0.4"
+ browserify-des "^1.0.0"
+ evp_bytestokey "^1.0.0"
+
+browserify-des@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c"
+ integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==
+ dependencies:
+ cipher-base "^1.0.1"
+ des.js "^1.0.0"
+ inherits "^2.0.1"
+ safe-buffer "^5.1.2"
+
+browserify-rsa@^4.0.0, browserify-rsa@^4.0.1:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d"
+ integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==
+ dependencies:
+ bn.js "^5.0.0"
+ randombytes "^2.0.1"
+
+browserify-sign@^4.0.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3"
+ integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==
+ dependencies:
+ bn.js "^5.1.1"
+ browserify-rsa "^4.0.1"
+ create-hash "^1.2.0"
+ create-hmac "^1.1.7"
+ elliptic "^6.5.3"
+ inherits "^2.0.4"
+ parse-asn1 "^5.1.5"
+ readable-stream "^3.6.0"
+ safe-buffer "^5.2.0"
+
browserslist@^4.16.6:
version "4.16.6"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2"
@@ -2822,6 +3000,22 @@
escalade "^3.1.1"
node-releases "^1.1.71"
+bs58@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a"
+ integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo=
+ dependencies:
+ base-x "^3.0.2"
+
+bs58check@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc"
+ integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==
+ dependencies:
+ bs58 "^4.0.0"
+ create-hash "^1.1.0"
+ safe-buffer "^5.1.2"
+
bser@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05"
@@ -2834,7 +3028,17 @@
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
-buffer@^5.5.0:
+buffer-to-arraybuffer@^0.0.5:
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a"
+ integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=
+
+buffer-xor@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
+ integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=
+
+buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
@@ -2854,6 +3058,11 @@
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=
+bytes@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
+ integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
+
cache-base@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
@@ -2895,7 +3104,7 @@
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
-camelcase@^5.0.0, camelcase@^5.3.1:
+camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
@@ -2906,9 +3115,9 @@
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
caniuse-lite@^1.0.30001219:
- version "1.0.30001236"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001236.tgz#0a80de4cdf62e1770bb46a30d884fc8d633e3958"
- integrity sha512-o0PRQSrSCGJKCPZcgMzl5fUaj5xHe8qA2m4QRvnyY4e1lITqoNkr7q/Oh1NcpGSy0Th97UZ35yoKcINPoq7YOQ==
+ version "1.0.30001238"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001238.tgz#e6a8b45455c5de601718736d0242feef0ecdda15"
+ integrity sha512-bZGam2MxEt7YNsa2VwshqWQMwrYs5tR5WZQRYSuFxsBQunWjBuXhN4cS9nV5FFb1Z9y+DoQcQ0COyQbv6A+CKw==
caseless@~0.12.0:
version "0.12.0"
@@ -2922,16 +3131,16 @@
dependencies:
check-error "^1.0.2"
-chai@^4.2.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.0.tgz#5523a5faf7f819c8a92480d70a8cccbadacfc25f"
- integrity sha512-/BFd2J30EcOwmdOgXvVsmM48l0Br0nmZPlO0uOW4XKh6kpsUumRXBgPV+IlaqFaqr9cYbeoZAM1Npx0i4A+aiA==
+chai@^4.3.4:
+ version "4.3.4"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49"
+ integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==
dependencies:
assertion-error "^1.1.0"
check-error "^1.0.2"
deep-eql "^3.0.1"
get-func-name "^2.0.0"
- pathval "^1.1.0"
+ pathval "^1.1.1"
type-detect "^4.0.5"
chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.2:
@@ -2951,15 +3160,7 @@
ansi-styles "^4.1.0"
supports-color "^7.1.0"
-chalk@^4.0.0, chalk@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
- integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
- dependencies:
- ansi-styles "^4.1.0"
- supports-color "^7.1.0"
-
-chalk@^4.1.1:
+chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad"
integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==
@@ -2990,10 +3191,10 @@
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=
-chokidar@3.4.3:
- version "3.4.3"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b"
- integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==
+chokidar@3.5.1:
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
+ integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==
dependencies:
anymatch "~3.1.1"
braces "~3.0.2"
@@ -3003,23 +3204,28 @@
normalize-path "~3.0.0"
readdirp "~3.5.0"
optionalDependencies:
- fsevents "~2.1.2"
+ fsevents "~2.3.1"
chokidar@^3.4.0:
- version "3.5.1"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
- integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75"
+ integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==
dependencies:
- anymatch "~3.1.1"
+ anymatch "~3.1.2"
braces "~3.0.2"
- glob-parent "~5.1.0"
+ glob-parent "~5.1.2"
is-binary-path "~2.1.0"
is-glob "~4.0.1"
normalize-path "~3.0.0"
- readdirp "~3.5.0"
+ readdirp "~3.6.0"
optionalDependencies:
- fsevents "~2.3.1"
+ fsevents "~2.3.2"
+chownr@^1.1.1:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
+ integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
+
ci-info@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
@@ -3030,7 +3236,18 @@
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6"
integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==
-cipher-base@^1.0.1:
+cids@^0.7.1:
+ version "0.7.5"
+ resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2"
+ integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==
+ dependencies:
+ buffer "^5.5.0"
+ class-is "^1.1.0"
+ multibase "~0.6.0"
+ multicodec "^1.0.0"
+ multihashes "~0.4.15"
+
+cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==
@@ -3043,6 +3260,11 @@
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.1.tgz#2fd46d9906a126965aa541345c499aaa18e8cd73"
integrity sha512-jVamGdJPDeuQilKhvVn1h3knuMOZzr8QDnpk+M9aMlCaMkTDd6fBWPhiDqFvFZ07pL0liqabAiuy8SY4jGHeaw==
+class-is@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825"
+ integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==
+
class-utils@^0.3.5:
version "0.3.6"
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@@ -3066,23 +3288,14 @@
restore-cursor "^3.1.0"
cli-spinners@^2.2.0, cli-spinners@^2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047"
- integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.0.tgz#36c7dc98fb6a9a76bd6238ec3f77e2425627e939"
+ integrity sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==
cli-width@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==
-
-cliui@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
- integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==
- dependencies:
- string-width "^3.1.0"
- strip-ansi "^5.2.0"
- wrap-ansi "^5.1.0"
cliui@^7.0.2:
version "7.0.4"
@@ -3161,11 +3374,6 @@
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
-colorette@^1.2.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
- integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==
-
colorette@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
@@ -3232,6 +3440,27 @@
dependencies:
bluebird "^3.1.1"
+content-disposition@0.5.3:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
+ integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
+ dependencies:
+ safe-buffer "5.1.2"
+
+content-hash@^2.5.2:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211"
+ integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==
+ dependencies:
+ cids "^0.7.1"
+ multicodec "^0.5.5"
+ multihashes "^0.4.15"
+
+content-type@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
+ integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
+
convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
@@ -3239,12 +3468,27 @@
dependencies:
safe-buffer "~5.1.1"
+cookie-signature@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
+ integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
+
+cookie@0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
+ integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
+
+cookiejar@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c"
+ integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==
+
copy-descriptor@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
-core-js-compat@^3.14.0, core-js-compat@^3.9.1:
+core-js-compat@^3.14.0:
version "3.14.0"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.14.0.tgz#b574dabf29184681d5b16357bd33d104df3d29a5"
integrity sha512-R4NS2eupxtiJU+VwgkF9WTpnSfZW4pogwKHd8bclWU2sp93Pr5S1uYJI84cMOubJRou7bcfL0vmwtLslWN5p3A==
@@ -3257,6 +3501,14 @@
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+cors@^2.8.1:
+ version "2.8.5"
+ resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29"
+ integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==
+ dependencies:
+ object-assign "^4"
+ vary "^1"
+
coveralls@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b"
@@ -3268,7 +3520,15 @@
minimist "^1.2.5"
request "^2.88.2"
-create-hash@^1.2.0:
+create-ecdh@^4.0.0:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e"
+ integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==
+ dependencies:
+ bn.js "^4.1.0"
+ elliptic "^6.5.3"
+
+create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==
@@ -3279,6 +3539,18 @@
ripemd160 "^2.0.1"
sha.js "^2.4.0"
+create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff"
+ integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==
+ dependencies:
+ cipher-base "^1.0.3"
+ create-hash "^1.1.0"
+ inherits "^2.0.1"
+ ripemd160 "^2.0.0"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
create-require@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
@@ -3293,6 +3565,23 @@
shebang-command "^2.0.0"
which "^2.0.1"
+crypto-browserify@3.12.0:
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
+ integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==
+ dependencies:
+ browserify-cipher "^1.0.0"
+ browserify-sign "^4.0.0"
+ create-ecdh "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.0"
+ diffie-hellman "^5.0.0"
+ inherits "^2.0.1"
+ pbkdf2 "^3.0.3"
+ public-encrypt "^4.0.0"
+ randombytes "^2.0.0"
+ randomfill "^1.0.3"
+
crypto-random-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
@@ -3349,26 +3638,19 @@
whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0"
-debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
+debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+debug@4, debug@4.3.1, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
- dependencies:
- ms "2.1.2"
-
-debug@4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1"
- integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==
dependencies:
ms "2.1.2"
-
-debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
- version "2.6.9"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
- integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
- dependencies:
- ms "2.0.0"
debug@^3.2.7:
version "3.2.7"
@@ -3377,11 +3659,6 @@
dependencies:
ms "^2.1.1"
-decamelize@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
- integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
-
decamelize@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837"
@@ -3398,13 +3675,13 @@
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
decomment@^0.9.3:
- version "0.9.3"
- resolved "https://registry.yarnpkg.com/decomment/-/decomment-0.9.3.tgz#b913f32e5fe1113848f516caa5c7afefa9544d38"
- integrity sha512-5skH5BfUL3n09RDmMVaHS1QGCiZRnl2nArUwmsE9JRY93Ueh3tihYl5wIrDdAuXnoFhxVis/DmRWREO2c6DG3w==
+ version "0.9.4"
+ resolved "https://registry.yarnpkg.com/decomment/-/decomment-0.9.4.tgz#fa40335bd90e3826d5c1984276e390525ff856d5"
+ integrity sha512-8eNlhyI5cSU4UbBlrtagWpR03dqXcE5IR9zpe7PnO6UzReXDskucsD8usgrzUmQ6qJ3N82aws/p/mu/jqbURWw==
dependencies:
esprima "4.0.1"
-decompress-response@^3.3.0:
+decompress-response@^3.2.0, decompress-response@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
@@ -3491,15 +3768,20 @@
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
+depd@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
+ integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
+
dependency-tree@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/dependency-tree/-/dependency-tree-8.0.0.tgz#59d141bcb53ca59f54e7f7b94013820ddd49b7d7"
- integrity sha512-zagnV3jgizudEWY3FIFkGCrRr3+GukSMLlw1snIWAOL2beceC22hBXdeNjCnnfPZvbHIPB9DvacSCfD+IoOG3w==
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/dependency-tree/-/dependency-tree-8.1.1.tgz#1a309f5a860b3285f7b1638c98ce48c8906ae6e6"
+ integrity sha512-bl5U16VQpaYxD0xvcnCH/dTctCiWnsVWymh9dNjbm4T00Hm21flu1VLnNueKCj7+3uusbcJhKKKtiWrpU0I+Nw==
dependencies:
commander "^2.20.3"
debug "^4.3.1"
filing-cabinet "^3.0.0"
- precinct "^7.0.0"
+ precinct "^8.0.0"
typescript "^3.9.7"
deprecation@^2.0.0, deprecation@^2.3.1:
@@ -3507,10 +3789,23 @@
resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919"
integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==
+des.js@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843"
+ integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==
+ dependencies:
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+destroy@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
+ integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
+
detect-indent@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd"
- integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA==
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6"
+ integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==
detect-newline@^3.0.0:
version "3.1.0"
@@ -3518,12 +3813,12 @@
integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==
detective-amd@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/detective-amd/-/detective-amd-3.0.1.tgz#aca8eddb1f405821953faf4a893d9b9e0430b09e"
- integrity sha512-vJgluSKkPyo+/McW9hzwmZwY1VPA3BS0VS1agdpPAWAhr65HwC1ox4Ig82rVfGYDYCa4GcKQON5JWBk++2Kf1Q==
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/detective-amd/-/detective-amd-3.1.0.tgz#92daee3214a0ca4522646cf333cac90a3fca6373"
+ integrity sha512-G7wGWT6f0VErjUkE2utCm7IUshT7nBh7aBBH2VBOiY9Dqy2DMens5iiOvYCuhstoIxRKLrnOvVAz4/EyPIAjnw==
dependencies:
ast-module-types "^2.7.0"
- escodegen "^1.8.0"
+ escodegen "^2.0.0"
get-amd-module-type "^3.0.0"
node-source-walk "^4.0.0"
@@ -3609,11 +3904,25 @@
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.1.tgz#9c9801d52ed5f576ff0a20e3022a13ee6e297e7c"
integrity sha512-XPLijkfJUh/PIBnfkcSHgvD6tlYixmcMAn3osTk6jt+H0v/mgURto1XUiD9DKuGX5NDoVS6dSlA23gd9FUaCFg==
-diff@4.0.2, diff@^4.0.1:
+diff@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b"
+ integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==
+
+diff@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
+diffie-hellman@^5.0.0:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
+ integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==
+ dependencies:
+ bn.js "^4.1.0"
+ miller-rabin "^4.0.0"
+ randombytes "^2.0.0"
+
dir-glob@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
@@ -3635,6 +3944,11 @@
dependencies:
esutils "^2.0.2"
+dom-walk@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84"
+ integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==
+
domexception@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304"
@@ -3672,12 +3986,17 @@
jsbn "~0.1.0"
safer-buffer "^2.1.0"
+ee-first@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+ integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
+
electron-to-chromium@^1.3.723:
version "1.3.752"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz#0728587f1b9b970ec9ffad932496429aef750d09"
integrity sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A==
-elliptic@^6.5.4:
+elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4:
version "6.5.4"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
@@ -3710,6 +4029,11 @@
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+encodeurl@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
+ integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
+
end-of-stream@^1.1.0, end-of-stream@^1.4.1:
version "1.4.4"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
@@ -3718,9 +4042,9 @@
once "^1.4.0"
enhanced-resolve@^5.3.2:
- version "5.7.0"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz#525c5d856680fbd5052de453ac83e32049958b5c"
- integrity sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==
+ version "5.8.2"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz#15ddc779345cbb73e97c611cd00c01c1e7bf4d8b"
+ integrity sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==
dependencies:
graceful-fs "^4.2.4"
tapable "^2.2.0"
@@ -3739,27 +4063,7 @@
dependencies:
is-arrayish "^0.2.1"
-es-abstract@^1.18.0-next.1:
- version "1.18.0-next.2"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.2.tgz#088101a55f0541f595e7e057199e27ddc8f3a5c2"
- integrity sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==
- dependencies:
- call-bind "^1.0.2"
- es-to-primitive "^1.2.1"
- function-bind "^1.1.1"
- get-intrinsic "^1.0.2"
- has "^1.0.3"
- has-symbols "^1.0.1"
- is-callable "^1.2.2"
- is-negative-zero "^2.0.1"
- is-regex "^1.1.1"
- object-inspect "^1.9.0"
- object-keys "^1.1.1"
- object.assign "^4.1.2"
- string.prototype.trimend "^1.0.3"
- string.prototype.trimstart "^1.0.3"
-
-es-abstract@^1.18.0-next.2, es-abstract@^1.18.2:
+es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2:
version "1.18.3"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0"
integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==
@@ -3826,6 +4130,11 @@
resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675"
integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
+escape-html@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
+ integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
+
escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
@@ -3840,18 +4149,6 @@
version "2.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
-
-escodegen@^1.8.0:
- version "1.14.3"
- resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503"
- integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==
- dependencies:
- esprima "^4.0.1"
- estraverse "^4.2.0"
- esutils "^2.0.2"
- optionator "^0.8.1"
- optionalDependencies:
- source-map "~0.6.1"
escodegen@^2.0.0:
version "2.0.0"
@@ -4000,9 +4297,9 @@
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
eslint-visitor-keys@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
- integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
+ integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
eslint@^7.27.0:
version "7.28.0"
@@ -4077,7 +4374,7 @@
dependencies:
estraverse "^5.2.0"
-estraverse@^4.1.1, estraverse@^4.2.0:
+estraverse@^4.1.1:
version "4.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
@@ -4092,11 +4389,128 @@
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
+etag@~1.8.1:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
+ integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
+
+eth-ens-namehash@2.0.8:
+ version "2.0.8"
+ resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf"
+ integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88=
+ dependencies:
+ idna-uts46-hx "^2.3.1"
+ js-sha3 "^0.5.7"
+
+eth-lib@0.2.8:
+ version "0.2.8"
+ resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8"
+ integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==
+ dependencies:
+ bn.js "^4.11.6"
+ elliptic "^6.4.0"
+ xhr-request-promise "^0.1.2"
+
+eth-lib@^0.1.26:
+ version "0.1.29"
+ resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9"
+ integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==
+ dependencies:
+ bn.js "^4.11.6"
+ elliptic "^6.4.0"
+ nano-json-stream-parser "^0.1.2"
+ servify "^0.1.12"
+ ws "^3.0.0"
+ xhr-request-promise "^0.1.2"
+
+ethereum-bloom-filters@^1.0.6:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a"
+ integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==
+ dependencies:
+ js-sha3 "^0.8.0"
+
+ethereum-cryptography@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191"
+ integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==
+ dependencies:
+ "@types/pbkdf2" "^3.0.0"
+ "@types/secp256k1" "^4.0.1"
+ blakejs "^1.1.0"
+ browserify-aes "^1.2.0"
+ bs58check "^2.1.2"
+ create-hash "^1.2.0"
+ create-hmac "^1.1.7"
+ hash.js "^1.1.7"
+ keccak "^3.0.0"
+ pbkdf2 "^3.0.17"
+ randombytes "^2.1.0"
+ safe-buffer "^5.1.2"
+ scrypt-js "^3.0.0"
+ secp256k1 "^4.0.1"
+ setimmediate "^1.0.5"
+
+ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979"
+ integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==
+
+ethereumjs-tx@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed"
+ integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==
+ dependencies:
+ ethereumjs-common "^1.5.0"
+ ethereumjs-util "^6.0.0"
+
+ethereumjs-util@^6.0.0:
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69"
+ integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==
+ dependencies:
+ "@types/bn.js" "^4.11.3"
+ bn.js "^4.11.0"
+ create-hash "^1.1.2"
+ elliptic "^6.5.2"
+ ethereum-cryptography "^0.1.3"
+ ethjs-util "0.1.6"
+ rlp "^2.2.3"
+
+ethjs-unit@0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699"
+ integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=
+ dependencies:
+ bn.js "4.11.6"
+ number-to-bn "1.7.0"
+
+ethjs-util@0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536"
+ integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==
+ dependencies:
+ is-hex-prefixed "1.0.0"
+ strip-hex-prefix "1.0.0"
+
+eventemitter3@4.0.4:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384"
+ integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==
+
eventemitter3@^4.0.7:
version "4.0.7"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
+evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02"
+ integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==
+ dependencies:
+ md5.js "^1.3.4"
+ safe-buffer "^5.1.1"
+
execa@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
@@ -4142,6 +4556,42 @@
jest-message-util "^27.0.2"
jest-regex-util "^27.0.1"
+express@^4.14.0:
+ version "4.17.1"
+ resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
+ integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
+ dependencies:
+ accepts "~1.3.7"
+ array-flatten "1.1.1"
+ body-parser "1.19.0"
+ content-disposition "0.5.3"
+ content-type "~1.0.4"
+ cookie "0.4.0"
+ cookie-signature "1.0.6"
+ debug "2.6.9"
+ depd "~1.1.2"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ finalhandler "~1.1.2"
+ fresh "0.5.2"
+ merge-descriptors "1.0.1"
+ methods "~1.1.2"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ path-to-regexp "0.1.7"
+ proxy-addr "~2.0.5"
+ qs "6.7.0"
+ range-parser "~1.2.1"
+ safe-buffer "5.1.2"
+ send "0.17.1"
+ serve-static "1.14.1"
+ setprototypeof "1.1.1"
+ statuses "~1.5.0"
+ type-is "~1.6.18"
+ utils-merge "1.0.1"
+ vary "~1.1.2"
+
ext@^1.1.2:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244"
@@ -4230,9 +4680,9 @@
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
fastq@^1.6.0:
- version "1.10.1"
- resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.1.tgz#8b8f2ac8bf3632d67afcd65dac248d5fdc45385e"
- integrity sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA==
+ version "1.11.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858"
+ integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==
dependencies:
reusify "^1.0.4"
@@ -4315,6 +4765,19 @@
dependencies:
to-regex-range "^5.0.1"
+finalhandler@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
+ integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==
+ dependencies:
+ debug "2.6.9"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ statuses "~1.5.0"
+ unpipe "~1.0.0"
+
find-babel-config@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.2.0.tgz#a9b7b317eb5b9860cda9d54740a8c8337a2283a2"
@@ -4404,15 +4867,20 @@
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
+foreach@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
+ integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k=
+
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
form-data@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682"
- integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f"
+ integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
@@ -4427,6 +4895,11 @@
combined-stream "^1.0.6"
mime-types "^2.1.12"
+forwarded@0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
+ integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
+
fragment-cache@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
@@ -4434,6 +4907,11 @@
dependencies:
map-cache "^0.2.2"
+fresh@0.5.2:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
+ integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
+
fs-extra@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1"
@@ -4443,6 +4921,15 @@
jsonfile "^6.0.1"
universalify "^2.0.0"
+fs-extra@^4.0.2:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
+ integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
fs-extra@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
@@ -4452,6 +4939,13 @@
jsonfile "^4.0.0"
universalify "^0.1.0"
+fs-minipass@^1.2.5:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
+ integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
+ dependencies:
+ minipass "^2.6.0"
+
fs-readdir-recursive@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27"
@@ -4462,16 +4956,11 @@
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
-fsevents@^2.3.2, fsevents@~2.3.1:
+fsevents@^2.3.2, fsevents@~2.3.1, fsevents@~2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
-fsevents@~2.1.2:
- version "2.1.3"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
- integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
-
function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
@@ -4496,7 +4985,7 @@
strip-ansi "^3.0.1"
wide-align "^1.1.0"
-gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
+gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
@@ -4509,7 +4998,7 @@
ast-module-types "^2.3.2"
node-source-walk "^4.0.0"
-get-caller-file@^2.0.1, get-caller-file@^2.0.5:
+get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
@@ -4519,7 +5008,7 @@
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=
-get-intrinsic@^1.0.1, get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1:
+get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6"
integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==
@@ -4538,6 +5027,11 @@
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
+get-stream@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
+ integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
+
get-stream@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
@@ -4570,9 +5064,9 @@
assert-plus "^1.0.0"
gh-pages@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-3.2.0.tgz#ac5f9f03dae7622740ff39613ee2cfeacabc680b"
- integrity sha512-VQTwyRtxoaId0YmDXdC/G854dojpwTuOdpZUL3PGG6WQZvSoGVD8ggedKARZltixIREMezoDywE+g3g2paLxPw==
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-3.2.2.tgz#3177ef792f8cfcd6872c252c3482910d88b46bbb"
+ integrity sha512-szdkmGpVqMBUZkjgsEXQm5wkLvx/XNvWf3HzL+2ETpLtpaXvSvIzpNgLiiojDzxmbFDf3M5CFK7p/3eYi8U83A==
dependencies:
async "^2.6.1"
commander "^2.18.0"
@@ -4623,20 +5117,13 @@
read "^1.0.7"
github-url-to-object@^4.0.4:
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/github-url-to-object/-/github-url-to-object-4.0.4.tgz#a9797b7026e18d53b50b07f45b7e169b55fd90ee"
- integrity sha512-1Ri1pR8XTfzLpbtPz5MlW/amGNdNReuExPsbF9rxLsBfO1GH9RtDBamhJikd0knMWq3RTTQDbTtw0GGvvEAJEA==
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/github-url-to-object/-/github-url-to-object-4.0.6.tgz#5ea8701dc8c336b8d582dc3fa5bf964165c3b365"
+ integrity sha512-NaqbYHMUAlPcmWFdrAB7bcxrNIiiJWJe8s/2+iOc9vlcHlwHqSGrPk+Yi3nu6ebTwgsZEa7igz+NH2vEq3gYwQ==
dependencies:
is-url "^1.1.0"
-glob-parent@^5.1.0, glob-parent@~5.1.0:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
- integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
- dependencies:
- is-glob "^4.0.1"
-
-glob-parent@^5.1.2:
+glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -4650,7 +5137,7 @@
dependencies:
find-index "^0.1.1"
-glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
+glob@7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
@@ -4662,7 +5149,7 @@
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@^7.1.7:
+glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7:
version "7.1.7"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
@@ -4681,6 +5168,14 @@
dependencies:
ini "2.0.0"
+global@~4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406"
+ integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==
+ dependencies:
+ min-document "^2.19.0"
+ process "^0.11.10"
+
globals@^11.1.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
@@ -4692,23 +5187,11 @@
integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==
dependencies:
type-fest "^0.20.2"
-
-globby@^11.0.1:
- version "11.0.2"
- resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83"
- integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==
- dependencies:
- array-union "^2.1.0"
- dir-glob "^3.0.1"
- fast-glob "^3.1.1"
- ignore "^5.1.4"
- merge2 "^1.3.0"
- slash "^3.0.0"
globby@^11.0.3:
- version "11.0.3"
- resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb"
- integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==
+ version "11.0.4"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5"
+ integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==
dependencies:
array-union "^2.1.0"
dir-glob "^3.0.1"
@@ -4735,7 +5218,7 @@
dependencies:
minimist "^1.2.5"
-got@^9.6.0:
+got@9.6.0, got@^9.6.0:
version "9.6.0"
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
@@ -4752,6 +5235,26 @@
to-readable-stream "^1.0.0"
url-parse-lax "^3.0.0"
+got@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a"
+ integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==
+ dependencies:
+ decompress-response "^3.2.0"
+ duplexer3 "^0.1.4"
+ get-stream "^3.0.0"
+ is-plain-obj "^1.1.0"
+ is-retry-allowed "^1.0.0"
+ is-stream "^1.0.0"
+ isurl "^1.0.0-alpha5"
+ lowercase-keys "^1.0.0"
+ p-cancelable "^0.3.0"
+ p-timeout "^1.1.1"
+ safe-buffer "^5.0.1"
+ timed-out "^4.0.0"
+ url-parse-lax "^1.0.0"
+ url-to-options "^1.0.1"
+
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4:
version "4.2.6"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
@@ -4809,16 +5312,23 @@
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
-has-symbols@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
- integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
+has-symbol-support-x@^1.4.1:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"
+ integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==
-has-symbols@^1.0.2:
+has-symbols@^1.0.1, has-symbols@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423"
integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==
+has-to-string-tag-x@^1.2.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d"
+ integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==
+ dependencies:
+ has-symbol-support-x "^1.4.1"
+
has-unicode@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
@@ -4881,7 +5391,7 @@
resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04"
integrity sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=
-hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7:
+hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42"
integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==
@@ -4904,9 +5414,9 @@
minimalistic-crypto-utils "^1.0.1"
hosted-git-info@^2.1.4:
- version "2.8.8"
- resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
- integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
+ version "2.8.9"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
+ integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==
html-encoding-sniffer@^2.0.1:
version "2.0.1"
@@ -4925,6 +5435,33 @@
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
+http-errors@1.7.2:
+ version "1.7.2"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
+ integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.3"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+http-errors@~1.7.2:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
+ integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.4"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+http-https@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b"
+ integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=
+
http-proxy-agent@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a"
@@ -4971,6 +5508,13 @@
dependencies:
safer-buffer ">= 2.1.2 < 3"
+idna-uts46-hx@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9"
+ integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==
+ dependencies:
+ punycode "2.1.0"
+
ieee754@^1.1.13:
version "1.2.1"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
@@ -5025,11 +5569,16 @@
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
+inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+inherits@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+ integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
+
ini@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5"
@@ -5041,9 +5590,9 @@
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
inquirer@^8.0.0:
- version "8.1.0"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.0.tgz#68ce5ce5376cf0e89765c993d8b7c1e62e184d69"
- integrity sha512-1nKYPoalt1vMBfCMtpomsUc32wmOoWXAoq3kM/5iTfxyQ2f/BxjixQpC+mbZ7BI0JUXHED4/XPXekDVtJNpXYw==
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.1.tgz#7c53d94c6d03011c7bb2a947f0dca3b98246c26a"
+ integrity sha512-hUDjc3vBkh/uk1gPfMAD/7Z188Q8cvTGl0nxwaCdwSbzFh6ZKkZh+s2ozVxbE5G9ZNRyeY0+lgbAIOUFsFf98w==
dependencies:
ansi-escapes "^4.2.1"
chalk "^4.1.1"
@@ -5079,6 +5628,11 @@
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5"
integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==
+ipaddr.js@1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
+ integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
+
is-accessor-descriptor@^0.1.6:
version "0.1.6"
resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
@@ -5093,6 +5647,13 @@
dependencies:
kind-of "^6.0.0"
+is-arguments@^1.0.4:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9"
+ integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==
+ dependencies:
+ call-bind "^1.0.0"
+
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@@ -5129,7 +5690,7 @@
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-is-callable@^1.1.4, is-callable@^1.2.2, is-callable@^1.2.3:
+is-callable@^1.1.4, is-callable@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e"
integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==
@@ -5148,14 +5709,7 @@
dependencies:
ci-info "^3.1.1"
-is-core-module@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
- integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
- dependencies:
- has "^1.0.3"
-
-is-core-module@^2.4.0:
+is-core-module@^2.2.0, is-core-module@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1"
integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==
@@ -5177,9 +5731,9 @@
kind-of "^6.0.0"
is-date-object@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e"
- integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5"
+ integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==
is-descriptor@^0.1.0:
version "0.1.6"
@@ -5233,11 +5787,21 @@
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+is-function@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08"
+ integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==
+
is-generator-fn@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"
integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==
+is-generator-function@^1.0.7:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c"
+ integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==
+
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
@@ -5245,6 +5809,11 @@
dependencies:
is-extglob "^2.1.1"
+is-hex-prefixed@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554"
+ integrity sha1-fY035q135dEnFIkTxXPggtd39VQ=
+
is-installed-globally@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520"
@@ -5295,12 +5864,17 @@
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
+is-object@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf"
+ integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==
+
is-path-inside@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017"
- integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
+ integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
-is-plain-obj@^1.0.0:
+is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
@@ -5326,14 +5900,6 @@
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
-
-is-regex@^1.1.1:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251"
- integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==
- dependencies:
- call-bind "^1.0.2"
- has-symbols "^1.0.1"
is-regex@^1.1.3:
version "1.1.3"
@@ -5353,35 +5919,44 @@
resolved "https://registry.yarnpkg.com/is-relative-path/-/is-relative-path-1.0.2.tgz#091b46a0d67c1ed0fe85f1f8cfdde006bb251d46"
integrity sha1-CRtGoNZ8HtD+hfH4z93gBrslHUY=
+is-retry-allowed@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4"
+ integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==
+
+is-stream@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+ integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+
is-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
-is-string@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6"
- integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==
-
-is-string@^1.0.6:
+is-string@^1.0.5, is-string@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f"
integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==
-is-symbol@^1.0.2:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
- integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==
- dependencies:
- has-symbols "^1.0.1"
-
-is-symbol@^1.0.3:
+is-symbol@^1.0.2, is-symbol@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c"
integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==
dependencies:
has-symbols "^1.0.2"
+is-typed-array@^1.1.3:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.5.tgz#f32e6e096455e329eb7b423862456aa213f0eb4e"
+ integrity sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==
+ dependencies:
+ available-typed-arrays "^1.0.2"
+ call-bind "^1.0.2"
+ es-abstract "^1.18.0-next.2"
+ foreach "^2.0.5"
+ has-symbols "^1.0.1"
+
is-typedarray@^1.0.0, is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@@ -5475,6 +6050,14 @@
html-escaper "^2.0.0"
istanbul-lib-report "^3.0.0"
+isurl@^1.0.0-alpha5:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"
+ integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==
+ dependencies:
+ has-to-string-tag-x "^1.2.0"
+ is-object "^1.0.1"
+
jest-changed-files@^27.0.2:
version "27.0.2"
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.2.tgz#997253042b4a032950fc5f56abf3c5d1f8560801"
@@ -5884,6 +6467,11 @@
import-local "^3.0.2"
jest-cli "^27.0.4"
+js-sha3@0.5.7, js-sha3@^0.5.7:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7"
+ integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=
+
js-sha3@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840"
@@ -5894,13 +6482,12 @@
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
-js-yaml@3.14.0:
- version "3.14.0"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
- integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
+js-yaml@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f"
+ integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==
dependencies:
- argparse "^1.0.7"
- esprima "^4.0.0"
+ argparse "^2.0.1"
js-yaml@^3.13.1:
version "3.14.1"
@@ -6051,6 +6638,14 @@
array-includes "^3.1.2"
object.assign "^4.1.2"
+keccak@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff"
+ integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==
+ dependencies:
+ node-addon-api "^2.0.0"
+ node-gyp-build "^4.2.0"
+
keyv@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
@@ -6195,22 +6790,12 @@
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
-lodash.sortby@^4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
- integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
-
lodash.truncate@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
-lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.19:
- version "4.17.20"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
- integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
-
-lodash@^4.17.21, lodash@^4.7.0:
+lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.21, lodash@^4.7.0:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -6220,7 +6805,7 @@
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==
-log-symbols@4.0.0, log-symbols@^4.0.0:
+log-symbols@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920"
integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
@@ -6350,6 +6935,16 @@
inherits "^2.0.1"
safe-buffer "^5.1.2"
+media-typer@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
+ integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
+
+merge-descriptors@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
+ integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
+
merge-source-map@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646"
@@ -6367,6 +6962,11 @@
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
+methods@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
+ integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
+
micromatch@^3.1.10, micromatch@^3.1.4:
version "3.1.10"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
@@ -6386,15 +6986,7 @@
snapdragon "^0.8.1"
to-regex "^3.0.2"
-micromatch@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
- integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
- dependencies:
- braces "^3.0.1"
- picomatch "^2.0.5"
-
-micromatch@^4.0.4:
+micromatch@^4.0.2, micromatch@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
@@ -6402,22 +6994,35 @@
braces "^3.0.1"
picomatch "^2.2.3"
-mime-db@1.45.0:
- version "1.45.0"
- resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea"
- integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==
+miller-rabin@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
+ integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==
+ dependencies:
+ bn.js "^4.0.0"
+ brorand "^1.0.1"
+
+mime-db@1.48.0:
+ version "1.48.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d"
+ integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==
-mime-types@^2.1.12, mime-types@~2.1.19:
- version "2.1.28"
- resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd"
- integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==
+mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24:
+ version "2.1.31"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b"
+ integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==
dependencies:
- mime-db "1.45.0"
+ mime-db "1.48.0"
+
+mime@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
mime@^2.4.6:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.0.tgz#2b4af934401779806ee98026bb42e8c1ae1876b1"
- integrity sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe"
+ integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==
mimic-fn@^2.1.0:
version "2.1.0"
@@ -6434,6 +7039,13 @@
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9"
integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==
+min-document@^2.19.0:
+ version "2.19.0"
+ resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
+ integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=
+ dependencies:
+ dom-walk "^0.1.0"
+
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
@@ -6456,6 +7068,21 @@
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
+minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
+ integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
+ dependencies:
+ safe-buffer "^5.1.2"
+ yallist "^3.0.0"
+
+minizlib@^1.2.1:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
+ integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==
+ dependencies:
+ minipass "^2.9.0"
+
mixin-deep@^1.2.0:
version "1.3.2"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
@@ -6464,49 +7091,61 @@
for-in "^1.0.2"
is-extendable "^1.0.1"
-mkdirp@^0.5.1:
+mkdirp-promise@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1"
+ integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=
+ dependencies:
+ mkdirp "*"
+
+mkdirp@*, mkdirp@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
+ integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
+
+mkdirp@^0.5.0, mkdirp@^0.5.3:
version "0.5.5"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
dependencies:
minimist "^1.2.5"
-mkdirp@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
- integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
-
-mocha@^8.1.1:
- version "8.2.1"
- resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39"
- integrity sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==
+mocha@^8.3.2:
+ version "8.4.0"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff"
+ integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==
dependencies:
"@ungap/promise-all-settled" "1.1.2"
ansi-colors "4.1.1"
browser-stdout "1.3.1"
- chokidar "3.4.3"
- debug "4.2.0"
- diff "4.0.2"
+ chokidar "3.5.1"
+ debug "4.3.1"
+ diff "5.0.0"
escape-string-regexp "4.0.0"
find-up "5.0.0"
glob "7.1.6"
growl "1.10.5"
he "1.2.0"
- js-yaml "3.14.0"
+ js-yaml "4.0.0"
log-symbols "4.0.0"
minimatch "3.0.4"
- ms "2.1.2"
- nanoid "3.1.12"
+ ms "2.1.3"
+ nanoid "3.1.20"
serialize-javascript "5.0.1"
strip-json-comments "3.1.1"
- supports-color "7.2.0"
+ supports-color "8.1.1"
which "2.0.2"
wide-align "1.1.3"
- workerpool "6.0.2"
- yargs "13.3.2"
- yargs-parser "13.1.2"
+ workerpool "6.1.0"
+ yargs "16.2.0"
+ yargs-parser "20.2.4"
yargs-unparser "2.0.0"
+mock-fs@^4.1.0:
+ version "4.14.0"
+ resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18"
+ integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==
+
module-definition@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/module-definition/-/module-definition-3.3.1.tgz#fedef71667713e36988b93d0626a4fe7b35aebfc"
@@ -6531,31 +7170,81 @@
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+ms@2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
+ integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
+
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-ms@^2.1.1:
+ms@2.1.3, ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
+multibase@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b"
+ integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==
+ dependencies:
+ base-x "^3.0.8"
+ buffer "^5.5.0"
+
+multibase@~0.6.0:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b"
+ integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==
+ dependencies:
+ base-x "^3.0.8"
+ buffer "^5.5.0"
+
+multicodec@^0.5.5:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd"
+ integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==
+ dependencies:
+ varint "^5.0.0"
+
+multicodec@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f"
+ integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==
+ dependencies:
+ buffer "^5.6.0"
+ varint "^5.0.0"
+
+multihashes@^0.4.15, multihashes@~0.4.15:
+ version "0.4.21"
+ resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5"
+ integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==
+ dependencies:
+ buffer "^5.5.0"
+ multibase "^0.7.0"
+ varint "^5.0.0"
+
mute-stream@0.0.8, mute-stream@~0.0.4:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
-nanoid@3.1.12:
- version "3.1.12"
- resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654"
- integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==
+nano-json-stream-parser@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f"
+ integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=
-nanoid@^3.1.20:
+nanoid@3.1.20:
version "3.1.20"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788"
integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==
+nanoid@^3.1.23:
+ version "3.1.23"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81"
+ integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==
+
nanomatch@^1.2.9:
version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
@@ -6583,6 +7272,11 @@
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
+negotiator@0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
+ integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
+
neo-async@^2.6.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
@@ -6593,6 +7287,11 @@
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
integrity sha1-yobR/ogoFpsBICCOPchCS524NCw=
+node-addon-api@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32"
+ integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==
+
node-fetch@^2.6.0, node-fetch@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
@@ -6658,9 +7357,9 @@
sort-keys "^1.0.0"
normalize-url@^4.1.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
- integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
+ version "4.5.1"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a"
+ integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==
npm-run-path@^4.0.1:
version "4.0.1"
@@ -6674,6 +7373,14 @@
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
+number-to-bn@1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0"
+ integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=
+ dependencies:
+ bn.js "4.11.6"
+ strip-hex-prefix "1.0.0"
+
nwsapi@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
@@ -6684,7 +7391,7 @@
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
-object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
+object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
@@ -6698,16 +7405,11 @@
define-property "^0.2.5"
kind-of "^3.0.3"
-object-inspect@^1.10.3:
+object-inspect@^1.10.3, object-inspect@^1.9.0:
version "1.10.3"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369"
integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==
-object-inspect@^1.9.0:
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a"
- integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==
-
object-keys@^1.0.12, object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
@@ -6765,6 +7467,20 @@
define-properties "^1.1.3"
es-abstract "^1.18.2"
+oboe@2.1.5:
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd"
+ integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=
+ dependencies:
+ http-https "^1.0.0"
+
+on-finished@~2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
+ integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
+ dependencies:
+ ee-first "1.1.1"
+
once@^1.3.0, once@^1.3.1, once@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
@@ -6817,21 +7533,7 @@
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
-ora@^5.1.0:
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f"
- integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==
- dependencies:
- bl "^4.0.3"
- chalk "^4.1.0"
- cli-cursor "^3.1.0"
- cli-spinners "^2.5.0"
- is-interactive "^1.0.0"
- log-symbols "^4.0.0"
- strip-ansi "^6.0.0"
- wcwidth "^1.0.1"
-
-ora@^5.3.0:
+ora@^5.1.0, ora@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18"
integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==
@@ -6851,6 +7553,11 @@
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+p-cancelable@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa"
+ integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==
+
p-cancelable@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
@@ -6861,6 +7568,11 @@
resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a"
integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==
+p-finally@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+ integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
+
p-limit@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
@@ -6910,6 +7622,13 @@
dependencies:
p-limit "^3.0.2"
+p-timeout@^1.1.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386"
+ integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=
+ dependencies:
+ p-finally "^1.0.0"
+
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
@@ -6937,6 +7656,22 @@
dependencies:
callsites "^3.0.0"
+parse-asn1@^5.0.0, parse-asn1@^5.1.5:
+ version "5.1.6"
+ resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4"
+ integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==
+ dependencies:
+ asn1.js "^5.2.0"
+ browserify-aes "^1.0.0"
+ evp_bytestokey "^1.0.0"
+ pbkdf2 "^3.0.3"
+ safe-buffer "^5.1.1"
+
+parse-headers@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515"
+ integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==
+
parse-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
@@ -6965,6 +7700,11 @@
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
+parseurl@~1.3.3:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
+ integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
+
pascalcase@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
@@ -6991,10 +7731,15 @@
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
path-parse@^1.0.6:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
- integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
+path-to-regexp@0.1.7:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
+ integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
+
path-type@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
@@ -7007,22 +7752,28 @@
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
-pathval@^1.1.0:
+pathval@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d"
integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==
+pbkdf2@^3.0.17, pbkdf2@^3.0.3:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075"
+ integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==
+ dependencies:
+ create-hash "^1.1.2"
+ create-hmac "^1.1.4"
+ ripemd160 "^2.0.1"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
-picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
- integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
-
-picomatch@^2.2.3:
+picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
@@ -7107,13 +7858,11 @@
integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
postcss-selector-parser@^6.0.2:
- version "6.0.4"
- resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3"
- integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==
+ version "6.0.6"
+ resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea"
+ integrity sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==
dependencies:
cssesc "^3.0.0"
- indexes-of "^1.0.1"
- uniq "^1.0.1"
util-deprecate "^1.0.2"
postcss-values-parser@^2.0.1:
@@ -7125,28 +7874,28 @@
indexes-of "^1.0.1"
uniq "^1.0.1"
-postcss@^7.0.14:
- version "7.0.35"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24"
- integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==
+postcss@^7.0.36:
+ version "7.0.36"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.36.tgz#056f8cffa939662a8f5905950c07d5285644dfcb"
+ integrity sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==
dependencies:
chalk "^2.4.2"
source-map "^0.6.1"
supports-color "^6.1.0"
postcss@^8.1.7:
- version "8.2.6"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.6.tgz#5d69a974543b45f87e464bc4c3e392a97d6be9fe"
- integrity sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==
+ version "8.3.5"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.5.tgz#982216b113412bc20a86289e91eb994952a5b709"
+ integrity sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==
dependencies:
- colorette "^1.2.1"
- nanoid "^3.1.20"
- source-map "^0.6.1"
+ colorette "^1.2.2"
+ nanoid "^3.1.23"
+ source-map-js "^0.6.2"
precinct@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/precinct/-/precinct-7.0.0.tgz#37334165dee5d28f469202a910787cb2fb6a9186"
- integrity sha512-ayTxq+fdaoowk4HvdfBs7bChg4ToqdRxjZqy3611dppelGF8UHQZrLta3GolRLoHSJQtKfBGA35IvW8K3tRR7A==
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/precinct/-/precinct-7.1.0.tgz#a0311e0b59029647eaf57c2d30b8efa9c85d129a"
+ integrity sha512-I1RkW5PX51/q6Xl39//D7x9NgaKNGHpR5DCNaoxP/b2+KbzzXDNhauJUMV17KSYkJA41CSpwYUPRtRoNxbshWA==
dependencies:
commander "^2.20.3"
debug "^4.3.1"
@@ -7162,6 +7911,25 @@
module-definition "^3.3.1"
node-source-walk "^4.2.0"
+precinct@^8.0.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/precinct/-/precinct-8.1.0.tgz#6b8f2389ba2ca61c466731390b0d7e25da3fd996"
+ integrity sha512-oeZBR9IdER42Ef6Rz11z1oOUqicsI5J1Qffj6tYghKLhxN2UnHy7uE1axxNr0VZRevPK2HWkROk36uXrbJwHFA==
+ dependencies:
+ commander "^2.20.3"
+ debug "^4.3.1"
+ detective-amd "^3.0.1"
+ detective-cjs "^3.1.1"
+ detective-es6 "^2.2.0"
+ detective-less "^1.0.2"
+ detective-postcss "^4.0.0"
+ detective-sass "^3.0.1"
+ detective-scss "^2.0.1"
+ detective-stylus "^1.0.0"
+ detective-typescript "^7.0.0"
+ module-definition "^3.3.1"
+ node-source-walk "^4.2.0"
+
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -7172,7 +7940,7 @@
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
-prepend-http@^1.0.0:
+prepend-http@^1.0.0, prepend-http@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
@@ -7214,6 +7982,11 @@
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
+process@^0.11.10:
+ version "0.11.10"
+ resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+ integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
+
progress-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/progress-stream/-/progress-stream-2.0.0.tgz#fac63a0b3d11deacbb0969abcc93b214bce19ed5"
@@ -7228,9 +8001,9 @@
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
prompts@^2.0.1:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7"
- integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61"
+ integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==
dependencies:
kleur "^3.0.3"
sisteransi "^1.0.5"
@@ -7244,6 +8017,14 @@
object-assign "^4.1.1"
react-is "^16.8.1"
+proxy-addr@~2.0.5:
+ version "2.0.7"
+ resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025"
+ integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==
+ dependencies:
+ forwarded "0.2.0"
+ ipaddr.js "1.9.1"
+
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
@@ -7254,6 +8035,18 @@
resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==
+public-encrypt@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0"
+ integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==
+ dependencies:
+ bn.js "^4.1.0"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ parse-asn1 "^5.0.0"
+ randombytes "^2.0.1"
+ safe-buffer "^5.1.2"
+
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
@@ -7271,6 +8064,11 @@
inherits "^2.0.3"
pump "^3.0.0"
+punycode@2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d"
+ integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=
+
punycode@^2.1.0, punycode@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
@@ -7283,6 +8081,11 @@
dependencies:
escape-goat "^2.0.0"
+qs@6.7.0:
+ version "6.7.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
+ integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
+
qs@~6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
@@ -7296,18 +8099,50 @@
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"
+query-string@^5.0.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb"
+ integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==
+ dependencies:
+ decode-uri-component "^0.2.0"
+ object-assign "^4.1.0"
+ strict-uri-encode "^1.0.0"
+
queue-microtask@^1.2.2:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.2.tgz#abf64491e6ecf0f38a6502403d4cda04f372dfd3"
- integrity sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
+ integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
-randombytes@^2.1.0:
+randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
dependencies:
safe-buffer "^5.1.0"
+randomfill@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458"
+ integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==
+ dependencies:
+ randombytes "^2.0.5"
+ safe-buffer "^5.1.0"
+
+range-parser@~1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
+ integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
+
+raw-body@2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
+ integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==
+ dependencies:
+ bytes "3.1.0"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ unpipe "1.0.0"
+
rc@^1.2.7, rc@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
@@ -7324,9 +8159,9 @@
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react-is@^17.0.1:
- version "17.0.1"
- resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339"
- integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==
+ version "17.0.2"
+ resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
+ integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
read-pkg-up@^3.0.0:
version "3.0.0"
@@ -7390,6 +8225,13 @@
dependencies:
picomatch "^2.2.1"
+readdirp@~3.6.0:
+ version "3.6.0"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
+ integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
+ dependencies:
+ picomatch "^2.2.1"
+
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
@@ -7438,9 +8280,9 @@
define-properties "^1.1.3"
regexpp@^3.0.0, regexpp@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
- integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
+ integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
regexpu-core@^4.7.1:
version "4.7.1"
@@ -7474,9 +8316,9 @@
integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==
regjsparser@^0.6.4:
- version "0.6.7"
- resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.7.tgz#c00164e1e6713c2e3ee641f1701c4b7aa0a7f86c"
- integrity sha512-ib77G0uxsA2ovgiYbCVGx4Pv3PSttAx2vIwidqQzbL2U5S4Q+j00HdSAneSBuyVcMvEnTXMjiGgB+DlXozVhpQ==
+ version "0.6.9"
+ resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.9.tgz#b489eef7c9a2ce43727627011429cf833a7183e6"
+ integrity sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==
dependencies:
jsesc "~0.5.0"
@@ -7491,16 +8333,16 @@
integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
repeat-element@^1.1.2:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
- integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9"
+ integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==
repeat-string@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
-request@^2.88.2:
+request@^2.79.0, request@^2.88.2:
version "2.88.2"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
@@ -7536,11 +8378,6 @@
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
-require-main-filename@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
- integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
-
requirejs-config-file@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/requirejs-config-file/-/requirejs-config-file-4.0.0.tgz#4244da5dd1f59874038cc1091d078d620abb6ebc"
@@ -7634,7 +8471,7 @@
dependencies:
glob "^7.1.3"
-ripemd160@^2.0.1:
+ripemd160@^2.0.0, ripemd160@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==
@@ -7642,6 +8479,13 @@
hash-base "^3.0.0"
inherits "^2.0.1"
+rlp@^2.2.3:
+ version "2.2.6"
+ resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c"
+ integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==
+ dependencies:
+ bn.js "^4.11.1"
+
run-async@^2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
@@ -7661,15 +8505,15 @@
dependencies:
tslib "^1.9.0"
-safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
+safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
-
-safe-buffer@~5.1.0, safe-buffer@~5.1.1:
- version "5.1.2"
- resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
- integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
safe-regex@^1.1.0:
version "1.1.0"
@@ -7697,11 +8541,25 @@
dependencies:
xmlchars "^2.2.0"
+scrypt-js@^3.0.0, scrypt-js@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312"
+ integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==
+
scryptsy@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790"
integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==
+secp256k1@^4.0.1:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1"
+ integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==
+ dependencies:
+ elliptic "^6.5.2"
+ node-addon-api "^2.0.0"
+ node-gyp-build "^4.2.0"
+
semver-diff@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b"
@@ -7709,7 +8567,7 @@
dependencies:
semver "^6.3.0"
-"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.6.0:
+"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
@@ -7724,20 +8582,32 @@
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-semver@^7.2.1, semver@^7.3.2, semver@^7.3.4:
- version "7.3.4"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
- integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
- dependencies:
- lru-cache "^6.0.0"
-
-semver@^7.3.5:
+semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
version "7.3.5"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
dependencies:
lru-cache "^6.0.0"
+send@0.17.1:
+ version "0.17.1"
+ resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
+ integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==
+ dependencies:
+ debug "2.6.9"
+ depd "~1.1.2"
+ destroy "~1.0.4"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ fresh "0.5.2"
+ http-errors "~1.7.2"
+ mime "1.6.0"
+ ms "2.1.1"
+ on-finished "~2.3.0"
+ range-parser "~1.2.1"
+ statuses "~1.5.0"
+
serialize-javascript@5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4"
@@ -7745,10 +8615,26 @@
dependencies:
randombytes "^2.1.0"
-set-blocking@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
- integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
+serve-static@1.14.1:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
+ integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
+ dependencies:
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ parseurl "~1.3.3"
+ send "0.17.1"
+
+servify@^0.1.12:
+ version "0.1.12"
+ resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95"
+ integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==
+ dependencies:
+ body-parser "^1.16.0"
+ cors "^2.8.1"
+ express "^4.14.0"
+ request "^2.79.0"
+ xhr "^2.3.3"
set-value@^2.0.0, set-value@^2.0.1:
version "2.0.1"
@@ -7760,7 +8646,17 @@
is-plain-object "^2.0.3"
split-string "^3.0.1"
-sha.js@^2.4.0:
+setimmediate@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
+ integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=
+
+setprototypeof@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
+ integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
+
+sha.js@^2.4.0, sha.js@^2.4.8:
version "2.4.11"
resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7"
integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==
@@ -7815,6 +8711,15 @@
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f"
integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==
+simple-get@^2.7.0:
+ version "2.8.1"
+ resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d"
+ integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==
+ dependencies:
+ decompress-response "^3.3.0"
+ once "^1.3.1"
+ simple-concat "^1.0.0"
+
simple-get@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.0.tgz#73fa628278d21de83dadd5512d2cc1f4872bd675"
@@ -7892,6 +8797,11 @@
dependencies:
is-plain-obj "^2.0.0"
+source-map-js@^0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e"
+ integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==
+
source-map-resolve@^0.5.0:
version "0.5.3"
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
@@ -7953,9 +8863,9 @@
spdx-license-ids "^3.0.0"
spdx-license-ids@^3.0.0:
- version "3.0.7"
- resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65"
- integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==
+ version "3.0.9"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz#8a595135def9592bda69709474f1cbeea7c2467f"
+ integrity sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==
speedometer@~1.0.0:
version "1.0.0"
@@ -8004,6 +8914,11 @@
define-property "^0.2.5"
object-copy "^0.1.0"
+"statuses@>= 1.5.0 < 2", statuses@~1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
+ integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
+
stream-shift@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d"
@@ -8015,9 +8930,9 @@
integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=
string-length@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1"
- integrity sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw==
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
+ integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==
dependencies:
char-regex "^1.0.2"
strip-ansi "^6.0.0"
@@ -8039,7 +8954,7 @@
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
-string-width@^3.0.0, string-width@^3.1.0:
+string-width@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
@@ -8049,9 +8964,9 @@
strip-ansi "^5.1.0"
string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
- integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
+ integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
@@ -8071,28 +8986,12 @@
regexp.prototype.flags "^1.3.1"
side-channel "^1.0.4"
-string.prototype.trimend@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b"
- integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==
- dependencies:
- call-bind "^1.0.0"
- define-properties "^1.1.3"
-
string.prototype.trimend@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80"
integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
-
-string.prototype.trimstart@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa"
- integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==
- dependencies:
- call-bind "^1.0.0"
define-properties "^1.1.3"
string.prototype.trimstart@^1.0.4:
@@ -8140,7 +9039,7 @@
dependencies:
ansi-regex "^3.0.0"
-strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
+strip-ansi@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
@@ -8169,6 +9068,13 @@
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
+strip-hex-prefix@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f"
+ integrity sha1-DF8VX+8RUTczd96du1iNoFUA428=
+ dependencies:
+ is-hex-prefixed "1.0.0"
+
strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
@@ -8199,10 +9105,10 @@
commander "^2.8.1"
debug "^4.1.0"
-supports-color@7.2.0, supports-color@^7.0.0, supports-color@^7.1.0:
- version "7.2.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
- integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
+supports-color@8.1.1, supports-color@^8.0.0:
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
+ integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
dependencies:
has-flag "^4.0.0"
@@ -8220,21 +9126,38 @@
dependencies:
has-flag "^3.0.0"
-supports-color@^8.0.0:
- version "8.1.1"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
- integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
+supports-color@^7.0.0, supports-color@^7.1.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+ integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
dependencies:
has-flag "^4.0.0"
supports-hyperlinks@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47"
- integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb"
+ integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==
dependencies:
has-flag "^4.0.0"
supports-color "^7.0.0"
+swarm-js@^0.1.40:
+ version "0.1.40"
+ resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99"
+ integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==
+ dependencies:
+ bluebird "^3.5.0"
+ buffer "^5.0.5"
+ eth-lib "^0.1.26"
+ fs-extra "^4.0.2"
+ got "^7.1.0"
+ mime-types "^2.1.16"
+ mkdirp-promise "^5.0.1"
+ mock-fs "^4.1.0"
+ setimmediate "^1.0.5"
+ tar "^4.0.2"
+ xhr-request "^1.0.1"
+
symbol-tree@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
@@ -8257,6 +9180,19 @@
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b"
integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==
+tar@^4.0.2:
+ version "4.4.13"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
+ integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
+ dependencies:
+ chownr "^1.1.1"
+ fs-minipass "^1.2.5"
+ minipass "^2.8.6"
+ minizlib "^1.2.1"
+ mkdirp "^0.5.0"
+ safe-buffer "^5.1.2"
+ yallist "^3.0.3"
+
temp@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/temp/-/temp-0.4.0.tgz#671ad63d57be0fe9d7294664b3fc400636678a60"
@@ -8302,6 +9238,11 @@
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
+timed-out@^4.0.0, timed-out@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
+ integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=
+
tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
@@ -8356,6 +9297,11 @@
regex-not "^1.0.2"
safe-regex "^1.1.0"
+toidentifier@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
+ integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
+
tough-cookie@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4"
@@ -8371,13 +9317,6 @@
integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
dependencies:
psl "^1.1.28"
- punycode "^2.1.1"
-
-tr46@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479"
- integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==
- dependencies:
punycode "^2.1.1"
tr46@^2.1.0:
@@ -8394,7 +9333,7 @@
dependencies:
escape-string-regexp "^1.0.2"
-ts-node@^9.0.0:
+ts-node@^9.1.1:
version "9.1.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
@@ -8416,15 +9355,15 @@
minimist "^1.2.0"
strip-bom "^3.0.0"
-tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
+tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-tslint@^5.20.1:
- version "5.20.1"
- resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d"
- integrity sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==
+tslint@^6.1.3:
+ version "6.1.3"
+ resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904"
+ integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==
dependencies:
"@babel/code-frame" "^7.0.0"
builtin-modules "^1.1.1"
@@ -8434,10 +9373,10 @@
glob "^7.1.1"
js-yaml "^3.13.1"
minimatch "^3.0.4"
- mkdirp "^0.5.1"
+ mkdirp "^0.5.3"
resolve "^1.3.2"
semver "^5.3.0"
- tslib "^1.8.0"
+ tslib "^1.13.0"
tsutils "^2.29.0"
tsutils@^2.29.0:
@@ -8447,13 +9386,6 @@
dependencies:
tslib "^1.8.1"
-tsutils@^3.17.1:
- version "3.20.0"
- resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.20.0.tgz#ea03ea45462e146b53d70ce0893de453ff24f698"
- integrity sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==
- dependencies:
- tslib "^1.8.1"
-
tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
@@ -8497,30 +9429,38 @@
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
-type-fest@^0.11.0:
- version "0.11.0"
- resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
- integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
-
type-fest@^0.20.2:
version "0.20.2"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
+type-fest@^0.21.3:
+ version "0.21.3"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
+ integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
+
type-fest@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==
+type-is@~1.6.17, type-is@~1.6.18:
+ version "1.6.18"
+ resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
+ integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
+ dependencies:
+ media-typer "0.3.0"
+ mime-types "~2.1.24"
+
type@^1.0.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0"
integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==
type@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f"
- integrity sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d"
+ integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==
typedarray-to-buffer@^3.1.5:
version "3.1.5"
@@ -8530,19 +9470,24 @@
is-typedarray "^1.0.0"
typescript@^3.9.5, typescript@^3.9.7:
- version "3.9.9"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674"
- integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==
+ version "3.9.10"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"
+ integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==
-typescript@^4.3.2:
- version "4.3.2"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
- integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
+typescript@^4.2.4, typescript@^4.3.2:
+ version "4.3.4"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc"
+ integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==
uglify-js@^3.1.4:
- version "3.12.7"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.7.tgz#be4f06142a67bd91ef868b4e111dc241e151bff3"
- integrity sha512-SIZhkoh+U/wjW+BHGhVwE9nt8tWJspncloBcFapkpGRwNPqcH8pzX36BXe3TPBjzHWPMUZotpCigak/udWNr1Q==
+ version "3.13.9"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.9.tgz#4d8d21dcd497f29cfd8e9378b9df123ad025999b"
+ integrity sha512-wZbyTQ1w6Y7fHdt8sJnHfSIuWeDgk6B5rCb4E/AM6QNNPbOMIZph21PW5dRB3h7Df0GszN+t7RuUH6sWK5bF0g==
+
+ultron@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
+ integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==
unbox-primitive@^1.0.1:
version "1.0.1"
@@ -8554,6 +9499,11 @@
has-symbols "^1.0.2"
which-boxed-primitive "^1.0.2"
+underscore@1.12.1:
+ version "1.12.1"
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e"
+ integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==
+
unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
@@ -8614,6 +9564,11 @@
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
+unpipe@1.0.0, unpipe@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
+ integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
+
unset-value@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
@@ -8659,6 +9614,13 @@
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
+url-parse-lax@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
+ integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=
+ dependencies:
+ prepend-http "^1.0.1"
+
url-parse-lax@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
@@ -8666,18 +9628,33 @@
dependencies:
prepend-http "^2.0.0"
+url-set-query@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339"
+ integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=
+
+url-to-options@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
+ integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=
+
use@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
utf-8-validate@^5.0.2:
- version "5.0.4"
- resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.4.tgz#72a1735983ddf7a05a43a9c6b67c5ce1c910f9b8"
- integrity sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q==
+ version "5.0.5"
+ resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1"
+ integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==
dependencies:
node-gyp-build "^4.2.0"
+utf8@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1"
+ integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==
+
util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
@@ -8688,20 +9665,42 @@
resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f"
integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=
+util@^0.12.0:
+ version "0.12.4"
+ resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253"
+ integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==
+ dependencies:
+ inherits "^2.0.3"
+ is-arguments "^1.0.4"
+ is-generator-function "^1.0.7"
+ is-typed-array "^1.1.3"
+ safe-buffer "^5.1.2"
+ which-typed-array "^1.1.2"
+
+utils-merge@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
+ integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
+
+uuid@3.3.2:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
+ integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
+
uuid@^3.3.2:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
v8-compile-cache@^2.0.3:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132"
- integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
+ integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
v8-to-istanbul@^7.0.0:
- version "7.1.0"
- resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz#5b95cef45c0f83217ec79f8fc7ee1c8b486aee07"
- integrity sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g==
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1"
+ integrity sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==
dependencies:
"@types/istanbul-lib-coverage" "^2.0.1"
convert-source-map "^1.6.0"
@@ -8715,6 +9714,16 @@
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"
+varint@^5.0.0:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4"
+ integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==
+
+vary@^1, vary@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
+ integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
+
verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
@@ -8762,6 +9771,246 @@
dependencies:
defaults "^1.0.3"
+web3-bzz@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.6.tgz#95f370aecc3ff6ad07f057e6c0c916ef09b04dde"
+ integrity sha512-ibHdx1wkseujFejrtY7ZyC0QxQ4ATXjzcNUpaLrvM6AEae8prUiyT/OloG9FWDgFD2CPLwzKwfSQezYQlANNlw==
+ dependencies:
+ "@types/node" "^12.12.6"
+ got "9.6.0"
+ swarm-js "^0.1.40"
+ underscore "1.12.1"
+
+web3-core-helpers@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.6.tgz#c478246a9abe4e5456acf42657dac2f7c330be74"
+ integrity sha512-nhtjA2ZbkppjlxTSwG0Ttu6FcPkVu1rCN5IFAOVpF/L0SEt+jy+O5l90+cjDq0jAYvlBwUwnbh2mR9hwDEJCNA==
+ dependencies:
+ underscore "1.12.1"
+ web3-eth-iban "1.3.6"
+ web3-utils "1.3.6"
+
+web3-core-method@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.6.tgz#4b0334edd94b03dfec729d113c69a4eb6ebc68ae"
+ integrity sha512-RyegqVGxn0cyYW5yzAwkPlsSEynkdPiegd7RxgB4ak1eKk2Cv1q2x4C7D2sZjeeCEF+q6fOkVmo2OZNqS2iQxg==
+ dependencies:
+ "@ethersproject/transactions" "^5.0.0-beta.135"
+ underscore "1.12.1"
+ web3-core-helpers "1.3.6"
+ web3-core-promievent "1.3.6"
+ web3-core-subscriptions "1.3.6"
+ web3-utils "1.3.6"
+
+web3-core-promievent@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.6.tgz#6c27dc79de8f71b74f5d17acaf9aaf593d3cb0c9"
+ integrity sha512-Z+QzfyYDTXD5wJmZO5wwnRO8bAAHEItT1XNSPVb4J1CToV/I/SbF7CuF8Uzh2jns0Cm1109o666H7StFFvzVKw==
+ dependencies:
+ eventemitter3 "4.0.4"
+
+web3-core-requestmanager@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.6.tgz#4fea269fe913fd4fca464b4f7c65cb94857b5b2a"
+ integrity sha512-2rIaeuqeo7QN1Eex7aXP0ZqeteJEPWXYFS/M3r3LXMiV8R4STQBKE+//dnHJXoo2ctzEB5cgd+7NaJM8S3gPyA==
+ dependencies:
+ underscore "1.12.1"
+ util "^0.12.0"
+ web3-core-helpers "1.3.6"
+ web3-providers-http "1.3.6"
+ web3-providers-ipc "1.3.6"
+ web3-providers-ws "1.3.6"
+
+web3-core-subscriptions@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.6.tgz#ee24e7974d1d72ff6c992c599deba4ef9b308415"
+ integrity sha512-wi9Z9X5X75OKvxAg42GGIf81ttbNR2TxzkAsp1g+nnp5K8mBwgZvXrIsDuj7Z7gx72Y45mWJADCWjk/2vqNu8g==
+ dependencies:
+ eventemitter3 "4.0.4"
+ underscore "1.12.1"
+ web3-core-helpers "1.3.6"
+
+web3-core@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.6.tgz#a6a761d1ff2f3ee462b8dab679229d2f8e267504"
+ integrity sha512-gkLDM4T1Sc0T+HZIwxrNrwPg0IfWI0oABSglP2X5ZbBAYVUeEATA0o92LWV8BeF+okvKXLK1Fek/p6axwM/h3Q==
+ dependencies:
+ "@types/bn.js" "^4.11.5"
+ "@types/node" "^12.12.6"
+ bignumber.js "^9.0.0"
+ web3-core-helpers "1.3.6"
+ web3-core-method "1.3.6"
+ web3-core-requestmanager "1.3.6"
+ web3-utils "1.3.6"
+
+web3-eth-abi@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.6.tgz#4272ca48d817aa651bbf97b269f5ff10abc2b8a9"
+ integrity sha512-Or5cRnZu6WzgScpmbkvC6bfNxR26hqiKK4i8sMPFeTUABQcb/FU3pBj7huBLYbp9dH+P5W79D2MqwbWwjj9DoQ==
+ dependencies:
+ "@ethersproject/abi" "5.0.7"
+ underscore "1.12.1"
+ web3-utils "1.3.6"
+
+web3-eth-accounts@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.6.tgz#f9fcb50b28ee58090ab292a10d996155caa2b474"
+ integrity sha512-Ilr0hG6ONbCdSlVKffasCmNwftD5HsNpwyQASevocIQwHdTlvlwO0tb3oGYuajbKOaDzNTwXfz25bttAEoFCGA==
+ dependencies:
+ crypto-browserify "3.12.0"
+ eth-lib "0.2.8"
+ ethereumjs-common "^1.3.2"
+ ethereumjs-tx "^2.1.1"
+ scrypt-js "^3.0.1"
+ underscore "1.12.1"
+ uuid "3.3.2"
+ web3-core "1.3.6"
+ web3-core-helpers "1.3.6"
+ web3-core-method "1.3.6"
+ web3-utils "1.3.6"
+
+web3-eth-contract@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.6.tgz#cccf4d32dc56917fb6923e778498a9ba2a5ba866"
+ integrity sha512-8gDaRrLF2HCg+YEZN1ov0zN35vmtPnGf3h1DxmJQK5Wm2lRMLomz9rsWsuvig3UJMHqZAQKD7tOl3ocJocQsmA==
+ dependencies:
+ "@types/bn.js" "^4.11.5"
+ underscore "1.12.1"
+ web3-core "1.3.6"
+ web3-core-helpers "1.3.6"
+ web3-core-method "1.3.6"
+ web3-core-promievent "1.3.6"
+ web3-core-subscriptions "1.3.6"
+ web3-eth-abi "1.3.6"
+ web3-utils "1.3.6"
+
+web3-eth-ens@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.6.tgz#0d28c5d4ea7b4462ef6c077545a77956a6cdf175"
+ integrity sha512-n27HNj7lpSkRxTgSx+Zo7cmKAgyg2ElFilaFlUu/X2CNH23lXfcPm2bWssivH9z0ndhg0OyR4AYFZqPaqDHkJA==
+ dependencies:
+ content-hash "^2.5.2"
+ eth-ens-namehash "2.0.8"
+ underscore "1.12.1"
+ web3-core "1.3.6"
+ web3-core-helpers "1.3.6"
+ web3-core-promievent "1.3.6"
+ web3-eth-abi "1.3.6"
+ web3-eth-contract "1.3.6"
+ web3-utils "1.3.6"
+
+web3-eth-iban@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.6.tgz#0d6ba21fe78f190af8919e9cd5453882457209e0"
+ integrity sha512-nfMQaaLA/zsg5W4Oy/EJQbs8rSs1vBAX6b/35xzjYoutXlpHMQadujDx2RerTKhSHqFXSJeQAfE+2f6mdhYkRQ==
+ dependencies:
+ bn.js "^4.11.9"
+ web3-utils "1.3.6"
+
+web3-eth-personal@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.6.tgz#226137916754c498f0284f22c55924c87a2efcf0"
+ integrity sha512-pOHU0+/h1RFRYoh1ehYBehRbcKWP4OSzd4F7mDljhHngv6W8ewMHrAN8O1ol9uysN2MuCdRE19qkRg5eNgvzFQ==
+ dependencies:
+ "@types/node" "^12.12.6"
+ web3-core "1.3.6"
+ web3-core-helpers "1.3.6"
+ web3-core-method "1.3.6"
+ web3-net "1.3.6"
+ web3-utils "1.3.6"
+
+web3-eth@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.6.tgz#2c650893d540a7a0eb1365dd5b2dca24ac919b7c"
+ integrity sha512-9+rnywRRpyX3C4hfsAQXPQh6vHh9XzQkgLxo3gyeXfbhbShUoq2gFVuy42vsRs//6JlsKdyZS7Z3hHPHz2wreA==
+ dependencies:
+ underscore "1.12.1"
+ web3-core "1.3.6"
+ web3-core-helpers "1.3.6"
+ web3-core-method "1.3.6"
+ web3-core-subscriptions "1.3.6"
+ web3-eth-abi "1.3.6"
+ web3-eth-accounts "1.3.6"
+ web3-eth-contract "1.3.6"
+ web3-eth-ens "1.3.6"
+ web3-eth-iban "1.3.6"
+ web3-eth-personal "1.3.6"
+ web3-net "1.3.6"
+ web3-utils "1.3.6"
+
+web3-net@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.6.tgz#a56492e2227475e38db29394f8bac305a2446e41"
+ integrity sha512-KhzU3wMQY/YYjyMiQzbaLPt2kut88Ncx2iqjy3nw28vRux3gVX0WOCk9EL/KVJBiAA/fK7VklTXvgy9dZnnipw==
+ dependencies:
+ web3-core "1.3.6"
+ web3-core-method "1.3.6"
+ web3-utils "1.3.6"
+
+web3-providers-http@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.6.tgz#36e8724a7424d52827819d53fd75dbf31f5422c2"
+ integrity sha512-OQkT32O1A06dISIdazpGLveZcOXhEo5cEX6QyiSQkiPk/cjzDrXMw4SKZOGQbbS1+0Vjizm1Hrp7O8Vp2D1M5Q==
+ dependencies:
+ web3-core-helpers "1.3.6"
+ xhr2-cookies "1.1.0"
+
+web3-providers-ipc@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.6.tgz#cef8d12c1ebb47adce5ebf597f553c623362cb4a"
+ integrity sha512-+TVsSd2sSVvVgHG4s6FXwwYPPT91boKKcRuEFXqEfAbUC5t52XOgmyc2LNiD9LzPhed65FbV4LqICpeYGUvSwA==
+ dependencies:
+ oboe "2.1.5"
+ underscore "1.12.1"
+ web3-core-helpers "1.3.6"
+
+web3-providers-ws@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.6.tgz#e1df617bc89d66165abdf2191da0014c505bfaac"
+ integrity sha512-bk7MnJf5or0Re2zKyhR3L3CjGululLCHXx4vlbc/drnaTARUVvi559OI5uLytc/1k5HKUUyENAxLvetz2G1dnQ==
+ dependencies:
+ eventemitter3 "4.0.4"
+ underscore "1.12.1"
+ web3-core-helpers "1.3.6"
+ websocket "^1.0.32"
+
+web3-shh@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.6.tgz#4e3486c7eca5cbdb87f88910948223a5b7ea6c20"
+ integrity sha512-9zRo415O0iBslxBnmu9OzYjNErzLnzOsy+IOvSpIreLYbbAw0XkDWxv3SfcpKnTIWIACBR4AYMIxmmyi5iB3jw==
+ dependencies:
+ web3-core "1.3.6"
+ web3-core-method "1.3.6"
+ web3-core-subscriptions "1.3.6"
+ web3-net "1.3.6"
+
+web3-utils@1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.6.tgz#390bc9fa3a7179746963cfaca55bb80ac4d8dc10"
+ integrity sha512-hHatFaQpkQgjGVER17gNx8u1qMyaXFZtM0y0XLGH1bzsjMPlkMPLRcYOrZ00rOPfTEuYFOdrpGOqZXVmGrMZRg==
+ dependencies:
+ bn.js "^4.11.9"
+ eth-lib "0.2.8"
+ ethereum-bloom-filters "^1.0.6"
+ ethjs-unit "0.1.6"
+ number-to-bn "1.7.0"
+ randombytes "^2.1.0"
+ underscore "1.12.1"
+ utf8 "3.0.0"
+
+web3@^1.3.5:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.6.tgz#599425461c3f9a8cbbefa70616438995f4a064cc"
+ integrity sha512-jEpPhnL6GDteifdVh7ulzlPrtVQeA30V9vnki9liYlUvLV82ZM7BNOQJiuzlDePuE+jZETZSP/0G/JlUVt6pOA==
+ dependencies:
+ web3-bzz "1.3.6"
+ web3-core "1.3.6"
+ web3-eth "1.3.6"
+ web3-eth-personal "1.3.6"
+ web3-net "1.3.6"
+ web3-shh "1.3.6"
+ web3-utils "1.3.6"
+
webidl-conversions@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
@@ -8772,7 +10021,7 @@
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514"
integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==
-websocket@^1.0.34:
+websocket@^1.0.32, websocket@^1.0.34:
version "1.0.34"
resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111"
integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==
@@ -8796,16 +10045,7 @@
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
-whatwg-url@^8.0.0:
- version "8.4.0"
- resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837"
- integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw==
- dependencies:
- lodash.sortby "^4.7.0"
- tr46 "^2.0.2"
- webidl-conversions "^6.1.0"
-
-whatwg-url@^8.5.0:
+whatwg-url@^8.0.0, whatwg-url@^8.5.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.6.0.tgz#27c0205a4902084b872aecb97cf0f2a7a3011f4c"
integrity sha512-os0KkeeqUOl7ccdDT1qqUcS4KH4tcBTSKK5Nl5WKb2lyxInIZ/CpjkqKa1Ss12mjfdcRX9mHmPPs7/SxG1Hbdw==
@@ -8825,10 +10065,18 @@
is-string "^1.0.5"
is-symbol "^1.0.3"
-which-module@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
- integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
+which-typed-array@^1.1.2:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff"
+ integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==
+ dependencies:
+ available-typed-arrays "^1.0.2"
+ call-bind "^1.0.0"
+ es-abstract "^1.18.0-next.1"
+ foreach "^2.0.5"
+ function-bind "^1.1.1"
+ has-symbols "^1.0.1"
+ is-typed-array "^1.1.3"
which@2.0.2, which@^2.0.1:
version "2.0.2"
@@ -8861,19 +10109,10 @@
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
-workerpool@6.0.2:
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438"
- integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==
-
-wrap-ansi@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
- integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==
- dependencies:
- ansi-styles "^3.2.0"
- string-width "^3.0.0"
- strip-ansi "^5.0.0"
+workerpool@6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b"
+ integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==
wrap-ansi@^7.0.0:
version "7.0.0"
@@ -8911,16 +10150,62 @@
sort-keys "^4.0.0"
write-file-atomic "^3.0.0"
+ws@^3.0.0:
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
+ integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==
+ dependencies:
+ async-limiter "~1.0.0"
+ safe-buffer "~5.1.0"
+ ultron "~1.1.0"
+
ws@^7.4.5:
- version "7.4.6"
- resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
- integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==
+ version "7.5.0"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691"
+ integrity sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw==
xdg-basedir@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"
integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==
+xhr-request-promise@^0.1.2:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c"
+ integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==
+ dependencies:
+ xhr-request "^1.1.0"
+
+xhr-request@^1.0.1, xhr-request@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed"
+ integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==
+ dependencies:
+ buffer-to-arraybuffer "^0.0.5"
+ object-assign "^4.1.1"
+ query-string "^5.0.1"
+ simple-get "^2.7.0"
+ timed-out "^4.0.1"
+ url-set-query "^1.0.0"
+ xhr "^2.0.4"
+
+xhr2-cookies@1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48"
+ integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=
+ dependencies:
+ cookiejar "^2.1.1"
+
+xhr@^2.0.4, xhr@^2.3.3:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d"
+ integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==
+ dependencies:
+ global "~4.4.0"
+ is-function "^1.0.1"
+ parse-headers "^2.0.0"
+ xtend "^4.0.0"
+
xml-name-validator@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
@@ -8931,7 +10216,7 @@
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==
-xtend@~4.0.1:
+xtend@^4.0.0, xtend@~4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
@@ -8942,16 +10227,11 @@
integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==
dependencies:
cuint "^0.2.2"
-
-y18n@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
- integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
y18n@^5.0.5:
- version "5.0.5"
- resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18"
- integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==
+ version "5.0.8"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
+ integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
yaeti@^0.0.6:
version "0.0.6"
@@ -8963,24 +10243,26 @@
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
+yallist@^3.0.0, yallist@^3.0.3:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
+ integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
+
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
-
-yargs-parser@13.1.2, yargs-parser@^13.1.2:
- version "13.1.2"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"
- integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==
- dependencies:
- camelcase "^5.0.0"
- decamelize "^1.2.0"
-yargs-parser@^20.2.2:
+yargs-parser@20.2.4:
version "20.2.4"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
+yargs-parser@^20.2.2:
+ version "20.2.7"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a"
+ integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==
+
yargs-unparser@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb"
@@ -8991,23 +10273,7 @@
flat "^5.0.2"
is-plain-obj "^2.1.0"
-yargs@13.3.2:
- version "13.3.2"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
- integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
- dependencies:
- cliui "^5.0.0"
- find-up "^3.0.0"
- get-caller-file "^2.0.1"
- require-directory "^2.1.1"
- require-main-filename "^2.0.0"
- set-blocking "^2.0.0"
- string-width "^3.0.0"
- which-module "^2.0.0"
- y18n "^4.0.0"
- yargs-parser "^13.1.2"
-
-yargs@^16.0.3:
+yargs@16.2.0, yargs@^16.0.3:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==