diff --git a/.circleci/config.yml b/.circleci/config.yml index da232ac1..d0b0a043 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: phusion/baseimage:0.11 + - image: ubuntu:18.04 environment: DEBUG_BUILD: true DEBIAN_FRONTEND: noninteractive @@ -10,9 +10,45 @@ jobs: working_directory: ~/edgeware steps: - - checkout + # basic image config to install sudo, node, yarn - run: apt-get update + - run: apt-get install -y sudo git curl + - run: curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - + - run: sudo apt-get install -y nodejs + - run: npm install --global yarn + + # begin using repo-specific scripts + - checkout - run: ~/edgeware/scripts/init.sh + # get cached edgeware build + - restore_cache: + key: edgeware-{{ checksum "Cargo.lock" }} + # module test cases - run: source ~/.cargo/env && cd ~/edgeware && ./scripts/test.sh + + # full build + - run: source ~/.cargo/env && cd ~/edgeware && cargo build --release + + # save the built binary + - store_artifacts: + path: ~/edgeware/target/release/edgeware + destination: edgeware-node + + # save edgeware build + - save_cache: + key: edgeware-{{ checksum "Cargo.lock" }} + paths: + - target + + # ts test cases with node_modules caching + - restore_cache: + key: edgeware-tests-{{ checksum "ts-tests/frontier-tester/yarn.lock" }} + - run: cd ~/edgeware/ts-tests/frontier-tester && yarn + - save_cache: + key: edgeware-tests-{{ checksum "ts-tests/frontier-tester/yarn.lock" }} + paths: + - ts-tests/frontier-tester/node_modules + + - run: cd ~/edgeware/ts-tests/frontier-tester && yarn test-ci diff --git a/.gitignore b/.gitignore index 7b192440..476390e9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,8 @@ edgeware*.wasm # Misc .vscode mainnet-state.json +db +node_modules +forker-data +beresheet-state.json +build \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e69de29b diff --git a/Cargo.lock b/Cargo.lock index 5c70c640..75191a81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,9 +12,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" +checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ "gimli 0.23.0", ] @@ -55,7 +55,7 @@ dependencies = [ "aes", "block-cipher", "ghash", - "subtle 2.3.0", + "subtle 2.4.0", ] [[package]] @@ -65,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63dd91889c49327ad7ef3b500fd1109dbd3c509a03db0d4a9ce413b79f575cb6" dependencies = [ "block-cipher", - "byteorder 1.3.4", + "byteorder", "opaque-debug 0.3.0", ] @@ -81,24 +81,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29661b60bec623f0586702976ff4d0c9942dcb6723161c2df0eea78455cfedfb" -dependencies = [ - "const-random", -] - -[[package]] -name = "ahash" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" - -[[package]] -name = "ahash" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6789e291be47ace86a60303502173d84af8327e3627ecf334356ee0f87a164c" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" [[package]] name = "aho-corasick" @@ -109,17 +94,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alga" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" -dependencies = [ - "approx", - "num-complex", - "num-traits", -] - [[package]] name = "ansi_term" version = "0.11.0" @@ -140,9 +114,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.34" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" +checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "approx" @@ -155,9 +129,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "0.4.7" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" +checksum = "d4d7d63395147b81a9e570bcc6243aaf71c017bd666d4909cfef0085bdda8d73" [[package]] name = "arrayref" @@ -233,28 +207,31 @@ dependencies = [ "concurrent-queue", "fastrand", "futures-lite", - "once_cell 1.5.2", + "once_cell", "vec-arena", ] [[package]] name = "async-global-executor" -version = "1.4.3" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73079b49cd26b8fd5a15f68fc7707fc78698dc2a3d61430f2a7a9430230dfa04" +checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" dependencies = [ + "async-channel", "async-executor", "async-io", + "async-mutex", + "blocking", "futures-lite", "num_cpus", - "once_cell 1.5.2", + "once_cell", ] [[package]] name = "async-io" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a0b2bb8ae20fede194e779150fe283f65a4a08461b496de546ec366b174ad9" +checksum = "9315f8f07556761c3e48fec2e6b276004acf426e6dc068b2c2251854d65ee0fd" dependencies = [ "concurrent-queue", "fastrand", @@ -262,7 +239,7 @@ dependencies = [ "libc", "log", "nb-connect", - "once_cell 1.5.2", + "once_cell", "parking", "polling", "vec-arena", @@ -270,6 +247,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "async-lock" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1996609732bde4a9988bc42125f55f2af5f3c36370e27c778d5191a4a1b63bfb" +dependencies = [ + "event-listener", +] + [[package]] name = "async-mutex" version = "1.4.0" @@ -279,16 +265,33 @@ dependencies = [ "event-listener", ] +[[package]] +name = "async-process" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8cea09c1fb10a317d1b5af8024eeba256d6554763e85ecd90ff8df31c7bbda" +dependencies = [ + "async-io", + "blocking", + "cfg-if 0.1.10", + "event-listener", + "futures-lite", + "once_cell", + "signal-hook", + "winapi 0.3.9", +] + [[package]] name = "async-std" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e82538bc65a25dbdff70e4c5439d52f068048ab97cdea0acd73f131594caa1" +checksum = "d9f06685bad74e0570f5213741bea82158279a4103d988e57bfada11ad230341" dependencies = [ + "async-channel", "async-global-executor", "async-io", - "async-mutex", - "blocking", + "async-lock", + "async-process", "crossbeam-utils 0.8.1", "futures-channel", "futures-core", @@ -299,8 +302,8 @@ dependencies = [ "log", "memchr", "num_cpus", - "once_cell 1.5.2", - "pin-project-lite 0.1.11", + "once_cell", + "pin-project-lite 0.2.4", "pin-utils", "slab", "wasm-bindgen-futures", @@ -314,14 +317,15 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-tls" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df097e3f506bec0e1a24f06bb3c962c228f36671de841ff579cb99f371772634" +checksum = "2f23d769dbf1838d5df5156e7b1ad404f4c463d1ac2c6aeb6cd943630f8a8400" dependencies = [ - "futures 0.3.8", - "rustls", + "futures-core", + "futures-io", + "rustls 0.19.0", "webpki", - "webpki-roots 0.19.0", + "webpki-roots", ] [[package]] @@ -337,9 +341,12 @@ dependencies = [ [[package]] name = "atomic" -version = "0.4.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f46ca51dca4837f1520754d1c8c36636356b81553d928dc9c177025369a06e" +checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281" +dependencies = [ + "autocfg", +] [[package]] name = "atomic-waker" @@ -358,12 +365,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" - [[package]] name = "autocfg" version = "1.0.1" @@ -372,15 +373,15 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.55" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" +checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" dependencies = [ "addr2line", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.22.0", + "object 0.23.0", "rustc-demangle", ] @@ -390,12 +391,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - [[package]] name = "base64" version = "0.12.3" @@ -414,7 +409,7 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" dependencies = [ - "byteorder 1.3.4", + "byteorder", "serde", ] @@ -442,33 +437,12 @@ dependencies = [ "which", ] -[[package]] -name = "bip39" -version = "0.6.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059804e226b3ac116519a252d7f5fb985a5ccc0e93255e036a5f7e7283323f4" -dependencies = [ - "failure", - "hashbrown 0.1.8", - "hmac", - "once_cell 0.1.8", - "pbkdf2", - "rand 0.6.5", - "sha2 0.8.2", -] - [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -[[package]] -name = "bitmask" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" - [[package]] name = "bitvec" version = "0.17.4" @@ -511,17 +485,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake2s_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.7.3" @@ -530,7 +493,7 @@ checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ "block-padding 0.1.5", "byte-tools", - "byteorder 1.3.4", + "byteorder", "generic-array 0.12.3", ] @@ -579,15 +542,9 @@ dependencies = [ "atomic-waker", "fastrand", "futures-lite", - "once_cell 1.5.2", + "once_cell", ] -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - [[package]] name = "bs58" version = "0.4.0" @@ -606,6 +563,15 @@ dependencies = [ "serde", ] +[[package]] +name = "build-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" +dependencies = [ + "semver 0.6.0", +] + [[package]] name = "bumpalo" version = "3.4.0" @@ -626,15 +592,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" - -[[package]] -name = "byteorder" -version = "1.3.4" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "bytes" @@ -642,7 +602,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ - "byteorder 1.3.4", + "byteorder", "either", "iovec", ] @@ -654,10 +614,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] -name = "c_linked_list" -version = "1.1.1" +name = "bytes" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "cache-padded" @@ -665,6 +625,28 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +[[package]] +name = "cargo-platform" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0226944a63d1bf35a3b5f948dd7c59e263db83695c9e8bffc4037de02e30f1d7" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714a157da7991e23d90686b9524b9e12e0407a108647f52e9328f4b3d51ac7f" +dependencies = [ + "cargo-platform", + "semver 0.11.0", + "semver-parser 0.10.2", + "serde", + "serde_json", +] + [[package]] name = "cast" version = "0.2.3" @@ -676,9 +658,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.65" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15" +checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" dependencies = [ "jobserver", ] @@ -727,6 +709,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "chainbridge" +version = "1.0.0" +dependencies = [ + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "chrono" version = "0.4.19" @@ -742,6 +739,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.4", +] + [[package]] name = "clang-sys" version = "0.29.3" @@ -777,15 +783,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -dependencies = [ - "bitflags", -] - [[package]] name = "cmake" version = "0.1.45" @@ -816,41 +813,19 @@ dependencies = [ [[package]] name = "console_log" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48" +checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494" dependencies = [ "log", "web-sys", ] -[[package]] -name = "const-random" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486d435a7351580347279f374cb8a3c16937485441db80181357b7c4d70f17ed" -dependencies = [ - "const-random-macro", - "proc-macro-hack", -] - -[[package]] -name = "const-random-macro" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a84d8ff70e3ec52311109b019c27672b4c1929e4cf7c18bcf0cd9fb5e230be" -dependencies = [ - "getrandom 0.2.0", - "lazy_static", - "proc-macro-hack", - "tiny-keccak", -] - [[package]] name = "const_fn" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c478836e029dcef17fb47c89023448c64f781a046e0300e257ad8225ae59afab" +checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" [[package]] name = "constant_time_eq" @@ -880,6 +855,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" +[[package]] +name = "cpuid-bool" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" + [[package]] name = "cranelift-bforest" version = "0.66.0" @@ -895,7 +876,7 @@ version = "0.66.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d9badfe36176cb653506091693bc2bb1970c9bddfcd6ec7fac404f7eaec6f38" dependencies = [ - "byteorder 1.3.4", + "byteorder", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", @@ -904,7 +885,7 @@ dependencies = [ "log", "regalloc", "serde", - "smallvec 1.5.0", + "smallvec 1.6.1", "target-lexicon", "thiserror", ] @@ -942,7 +923,7 @@ checksum = "2ef419efb4f94ecc02e5d9fbcc910d2bb7f0040e2de570e63a454f883bc891d6" dependencies = [ "cranelift-codegen", "log", - "smallvec 1.5.0", + "smallvec 1.6.1", "target-lexicon", ] @@ -1055,13 +1036,13 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 0.1.10", "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", "memoffset 0.5.6", - "scopeguard 1.1.0", + "scopeguard", ] [[package]] @@ -1075,7 +1056,7 @@ dependencies = [ "crossbeam-utils 0.8.1", "lazy_static", "memoffset 0.6.1", - "scopeguard 1.1.0", + "scopeguard", ] [[package]] @@ -1095,7 +1076,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 0.1.10", "lazy_static", ] @@ -1106,7 +1087,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 1.0.0", "lazy_static", ] @@ -1134,14 +1115,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.4", - "subtle 2.3.0", + "subtle 2.4.0", ] [[package]] name = "csv" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4666154fd004af3fd6f1da2e81a96fd5a81927fe8ddb6ecc79e2aa6e138b54" +checksum = "f9d58633299b24b515ac72a3f869f8b91306a3cec616a602843a383acd6f9e97" dependencies = [ "bstr", "csv-core", @@ -1170,9 +1151,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbaabec2c953050352311293be5c6aba8e141ba19d6811862b232d6fd020484" +checksum = "10bcb9d7dcbf7002aaffbb53eac22906b64cdcc127971dcc387d8eb7c95d5560" dependencies = [ "quote", "syn", @@ -1180,37 +1161,38 @@ dependencies = [ [[package]] name = "cuckoofilter" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" +checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" dependencies = [ - "byteorder 0.5.3", - "rand 0.3.23", + "byteorder", + "fnv", + "rand 0.7.3", ] [[package]] name = "curve25519-dalek" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" +checksum = "434e1720189a637d44fe464f4df1e6eb900b4835255b14354497c78af37d9bb8" dependencies = [ - "byteorder 1.3.4", + "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle 2.3.0", + "subtle 2.4.0", "zeroize", ] [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "f627126b946c25a4638eec0ea634fc52506dea98db118aae985118ce7c3d723f" dependencies = [ - "byteorder 1.3.4", + "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.3.0", + "subtle 2.4.0", "zeroize", ] @@ -1265,6 +1247,15 @@ dependencies = [ "dirs-sys", ] +[[package]] +name = "directories" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fed639d60b58d0f53498ab13d26f621fd77569cc6edb031f4cc36a2ad9da0f" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-sys" version = "0.3.5" @@ -1282,8 +1273,8 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" dependencies = [ - "byteorder 1.3.4", - "quick-error", + "byteorder", + "quick-error 1.2.3", ] [[package]] @@ -1315,9 +1306,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d55796afa1b20c2945ca8eabfc421839f2b766619209f1ede813cf2484f31804" +checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "ed25519" @@ -1334,7 +1325,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "curve25519-dalek 3.0.0", + "curve25519-dalek 3.0.2", "ed25519", "rand 0.7.3", "serde", @@ -1343,17 +1334,15 @@ dependencies = [ ] [[package]] -name = "edge-signaling" -version = "1.0.0" +name = "edge-assets" +version = "3.2.0" dependencies = [ - "edge-voting", + "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", "parity-scale-codec", - "safe-mix", "serde", - "serde_derive", "sp-core", "sp-io", "sp-runtime", @@ -1361,65 +1350,71 @@ dependencies = [ ] [[package]] -name = "edge-treasury-reward" +name = "edge-chainbridge" version = "1.0.0" dependencies = [ + "chainbridge", "frame-support", "frame-system", - "pallet-authorship", "pallet-balances", - "pallet-session", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-timestamp", - "pallet-treasury", "parity-scale-codec", - "safe-mix", "serde", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-staking", "sp-std", ] [[package]] -name = "edge-voting" +name = "edge-treasury-reward" version = "1.0.0" dependencies = [ "frame-support", "frame-system", + "pallet-authorship", "pallet-balances", + "pallet-session", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-timestamp", + "pallet-treasury", "parity-scale-codec", "safe-mix", "serde", "sp-core", "sp-io", "sp-runtime", + "sp-staking", "sp-std", ] [[package]] name = "edgeware-cli" -version = "3.1.0" +version = "3.2.0" dependencies = [ "assert_cmd", "edgeware-executor", - "edgeware-inspect", "edgeware-primitives", "edgeware-rpc", "edgeware-runtime", + "fc-consensus", + "fc-rpc-core", + "fp-consensus", "frame-benchmarking-cli", "frame-support", "frame-system", - "futures 0.3.8", + "futures 0.3.12", "hex 0.3.2", "hex-literal", + "jsonrpc-core", + "jsonrpc-pubsub", "log", "nix", "pallet-authority-discovery", "pallet-balances", "pallet-contracts", + "pallet-evm", "pallet-grandpa", "pallet-im-online", "pallet-indices", @@ -1446,7 +1441,6 @@ dependencies = [ "sc-offchain", "sc-rpc", "sc-service", - "sc-service-test", "sc-telemetry", "sc-tracing", "sc-transaction-pool", @@ -1458,7 +1452,6 @@ dependencies = [ "sp-consensus-aura", "sp-core", "sp-finality-grandpa", - "sp-finality-tracker", "sp-inherents", "sp-io", "sp-keyring", @@ -1478,7 +1471,7 @@ dependencies = [ [[package]] name = "edgeware-executor" -version = "3.1.0" +version = "3.2.0" dependencies = [ "criterion", "edgeware-primitives", @@ -1502,30 +1495,13 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-trie", - "substrate-test-client", "trie-root", "wabt", ] -[[package]] -name = "edgeware-inspect" -version = "3.1.0" -dependencies = [ - "derive_more", - "log", - "parity-scale-codec", - "sc-cli", - "sc-client-api", - "sc-service", - "sp-blockchain", - "sp-core", - "sp-runtime", - "structopt", -] - [[package]] name = "edgeware-primitives" -version = "3.1.0" +version = "3.2.0" dependencies = [ "frame-system", "parity-scale-codec", @@ -1538,27 +1514,32 @@ dependencies = [ [[package]] name = "edgeware-rpc" -version = "3.1.0" +version = "3.2.0" dependencies = [ "edgeware-primitives", "edgeware-runtime", + "fc-rpc", + "fc-rpc-core", + "fp-rpc", "jsonrpc-core", + "jsonrpc-pubsub", "pallet-contracts-rpc", + "pallet-ethereum", "pallet-transaction-payment-rpc", "sc-client-api", - "sc-consensus-babe", - "sc-consensus-babe-rpc", + "sc-consensus-aura", "sc-consensus-epochs", "sc-finality-grandpa", "sc-finality-grandpa-rpc", "sc-keystore", + "sc-network", "sc-rpc", "sc-rpc-api", "sp-api", "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-consensus-babe", + "sp-consensus-aura", "sp-runtime", "sp-transaction-pool", "substrate-frame-rpc-system", @@ -1566,7 +1547,7 @@ dependencies = [ [[package]] name = "edgeware-rpc-client" -version = "3.1.0" +version = "3.2.0" dependencies = [ "edgeware-primitives", "futures 0.1.30", @@ -1579,29 +1560,39 @@ dependencies = [ [[package]] name = "edgeware-runtime" -version = "3.1.0" +version = "3.2.0" dependencies = [ - "edge-signaling", + "chainbridge", + "edge-assets", + "edge-chainbridge", "edge-treasury-reward", - "edge-voting", "edgeware-primitives", + "evm-runtime", + "fp-rpc", + "frame-benchmarking", "frame-executive", "frame-support", "frame-system", + "frame-system-benchmarking", "frame-system-rpc-runtime-api", + "hex-literal", "integer-sqrt", - "pallet-assets", "pallet-aura", "pallet-authority-discovery", "pallet-authorship", "pallet-balances", + "pallet-bounties", "pallet-collective", "pallet-contracts", "pallet-contracts-primitives", "pallet-contracts-rpc-runtime-api", "pallet-democracy", "pallet-elections-phragmen", - "pallet-finality-tracker", + "pallet-ethereum", + "pallet-evm", + "pallet-evm-precompile-ed25519", + "pallet-evm-precompile-modexp", + "pallet-evm-precompile-simple", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -1617,6 +1608,7 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-sudo", "pallet-timestamp", + "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -1643,12 +1635,12 @@ dependencies = [ "sp-transaction-pool", "sp-version", "static_assertions", - "substrate-wasm-builder-runner", + "substrate-wasm-builder", ] [[package]] name = "edgeware-runtime-interface" -version = "3.1.0" +version = "3.2.0" dependencies = [ "edgeware-primitives", "parity-scale-codec", @@ -1659,16 +1651,20 @@ dependencies = [ [[package]] name = "edgeware-testing" -version = "3.1.0" +version = "3.2.0" dependencies = [ - "edge-signaling", + "criterion", "edge-treasury-reward", "edgeware-executor", "edgeware-primitives", "edgeware-runtime", "frame-support", "frame-system", + "fs_extra", + "futures 0.3.12", + "log", "pallet-balances", + "pallet-contracts", "pallet-grandpa", "pallet-indices", "pallet-session", @@ -1677,14 +1673,24 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "parity-scale-codec", + "sc-block-builder", + "sc-cli", + "sc-client-api", + "sc-client-db", "sc-executor", "sc-service", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", "sp-core", + "sp-inherents", "sp-io", "sp-keyring", "sp-runtime", + "sp-timestamp", "substrate-test-client", - "wabt", + "tempfile", ] [[package]] @@ -1734,9 +1740,9 @@ checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e" [[package]] name = "erased-serde" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca8b296792113e1500fd935ae487be6e00ce318952a6880555554824d6ebf38" +checksum = "0465971a8cc1fa2455c8465aaa377131e1f1cf4983280f474a13e68793aa770c" dependencies = [ "serde", ] @@ -1762,19 +1768,116 @@ dependencies = [ "libc", ] +[[package]] +name = "ethbloom" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22a621dcebea74f2a6f2002d0a885c81ccf6cbdf86760183316a7722b5707ca4" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "tiny-keccak", +] + +[[package]] +name = "ethereum" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8603f637f22e3ab9aff8466b37850cd7ea2ae52034b07e41fdc82f1f68dfa2c" +dependencies = [ + "ethereum-types", + "hash-db", + "hash256-std-hasher", + "parity-scale-codec", + "rlp", + "rlp-derive", + "serde", + "sha3 0.9.1", + "triehash", +] + +[[package]] +name = "ethereum-types" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05dc5f0df4915fa6dff7f975a8366ecfaaa8959c74235469495153e7bb1b280e" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "uint 0.9.0", +] + [[package]] name = "event-listener" version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" +[[package]] +name = "evm" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38d664e59bf9ae0114a275cdf785d4112c32b3df0e522f16585a77599e7c614" +dependencies = [ + "ethereum", + "evm-core", + "evm-gasometer", + "evm-runtime", + "log", + "parity-scale-codec", + "primitive-types", + "rlp", + "serde", + "sha3 0.8.2", +] + +[[package]] +name = "evm-core" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11690b7226e83602067b6ba9568055e642971158b2c3af210c80d37ce2b8629" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "serde", +] + +[[package]] +name = "evm-gasometer" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f566265c4b49fab36e74db39f8c5499a7d4bbfb54c83896ef56f3f517b945eca" +dependencies = [ + "evm-core", + "evm-runtime", + "primitive-types", +] + +[[package]] +name = "evm-runtime" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d22e83135ff4870046706c7bd8dd70bb321df98b42218812e99444332222250" +dependencies = [ + "evm-core", + "primitive-types", + "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.8", + "futures 0.3.12", ] [[package]] @@ -1820,6 +1923,79 @@ dependencies = [ "instant", ] +[[package]] +name = "fc-consensus" +version = "0.1.0" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "derive_more", + "fp-consensus", + "futures 0.3.12", + "log", + "parity-scale-codec", + "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-rpc" +version = "0.1.0" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "ethereum", + "ethereum-types", + "fc-consensus", + "fc-rpc-core", + "fp-rpc", + "futures 0.3.12", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-pubsub", + "libsecp256k1", + "log", + "pallet-ethereum", + "pallet-evm", + "parity-scale-codec", + "rand 0.7.3", + "rlp", + "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 = "0.1.0" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "ethereum-types", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-pubsub", + "rustc-hex", + "serde", + "serde_json", +] + [[package]] name = "fdlimit" version = "0.2.1" @@ -1846,7 +2022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8feb87a63249689640ac9c011742c33139204e3c134293d3054022276869133b" dependencies = [ "either", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 2.0.2", "log", "num-traits", @@ -1856,12 +2032,12 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ - "byteorder 1.3.4", - "rand 0.7.3", + "byteorder", + "rand 0.8.2", "rustc-hex", "static_assertions", ] @@ -1893,8 +2069,8 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", ] @@ -1909,10 +2085,50 @@ dependencies = [ "percent-encoding 2.1.0", ] +[[package]] +name = "fp-consensus" +version = "0.1.0" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "parity-scale-codec", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fp-evm" +version = "0.8.0" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "evm", + "impl-trait-for-tuples 0.1.3", + "parity-scale-codec", + "serde", + "sp-core", + "sp-std", +] + +[[package]] +name = "fp-rpc" +version = "0.1.0" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "ethereum", + "ethereum-types", + "fp-evm", + "parity-scale-codec", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "frame-benchmarking" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -1929,17 +2145,22 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ + "Inflector", + "chrono", "frame-benchmarking", + "handlebars", "parity-scale-codec", "sc-cli", "sc-client-db", "sc-executor", "sc-service", + "serde", "sp-core", "sp-externalities", + "sp-keystore", "sp-runtime", "sp-state-machine", "structopt", @@ -1947,8 +2168,8 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -1963,8 +2184,8 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "12.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "12.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "serde", @@ -1974,19 +2195,19 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "bitmask", + "bitflags", "frame-metadata", "frame-support-procedural", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "log", - "once_cell 1.5.2", + "once_cell", "parity-scale-codec", "paste", "serde", - "smallvec 1.5.0", + "smallvec 1.6.1", "sp-arithmetic", "sp-core", "sp-inherents", @@ -1999,9 +2220,10 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ + "Inflector", "frame-support-procedural-tools", "proc-macro2", "quote", @@ -2010,8 +2232,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2022,8 +2244,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "proc-macro2", "quote", @@ -2032,11 +2254,11 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "parity-scale-codec", "serde", "sp-core", @@ -2046,10 +2268,25 @@ dependencies = [ "sp-version", ] +[[package]] +name = "frame-system-benchmarking" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c1c7102ca1f9f40220682dff62af93292db159e2457b1e439e882c11a4be646" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "frame-system-rpc-runtime-api" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-api", @@ -2067,6 +2304,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -2097,9 +2340,9 @@ checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed" [[package]] name = "futures" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" dependencies = [ "futures-channel", "futures-core", @@ -2112,34 +2355,19 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" dependencies = [ "futures-core", "futures-sink", ] -[[package]] -name = "futures-channel-preview" -version = "0.3.0-alpha.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" -dependencies = [ - "futures-core-preview", -] - [[package]] name = "futures-core" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" - -[[package]] -name = "futures-core-preview" -version = "0.3.0-alpha.19" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" +checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" [[package]] name = "futures-cpupool" @@ -2158,7 +2386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9" dependencies = [ "futures 0.1.30", - "futures 0.3.8", + "futures 0.3.12", "lazy_static", "log", "parking_lot 0.9.0", @@ -2169,9 +2397,9 @@ dependencies = [ [[package]] name = "futures-executor" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" +checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" dependencies = [ "futures-core", "futures-task", @@ -2181,30 +2409,30 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" +checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" [[package]] name = "futures-lite" -version = "1.11.2" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6c079abfac3ab269e2927ec048dabc89d009ebfdda6b8ee86624f30c689658" +checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb" dependencies = [ "fastrand", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite 0.1.11", + "pin-project-lite 0.2.4", "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" dependencies = [ "proc-macro-hack", "proc-macro2", @@ -2214,17 +2442,17 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" +checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" [[package]] name = "futures-task" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" +checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" dependencies = [ - "once_cell 1.5.2", + "once_cell", ] [[package]] @@ -2245,9 +2473,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" +checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" dependencies = [ "futures 0.1.30", "futures-channel", @@ -2257,25 +2485,13 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project 1.0.2", + "pin-project-lite 0.2.4", "pin-utils", "proc-macro-hack", "proc-macro-nested", "slab", ] -[[package]] -name = "futures-util-preview" -version = "0.3.0-alpha.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" -dependencies = [ - "futures-channel-preview", - "futures-core-preview", - "pin-utils", - "slab", -] - [[package]] name = "futures_codec" version = "0.4.1" @@ -2283,7 +2499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce54d63f8b0c75023ed920d46fd71d0cbbb830b0ee012726b5b4f506fb6dea5b" dependencies = [ "bytes 0.5.6", - "futures 0.3.8", + "futures 0.3.12", "memchr", "pin-project 0.4.27", ] @@ -2295,23 +2511,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] -name = "generator" -version = "0.6.23" +name = "generic-array" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cdc09201b2e8ca1b19290cf7e65de2246b8e91fb6874279722189c4de7b94dc" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ - "cc", - "libc", - "log", - "rustc_version", - "winapi 0.3.9", + "typenum", ] [[package]] name = "generic-array" -version = "0.12.3" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd" dependencies = [ "typenum", ] @@ -2326,35 +2538,14 @@ dependencies = [ "version_check", ] -[[package]] -name = "get_if_addrs" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" -dependencies = [ - "c_linked_list", - "get_if_addrs-sys", - "libc", - "winapi 0.2.8", -] - -[[package]] -name = "get_if_addrs-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" -dependencies = [ - "gcc", - "libc", -] - [[package]] name = "getrandom" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", + "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", "wasm-bindgen", @@ -2362,21 +2553,24 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", + "js-sys", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi 0.10.1+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "ghash" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6e27f0689a6e15944bdce7e45425efb87eaa8ab0c6e87f11d0987a9133e2531" +checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" dependencies = [ + "opaque-debug 0.3.0", "polyval", ] @@ -2441,7 +2635,7 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" dependencies = [ - "byteorder 1.3.4", + "byteorder", "bytes 0.4.12", "fnv", "futures 0.1.30", @@ -2464,10 +2658,10 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.1", + "http 0.2.3", "indexmap", "slab", - "tokio 0.2.23", + "tokio 0.2.24", "tokio-util", "tracing", "tracing-futures", @@ -2475,9 +2669,23 @@ dependencies = [ [[package]] name = "half" -version = "1.6.0" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62aca2aba2d62b4a7f5b33f3712cb1b0692779a56fb510499d5c0aa594daeaf3" + +[[package]] +name = "handlebars" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177" +checksum = "964d0e99a61fe9b1b347389b77ebf8b7e1587b70293676aaca7d27e59b9073b2" +dependencies = [ + "log", + "pest", + "pest_derive", + "quick-error 2.0.0", + "serde", + "serde_json", +] [[package]] name = "hash-db" @@ -2494,59 +2702,29 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" -dependencies = [ - "byteorder 1.3.4", - "scopeguard 0.3.3", -] - -[[package]] -name = "hashbrown" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" -dependencies = [ - "ahash 0.2.19", - "autocfg 0.1.7", -] - -[[package]] -name = "hashbrown" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "ahash 0.3.8", - "autocfg 1.0.1", -] - [[package]] name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" dependencies = [ - "ahash 0.4.6", + "ahash", ] [[package]] name = "heck" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" dependencies = [ "libc", ] @@ -2585,6 +2763,16 @@ dependencies = [ "digest 0.8.1", ] +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] + [[package]] name = "hmac-drbg" version = "0.2.0" @@ -2593,7 +2781,7 @@ checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" dependencies = [ "digest 0.8.1", "generic-array 0.12.3", - "hmac", + "hmac 0.7.1", ] [[package]] @@ -2609,11 +2797,11 @@ dependencies = [ [[package]] name = "http" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "fnv", "itoa", ] @@ -2637,7 +2825,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ "bytes 0.5.6", - "http 0.2.1", + "http 0.2.3", ] [[package]] @@ -2658,7 +2846,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" dependencies = [ - "quick-error", + "quick-error 1.2.3", ] [[package]] @@ -2682,7 +2870,7 @@ dependencies = [ "time", "tokio 0.1.22", "tokio-buf", - "tokio-executor 0.1.10", + "tokio-executor", "tokio-io", "tokio-reactor", "tokio-tcp", @@ -2702,14 +2890,14 @@ dependencies = [ "futures-core", "futures-util", "h2 0.2.7", - "http 0.2.1", + "http 0.2.3", "http-body 0.3.1", "httparse", "httpdate", "itoa", - "pin-project 1.0.2", + "pin-project 1.0.4", "socket2", - "tokio 0.2.23", + "tokio 0.2.24", "tower-service", "tracing", "want 0.3.0", @@ -2726,9 +2914,9 @@ dependencies = [ "futures-util", "hyper 0.13.9", "log", - "rustls", + "rustls 0.18.1", "rustls-native-certs", - "tokio 0.2.23", + "tokio 0.2.24", "tokio-rustls", "webpki", ] @@ -2755,6 +2943,43 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "if-addrs" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28538916eb3f3976311f5dfbe67b5362d0add1293d0a9cad17debf86f8e3aa48" +dependencies = [ + "if-addrs-sys", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "if-addrs-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de74b9dd780476e837e5eb5ab7c88b49ed304126e412030a0adba99c8efe79ea" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "if-watch" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d7c5e361e6b05c882b4847dd98992534cebc6fcde7f4bc98225bcf10fd6d0d" +dependencies = [ + "async-io", + "futures 0.3.12", + "futures-lite", + "if-addrs", + "ipnet", + "libc", + "log", + "winapi 0.3.9", +] + [[package]] name = "impl-codec" version = "0.4.2" @@ -2764,6 +2989,15 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + [[package]] name = "impl-serde" version = "0.3.1" @@ -2784,14 +3018,25 @@ dependencies = [ "syn", ] +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f65a8ecf74feeacdab8d38cb129e550ca871cccaa7d1921d8636ecd75534903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "indexmap" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ - "autocfg 1.0.1", - "hashbrown 0.9.1", + "autocfg", + "hashbrown", "serde", ] @@ -2802,6 +3047,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -2819,7 +3067,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "futures-timer 2.0.2", ] @@ -2864,9 +3112,9 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "jobserver" @@ -2879,9 +3127,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.45" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" +checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" dependencies = [ "wasm-bindgen", ] @@ -3036,30 +3284,30 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0315ef2f688e33844400b31f11c263f2b3dc21d8b9355c6891c5f185fae43f9a" +checksum = "92312348daade49976a6dc59263ad39ed54f840aacb5664874f7c9aa16e5f848" dependencies = [ "parity-util-mem", - "smallvec 1.5.0", + "smallvec 1.6.1", ] [[package]] name = "kvdb-memorydb" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73de822b260a3bdfb889dbbb65bb2d473eee2253973d6fa4a5d149a2a4a7c66e" +checksum = "986052a8d16c692eaebe775391f9a3ac26714f3907132658500b601dec94c8c2" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44947dd392f09475af614d740fe0320b66d01cb5b977f664bbbb5e45a70ea4c1" +checksum = "8d92c36be64baba5ea549116ff0d7ffd445456a7be8aaee21ec05882b980cd11" dependencies = [ "fs-swap", "kvdb", @@ -3067,25 +3315,26 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "regex", "rocksdb", - "smallvec 1.5.0", + "smallvec 1.6.1", ] [[package]] name = "kvdb-web" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2701a1369d6ea4f1b9f606db46e5e2a4a8e47f22530a07823d653f85ab1f6c34" +checksum = "f7bfe11b3202691673766b1224c432996f6b8047db17ceb743675bef3404e714" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "js-sys", "kvdb", "kvdb-memorydb", "log", "parity-util-mem", - "send_wrapper 0.3.0", + "parking_lot 0.11.1", + "send_wrapper 0.5.0", "wasm-bindgen", "web-sys", ] @@ -3110,9 +3359,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.80" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" [[package]] name = "libloading" @@ -3132,13 +3381,13 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.28.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f5a4604c1a40d75651da141dfde29ad15329f537a779528803297d2220274" +checksum = "2e17c636b5fe5ff900ccc2840b643074bfac321551d821243a781d0d46f06588" dependencies = [ "atomic", "bytes 0.5.6", - "futures 0.3.8", + "futures 0.3.12", "lazy_static", "libp2p-core", "libp2p-core-derive", @@ -3161,26 +3410,25 @@ dependencies = [ "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", - "multihash", "parity-multiaddr", - "parking_lot 0.10.2", - "pin-project 0.4.27", - "smallvec 1.5.0", + "parking_lot 0.11.1", + "pin-project 1.0.4", + "smallvec 1.6.1", "wasm-timer", ] [[package]] name = "libp2p-core" -version = "0.22.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f13ba8c7df0768af2eb391696d562c7de88cc3a35122531aaa6a7d77754d25" +checksum = "e1cb706da14c064dce54d8864ade6836b3486b51689300da74eeb7053aa4551e" dependencies = [ "asn1_der", - "bs58 0.3.1", + "bs58", "ed25519-dalek", "either", "fnv", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "lazy_static", "libsecp256k1", @@ -3188,26 +3436,26 @@ dependencies = [ "multihash", "multistream-select", "parity-multiaddr", - "parking_lot 0.10.2", - "pin-project 0.4.27", + "parking_lot 0.11.1", + "pin-project 1.0.4", "prost", "prost-build", "rand 0.7.3", "ring", "rw-stream-sink", - "sha2 0.8.2", - "smallvec 1.5.0", + "sha2 0.9.2", + "smallvec 1.6.1", "thiserror", - "unsigned-varint 0.4.0", + "unsigned-varint", "void", "zeroize", ] [[package]] name = "libp2p-core-derive" -version = "0.20.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f753d9324cd3ec14bf04b8a8cd0d269c87f294153d6bf2a84497a63a5ad22213" +checksum = "f4bc40943156e42138d22ed3c57ff0e1a147237742715937622a99b10fbe0156" dependencies = [ "quote", "syn", @@ -3215,54 +3463,55 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74029ae187f35f4b8ddf26b9779a68b340045d708528a103917cdca49a296db5" +checksum = "e3257a41f376aa23f237231971fee7e350e4d8353cfcf233aef34d6d6b638f0c" dependencies = [ "flate2", - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", ] [[package]] name = "libp2p-dns" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cf319822e08dd65c8e060d2354e9f952895bbc433f5706c75ed010c152aee5e" +checksum = "2e09bab25af01326b4ed9486d31325911437448edda30bc57681502542d49f20" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "log", ] [[package]] name = "libp2p-floodsub" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a9acb43a3e4a4e413e0c4abe0fa49308df7c6335c88534757b647199cb8a51" +checksum = "6fd8cdd5ef1dd0b7346975477216d752de976b92e43051bc8bd808c372ea6cec" dependencies = [ "cuckoofilter", "fnv", - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "libp2p-swarm", + "log", "prost", "prost-build", "rand 0.7.3", - "smallvec 1.5.0", + "smallvec 1.6.1", ] [[package]] name = "libp2p-gossipsub" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab20fcb60edebe3173bbb708c6ac3444afdf1e3152dc2866b10c4f5497f17467" +checksum = "d489531aa9d4ba8726a08b3b74e21c2e10a518ad266ebca98d79040123ab0036" dependencies = [ - "base64 0.11.0", - "byteorder 1.3.4", + "base64 0.13.0", + "byteorder", "bytes 0.5.6", "fnv", - "futures 0.3.8", + "futures 0.3.12", "futures_codec", "hex_fmt", "libp2p-core", @@ -3272,122 +3521,122 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "sha2 0.8.2", - "smallvec 1.5.0", - "unsigned-varint 0.4.0", + "sha2 0.9.2", + "smallvec 1.6.1", + "unsigned-varint", "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56396ee63aa9164eacf40c2c5d2bda8c4133c2f57e1b0425d51d3a4e362583b1" +checksum = "c43bc51a9bc3780288c526615ba0f5f8216820ea6dcc02b89e8daee526c5fccb" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "libp2p-swarm", "log", "prost", "prost-build", - "smallvec 1.5.0", + "smallvec 1.6.1", "wasm-timer", ] [[package]] name = "libp2p-kad" -version = "0.23.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7fa9047f8b8f544278a35c2d9d45d3b2c1785f2d86d4e1629d6edf97be3955" +checksum = "bfe68563ee33f3848293919afd61470ebcdea4e757a36cc2c33a5508abec2216" dependencies = [ "arrayvec 0.5.2", "bytes 0.5.6", "either", "fnv", - "futures 0.3.8", + "futures 0.3.12", "futures_codec", "libp2p-core", "libp2p-swarm", "log", - "multihash", "prost", "prost-build", "rand 0.7.3", - "sha2 0.8.2", - "smallvec 1.5.0", - "uint", - "unsigned-varint 0.4.0", + "sha2 0.9.2", + "smallvec 1.6.1", + "uint 0.8.5", + "unsigned-varint", "void", "wasm-timer", ] [[package]] name = "libp2p-mdns" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3173b5a6b2f690c29ae07798d85b9441a131ac76ddae9015ef22905b623d0c69" +checksum = "8a9e12688e8f14008c950c1efde587cb44dbf316fa805f419cd4e524991236f5" dependencies = [ - "async-std", + "async-io", "data-encoding", "dns-parser", - "either", - "futures 0.3.8", + "futures 0.3.12", + "if-watch", "lazy_static", "libp2p-core", "libp2p-swarm", "log", - "net2", "rand 0.7.3", - "smallvec 1.5.0", + "smallvec 1.6.1", + "socket2", "void", - "wasm-timer", ] [[package]] name = "libp2p-mplex" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a73a799cc8410b36e40b8f4c4b6babbcb9efd3727111bf517876e4acfa612d3" +checksum = "ce3200fbe6608e623bd9efa459cc8bafa0e4efbb0a2dfcdd0e1387ff4181264b" dependencies = [ "bytes 0.5.6", - "fnv", - "futures 0.3.8", + "futures 0.3.12", "futures_codec", "libp2p-core", "log", - "parking_lot 0.10.2", - "unsigned-varint 0.4.0", + "nohash-hasher", + "parking_lot 0.11.1", + "rand 0.7.3", + "smallvec 1.6.1", + "unsigned-varint", ] [[package]] name = "libp2p-noise" -version = "0.24.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef6c490042f549fb1025f2892dfe6083d97a77558f450c1feebe748ca9eb15a" +checksum = "0580e0d18019d254c9c349c03ff7b22e564b6f2ada70c045fc39738e144f2139" dependencies = [ "bytes 0.5.6", - "curve25519-dalek 2.1.0", - "futures 0.3.8", + "curve25519-dalek 3.0.2", + "futures 0.3.12", "lazy_static", "libp2p-core", "log", "prost", "prost-build", "rand 0.7.3", - "sha2 0.8.2", + "sha2 0.9.2", "snow", "static_assertions", - "x25519-dalek 0.6.0", + "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad063c21dfcea4518ac9e8bd4119d33a5b26c41e674f602f41f05617a368a5c8" +checksum = "50b2ec86a18cbf09d7df440e7786a2409640c774e476e9a3b4d031382c3d7588" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "libp2p-swarm", "log", @@ -3398,82 +3647,81 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903a12e99c72dbebefea258de887982adeacc7025baa1ceb10b7fa9928f54791" +checksum = "6a7b1bdcbe46a3a2159c231601ed29645282653c0a96ce3a2ad8352c9fbe6800" dependencies = [ "bytes 0.5.6", - "futures 0.3.8", + "futures 0.3.12", "futures_codec", "libp2p-core", "log", "prost", "prost-build", - "rw-stream-sink", - "unsigned-varint 0.4.0", + "unsigned-varint", "void", ] [[package]] name = "libp2p-pnet" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b3c2d5d26a9500e959a0e19743897239a6c4be78dadf99b70414301a70c006" +checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "log", - "pin-project 0.4.27", + "pin-project 1.0.4", "rand 0.7.3", "salsa20", - "sha3", + "sha3 0.9.1", ] [[package]] name = "libp2p-request-response" -version = "0.3.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0c9e8a4cd69d97e9646c54313d007512f411aba8c5226cfcda16df6a6e84a3" +checksum = "620e2950decbf77554b5aed3824f7d0e2c04923f28c70f9bff1a402c47ef6b1e" dependencies = [ "async-trait", "bytes 0.5.6", - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "libp2p-swarm", "log", - "lru 0.6.1", + "lru", "minicbor", "rand 0.7.3", - "smallvec 1.5.0", - "unsigned-varint 0.5.1", + "smallvec 1.6.1", + "unsigned-varint", "wasm-timer", ] [[package]] name = "libp2p-swarm" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7193e444210132237b81b755ec7fe53f1c4bd2f53cf719729b94c0c72eb6eaa1" +checksum = "fdf5894ee1ee63a38aa58d58a16e3dcf7ede6b59ea7b22302c00c1a41d7aec41" dependencies = [ "either", - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "log", "rand 0.7.3", - "smallvec 1.5.0", + "smallvec 1.6.1", "void", "wasm-timer", ] [[package]] name = "libp2p-tcp" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f42ec130d7a37a7e47bf4398026b7ad9185c08ed26972e2720f8b94112796f" +checksum = "1d2113a7dab2b502c55fe290910cd7399a2aa04fe70a2f5a415a87a1db600c0e" dependencies = [ "async-std", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", - "get_if_addrs", + "if-addrs", "ipnet", "libp2p-core", "log", @@ -3482,23 +3730,23 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea7acb0a034f70d7db94c300eba3f65c0f6298820105624088a9609c9974d77" +checksum = "af05fe92c2a3aa320bc82a308ddb7b33bef3b060154c5a4b9fb0b01f15385fc0" dependencies = [ "async-std", - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "log", ] [[package]] name = "libp2p-wasm-ext" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34c1faac6f92c21fbe155417957863ea822fba9e9fd5eb24c0912336a100e63f" +checksum = "37cd44ea05a4523f40183f60ab6e6a80e400a5ddfc98b0df1c55edeb85576cd9" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -3508,31 +3756,31 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.23.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d650534ebd99f48f6fa292ed5db10d30df2444943afde4407ceeddab8e513fca" +checksum = "270c80528e21089ea25b41dd1ab8fd834bdf093ebee422fed3b68699a857a083" dependencies = [ "async-tls", "either", - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "log", "quicksink", - "rustls", + "rustls 0.19.0", "rw-stream-sink", "soketto", "url 2.2.0", "webpki", - "webpki-roots 0.18.0", + "webpki-roots", ] [[package]] name = "libp2p-yamux" -version = "0.25.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781d9b9f043dcdabc40640807125368596b849fd4d96cdca2dcf052fdf6f33fd" +checksum = "36799de9092c35782f080032eddbc8de870f94a0def87cf9f8883efccd5cacf0" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "libp2p-core", "parking_lot 0.11.1", "thiserror", @@ -3563,7 +3811,7 @@ dependencies = [ "hmac-drbg", "rand 0.7.3", "sha2 0.8.2", - "subtle 2.3.0", + "subtle 2.4.0", "typenum", ] @@ -3580,9 +3828,9 @@ dependencies = [ [[package]] name = "linked-hash-map" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" +checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "linked_hash_set" @@ -3595,31 +3843,21 @@ dependencies = [ [[package]] name = "linregress" -version = "0.1.7" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9290cf6f928576eeb9c096c6fad9d8d452a0a1a70a2bbffa6e36064eedc0aac9" +checksum = "0d0ad4b5cc8385a881c561fac3501353d63d2a2b7a357b5064d71815c9a92724" dependencies = [ - "failure", "nalgebra", "statrs", ] -[[package]] -name = "lock_api" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -dependencies = [ - "scopeguard 0.3.3", -] - [[package]] name = "lock_api" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" dependencies = [ - "scopeguard 1.1.0", + "scopeguard", ] [[package]] @@ -3628,54 +3866,32 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" dependencies = [ - "scopeguard 1.1.0", + "scopeguard", ] [[package]] name = "log" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if 0.1.10", -] - -[[package]] -name = "loom" -version = "0.3.6" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e8460f2f2121162705187214720353c517b97bdfb3494c0b1e33d83ebe4bed" +checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" dependencies = [ "cfg-if 0.1.10", - "generator", - "scoped-tls", - "serde", - "serde_json", ] [[package]] name = "lru" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" -dependencies = [ - "hashbrown 0.6.3", -] - -[[package]] -name = "lru" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be716eb6878ca2263eb5d00a781aa13264a794f519fe6af4fbb2668b2d5441c0" +checksum = "3aae342b73d57ad0b8b364bd12584819f2c1fe9114285dfcf8b0722607671635" dependencies = [ - "hashbrown 0.9.1", + "hashbrown", ] [[package]] name = "lru_time_cache" -version = "0.10.0" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb241df5c4caeb888755363fc95f8a896618dc0d435e9e775f7930cb099beab" +checksum = "78f957950068c53af3b32a1b3a6e69f6dd3c19fa6f0dcc1168b846662d5e10b1" [[package]] name = "mach" @@ -3686,6 +3902,12 @@ dependencies = [ "libc", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "matchers" version = "0.0.1" @@ -3703,9 +3925,9 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "matrixmultiply" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f" +checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" dependencies = [ "rawpointer", ] @@ -3738,7 +3960,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -3747,17 +3969,17 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] name = "memory-db" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f36ddb0b2cdc25d38babba472108798e3477f02be5165f038c5e393e50c57a" +checksum = "6cbd2a22f201c03cc1706a727842490abfea17b7b53260358239828208daba3c" dependencies = [ "hash-db", - "hashbrown 0.8.2", + "hashbrown", "parity-util-mem", ] @@ -3769,11 +3991,11 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merlin" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" dependencies = [ - "byteorder 1.3.4", + "byteorder", "keccak", "rand_core 0.5.1", "zeroize", @@ -3781,18 +4003,18 @@ dependencies = [ [[package]] name = "minicbor" -version = "0.5.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc03ad6f8f548db7194a5ff5a6f96342ecae4e3ef67d2bf18bacc0e245cd041" +checksum = "3265a9f5210bb726f81ef9c456ae0aff5321cd95748c0e71889b0e19d8f0332b" dependencies = [ "minicbor-derive", ] [[package]] name = "minicbor-derive" -version = "0.4.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c214bf3d90099b52f3e4b328ae0fe34837fd0fab683ad1e10fceb4629106df48" +checksum = "130b9455e28a3f308f6579671816a6f2621e2e0cbf55dc2f886345bef699481e" dependencies = [ "proc-macro2", "quote", @@ -3806,14 +4028,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" dependencies = [ "adler", - "autocfg 1.0.1", + "autocfg", ] [[package]] name = "mio" -version = "0.6.22" +version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" dependencies = [ "cfg-if 0.1.10", "fuchsia-zircon", @@ -3822,7 +4044,7 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow 0.2.1", + "miow 0.2.2", "net2", "slab", "winapi 0.2.8", @@ -3865,9 +4087,9 @@ dependencies = [ [[package]] name = "miow" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" dependencies = [ "kernel32-sys", "net2", @@ -3892,18 +4114,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[package]] -name = "multihash" -version = "0.11.4" +name = "multihash" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab" +dependencies = [ + "digest 0.9.0", + "generic-array 0.14.4", + "multihash-derive", + "sha2 0.9.2", + "unsigned-varint", +] + +[[package]] +name = "multihash-derive" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567122ab6492f49b59def14ecc36e13e64dca4188196dd0cd41f9f3f979f3df6" +checksum = "85ee3c48cb9d9b275ad967a0e96715badc13c6029adb92f34fa17b9ff28fd81f" dependencies = [ - "blake2b_simd", - "blake2s_simd", - "digest 0.9.0", - "sha-1 0.9.2", - "sha2 0.9.2", - "sha3", - "unsigned-varint 0.5.1", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", + "synstructure", ] [[package]] @@ -3914,32 +4148,33 @@ checksum = "1255076139a83bb467426e7f8d0134968a8118844faa755985e077cf31850333" [[package]] name = "multistream-select" -version = "0.8.5" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93faf2e41f9ee62fb01680ed48f3cc26652352327aa2e59869070358f6b7dd75" +checksum = "dda822043bba2d6da31c4e14041f9794f8fb130a5959289038d0b809d8888614" dependencies = [ "bytes 0.5.6", - "futures 0.3.8", + "futures 0.3.12", "log", - "pin-project 1.0.2", - "smallvec 1.5.0", - "unsigned-varint 0.5.1", + "pin-project 1.0.4", + "smallvec 1.6.1", + "unsigned-varint", ] [[package]] name = "nalgebra" -version = "0.18.1" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2" +checksum = "d6b6147c3d50b4f3cdabfe2ecc94a0191fd3d6ad58aefd9664cf396285883486" dependencies = [ - "alga", "approx", - "generic-array 0.12.3", + "generic-array 0.13.2", "matrixmultiply", - "num-complex", - "num-rational", + "num-complex 0.2.4", + "num-rational 0.2.4", "num-traits", - "rand 0.6.5", + "rand 0.7.3", + "rand_distr", + "simba", "typenum", ] @@ -3964,9 +4199,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.35" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" dependencies = [ "cfg-if 0.1.10", "libc", @@ -4008,13 +4243,38 @@ dependencies = [ "version_check", ] +[[package]] +name = "num" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" +dependencies = [ + "num-bigint 0.3.1", + "num-complex 0.3.1", + "num-integer", + "num-iter", + "num-rational 0.3.2", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.0.1", + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf" +dependencies = [ + "autocfg", "num-integer", "num-traits", ] @@ -4025,7 +4285,16 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" dependencies = [ - "autocfg 1.0.1", + "autocfg", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +dependencies = [ "num-traits", ] @@ -4035,7 +4304,18 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.0.1", + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +dependencies = [ + "autocfg", + "num-integer", "num-traits", ] @@ -4045,8 +4325,20 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg 1.0.1", - "num-bigint", + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +dependencies = [ + "autocfg", + "num-bigint 0.3.1", "num-integer", "num-traits", ] @@ -4057,7 +4349,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg 1.0.1", + "autocfg", "libm", ] @@ -4090,18 +4382,9 @@ dependencies = [ [[package]] name = "object" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" - -[[package]] -name = "once_cell" -version = "0.1.8" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" -dependencies = [ - "parking_lot 0.7.1", -] +checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" [[package]] name = "once_cell" @@ -4154,22 +4437,10 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "pallet-assets" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "sp-runtime", -] - [[package]] name = "pallet-aura" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4187,8 +4458,8 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4203,12 +4474,12 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "parity-scale-codec", "sp-authorship", "sp-inherents", @@ -4217,38 +4488,27 @@ dependencies = [ ] [[package]] -name = "pallet-babe" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +name = "pallet-balances" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "pallet-authorship", - "pallet-session", - "pallet-timestamp", "parity-scale-codec", "serde", - "sp-application-crypto", - "sp-consensus-babe", - "sp-consensus-vrf", - "sp-inherents", - "sp-io", "sp-runtime", - "sp-session", - "sp-staking", "sp-std", - "sp-timestamp", ] [[package]] -name = "pallet-balances" +name = "pallet-bounties" version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", + "pallet-treasury", "parity-scale-codec", "serde", "sp-runtime", @@ -4257,9 +4517,10 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -4272,16 +4533,16 @@ dependencies = [ [[package]] name = "pallet-contracts" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "bitflags", "frame-support", "frame-system", "pallet-contracts-primitives", + "pallet-contracts-proc-macro", "parity-scale-codec", - "parity-wasm", - "pwasm-utils", + "parity-wasm 0.41.0", + "pwasm-utils 0.16.0", "serde", "sp-core", "sp-io", @@ -4293,18 +4554,29 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ + "bitflags", "parity-scale-codec", "sp-runtime", "sp-std", ] +[[package]] +name = "pallet-contracts-proc-macro" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pallet-contracts-rpc" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4322,8 +4594,8 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -4334,8 +4606,8 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4349,8 +4621,8 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4362,31 +4634,101 @@ dependencies = [ ] [[package]] -name = "pallet-finality-tracker" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +name = "pallet-ethereum" +version = "0.1.0" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "ethereum", + "ethereum-types", + "evm", + "fp-consensus", + "fp-evm", + "fp-rpc", + "frame-support", + "frame-system", + "libsecp256k1", + "pallet-balances", + "pallet-evm", + "pallet-timestamp", + "parity-scale-codec", + "rlp", + "rustc-hex", + "serde", + "sha3 0.8.2", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-evm" +version = "2.0.1" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" dependencies = [ + "evm", + "evm-gasometer", + "evm-runtime", + "fp-evm", "frame-support", "frame-system", - "impl-trait-for-tuples", + "pallet-balances", + "pallet-timestamp", "parity-scale-codec", + "primitive-types", + "rlp", "serde", - "sp-finality-tracker", - "sp-inherents", + "sha3 0.8.2", + "sp-core", + "sp-io", "sp-runtime", "sp-std", ] +[[package]] +name = "pallet-evm-precompile-ed25519" +version = "2.0.1" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "ed25519-dalek", + "evm", + "fp-evm", + "sp-core", + "sp-io", +] + +[[package]] +name = "pallet-evm-precompile-modexp" +version = "2.0.1" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "evm", + "fp-evm", + "num", + "sp-core", + "sp-io", +] + +[[package]] +name = "pallet-evm-precompile-simple" +version = "2.0.1" +source = "git+https://github.com/hicommonwealth/frontier.git?rev=d3179acb5a111d58af6c48a12588ecd38750a9bb#d3179acb5a111d58af6c48a12588ecd38750a9bb" +dependencies = [ + "evm", + "fp-evm", + "ripemd160", + "sp-core", + "sp-io", +] + [[package]] name = "pallet-grandpa" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-authorship", - "pallet-finality-tracker", "pallet-session", "parity-scale-codec", "serde", @@ -4401,8 +4743,8 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4410,7 +4752,6 @@ dependencies = [ "frame-system", "parity-scale-codec", "serde", - "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -4418,8 +4759,8 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4437,8 +4778,8 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4453,8 +4794,8 @@ dependencies = [ [[package]] name = "pallet-multisig" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4468,8 +4809,8 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4483,8 +4824,8 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4498,8 +4839,8 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4511,8 +4852,8 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "enumflags2", "frame-support", @@ -4526,8 +4867,8 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4541,12 +4882,12 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.1.3", "pallet-timestamp", "parity-scale-codec", "serde", @@ -4561,8 +4902,8 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4581,8 +4922,8 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4592,8 +4933,8 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4606,13 +4947,13 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "parity-scale-codec", "serde", "sp-inherents", @@ -4622,16 +4963,30 @@ dependencies = [ ] [[package]] -name = "pallet-transaction-payment" +name = "pallet-tips" version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" +dependencies = [ + "frame-support", + "frame-system", + "pallet-treasury", + "parity-scale-codec", + "serde", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-transaction-payment" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "serde", - "smallvec 1.5.0", + "smallvec 1.6.1", "sp-core", "sp-io", "sp-runtime", @@ -4640,8 +4995,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4658,8 +5013,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "parity-scale-codec", @@ -4671,11 +5026,12 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples 0.2.0", "pallet-balances", "parity-scale-codec", "serde", @@ -4685,8 +5041,8 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-support", "frame-system", @@ -4700,8 +5056,8 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "enumflags2", "frame-support", @@ -4728,27 +5084,27 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.9.6" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43244a26dc1ddd3097216bb12eaa6cf8a07b060c72718d9ebd60fd297d6401df" +checksum = "180cd097078b337d2ba6400c6a67b181b38b611273cb1d8d12f3d8d5d8eaaacb" dependencies = [ "arrayref", - "bs58 0.4.0", - "byteorder 1.3.4", + "bs58", + "byteorder", "data-encoding", "multihash", "percent-encoding 2.1.0", "serde", "static_assertions", - "unsigned-varint 0.5.1", + "unsigned-varint", "url 2.2.0", ] [[package]] name = "parity-scale-codec" -version = "1.3.5" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c740e5fbcb6847058b40ac7e5574766c6388f585e184d769910fe0d3a2ca861" +checksum = "79602888a81ace83e3d1d4b2873286c1f5f906c84db667594e8db8da3506c383" dependencies = [ "arrayvec 0.5.2", "bitvec", @@ -4796,17 +5152,17 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c" +checksum = "8f17f15cb05897127bf36a240085a1f0bbef7bce3024849eccf7f93f6171bc27" dependencies = [ - "cfg-if 0.1.10", - "hashbrown 0.8.2", - "impl-trait-for-tuples", + "cfg-if 1.0.0", + "hashbrown", + "impl-trait-for-tuples 0.2.0", "parity-util-mem-derive", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "primitive-types", - "smallvec 1.5.0", + "smallvec 1.6.1", "winapi 0.3.9", ] @@ -4821,6 +5177,15 @@ dependencies = [ "synstructure", ] +[[package]] +name = "parity-wasm" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" +dependencies = [ + "byteorder", +] + [[package]] name = "parity-wasm" version = "0.41.0" @@ -4833,7 +5198,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e02a625dd75084c2a7024f07c575b61b782f729d18702dabb3cdbf31911dc61" dependencies = [ - "byteorder 1.3.4", + "byteorder", "bytes 0.4.12", "httparse", "log", @@ -4851,16 +5216,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -dependencies = [ - "lock_api 0.1.5", - "parking_lot_core 0.4.0", -] - [[package]] name = "parking_lot" version = "0.9.0" @@ -4890,20 +5245,7 @@ checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", "lock_api 0.4.2", - "parking_lot_core 0.8.0", -] - -[[package]] -name = "parking_lot_core" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -dependencies = [ - "libc", - "rand 0.6.5", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.9", + "parking_lot_core 0.8.2", ] [[package]] @@ -4913,11 +5255,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ "cfg-if 0.1.10", - "cloudabi 0.0.3", + "cloudabi", "libc", - "redox_syscall", + "redox_syscall 0.1.57", "rustc_version", - "smallvec 0.6.13", + "smallvec 0.6.14", "winapi 0.3.9", ] @@ -4928,25 +5270,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ "cfg-if 0.1.10", - "cloudabi 0.0.3", + "cloudabi", "libc", - "redox_syscall", - "smallvec 1.5.0", + "redox_syscall 0.1.57", + "smallvec 1.6.1", "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" dependencies = [ - "cfg-if 0.1.10", - "cloudabi 0.1.0", + "cfg-if 1.0.0", "instant", "libc", - "redox_syscall", - "smallvec 1.5.0", + "redox_syscall 0.1.57", + "smallvec 1.6.1", "winapi 0.3.9", ] @@ -4975,9 +5316,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" dependencies = [ - "byteorder 1.3.4", + "byteorder", "crypto-mac 0.7.0", - "rayon", +] + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac 0.8.0", ] [[package]] @@ -4987,22 +5336,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" [[package]] -name = "peeking_take_while" -version = "0.1.2" +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +dependencies = [ + "pest", + "pest_generator", +] [[package]] -name = "percent-encoding" -version = "1.0.1" +name = "pest_generator" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "percent-encoding" -version = "2.1.0" +name = "pest_meta" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +dependencies = [ + "maplit", + "pest", + "sha-1 0.8.2", +] [[package]] name = "petgraph" @@ -5025,11 +5417,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" +checksum = "95b70b68509f17aa2857863b6fa00bf21fc93674c7a8893de2f469f6aa7ca2f2" dependencies = [ - "pin-project-internal 1.0.2", + "pin-project-internal 1.0.4", ] [[package]] @@ -5045,9 +5437,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" +checksum = "caa25a6393f22ce819b0f50e0be89287292fda8d425be38ee0ca14c4931d9e71" dependencies = [ "proc-macro2", "quote", @@ -5062,9 +5454,9 @@ checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" [[package]] name = "pin-project-lite" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" +checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" [[package]] name = "pin-utils" @@ -5111,20 +5503,22 @@ dependencies = [ [[package]] name = "poly1305" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce46de8e53ee414ca4d02bfefac75d8c12fba948b76622a40b4be34dfce980" +checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8" dependencies = [ + "cpuid-bool 0.2.0", "universal-hash", ] [[package]] name = "polyval" -version = "0.4.2" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3fd900a291ceb8b99799cc8cd3d1d3403a51721e015bc533528b2ceafcc443c" +checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" dependencies = [ - "cfg-if 1.0.0", + "cpuid-bool 0.2.0", + "opaque-debug 0.3.0", "universal-hash", ] @@ -5136,9 +5530,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "predicates" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" +checksum = "73dd9b7b200044694dfede9edf907c1ca19630908443e9447e624993700c6932" dependencies = [ "difference", "predicates-core", @@ -5146,15 +5540,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" +checksum = "fb3dbeaaf793584e29c58c7e3a82bbb3c7c06b63cea68d13b0e3cddc124104dc" [[package]] name = "predicates-tree" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" +checksum = "aee95d988ee893cb35c06b148c80ed2cd52c8eea927f50ba7a0be1a786aeab73" dependencies = [ "predicates-core", "treeline", @@ -5174,14 +5568,15 @@ dependencies = [ [[package]] name = "primitive-types" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809" +checksum = "b3824ae2c5e27160113b9e029a10ec9e3f0237bad8029f69c7724393c9fdefd8" dependencies = [ "fixed-hash", "impl-codec", + "impl-rlp", "impl-serde", - "uint", + "uint 0.9.0", ] [[package]] @@ -5225,9 +5620,9 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro-nested" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" @@ -5309,9 +5704,20 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f53bc2558e8376358ebdc28301546471d67336584f6438ed4b7c7457a055fd7" dependencies = [ - "byteorder 1.3.4", + "byteorder", + "log", + "parity-wasm 0.41.0", +] + +[[package]] +name = "pwasm-utils" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c8ac87af529432d3a4f0e2b3bbf08af49f28f09cc73ed7e551161bdaef5f78d" +dependencies = [ + "byteorder", "log", - "parity-wasm", + "parity-wasm 0.41.0", ] [[package]] @@ -5320,6 +5726,12 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-error" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ac73b1112776fc109b2e61909bc46c7e1bf0d7f690ffb1676553acce16d5cda" + [[package]] name = "quicksink" version = "0.1.2" @@ -5333,9 +5745,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" dependencies = [ "proc-macro2", ] @@ -5369,60 +5781,30 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rand" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -dependencies = [ - "cloudabi 0.0.3", - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "winapi 0.3.9", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg 0.1.2", - "rand_xorshift", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.15", + "getrandom 0.1.16", "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc 0.2.0", - "rand_pcg 0.2.1", + "rand_pcg", ] [[package]] -name = "rand_chacha" -version = "0.1.1" +name = "rand" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", + "libc", + "rand_chacha 0.3.0", + "rand_core 0.6.1", + "rand_hc 0.3.0", ] [[package]] @@ -5435,6 +5817,16 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.1", +] + [[package]] name = "rand_core" version = "0.3.1" @@ -5456,70 +5848,43 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.15", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom 0.1.16", ] [[package]] -name = "rand_isaac" -version = "0.1.1" +name = "rand_core" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" dependencies = [ - "rand_core 0.3.1", + "getrandom 0.2.2", ] [[package]] -name = "rand_jitter" -version = "0.1.4" +name = "rand_distr" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2" dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", + "rand 0.7.3", ] [[package]] -name = "rand_os" -version = "0.1.3" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "cloudabi 0.0.3", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "wasm-bindgen", - "winapi 0.3.9", + "rand_core 0.5.1", ] [[package]] -name = "rand_pcg" -version = "0.1.2" +name = "rand_hc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", + "rand_core 0.6.1", ] [[package]] @@ -5531,20 +5896,11 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "raw-cpuid" -version = "7.0.3" +version = "7.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" +checksum = "beb71f708fe39b2c5e98076204c3cc094ee5a4c12c4cdb119a2b72dc34164f41" dependencies = [ "bitflags", "cc", @@ -5563,7 +5919,7 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" dependencies = [ - "autocfg 1.0.1", + "autocfg", "crossbeam-deque 0.8.0", "either", "rayon-core", @@ -5597,31 +5953,40 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +[[package]] +name = "redox_syscall" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570" +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.15", - "redox_syscall", + "getrandom 0.1.16", + "redox_syscall 0.1.57", "rust-argon2", ] [[package]] name = "ref-cast" -version = "1.0.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17626b2f4bcf35b84bf379072a66e28cfe5c3c6ae58b38e4914bb8891dabece" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c523ccaed8ac4b0288948849a350b37d3035827413c458b6a40ddb614bb4f72" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ "proc-macro2", "quote", @@ -5636,14 +6001,14 @@ checksum = "b9ba8aaf5fe7cf307c6dbdaeed85478961d29e25e3bee5169e11b92fa9f027a8" dependencies = [ "log", "rustc-hash", - "smallvec 1.5.0", + "smallvec 1.6.1", ] [[package]] name = "regex" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" +checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" dependencies = [ "aho-corasick", "memchr", @@ -5657,15 +6022,15 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" dependencies = [ - "byteorder 1.3.4", + "byteorder", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" +checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" [[package]] name = "region" @@ -5690,25 +6055,57 @@ dependencies = [ [[package]] name = "retain_mut" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e005d658ad26eacc2b6c506dfde519f4e277e328d0eb3379ca61647d70a8f531" +checksum = "53552c6c49e1e13f1a203ef0080ab3bbef0beb570a528993e83df057a9d9bba1" [[package]] name = "ring" -version = "0.16.18" +version = "0.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70017ed5c555d79ee3538fc63ca09c70ad8f317dcadc1adc2c496b60c22bb24f" +checksum = "024a1e66fea74c66c66624ee5622a7ff0e4b73a13b4f5c326ddb50c708944226" dependencies = [ "cc", "libc", - "once_cell 1.5.2", + "once_cell", "spin", "untrusted", "web-sys", "winapi 0.3.9", ] +[[package]] +name = "ripemd160" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "rlp" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54369147e3e7796c9b885c7304db87ca3d09a0a98f72843d532868675bbfba8" +dependencies = [ + "bytes 1.0.1", + "rustc-hex", +] + +[[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" @@ -5721,9 +6118,9 @@ dependencies = [ [[package]] name = "rpassword" -version = "4.0.5" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" +checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" dependencies = [ "libc", "winapi 0.3.9", @@ -5765,7 +6162,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver", + "semver 0.9.0", ] [[package]] @@ -5781,6 +6178,19 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" +dependencies = [ + "base64 0.13.0", + "log", + "ring", + "sct", + "webpki", +] + [[package]] name = "rustls-native-certs" version = "0.4.0" @@ -5788,7 +6198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8" dependencies = [ "openssl-probe", - "rustls", + "rustls 0.18.1", "schannel", "security-framework", ] @@ -5799,7 +6209,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "pin-project 0.4.27", "static_assertions", ] @@ -5821,11 +6231,11 @@ dependencies = [ [[package]] name = "salsa20" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f47b10fa80f6969bbbd9c8e7cc998f082979d402a9e10579e2303a87955395" +checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" dependencies = [ - "stream-cipher", + "cipher", ] [[package]] @@ -5839,13 +6249,13 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "bytes 0.5.6", + "async-trait", "derive_more", "either", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "libp2p", "log", @@ -5854,23 +6264,23 @@ dependencies = [ "prost-build", "rand 0.7.3", "sc-client-api", - "sc-keystore", "sc-network", "serde_json", "sp-api", "sp-authority-discovery", "sp-blockchain", "sp-core", + "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", ] [[package]] name = "sc-basic-authorship" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "log", "parity-scale-codec", @@ -5886,13 +6296,12 @@ dependencies = [ "sp-runtime", "sp-transaction-pool", "substrate-prometheus-endpoint", - "tokio-executor 0.2.0-alpha.6", ] [[package]] name = "sc-block-builder" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5908,25 +6317,29 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "parity-scale-codec", "sc-chain-spec-derive", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-finality-grandpa", "sc-network", "sc-telemetry", "serde", "serde_json", "sp-chain-spec", + "sp-consensus-babe", "sp-core", "sp-runtime", ] [[package]] name = "sc-chain-spec-derive" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5936,29 +6349,23 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "ansi_term 0.12.1", "atty", - "bip39", "chrono", - "derive_more", "fdlimit", - "futures 0.3.8", + "futures 0.3.12", "hex 0.4.2", - "lazy_static", "libp2p", "log", "names", - "nix", "parity-scale-codec", - "parity-util-mem", "rand 0.7.3", "regex", "rpassword", + "sc-cli-proc-macro", "sc-client-api", - "sc-informant", "sc-keystore", "sc-network", "sc-service", @@ -5969,37 +6376,46 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-keyring", + "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-state-machine", "sp-utils", "sp-version", "structopt", - "substrate-prometheus-endpoint", - "time", - "tokio 0.2.23", + "thiserror", + "tiny-bip39", + "tokio 0.2.24", "tracing", "tracing-log", "tracing-subscriber", ] [[package]] -name = "sc-client-api" +name = "sc-cli-proc-macro" version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sc-client-api" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", "fnv", - "futures 0.3.8", + "futures 0.3.12", "hash-db", - "hex-literal", "kvdb", "lazy_static", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-executor", - "sc-telemetry", "sp-api", "sp-blockchain", "sp-consensus", @@ -6007,7 +6423,7 @@ dependencies = [ "sp-database", "sp-externalities", "sp-inherents", - "sp-keyring", + "sp-keystore", "sp-runtime", "sp-state-machine", "sp-std", @@ -6021,8 +6437,8 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "blake2-rfc", "hash-db", @@ -6034,7 +6450,7 @@ dependencies = [ "parity-db", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-executor", "sc-state-db", @@ -6051,8 +6467,8 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "sc-client-api", "sp-blockchain", @@ -6062,19 +6478,18 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-block-builder", "sc-client-api", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", "sp-api", "sp-application-crypto", @@ -6085,6 +6500,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", + "sp-keystore", "sp-runtime", "sp-timestamp", "sp-version", @@ -6093,20 +6509,20 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", "fork-tree", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "log", "merlin", - "num-bigint", - "num-rational", + "num-bigint 0.2.6", + "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "pdqselect", "rand 0.7.3", "retain_mut", @@ -6128,6 +6544,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-io", + "sp-keystore", "sp-runtime", "sp-timestamp", "sp-utils", @@ -6135,38 +6552,14 @@ dependencies = [ "substrate-prometheus-endpoint", ] -[[package]] -name = "sc-consensus-babe-rpc" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" -dependencies = [ - "derive_more", - "futures 0.3.8", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-keystore", - "sc-rpc-api", - "serde", - "sp-api", - "sp-application-crypto", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-runtime", -] - [[package]] name = "sc-consensus-epochs" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "fork-tree", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sp-blockchain", "sp-runtime", @@ -6174,18 +6567,19 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-telemetry", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-slots", @@ -6193,12 +6587,14 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", + "sp-trie", + "thiserror", ] [[package]] name = "sc-consensus-uncles" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "log", "sc-client-api", @@ -6211,16 +6607,16 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", "lazy_static", "libsecp256k1", "log", "parity-scale-codec", - "parity-wasm", - "parking_lot 0.10.2", + "parity-wasm 0.41.0", + "parking_lot 0.11.1", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -6231,6 +6627,7 @@ dependencies = [ "sp-panic-handler", "sp-runtime-interface", "sp-serializer", + "sp-tasks", "sp-trie", "sp-version", "sp-wasm-interface", @@ -6239,25 +6636,24 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", - "log", "parity-scale-codec", - "parity-wasm", + "parity-wasm 0.41.0", "sp-allocator", "sp-core", - "sp-runtime-interface", "sp-serializer", "sp-wasm-interface", + "thiserror", "wasmi", ] [[package]] name = "sc-executor-wasmi" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "log", "parity-scale-codec", @@ -6271,13 +6667,13 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "log", "parity-scale-codec", - "parity-wasm", - "pwasm-utils", + "parity-wasm 0.41.0", + "pwasm-utils 0.14.0", "sc-executor-common", "scoped-tls", "sp-allocator", @@ -6289,17 +6685,17 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", "finality-grandpa", "fork-tree", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "pin-project 0.4.27", "rand 0.7.3", "sc-block-builder", @@ -6317,8 +6713,8 @@ dependencies = [ "sp-consensus", "sp-core", "sp-finality-grandpa", - "sp-finality-tracker", "sp-inherents", + "sp-keystore", "sp-runtime", "sp-utils", "substrate-prometheus-endpoint", @@ -6326,12 +6722,12 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", "finality-grandpa", - "futures 0.3.8", + "futures 0.3.12", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -6350,11 +6746,11 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "ansi_term 0.12.1", - "futures 0.3.8", + "futures 0.3.12", "log", "parity-util-mem", "sc-client-api", @@ -6368,29 +6764,33 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ + "async-trait", "derive_more", + "futures 0.3.12", + "futures-util", "hex 0.4.2", "merlin", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "rand 0.7.3", "serde_json", "sp-application-crypto", "sp-core", - "subtle 2.3.0", + "sp-keystore", + "subtle 2.4.0", ] [[package]] name = "sc-light" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "hash-db", "lazy_static", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-executor", "sp-api", @@ -6403,20 +6803,20 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "async-std", "async-trait", "bitflags", - "bs58 0.3.1", + "bs58", "bytes 0.5.6", "derive_more", "either", "erased-serde", "fnv", "fork-tree", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "futures_codec", "hex 0.4.2", @@ -6425,10 +6825,9 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log", - "lru 0.4.3", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "pin-project 0.4.27", "prost", "prost-build", @@ -6440,7 +6839,7 @@ dependencies = [ "serde_json", "slog", "slog_derive", - "smallvec 0.6.13", + "smallvec 1.6.1", "sp-arithmetic", "sp-blockchain", "sp-consensus", @@ -6449,7 +6848,7 @@ dependencies = [ "sp-utils", "substrate-prometheus-endpoint", "thiserror", - "unsigned-varint 0.4.0", + "unsigned-varint", "void", "wasm-timer", "zeroize", @@ -6457,34 +6856,35 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "libp2p", "log", - "lru 0.4.3", + "lru", "sc-network", "sp-runtime", + "substrate-prometheus-endpoint", "wasm-timer", ] [[package]] name = "sc-offchain" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "bytes 0.5.6", "fnv", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "hyper 0.13.9", "hyper-rustls", "log", "num_cpus", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "rand 0.7.3", "sc-client-api", "sc-keystore", @@ -6499,10 +6899,10 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "libp2p", "log", "serde_json", @@ -6512,8 +6912,8 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6521,26 +6921,28 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-block-builder", "sc-client-api", "sc-executor", "sc-keystore", "sc-rpc-api", + "sc-tracing", "serde_json", "sp-api", "sp-blockchain", "sp-chain-spec", "sp-core", + "sp-keystore", "sp-offchain", "sp-rpc", "sp-runtime", @@ -6553,18 +6955,18 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.12", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "serde", "serde_json", "sp-chain-spec", @@ -6577,8 +6979,8 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "futures 0.1.30", "jsonrpc-core", @@ -6595,14 +6997,13 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "derive_more", - "directories", + "directories 3.0.1", "exit-future", "futures 0.1.30", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "hash-db", "jsonrpc-core", @@ -6611,7 +7012,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "pin-project 0.4.27", "rand 0.7.3", "sc-block-builder", @@ -6641,6 +7042,7 @@ dependencies = [ "sp-externalities", "sp-inherents", "sp-io", + "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", @@ -6651,71 +7053,37 @@ dependencies = [ "sp-version", "substrate-prometheus-endpoint", "tempfile", + "thiserror", "tracing", + "tracing-futures", "wasm-timer", ] -[[package]] -name = "sc-service-test" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" -dependencies = [ - "fdlimit", - "futures 0.1.30", - "futures 0.3.8", - "hex-literal", - "log", - "parity-scale-codec", - "parking_lot 0.10.2", - "sc-block-builder", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sc-light", - "sc-network", - "sc-service", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-tracing", - "sp-transaction-pool", - "sp-trie", - "substrate-test-runtime", - "substrate-test-runtime-client", - "tempfile", - "tokio 0.1.22", -] - [[package]] name = "sc-state-db" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "log", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sp-core", + "thiserror", ] [[package]] name = "sc-telemetry" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "libp2p", "log", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "pin-project 0.4.27", "rand 0.7.3", "serde", @@ -6729,12 +7097,16 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ + "ansi_term 0.12.1", "erased-serde", + "lazy_static", "log", - "parking_lot 0.10.2", + "once_cell", + "parking_lot 0.11.1", + "regex", "rustc-hash", "sc-telemetry", "serde", @@ -6743,20 +7115,21 @@ dependencies = [ "sp-tracing", "tracing", "tracing-core", + "tracing-log", "tracing-subscriber", ] [[package]] name = "sc-transaction-graph" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.12", "linked-hash-map", "log", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "retain_mut", "serde", "sp-blockchain", @@ -6764,22 +7137,22 @@ dependencies = [ "sp-runtime", "sp-transaction-pool", "sp-utils", + "thiserror", "wasm-timer", ] [[package]] name = "sc-transaction-pool" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "derive_more", - "futures 0.3.8", + "futures 0.3.12", "futures-diagnose", "intervalier", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-transaction-graph", "sp-api", @@ -6790,6 +7163,7 @@ dependencies = [ "sp-transaction-pool", "sp-utils", "substrate-prometheus-endpoint", + "thiserror", "wasm-timer", ] @@ -6811,13 +7185,14 @@ checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" dependencies = [ "arrayref", "arrayvec 0.5.2", - "curve25519-dalek 2.1.0", - "getrandom 0.1.15", + "curve25519-dalek 2.1.2", + "getrandom 0.1.16", "merlin", "rand 0.7.3", "rand_core 0.5.1", + "serde", "sha2 0.8.2", - "subtle 2.3.0", + "subtle 2.4.0", "zeroize", ] @@ -6827,12 +7202,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - [[package]] name = "scopeguard" version = "1.1.0" @@ -6871,9 +7240,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f" +checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" dependencies = [ "zeroize", ] @@ -6901,13 +7270,32 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +dependencies = [ + "semver-parser 0.7.0", +] + [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", + "serde", ] [[package]] @@ -6917,10 +7305,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] -name = "send_wrapper" -version = "0.3.0" +name = "semver-parser" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686ef91cf020ad8d4aca9a7047641fd6add626b7b89e14546c2b6a76781cf822" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] [[package]] name = "send_wrapper" @@ -6928,11 +7319,17 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +[[package]] +name = "send_wrapper" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "930c0acf610d3fdb5e2ab6213019aaa04e227ebe9547b0649ba599b16d788bd7" + [[package]] name = "serde" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab" dependencies = [ "serde_derive", ] @@ -6949,9 +7346,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775" dependencies = [ "proc-macro2", "quote", @@ -6960,9 +7357,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95" +checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" dependencies = [ "itoa", "ryu", @@ -6989,7 +7386,7 @@ checksum = "ce3cdf1b5e620a498ee6f2a171885ac7e22f0e12089ec4b3d22b84921792507c" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool", + "cpuid-bool 0.1.2", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -7014,11 +7411,24 @@ checksum = "6e7aab86fe2149bad8c507606bdb3f4ef5e7b2380eb92350f56122cca72a42a8" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpuid-bool", + "cpuid-bool 0.1.2", "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" @@ -7033,12 +7443,11 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4921be914e16899a80adefb821f8ddb7974e3f1250223575a44ed994882127" +checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3" dependencies = [ "lazy_static", - "loom", ] [[package]] @@ -7047,20 +7456,42 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +[[package]] +name = "signal-hook" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729" +dependencies = [ + "libc", + "signal-hook-registry", +] + [[package]] name = "signal-hook-registry" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab" +checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" dependencies = [ "libc", ] [[package]] name = "signature" -version = "1.2.2" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" + +[[package]] +name = "simba" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" +checksum = "fb931b1367faadea6b1ab1c306a860ec17aaa5fa39f367d0c744e69d971a1fb2" +dependencies = [ + "approx", + "num-complex 0.2.4", + "num-traits", + "paste", +] [[package]] name = "slab" @@ -7070,9 +7501,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "slog" -version = "2.5.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" dependencies = [ "erased-serde", ] @@ -7092,9 +7523,9 @@ dependencies = [ [[package]] name = "slog-scope" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6" +checksum = "2f95a4b4c3274cd2869549da82b57ccc930859bdbf5bcea0424bc5f140b3c786" dependencies = [ "arc-swap", "lazy_static", @@ -7114,18 +7545,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" dependencies = [ "maybe-uninit", ] [[package]] name = "smallvec" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "snow" @@ -7141,19 +7572,18 @@ dependencies = [ "ring", "rustc_version", "sha2 0.9.2", - "subtle 2.3.0", - "x25519-dalek 1.1.0", + "subtle 2.4.0", + "x25519-dalek", ] [[package]] name = "socket2" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", "winapi 0.3.9", ] @@ -7166,7 +7596,7 @@ dependencies = [ "base64 0.12.3", "bytes 0.5.6", "flate2", - "futures 0.3.8", + "futures 0.3.12", "httparse", "log", "rand 0.7.3", @@ -7175,20 +7605,20 @@ dependencies = [ [[package]] name = "sp-allocator" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "derive_more", "log", "sp-core", "sp-std", "sp-wasm-interface", + "thiserror", ] [[package]] name = "sp-api" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "hash-db", "parity-scale-codec", @@ -7198,12 +7628,13 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-version", + "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -7214,8 +7645,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "serde", @@ -7226,8 +7657,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "integer-sqrt", "num-traits", @@ -7239,8 +7670,8 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-api", @@ -7251,8 +7682,8 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7262,8 +7693,8 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-api", @@ -7274,25 +7705,26 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "derive_more", + "futures 0.3.12", "log", - "lru 0.4.3", + "lru", "parity-scale-codec", - "parking_lot 0.10.2", - "sp-block-builder", + "parking_lot 0.11.1", + "sp-api", "sp-consensus", "sp-database", "sp-runtime", "sp-state-machine", + "thiserror", ] [[package]] name = "sp-chain-spec" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "serde", "serde_json", @@ -7300,16 +7732,15 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "derive_more", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", "libp2p", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "serde", "sp-api", "sp-core", @@ -7321,13 +7752,14 @@ dependencies = [ "sp-utils", "sp-version", "substrate-prometheus-endpoint", + "thiserror", "wasm-timer", ] [[package]] name = "sp-consensus-aura" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-api", @@ -7340,8 +7772,8 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "merlin", "parity-scale-codec", @@ -7352,6 +7784,7 @@ dependencies = [ "sp-consensus-vrf", "sp-core", "sp-inherents", + "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", @@ -7359,8 +7792,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7368,8 +7801,8 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7380,16 +7813,15 @@ dependencies = [ [[package]] name = "sp-core" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "base58", "blake2-rfc", - "byteorder 1.3.4", - "derive_more", + "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.8", + "futures 0.3.12", "hash-db", "hash256-std-hasher", "hex 0.4.2", @@ -7401,20 +7833,21 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "primitive-types", "rand 0.7.3", "regex", "schnorrkel", "secrecy", "serde", - "sha2 0.8.2", + "sha2 0.9.2", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", "sp-std", "sp-storage", "substrate-bip39", + "thiserror", "tiny-bip39", "tiny-keccak", "twox-hash", @@ -7424,17 +7857,17 @@ dependencies = [ [[package]] name = "sp-database" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "kvdb", - "parking_lot 0.10.2", + "parking_lot 0.11.1", ] [[package]] name = "sp-debug-derive" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "proc-macro2", "quote", @@ -7443,8 +7876,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "environmental", "parity-scale-codec", @@ -7454,8 +7887,8 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "finality-grandpa", "log", @@ -7464,45 +7897,37 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", + "sp-keystore", "sp-runtime", "sp-std", ] -[[package]] -name = "sp-finality-tracker" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" -dependencies = [ - "parity-scale-codec", - "sp-inherents", - "sp-std", -] - [[package]] name = "sp-inherents" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "derive_more", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sp-core", "sp-std", + "thiserror", ] [[package]] name = "sp-io" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sp-core", "sp-externalities", + "sp-keystore", "sp-runtime-interface", "sp-state-machine", "sp-std", @@ -7515,8 +7940,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "lazy_static", "sp-core", @@ -7524,10 +7949,27 @@ dependencies = [ "strum", ] +[[package]] +name = "sp-keystore" +version = "0.8.0" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" +dependencies = [ + "async-trait", + "derive_more", + "futures 0.3.12", + "merlin", + "parity-scale-codec", + "parking_lot 0.11.1", + "schnorrkel", + "serde", + "sp-core", + "sp-externalities", +] + [[package]] name = "sp-npos-elections" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "serde", @@ -7538,8 +7980,8 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7549,8 +7991,8 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "sp-api", "sp-core", @@ -7559,17 +8001,16 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "backtrace", - "log", ] [[package]] name = "sp-rpc" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "serde", "sp-core", @@ -7577,12 +8018,12 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "either", "hash256-std-hasher", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "log", "parity-scale-codec", "parity-util-mem", @@ -7592,16 +8033,16 @@ dependencies = [ "sp-application-crypto", "sp-arithmetic", "sp-core", - "sp-inherents", "sp-io", "sp-std", ] [[package]] name = "sp-runtime-interface" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ + "impl-trait-for-tuples 0.2.0", "parity-scale-codec", "primitive-types", "sp-externalities", @@ -7615,8 +8056,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "Inflector", "proc-macro-crate", @@ -7627,8 +8068,8 @@ dependencies = [ [[package]] name = "sp-sandbox" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-core", @@ -7640,8 +8081,8 @@ dependencies = [ [[package]] name = "sp-serializer" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "serde", "serde_json", @@ -7649,8 +8090,8 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-api", @@ -7662,8 +8103,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7672,34 +8113,35 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "rand 0.7.3", - "smallvec 1.5.0", + "smallvec 1.6.1", "sp-core", "sp-externalities", "sp-panic-handler", "sp-std", "sp-trie", + "thiserror", "trie-db", "trie-root", ] [[package]] name = "sp-std" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" [[package]] name = "sp-storage" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7710,11 +8152,24 @@ dependencies = [ ] [[package]] -name = "sp-timestamp" +name = "sp-tasks" version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" +dependencies = [ + "log", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime-interface", + "sp-std", +] + +[[package]] +name = "sp-timestamp" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "parity-scale-codec", "sp-api", "sp-inherents", @@ -7725,8 +8180,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "log", "parity-scale-codec", @@ -7738,23 +8193,24 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.12", "log", "parity-scale-codec", "serde", "sp-api", "sp-blockchain", "sp-runtime", + "thiserror", ] [[package]] name = "sp-trie" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "hash-db", "memory-db", @@ -7767,10 +8223,10 @@ dependencies = [ [[package]] name = "sp-utils" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "futures-core", "futures-timer 3.0.2", "lazy_static", @@ -7779,8 +8235,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7791,10 +8247,10 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.0", "parity-scale-codec", "sp-std", "wasmi", @@ -7820,11 +8276,11 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "statrs" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10102ac8d55e35db2b3fafc26f81ba8647da2e15879ab686a67e6d19af2685e8" +checksum = "cce16f6de653e88beca7bd13780d08e09d4489dbca1f9210e041bc4852481382" dependencies = [ - "rand 0.5.6", + "rand 0.7.3", ] [[package]] @@ -7854,9 +8310,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126d630294ec449fae0b16f964e35bf3c74f940da9dca17ee9b905f7b3112eb8" +checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" dependencies = [ "clap", "lazy_static", @@ -7865,9 +8321,9 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e51c492f9e23a220534971ff5afc14037289de430e3c83f9daf6a1b6ae91e8" +checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" dependencies = [ "heck", "proc-macro-error", @@ -7903,8 +8359,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236" dependencies = [ - "hmac", - "pbkdf2", + "hmac 0.7.1", + "pbkdf2 0.3.0", "schnorrkel", "sha2 0.8.2", "zeroize", @@ -7912,20 +8368,20 @@ dependencies = [ [[package]] name = "substrate-browser-utils" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "chrono", "console_error_panic_hook", "console_log", "futures 0.1.30", - "futures 0.3.8", + "futures 0.3.12", "futures-timer 3.0.2", + "getrandom 0.2.2", "js-sys", "kvdb-web", "libp2p-wasm-ext", "log", - "rand 0.6.5", "rand 0.7.3", "sc-chain-spec", "sc-informant", @@ -7938,16 +8394,17 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9726c2926418239f73d4d939fcc4ceb5c6697609426c64dd3bcf664f06986afa" dependencies = [ "platforms", ] [[package]] name = "substrate-frame-cli" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-system", "sc-cli", @@ -7958,11 +8415,11 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.8", + "futures 0.3.12", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -7981,8 +8438,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.8.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "0.8.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "async-std", "derive_more", @@ -7990,16 +8447,16 @@ dependencies = [ "hyper 0.13.9", "log", "prometheus", - "tokio 0.2.23", + "tokio 0.2.24", ] [[package]] name = "substrate-test-client" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +version = "2.0.1" +source = "git+https://github.com/paritytech/substrate.git?rev=b2a50198d3fa71959c77d22edb5fdb8c1e74006c#b2a50198d3fa71959c77d22edb5fdb8c1e74006c" dependencies = [ "futures 0.1.30", - "futures 0.3.8", + "futures 0.3.12", "hash-db", "hex 0.4.2", "parity-scale-codec", @@ -8015,78 +8472,27 @@ dependencies = [ "sp-consensus", "sp-core", "sp-keyring", + "sp-keystore", "sp-runtime", "sp-state-machine", ] [[package]] -name = "substrate-test-runtime" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" -dependencies = [ - "cfg-if 0.1.10", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "log", - "memory-db", - "pallet-babe", - "pallet-timestamp", - "parity-scale-codec", - "parity-util-mem", - "sc-service", - "serde", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-consensus-aura", - "sp-consensus-babe", - "sp-core", - "sp-externalities", - "sp-finality-grandpa", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-offchain", - "sp-runtime", - "sp-runtime-interface", - "sp-session", - "sp-state-machine", - "sp-std", - "sp-transaction-pool", - "sp-trie", - "sp-version", - "substrate-wasm-builder-runner", - "trie-db", -] - -[[package]] -name = "substrate-test-runtime-client" -version = "2.0.0" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" +name = "substrate-wasm-builder" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79091baab813855ddf65b191de9fe53e656b6b67c1e9bd23fdcbff8788164684" dependencies = [ - "futures 0.3.8", - "parity-scale-codec", - "sc-block-builder", - "sc-client-api", - "sc-consensus", - "sc-light", - "sc-service", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "substrate-test-client", - "substrate-test-runtime", + "ansi_term 0.12.1", + "atty", + "build-helper", + "cargo_metadata", + "tempfile", + "toml", + "walkdir", + "wasm-gc-api", ] -[[package]] -name = "substrate-wasm-builder-runner" -version = "1.0.6" -source = "git+https://github.com/hicommonwealth/substrate.git?branch=master#f50f9182c4be717f75dc5915b8a33ab24b011a98" - [[package]] name = "subtle" version = "1.0.0" @@ -8095,15 +8501,15 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" +checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.51" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b4f34193997d92804d359ed09953e25d5138df6bcc055a71bf68ee89fdf9223" +checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" dependencies = [ "proc-macro2", "quote", @@ -8136,14 +8542,14 @@ checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", - "rand 0.7.3", - "redox_syscall", + "rand 0.8.2", + "redox_syscall 0.2.4", "remove_dir_all", "winapi 0.3.9", ] @@ -8168,18 +8574,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" +checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" +checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" dependencies = [ "proc-macro2", "quote", @@ -8188,9 +8594,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +checksum = "bb9bc092d0d51e76b2b19d9d85534ffc9ec2db959a2523cdae0697e2972cd447" dependencies = [ "lazy_static", ] @@ -8206,29 +8612,30 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[package]] name = "tiny-bip39" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +checksum = "d9e44c4759bae7f1032e286a7ef990bd9ed23fe831b7eeba0beb97484c2e59b8" dependencies = [ - "failure", - "hmac", - "once_cell 1.5.2", - "pbkdf2", + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", "rand 0.7.3", "rustc-hash", - "sha2 0.8.2", + "sha2 0.9.2", + "thiserror", "unicode-normalization", + "zeroize", ] [[package]] @@ -8242,9 +8649,9 @@ dependencies = [ [[package]] name = "tinytemplate" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" +checksum = "a2ada8616fad06a2d0c455adc530de4ef57605a8120cc65da9653e0e9623ca74" dependencies = [ "serde", "serde_json", @@ -8277,11 +8684,11 @@ dependencies = [ "num_cpus", "tokio-codec", "tokio-current-thread", - "tokio-executor 0.1.10", + "tokio-executor", "tokio-fs", "tokio-io", "tokio-reactor", - "tokio-sync 0.1.8", + "tokio-sync", "tokio-tcp", "tokio-threadpool", "tokio-timer", @@ -8291,9 +8698,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff" +checksum = "099837d3464c16a808060bb3f02263b412f6fafcb5d01c533d309985fbeebe48" dependencies = [ "bytes 0.5.6", "fnv", @@ -8340,7 +8747,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" dependencies = [ "futures 0.1.30", - "tokio-executor 0.1.10", + "tokio-executor", ] [[package]] @@ -8353,17 +8760,6 @@ dependencies = [ "futures 0.1.30", ] -[[package]] -name = "tokio-executor" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" -dependencies = [ - "futures-util-preview", - "lazy_static", - "tokio-sync 0.2.0-alpha.6", -] - [[package]] name = "tokio-fs" version = "0.1.7" @@ -8413,9 +8809,9 @@ dependencies = [ "num_cpus", "parking_lot 0.9.0", "slab", - "tokio-executor 0.1.10", + "tokio-executor", "tokio-io", - "tokio-sync 0.1.8", + "tokio-sync", ] [[package]] @@ -8425,8 +8821,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", - "rustls", - "tokio 0.2.23", + "rustls 0.18.1", + "tokio 0.2.24", "webpki", ] @@ -8449,17 +8845,6 @@ dependencies = [ "futures 0.1.30", ] -[[package]] -name = "tokio-sync" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2" -dependencies = [ - "fnv", - "futures-core-preview", - "futures-util-preview", -] - [[package]] name = "tokio-tcp" version = "0.1.4" @@ -8488,7 +8873,7 @@ dependencies = [ "log", "num_cpus", "slab", - "tokio-executor 0.1.10", + "tokio-executor", ] [[package]] @@ -8500,7 +8885,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.30", "slab", - "tokio-executor 0.1.10", + "tokio-executor", ] [[package]] @@ -8547,14 +8932,14 @@ dependencies = [ "futures-sink", "log", "pin-project-lite 0.1.11", - "tokio 0.2.23", + "tokio 0.2.24", ] [[package]] name = "toml" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ "serde", ] @@ -8573,7 +8958,7 @@ checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "tracing-attributes", "tracing-core", ] @@ -8643,7 +9028,7 @@ dependencies = [ "serde", "serde_json", "sharded-slab", - "smallvec 1.5.0", + "smallvec 1.6.1", "thread_local", "tracing", "tracing-core", @@ -8659,15 +9044,15 @@ checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" [[package]] name = "trie-db" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e55f7ace33d6237e14137e386f4e1672e2a5c6bbc97fef9f438581a143971f0" +checksum = "5cc176c377eb24d652c9c69c832c832019011b6106182bf84276c66b66d5c9a6" dependencies = [ "hash-db", - "hashbrown 0.8.2", + "hashbrown", "log", "rustc-hex", - "smallvec 1.5.0", + "smallvec 1.6.1", ] [[package]] @@ -8679,6 +9064,16 @@ dependencies = [ "hash-db", ] +[[package]] +name = "triehash" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" +dependencies = [ + "hash-db", + "rlp", +] + [[package]] name = "try-lock" version = "0.2.3" @@ -8702,18 +9097,36 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + [[package]] name = "uint" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177" dependencies = [ - "byteorder 1.3.4", + "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" +dependencies = [ + "byteorder", + "crunchy", + "hex 0.4.2", + "static_assertions", +] + [[package]] name = "unicase" version = "2.6.0" @@ -8766,19 +9179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array 0.14.4", - "subtle 2.3.0", -] - -[[package]] -name = "unsigned-varint" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "669d776983b692a906c881fcd0cfb34271a48e197e4d6cb8df32b05bfc3d3fa5" -dependencies = [ - "bytes 0.5.6", - "futures-io", - "futures-util", - "futures_codec", + "subtle 2.4.0", ] [[package]] @@ -8787,8 +9188,10 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" dependencies = [ + "bytes 0.5.6", "futures-io", "futures-util", + "futures_codec", ] [[package]] @@ -8822,9 +9225,9 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" +checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" [[package]] name = "vec-arena" @@ -8928,25 +9331,25 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.10.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "93c6c3420963c5c64bca373b25e77acb562081b9bb4dd5bb864187742186cea9" [[package]] name = "wasm-bindgen" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" +checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" +checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" dependencies = [ "bumpalo", "lazy_static", @@ -8959,11 +9362,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" +checksum = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -8971,9 +9374,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" +checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8981,9 +9384,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.68" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" +checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" dependencies = [ "proc-macro2", "quote", @@ -8994,9 +9397,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.68" +version = "0.2.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" + +[[package]] +name = "wasm-gc-api" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" +checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" +dependencies = [ + "log", + "parity-wasm 0.32.0", + "rustc-demangle", +] [[package]] name = "wasm-timer" @@ -9004,7 +9418,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "js-sys", "parking_lot 0.11.1", "pin-utils", @@ -9022,9 +9436,9 @@ dependencies = [ "errno", "libc", "memory_units", - "num-rational", + "num-rational 0.2.4", "num-traits", - "parity-wasm", + "parity-wasm 0.41.0", "wasmi-validation", ] @@ -9034,7 +9448,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" dependencies = [ - "parity-wasm", + "parity-wasm 0.41.0", ] [[package]] @@ -9063,7 +9477,7 @@ dependencies = [ "log", "region", "rustc-demangle", - "smallvec 1.5.0", + "smallvec 1.6.1", "target-lexicon", "wasmparser 0.59.0", "wasmtime-environ", @@ -9104,7 +9518,7 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "cranelift-wasm", - "directories", + "directories 2.0.2", "errno", "file-per-thread-logger", "indexmap", @@ -9206,27 +9620,27 @@ dependencies = [ [[package]] name = "wast" -version = "27.0.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c3ef5f6a72dffa44c24d5811123f704e18a1dbc83637d347b1852b41d3835c" +checksum = "c24a3ee360d01d60ed0a0f960ab76a6acce64348cdb0bf8699c2a866fad57c7c" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835cf59c907f67e2bbc20f50157e08f35006fe2a8444d8ec9f5683e22f937045" +checksum = "5e8f7f34773fa6318e8897283abf7941c1f250faae4e1a52f82df09c3bad7cce" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.45" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" +checksum = "222b1ef9334f92a21d3fb53dc3fd80f30836959a90f9274a626d7e06315ba3c3" dependencies = [ "js-sys", "wasm-bindgen", @@ -9234,9 +9648,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ "ring", "untrusted", @@ -9244,18 +9658,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" -dependencies = [ - "webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" dependencies = [ "webpki", ] @@ -9331,24 +9736,13 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "x25519-dalek" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" -dependencies = [ - "curve25519-dalek 2.1.0", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "x25519-dalek" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc614d95359fd7afc321b66d2107ede58b246b844cf5d8a0adcca413e439f088" dependencies = [ - "curve25519-dalek 3.0.0", + "curve25519-dalek 3.0.2", "rand_core 0.5.1", "zeroize", ] @@ -9359,7 +9753,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aeb8c4043cac71c3c299dff107171c220d179492350ea198e109a414981b83c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "log", "nohash-hasher", "parking_lot 0.11.1", @@ -9369,9 +9763,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" +checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36" dependencies = [ "zeroize_derive", ] @@ -9390,18 +9784,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.5.3+zstd.1.4.5" +version = "0.5.4+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8" +checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "2.0.5+zstd.1.4.5" +version = "2.0.6+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055" +checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e" dependencies = [ "libc", "zstd-sys", @@ -9409,9 +9803,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.17+zstd.1.4.5" +version = "1.4.18+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b" +checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" dependencies = [ "cc", "glob 0.3.0", diff --git a/Cargo.toml b/Cargo.toml index 32ee7008..1f1eacad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,222 @@ [workspace] members = [ - "modules/edge-signaling", - "modules/edge-voting", "modules/edge-treasury-reward", + "modules/chainbridge", + "modules/edge-chainbridge", "node/cli", "node/executor", "node/primitives", "node/rpc", "node/rpc-client", "node/runtime", + "node/runtime-interface", "node/testing", ] +exclude = ["vendor"] [profile.release] # Edgeware runtime requires unwinding. -panic = "unwind" \ No newline at end of file +panic = "unwind" + +[profile.dev.package] +aes-soft = { opt-level = 3 } +aesni = { opt-level = 3 } +blake2 = { opt-level = 3 } +blake2-rfc = { opt-level = 3 } +blake2b_simd = { opt-level = 3 } +chacha20poly1305 = { opt-level = 3 } +cranelift-codegen = { opt-level = 3 } +cranelift-wasm = { opt-level = 3 } +crc32fast = { opt-level = 3 } +crossbeam-deque = { opt-level = 3 } +crossbeam-queue = { opt-level = 3 } +crypto-mac = { opt-level = 3 } +curve25519-dalek = { opt-level = 3 } +ed25519-dalek = { opt-level = 3 } +flate2 = { opt-level = 3 } +futures-channel = { opt-level = 3 } +hashbrown = { opt-level = 3 } +h2 = { opt-level = 3 } +hash-db = { opt-level = 3 } +hmac = { opt-level = 3 } +httparse = { opt-level = 3 } +integer-sqrt = { opt-level = 3 } +keccak = { opt-level = 3 } +libm = { opt-level = 3 } +librocksdb-sys = { opt-level = 3 } +libsecp256k1 = { opt-level = 3 } +libz-sys = { opt-level = 3 } +mio = { opt-level = 3 } +nalgebra = { opt-level = 3 } +num-bigint = { opt-level = 3 } +parking_lot = { opt-level = 3 } +parking_lot_core = { opt-level = 3 } +percent-encoding = { opt-level = 3 } +primitive-types = { opt-level = 3 } +ring = { opt-level = 3 } +rustls = { opt-level = 3 } +sha2 = { opt-level = 3 } +sha3 = { opt-level = 3 } +smallvec = { opt-level = 3 } +snow = { opt-level = 3 } +twox-hash = { opt-level = 3 } +uint = { opt-level = 3 } +wasmi = { opt-level = 3 } +x25519-dalek = { opt-level = 3 } +yamux = { opt-level = 3 } +zeroize = { opt-level = 3 } + +# Generated with: `cargo lock -s | grep substrate.git | cut -d' ' -f2 | awk '{print $0, "= { git = \"https://github.com/paritytech/substrate.git\", rev = \"b2a50198d3fa71959c77d22edb5fdb8c1e74006c\" }"}'` +# Make sure to have cargo-lock installed with: `cargo install cargo-lock --features=cli` + +[patch.crates-io] +# frontier deps +fc-consensus = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +fc-rpc = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +fc-rpc-core = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +fp-consensus = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +fp-evm = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +fp-rpc = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +pallet-ethereum = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +pallet-evm = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +pallet-evm-precompile-ed25519 = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +pallet-evm-precompile-modexp = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } +pallet-evm-precompile-simple = { git = "https://github.com/hicommonwealth/frontier.git", rev = "d3179acb5a111d58af6c48a12588ecd38750a9bb" } + +# substrate deps +fork-tree = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-executive = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-metadata = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-support = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-support-procedural = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-support-procedural-tools = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-support-procedural-tools-derive = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-system = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-aura = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-authorship = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-bounties = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-collective = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-contracts = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-contracts-proc-macro = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-contracts-rpc = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-contracts-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-democracy = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-grandpa = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-identity = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-im-online = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-indices = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-multisig = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-offences = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-proxy = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-recovery = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-session = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-staking = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-sudo = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-tips = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-utility = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +pallet-vesting = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-block-builder = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-chain-spec-derive = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-cli = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-cli-proc-macro = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-client-db = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-consensus = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-consensus-aura = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-consensus-uncles = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-executor = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-executor-common = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-executor-wasmi = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-executor-wasmtime = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-informant = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-keystore = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-light = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-network = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-network-gossip = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-offchain = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-peerset = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-proposer-metrics = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-rpc = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-rpc-server = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-service = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-state-db = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-telemetry = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-tracing = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-transaction-graph = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-allocator = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-api = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-api-proc-macro = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-authorship = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-chain-spec = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-consensus = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-consensus-slots = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-consensus-vrf = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-core = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-database = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-debug-derive = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-externalities = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-io = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-keystore = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-npos-elections-compact = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-offchain = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-panic-handler = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-rpc = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-sandbox = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-serializer = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-session = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-staking = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-state-machine = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-std = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-storage = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-tasks = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-timestamp = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-utils = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-version = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +sp-wasm-interface = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +substrate-browser-utils = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +substrate-frame-cli = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } +substrate-test-client = { git = "https://github.com/paritytech/substrate.git", rev = "b2a50198d3fa71959c77d22edb5fdb8c1e74006c" } diff --git a/README.md b/README.md index f1cc36c3..ccf5425e 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,6 @@ curl https://sh.rustup.rs -sSf | sh rustup update stable rustup update nightly rustup target add wasm32-unknown-unknown --toolchain nightly -cargo install --git https://github.com/alexcrichton/wasm-gc ``` Build Edgeware: @@ -88,3 +87,16 @@ If you previously build image `cwl/edgeware`, you can use docker-compose as well docker-compose up edgeware ``` You will have exposed ports 9933,9944 and 30333. + +### Module Benchmarking + +To build in benchmarking mode: +``` +cd node/cli && cargo build --features runtime-benchmarks --release +``` + +To run benchmarks and output new weight files while still in the `node/cli` folder (replace `signaling` with `voting` to benchmark voting instead): +``` +../../target/release/edgeware benchmark --pallet signaling --extrinsic "*" --steps 50 --repeat 20 --output ../runtime/src/weights/ +``` +If the amount of time it takes to run the benchmark is too long, consider reducing the `steps` and `repeat` parameters. \ No newline at end of file diff --git a/modules/chainbridge/Cargo.toml b/modules/chainbridge/Cargo.toml new file mode 100644 index 00000000..7ba7c261 --- /dev/null +++ b/modules/chainbridge/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = 'chainbridge' +version = '1.0.0' +authors = ['david@chainsafe.io'] +edition = '2018' + +[dependencies] +# third-party dependencies +codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +serde = { version = "1.0.101", optional = true } + +# primitives +sp-std = { version = "2.0", default-features = false } +sp-runtime = { version = "2.0", default-features = false } +sp-io = { version = "2.0", default-features = false } +sp-core = { version = "2.0", default-features = false } + +# frame dependencies +frame-support = { version = "2.0", default-features = false } +frame-system = { version = "2.0", default-features = false } + +pallet-balances = { version = "2.0", default-features = false } + +[features] +default = ["std"] +std = [ + "codec/std", + "serde", + "sp-std/std", + "sp-runtime/std", + "sp-io/std", + "sp-core/std", + "frame-support/std", + "frame-system/std", + "pallet-balances/std", +] + +runtime-benchmarks = [ + "sp-runtime/runtime-benchmarks", + "frame-system/runtime-benchmarks", +] \ No newline at end of file diff --git a/modules/chainbridge/src/lib.rs b/modules/chainbridge/src/lib.rs new file mode 100644 index 00000000..bb190bba --- /dev/null +++ b/modules/chainbridge/src/lib.rs @@ -0,0 +1,619 @@ +// Ensure we're `no_std` when compiling for Wasm. +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::{ + decl_error, decl_event, decl_module, decl_storage, + dispatch::DispatchResult, + ensure, + traits::{EnsureOrigin, Get}, + weights::{GetDispatchInfo, Pays}, + Parameter, +}; + +use frame_system::{self as system, ensure_root, ensure_signed}; +use sp_core::U256; +use sp_runtime::traits::{AccountIdConversion, Dispatchable}; +use sp_runtime::{ModuleId, RuntimeDebug}; +use sp_std::prelude::*; + +use codec::{Decode, Encode, EncodeLike}; + +const DEFAULT_RELAYER_THRESHOLD: u32 = 1; +const MODULE_ID: ModuleId = ModuleId(*b"cb/bridg"); + +pub type ChainId = u8; +pub type DepositNonce = u64; +pub type ResourceId = [u8; 32]; + +/// Helper function to concatenate a chain ID and some bytes to produce a resource ID. +/// The common format is (31 bytes unique ID + 1 byte chain ID). +pub fn derive_resource_id(chain: u8, id: &[u8]) -> ResourceId { + let mut r_id: ResourceId = [0; 32]; + r_id[31] = chain; // last byte is chain id + let range = if id.len() > 31 { 31 } else { id.len() }; // Use at most 31 bytes + for i in 0..range { + r_id[30 - i] = id[range - 1 - i]; // Ensure left padding for eth compatibility + } + return r_id; +} + +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +pub enum ProposalStatus { + Initiated, + Approved, + Rejected, +} + +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +pub struct ProposalVotes { + pub votes_for: Vec, + pub votes_against: Vec, + pub status: ProposalStatus, + pub expiry: BlockNumber, +} + +impl ProposalVotes { + /// Attempts to mark the proposal as approve or rejected. + /// Returns true if the status changes from active. + fn try_to_complete(&mut self, threshold: u32, total: u32) -> ProposalStatus { + if self.votes_for.len() >= threshold as usize { + self.status = ProposalStatus::Approved; + ProposalStatus::Approved + } else if total >= threshold && self.votes_against.len() as u32 + threshold > total { + self.status = ProposalStatus::Rejected; + ProposalStatus::Rejected + } else { + ProposalStatus::Initiated + } + } + + /// Returns true if the proposal has been rejected or approved, otherwise false. + fn is_complete(&self) -> bool { + self.status != ProposalStatus::Initiated + } + + /// Returns true if `who` has voted for or against the proposal + fn has_voted(&self, who: &A) -> bool { + self.votes_for.contains(&who) || self.votes_against.contains(&who) + } + + /// Return true if the expiry time has been reached + fn is_expired(&self, now: B) -> bool { + self.expiry <= now + } +} + +impl Default for ProposalVotes { + fn default() -> Self { + Self { + votes_for: vec![], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: BlockNumber::default(), + } + } +} + +pub trait Config: system::Config { + type Event: From> + Into<::Event>; + /// Origin used to administer the pallet + type AdminOrigin: EnsureOrigin; + /// Proposed dispatchable call + type Proposal: Parameter + Dispatchable + EncodeLike + GetDispatchInfo; + /// The identifier for this chain. + /// This must be unique and must not collide with existing IDs within a set of bridged chains. + type ChainId: Get; + + type ProposalLifetime: Get; +} + +decl_event! { + pub enum Event where ::AccountId { + /// Vote threshold has changed (new_threshold) + RelayerThresholdChanged(u32), + /// Chain now available for transfers (chain_id) + ChainWhitelisted(ChainId), + /// Relayer added to set + RelayerAdded(AccountId), + /// Relayer removed from set + RelayerRemoved(AccountId), + /// FunglibleTransfer is for relaying fungibles (dest_id, nonce, resource_id, amount, recipient, metadata) + FungibleTransfer(ChainId, DepositNonce, ResourceId, U256, Vec), + /// NonFungibleTransfer is for relaying NFTS (dest_id, nonce, resource_id, token_id, recipient, metadata) + NonFungibleTransfer(ChainId, DepositNonce, ResourceId, Vec, Vec, Vec), + /// GenericTransfer is for a generic data payload (dest_id, nonce, resource_id, metadata) + GenericTransfer(ChainId, DepositNonce, ResourceId, Vec), + /// Vote submitted in favour of proposal + VoteFor(ChainId, DepositNonce, AccountId), + /// Vot submitted against proposal + VoteAgainst(ChainId, DepositNonce, AccountId), + /// Voting successful for a proposal + ProposalApproved(ChainId, DepositNonce), + /// Voting rejected a proposal + ProposalRejected(ChainId, DepositNonce), + /// Execution of call succeeded + ProposalSucceeded(ChainId, DepositNonce), + /// Execution of call failed + ProposalFailed(ChainId, DepositNonce), + } +} + +decl_error! { + pub enum Error for Module { + /// Relayer threshold not set + ThresholdNotSet, + /// Provided chain Id is not valid + InvalidChainId, + /// Relayer threshold cannot be 0 + InvalidThreshold, + /// Interactions with this chain is not permitted + ChainNotWhitelisted, + /// Chain has already been enabled + ChainAlreadyWhitelisted, + /// Resource ID provided isn't mapped to anything + ResourceDoesNotExist, + /// Relayer already in set + RelayerAlreadyExists, + /// Provided accountId is not a relayer + RelayerInvalid, + /// Protected operation, must be performed by relayer + MustBeRelayer, + /// Relayer has already submitted some vote for this proposal + RelayerAlreadyVoted, + /// A proposal with these parameters has already been submitted + ProposalAlreadyExists, + /// No proposal with the ID was found + ProposalDoesNotExist, + /// Cannot complete proposal, needs more votes + ProposalNotComplete, + /// Proposal has either failed or succeeded + ProposalAlreadyComplete, + /// Lifetime of proposal has been exceeded + ProposalExpired, + } +} + +decl_storage! { + trait Store for Module as ChainBridge { + /// All whitelisted chains and their respective transaction counts + ChainNonces get(fn chains): map hasher(opaque_blake2_256) ChainId => Option; + + /// Number of votes required for a proposal to execute + RelayerThreshold get(fn relayer_threshold): u32 = DEFAULT_RELAYER_THRESHOLD; + + /// Tracks current relayer set + pub Relayers get(fn relayers): map hasher(opaque_blake2_256) T::AccountId => bool; + + /// Number of relayers in set + pub RelayerCount get(fn relayer_count): u32; + + /// All known proposals. + /// The key is the hash of the call and the deposit ID, to ensure it's unique. + pub Votes get(fn votes): + double_map hasher(opaque_blake2_256) ChainId, hasher(opaque_blake2_256) (DepositNonce, T::Proposal) + => Option>; + + /// Utilized by the bridge software to map resource IDs to actual methods + pub Resources get(fn resources): + map hasher(opaque_blake2_256) ResourceId => Option> + } +} + +decl_module! { + pub struct Module for enum Call where origin: T::Origin { + type Error = Error; + + const ChainIdentity: ChainId = T::ChainId::get(); + const ProposalLifetime: T::BlockNumber = T::ProposalLifetime::get(); + const BridgeAccountId: T::AccountId = MODULE_ID.into_account(); + + fn deposit_event() = default; + + /// Sets the vote threshold for proposals. + /// + /// This threshold is used to determine how many votes are required + /// before a proposal is executed. + /// + /// # + /// - O(1) lookup and insert + /// # + #[weight = 195_000_000] + pub fn set_threshold(origin, threshold: u32) -> DispatchResult { + Self::ensure_admin(origin)?; + Self::set_relayer_threshold(threshold) + } + + /// Stores a method name on chain under an associated resource ID. + /// + /// # + /// - O(1) write + /// # + #[weight = 195_000_000] + pub fn set_resource(origin, id: ResourceId, method: Vec) -> DispatchResult { + Self::ensure_admin(origin)?; + Self::register_resource(id, method) + } + + /// Removes a resource ID from the resource mapping. + /// + /// After this call, bridge transfers with the associated resource ID will + /// be rejected. + /// + /// # + /// - O(1) removal + /// # + #[weight = 195_000_000] + pub fn remove_resource(origin, id: ResourceId) -> DispatchResult { + Self::ensure_admin(origin)?; + Self::unregister_resource(id) + } + + /// Enables a chain ID as a source or destination for a bridge transfer. + /// + /// # + /// - O(1) lookup and insert + /// # + #[weight = 195_000_000] + pub fn whitelist_chain(origin, id: ChainId) -> DispatchResult { + Self::ensure_admin(origin)?; + Self::whitelist(id) + } + + /// Adds a new relayer to the relayer set. + /// + /// # + /// - O(1) lookup and insert + /// # + #[weight = 195_000_000] + pub fn add_relayer(origin, v: T::AccountId) -> DispatchResult { + Self::ensure_admin(origin)?; + Self::register_relayer(v) + } + + /// Removes an existing relayer from the set. + /// + /// # + /// - O(1) lookup and removal + /// # + #[weight = 195_000_000] + pub fn remove_relayer(origin, v: T::AccountId) -> DispatchResult { + Self::ensure_admin(origin)?; + Self::unregister_relayer(v) + } + + /// Commits a vote in favour of the provided proposal. + /// + /// If a proposal with the given nonce and source chain ID does not already exist, it will + /// be created with an initial vote in favour from the caller. + /// + /// # + /// - weight of proposed call, regardless of whether execution is performed + /// # + #[weight = (call.get_dispatch_info().weight + 195_000_000, call.get_dispatch_info().class, Pays::Yes)] + pub fn acknowledge_proposal(origin, nonce: DepositNonce, src_id: ChainId, r_id: ResourceId, call: Box<::Proposal>) -> DispatchResult { + let who = ensure_signed(origin)?; + ensure!(Self::is_relayer(&who), Error::::MustBeRelayer); + ensure!(Self::chain_whitelisted(src_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(r_id), Error::::ResourceDoesNotExist); + + Self::vote_for(who, nonce, src_id, call) + } + + /// Commits a vote against a provided proposal. + /// + /// # + /// - Fixed, since execution of proposal should not be included + /// # + #[weight = 195_000_000] + pub fn reject_proposal(origin, nonce: DepositNonce, src_id: ChainId, r_id: ResourceId, call: Box<::Proposal>) -> DispatchResult { + let who = ensure_signed(origin)?; + ensure!(Self::is_relayer(&who), Error::::MustBeRelayer); + ensure!(Self::chain_whitelisted(src_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(r_id), Error::::ResourceDoesNotExist); + + Self::vote_against(who, nonce, src_id, call) + } + + /// Evaluate the state of a proposal given the current vote threshold. + /// + /// A proposal with enough votes will be either executed or cancelled, and the status + /// will be updated accordingly. + /// + /// # + /// - weight of proposed call, regardless of whether execution is performed + /// # + #[weight = (prop.get_dispatch_info().weight + 195_000_000, prop.get_dispatch_info().class, Pays::Yes)] + pub fn eval_vote_state(origin, nonce: DepositNonce, src_id: ChainId, prop: Box<::Proposal>) -> DispatchResult { + ensure_signed(origin)?; + + Self::try_resolve_proposal(nonce, src_id, prop) + } + } +} + +impl Module { + // *** Utility methods *** + + pub fn ensure_admin(o: T::Origin) -> DispatchResult { + T::AdminOrigin::try_origin(o) + .map(|_| ()) + .or_else(ensure_root)?; + Ok(()) + } + + /// Checks if who is a relayer + pub fn is_relayer(who: &T::AccountId) -> bool { + Self::relayers(who) + } + + /// Provides an AccountId for the pallet. + /// This is used both as an origin check and deposit/withdrawal account. + pub fn account_id() -> T::AccountId { + MODULE_ID.into_account() + } + + /// Asserts if a resource is registered + pub fn resource_exists(id: ResourceId) -> bool { + return Self::resources(id) != None; + } + + /// Checks if a chain exists as a whitelisted destination + pub fn chain_whitelisted(id: ChainId) -> bool { + return Self::chains(id) != None; + } + + /// Increments the deposit nonce for the specified chain ID + fn bump_nonce(id: ChainId) -> DepositNonce { + let nonce = Self::chains(id).unwrap_or_default() + 1; + ::insert(id, nonce); + nonce + } + + // *** Admin methods *** + + /// Set a new voting threshold + pub fn set_relayer_threshold(threshold: u32) -> DispatchResult { + ensure!(threshold > 0, Error::::InvalidThreshold); + ::put(threshold); + Self::deposit_event(RawEvent::RelayerThresholdChanged(threshold)); + Ok(()) + } + + /// Register a method for a resource Id, enabling associated transfers + pub fn register_resource(id: ResourceId, method: Vec) -> DispatchResult { + ::insert(id, method); + Ok(()) + } + + /// Removes a resource ID, disabling associated transfer + pub fn unregister_resource(id: ResourceId) -> DispatchResult { + ::remove(id); + Ok(()) + } + + /// Whitelist a chain ID for transfer + pub fn whitelist(id: ChainId) -> DispatchResult { + // Cannot whitelist this chain + ensure!(id != T::ChainId::get(), Error::::InvalidChainId); + // Cannot whitelist with an existing entry + ensure!( + !Self::chain_whitelisted(id), + Error::::ChainAlreadyWhitelisted + ); + ::insert(&id, 0); + Self::deposit_event(RawEvent::ChainWhitelisted(id)); + Ok(()) + } + + /// Adds a new relayer to the set + pub fn register_relayer(relayer: T::AccountId) -> DispatchResult { + ensure!( + !Self::is_relayer(&relayer), + Error::::RelayerAlreadyExists + ); + >::insert(&relayer, true); + ::mutate(|i| *i += 1); + + Self::deposit_event(RawEvent::RelayerAdded(relayer)); + Ok(()) + } + + /// Removes a relayer from the set + pub fn unregister_relayer(relayer: T::AccountId) -> DispatchResult { + ensure!(Self::is_relayer(&relayer), Error::::RelayerInvalid); + >::remove(&relayer); + ::mutate(|i| *i -= 1); + Self::deposit_event(RawEvent::RelayerRemoved(relayer)); + Ok(()) + } + + // *** Proposal voting and execution methods *** + + /// Commits a vote for a proposal. If the proposal doesn't exist it will be created. + fn commit_vote( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + in_favour: bool, + ) -> DispatchResult { + let now = >::block_number(); + let mut votes = match >::get(src_id, (nonce, prop.clone())) { + Some(v) => v, + None => { + let mut v = ProposalVotes::default(); + v.expiry = now + T::ProposalLifetime::get(); + v + } + }; + + // Ensure the proposal isn't complete and relayer hasn't already voted + ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); + ensure!(!votes.is_expired(now), Error::::ProposalExpired); + ensure!(!votes.has_voted(&who), Error::::RelayerAlreadyVoted); + + if in_favour { + votes.votes_for.push(who.clone()); + Self::deposit_event(RawEvent::VoteFor(src_id, nonce, who.clone())); + } else { + votes.votes_against.push(who.clone()); + Self::deposit_event(RawEvent::VoteAgainst(src_id, nonce, who.clone())); + } + + >::insert(src_id, (nonce, prop.clone()), votes.clone()); + + Ok(()) + } + + /// Attempts to finalize or cancel the proposal if the vote count allows. + fn try_resolve_proposal( + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + if let Some(mut votes) = >::get(src_id, (nonce, prop.clone())) { + let now = >::block_number(); + ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); + ensure!(!votes.is_expired(now), Error::::ProposalExpired); + + let status = votes.try_to_complete(::get(), ::get()); + >::insert(src_id, (nonce, prop.clone()), votes.clone()); + + match status { + ProposalStatus::Approved => Self::finalize_execution(src_id, nonce, prop), + ProposalStatus::Rejected => Self::cancel_execution(src_id, nonce), + _ => Ok(()), + } + } else { + Err(Error::::ProposalDoesNotExist)? + } + } + + /// Commits a vote in favour of the proposal and executes it if the vote threshold is met. + fn vote_for( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + Self::commit_vote(who, nonce, src_id, prop.clone(), true)?; + Self::try_resolve_proposal(nonce, src_id, prop) + } + + /// Commits a vote against the proposal and cancels it if more than (relayers.len() - threshold) + /// votes against exist. + fn vote_against( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + Self::commit_vote(who, nonce, src_id, prop.clone(), false)?; + Self::try_resolve_proposal(nonce, src_id, prop) + } + + /// Execute the proposal and signals the result as an event + fn finalize_execution( + src_id: ChainId, + nonce: DepositNonce, + call: Box, + ) -> DispatchResult { + Self::deposit_event(RawEvent::ProposalApproved(src_id, nonce)); + call.dispatch(frame_system::RawOrigin::Signed(Self::account_id()).into()) + .map(|_| ()) + .map_err(|e| e.error)?; + Self::deposit_event(RawEvent::ProposalSucceeded(src_id, nonce)); + Ok(()) + } + + /// Cancels a proposal. + fn cancel_execution(src_id: ChainId, nonce: DepositNonce) -> DispatchResult { + Self::deposit_event(RawEvent::ProposalRejected(src_id, nonce)); + Ok(()) + } + + /// Initiates a transfer of a fungible asset out of the chain. This should be called by another pallet. + pub fn transfer_fungible( + dest_id: ChainId, + resource_id: ResourceId, + to: Vec, + amount: U256, + ) -> DispatchResult { + ensure!( + Self::chain_whitelisted(dest_id), + Error::::ChainNotWhitelisted + ); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(RawEvent::FungibleTransfer( + dest_id, + nonce, + resource_id, + amount, + to, + )); + Ok(()) + } + + /// Initiates a transfer of a nonfungible asset out of the chain. This should be called by another pallet. + pub fn transfer_nonfungible( + dest_id: ChainId, + resource_id: ResourceId, + token_id: Vec, + to: Vec, + metadata: Vec, + ) -> DispatchResult { + ensure!( + Self::chain_whitelisted(dest_id), + Error::::ChainNotWhitelisted + ); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(RawEvent::NonFungibleTransfer( + dest_id, + nonce, + resource_id, + token_id, + to, + metadata, + )); + Ok(()) + } + + /// Initiates a transfer of generic data out of the chain. This should be called by another pallet. + pub fn transfer_generic( + dest_id: ChainId, + resource_id: ResourceId, + metadata: Vec, + ) -> DispatchResult { + ensure!( + Self::chain_whitelisted(dest_id), + Error::::ChainNotWhitelisted + ); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(RawEvent::GenericTransfer( + dest_id, + nonce, + resource_id, + metadata, + )); + Ok(()) + } +} + + +/// Simple ensure origin for the bridge account +pub struct EnsureBridge(sp_std::marker::PhantomData); +impl EnsureOrigin for EnsureBridge { + type Success = T::AccountId; + fn try_origin(o: T::Origin) -> Result { + let bridge_id = MODULE_ID.into_account(); + o.into().and_then(|o| match o { + system::RawOrigin::Signed(who) if who == bridge_id => Ok(bridge_id), + r => Err(T::Origin::from(r)), + }) + } + + #[cfg(feature = "runtime-benchmarks")] + fn successful_origin() -> T::Origin { + T::Origin::from(frame_system::RawOrigin::Root) + } +} diff --git a/modules/chainbridge/src/mock.rs b/modules/chainbridge/src/mock.rs new file mode 100644 index 00000000..4dedb0f7 --- /dev/null +++ b/modules/chainbridge/src/mock.rs @@ -0,0 +1,154 @@ +#![cfg(test)] + +use super::*; + +use frame_support::{assert_ok, ord_parameter_types, parameter_types, weights::Weight}; +use frame_system::{self as system}; +use sp_core::H256; +use sp_runtime::{ + testing::Header, + traits::{AccountIdConversion, BlakeTwo256, Block as BlockT, IdentityLookup}, + Perbill, +}; + +use crate::{self as bridge, Config}; +pub use pallet_balances as balances; + +parameter_types! { + pub const BlockHashCount: u64 = 250; + pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockLength: u32 = 2 * 1024; + pub const AvailableBlockRatio: Perbill = Perbill::one(); + pub const MaxLocks: u32 = 100; +} + +impl frame_system::Config for Test { + type BaseCallFilter = (); + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type Origin = Origin; + type Index = u64; + type Call = (); + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type Event = Event; + type BlockHashCount = BlockHashCount; + type Version = (); + type PalletInfo = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); +} + +parameter_types! { + pub const ExistentialDeposit: u64 = 1; +} + +ord_parameter_types! { + pub const One: u64 = 1; +} + +impl pallet_balances::Config for Test { + type Balance = u64; + type DustRemoval = (); + type Event = Event; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type MaxLocks = MaxLocks; + type WeightInfo = (); +} + +parameter_types! { + pub const TestChainId: u8 = 5; + pub const ProposalLifetime: u64 = 50; +} + +impl Config for Test { + type Event = Event; + type AdminOrigin = frame_system::EnsureRoot; + type Proposal = Call; + type ChainId = TestChainId; + type ProposalLifetime = ProposalLifetime; +} + +pub type Block = sp_runtime::generic::Block; +pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; + +frame_support::construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: system::{Module, Call, Event}, + Balances: balances::{Module, Call, Storage, Config, Event}, + Bridge: bridge::{Module, Call, Storage, Event}, + } +); + +// pub const BRIDGE_ID: u64 = +pub const RELAYER_A: u64 = 0x2; +pub const RELAYER_B: u64 = 0x3; +pub const RELAYER_C: u64 = 0x4; +pub const ENDOWED_BALANCE: u64 = 100_000_000; +pub const TEST_THRESHOLD: u32 = 2; + +pub fn new_test_ext() -> sp_io::TestExternalities { + let bridge_id = ModuleId(*b"cb/bridg").into_account(); + let mut t = frame_system::GenesisConfig::default() + .build_storage::() + .unwrap(); + pallet_balances::GenesisConfig:: { + balances: vec![(bridge_id, ENDOWED_BALANCE)], + } + .assimilate_storage(&mut t) + .unwrap(); + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext +} + +pub fn new_test_ext_initialized( + src_id: ChainId, + r_id: ResourceId, + resource: Vec, +) -> sp_io::TestExternalities { + let mut t = new_test_ext(); + t.execute_with(|| { + // Set and check threshold + assert_ok!(Bridge::set_threshold(Origin::root(), TEST_THRESHOLD)); + assert_eq!(Bridge::relayer_threshold(), TEST_THRESHOLD); + // Add relayers + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_A)); + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_B)); + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_C)); + // Whitelist chain + assert_ok!(Bridge::whitelist_chain(Origin::root(), src_id)); + // Set and check resource ID mapped to some junk data + assert_ok!(Bridge::set_resource(Origin::root(), r_id, resource)); + assert_eq!(Bridge::resource_exists(r_id), true); + }); + t +} + +// Checks events against the latest. A contiguous set of events must be provided. They must +// include the most recent event, but do not have to include every past event. +pub fn assert_events(mut expected: Vec) { + let mut actual: Vec = system::Module::::events() + .iter() + .map(|e| e.event.clone()) + .collect(); + + expected.reverse(); + + for evt in expected { + let next = actual.pop().expect("event expected"); + assert_eq!(next, evt.into(), "Events don't match (actual,expected)"); + } +} diff --git a/modules/chainbridge/src/test.rs b/modules/chainbridge/src/test.rs new file mode 100644 index 00000000..3a8bec20 --- /dev/null +++ b/modules/chainbridge/src/test.rs @@ -0,0 +1,534 @@ +#![cfg(test)] + +use super::mock::{ + assert_events, new_test_ext, Balances, Bridge, Call, Event, Origin, ProposalLifetime, System, + Test, TestChainId, ENDOWED_BALANCE, RELAYER_A, RELAYER_B, RELAYER_C, TEST_THRESHOLD, +}; +use super::*; +use crate::mock::new_test_ext_initialized; +use frame_support::{assert_noop, assert_ok}; + +#[test] +fn derive_ids() { + let chain = 1; + let id = [ + 0x21, 0x60, 0x5f, 0x71, 0x84, 0x5f, 0x37, 0x2a, 0x9e, 0xd8, 0x42, 0x53, 0xd2, 0xd0, 0x24, + 0xb7, 0xb1, 0x09, 0x99, 0xf4, + ]; + let r_id = derive_resource_id(chain, &id); + let expected = [ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x21, 0x60, 0x5f, 0x71, 0x84, 0x5f, + 0x37, 0x2a, 0x9e, 0xd8, 0x42, 0x53, 0xd2, 0xd0, 0x24, 0xb7, 0xb1, 0x09, 0x99, 0xf4, chain, + ]; + assert_eq!(r_id, expected); +} + +#[test] +fn complete_proposal_approved() { + let mut prop = ProposalVotes { + votes_for: vec![1, 2], + votes_against: vec![3], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get(), + }; + + prop.try_to_complete(2, 3); + assert_eq!(prop.status, ProposalStatus::Approved); +} + +#[test] +fn complete_proposal_rejected() { + let mut prop = ProposalVotes { + votes_for: vec![1], + votes_against: vec![2, 3], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get(), + }; + + prop.try_to_complete(2, 3); + assert_eq!(prop.status, ProposalStatus::Rejected); +} + +#[test] +fn complete_proposal_bad_threshold() { + let mut prop = ProposalVotes { + votes_for: vec![1, 2], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get(), + }; + + prop.try_to_complete(3, 2); + assert_eq!(prop.status, ProposalStatus::Initiated); + + let mut prop = ProposalVotes { + votes_for: vec![], + votes_against: vec![1, 2], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get(), + }; + + prop.try_to_complete(3, 2); + assert_eq!(prop.status, ProposalStatus::Initiated); +} + +#[test] +fn setup_resources() { + new_test_ext().execute_with(|| { + let id: ResourceId = [1; 32]; + let method = "Pallet.do_something".as_bytes().to_vec(); + let method2 = "Pallet.do_somethingElse".as_bytes().to_vec(); + + assert_ok!(Bridge::set_resource(Origin::root(), id, method.clone())); + assert_eq!(Bridge::resources(id), Some(method)); + + assert_ok!(Bridge::set_resource(Origin::root(), id, method2.clone())); + assert_eq!(Bridge::resources(id), Some(method2)); + + assert_ok!(Bridge::remove_resource(Origin::root(), id)); + assert_eq!(Bridge::resources(id), None); + }) +} + +#[test] +fn whitelist_chain() { + new_test_ext().execute_with(|| { + assert!(!Bridge::chain_whitelisted(0)); + + assert_ok!(Bridge::whitelist_chain(Origin::root(), 0)); + assert_noop!( + Bridge::whitelist_chain(Origin::root(), TestChainId::get()), + Error::::InvalidChainId + ); + + assert_events(vec![Event::bridge(RawEvent::ChainWhitelisted(0))]); + }) +} + +#[test] +fn set_get_threshold() { + new_test_ext().execute_with(|| { + assert_eq!(::get(), 1); + + assert_ok!(Bridge::set_threshold(Origin::root(), TEST_THRESHOLD)); + assert_eq!(::get(), TEST_THRESHOLD); + + assert_ok!(Bridge::set_threshold(Origin::root(), 5)); + assert_eq!(::get(), 5); + + assert_events(vec![ + Event::bridge(RawEvent::RelayerThresholdChanged(TEST_THRESHOLD)), + Event::bridge(RawEvent::RelayerThresholdChanged(5)), + ]); + }) +} + +#[test] +fn asset_transfer_success() { + new_test_ext().execute_with(|| { + let dest_id = 2; + let to = vec![2]; + let resource_id = [1; 32]; + let metadata = vec![]; + let amount = 100; + let token_id = vec![1, 2, 3, 4]; + + assert_ok!(Bridge::set_threshold(Origin::root(), TEST_THRESHOLD,)); + + assert_ok!(Bridge::whitelist_chain(Origin::root(), dest_id.clone())); + assert_ok!(Bridge::transfer_fungible( + dest_id.clone(), + resource_id.clone(), + to.clone(), + amount.into() + )); + assert_events(vec![ + Event::bridge(RawEvent::ChainWhitelisted(dest_id.clone())), + Event::bridge(RawEvent::FungibleTransfer( + dest_id.clone(), + 1, + resource_id.clone(), + amount.into(), + to.clone(), + )), + ]); + + assert_ok!(Bridge::transfer_nonfungible( + dest_id.clone(), + resource_id.clone(), + token_id.clone(), + to.clone(), + metadata.clone() + )); + assert_events(vec![Event::bridge(RawEvent::NonFungibleTransfer( + dest_id.clone(), + 2, + resource_id.clone(), + token_id, + to.clone(), + metadata.clone(), + ))]); + + assert_ok!(Bridge::transfer_generic( + dest_id.clone(), + resource_id.clone(), + metadata.clone() + )); + assert_events(vec![Event::bridge(RawEvent::GenericTransfer( + dest_id.clone(), + 3, + resource_id, + metadata, + ))]); + }) +} + +#[test] +fn asset_transfer_invalid_chain() { + new_test_ext().execute_with(|| { + let chain_id = 2; + let bad_dest_id = 3; + let resource_id = [4; 32]; + + assert_ok!(Bridge::whitelist_chain(Origin::root(), chain_id.clone())); + assert_events(vec![Event::bridge(RawEvent::ChainWhitelisted( + chain_id.clone(), + ))]); + + assert_noop!( + Bridge::transfer_fungible(bad_dest_id, resource_id.clone(), vec![], U256::zero()), + Error::::ChainNotWhitelisted + ); + + assert_noop!( + Bridge::transfer_nonfungible(bad_dest_id, resource_id.clone(), vec![], vec![], vec![]), + Error::::ChainNotWhitelisted + ); + + assert_noop!( + Bridge::transfer_generic(bad_dest_id, resource_id.clone(), vec![]), + Error::::ChainNotWhitelisted + ); + }) +} + +#[test] +fn add_remove_relayer() { + new_test_ext().execute_with(|| { + assert_ok!(Bridge::set_threshold(Origin::root(), TEST_THRESHOLD,)); + assert_eq!(Bridge::relayer_count(), 0); + + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_A)); + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_B)); + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_C)); + assert_eq!(Bridge::relayer_count(), 3); + + // Already exists + assert_noop!( + Bridge::add_relayer(Origin::root(), RELAYER_A), + Error::::RelayerAlreadyExists + ); + + // Confirm removal + assert_ok!(Bridge::remove_relayer(Origin::root(), RELAYER_B)); + assert_eq!(Bridge::relayer_count(), 2); + assert_noop!( + Bridge::remove_relayer(Origin::root(), RELAYER_B), + Error::::RelayerInvalid + ); + assert_eq!(Bridge::relayer_count(), 2); + + assert_events(vec![ + Event::bridge(RawEvent::RelayerAdded(RELAYER_A)), + Event::bridge(RawEvent::RelayerAdded(RELAYER_B)), + Event::bridge(RawEvent::RelayerAdded(RELAYER_C)), + Event::bridge(RawEvent::RelayerRemoved(RELAYER_B)), + ]); + }) +} + +fn make_proposal(r: Vec) -> mock::Call { + Call::System(system::Call::remark(r)) +} + +#[test] +fn create_sucessful_proposal() { + let src_id = 1; + let r_id = derive_resource_id(src_id, b"remark"); + + new_test_ext_initialized(src_id, r_id, b"System.remark".to_vec()).execute_with(|| { + let prop_id = 1; + let proposal = make_proposal(vec![10]); + + // Create proposal (& vote) + assert_ok!(Bridge::acknowledge_proposal( + Origin::signed(RELAYER_A), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Second relayer votes against + assert_ok!(Bridge::reject_proposal( + Origin::signed(RELAYER_B), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![RELAYER_B], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Third relayer votes in favour + assert_ok!(Bridge::acknowledge_proposal( + Origin::signed(RELAYER_C), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A, RELAYER_C], + votes_against: vec![RELAYER_B], + status: ProposalStatus::Approved, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + assert_events(vec![ + Event::bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), + Event::bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_B)), + Event::bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_C)), + Event::bridge(RawEvent::ProposalApproved(src_id, prop_id)), + Event::bridge(RawEvent::ProposalSucceeded(src_id, prop_id)), + ]); + }) +} + +#[test] +fn create_unsucessful_proposal() { + let src_id = 1; + let r_id = derive_resource_id(src_id, b"transfer"); + + new_test_ext_initialized(src_id, r_id, b"System.remark".to_vec()).execute_with(|| { + let prop_id = 1; + let proposal = make_proposal(vec![11]); + + // Create proposal (& vote) + assert_ok!(Bridge::acknowledge_proposal( + Origin::signed(RELAYER_A), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Second relayer votes against + assert_ok!(Bridge::reject_proposal( + Origin::signed(RELAYER_B), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![RELAYER_B], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Third relayer votes against + assert_ok!(Bridge::reject_proposal( + Origin::signed(RELAYER_C), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![RELAYER_B, RELAYER_C], + status: ProposalStatus::Rejected, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + assert_eq!(Balances::free_balance(RELAYER_B), 0); + assert_eq!( + Balances::free_balance(Bridge::account_id()), + ENDOWED_BALANCE + ); + + assert_events(vec![ + Event::bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), + Event::bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_B)), + Event::bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_C)), + Event::bridge(RawEvent::ProposalRejected(src_id, prop_id)), + ]); + }) +} + +#[test] +fn execute_after_threshold_change() { + let src_id = 1; + let r_id = derive_resource_id(src_id, b"transfer"); + + new_test_ext_initialized(src_id, r_id, b"System.remark".to_vec()).execute_with(|| { + let prop_id = 1; + let proposal = make_proposal(vec![11]); + + // Create proposal (& vote) + assert_ok!(Bridge::acknowledge_proposal( + Origin::signed(RELAYER_A), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Change threshold + assert_ok!(Bridge::set_threshold(Origin::root(), 1)); + + // Attempt to execute + assert_ok!(Bridge::eval_vote_state( + Origin::signed(RELAYER_A), + prop_id, + src_id, + Box::new(proposal.clone()) + )); + + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: ProposalStatus::Approved, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + assert_eq!(Balances::free_balance(RELAYER_B), 0); + assert_eq!( + Balances::free_balance(Bridge::account_id()), + ENDOWED_BALANCE + ); + + assert_events(vec![ + Event::bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), + Event::bridge(RawEvent::RelayerThresholdChanged(1)), + Event::bridge(RawEvent::ProposalApproved(src_id, prop_id)), + Event::bridge(RawEvent::ProposalSucceeded(src_id, prop_id)), + ]); + }) +} + +#[test] +fn proposal_expires() { + let src_id = 1; + let r_id = derive_resource_id(src_id, b"remark"); + + new_test_ext_initialized(src_id, r_id, b"System.remark".to_vec()).execute_with(|| { + let prop_id = 1; + let proposal = make_proposal(vec![10]); + + // Create proposal (& vote) + assert_ok!(Bridge::acknowledge_proposal( + Origin::signed(RELAYER_A), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Increment enough blocks such that now == expiry + System::set_block_number(ProposalLifetime::get() + 1); + + // Attempt to submit a vote should fail + assert_noop!( + Bridge::reject_proposal( + Origin::signed(RELAYER_B), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + ), + Error::::ProposalExpired + ); + + // Proposal state should remain unchanged + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // eval_vote_state should have no effect + assert_noop!( + Bridge::eval_vote_state( + Origin::signed(RELAYER_C), + prop_id, + src_id, + Box::new(proposal.clone()) + ), + Error::::ProposalExpired + ); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + assert_events(vec![Event::bridge(RawEvent::VoteFor( + src_id, prop_id, RELAYER_A, + ))]); + }) +} diff --git a/modules/edge-assets/Cargo.toml b/modules/edge-assets/Cargo.toml new file mode 100644 index 00000000..3c6d3682 --- /dev/null +++ b/modules/edge-assets/Cargo.toml @@ -0,0 +1,45 @@ +[package] +name = "edge-assets" +version = "3.2.0" +authors = ["Commonwealth Labs "] +edition = "2018" +license = "Apache-2.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" +description = "FRAME asset management pallet" +readme = "README.md" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +serde = { version = "1.0.101", optional = true } +codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false } +sp-std = { version = "2.0", default-features = false } +sp-runtime = { version = "2.0", default-features = false } +frame-support = { version = "2.0", default-features = false } +frame-system = { version = "2.0", default-features = false } +frame-benchmarking = { version = "2.0", default-features = false, optional = true } + +[dev-dependencies] +sp-core = { version = "2.0" } +sp-std = { version = "2.0" } +sp-io = { version = "2.0" } +pallet-balances = { version = "2.0", default-features = false } + +[features] +default = ["std"] +std = [ + "serde", + "codec/std", + "sp-std/std", + "sp-runtime/std", + "frame-support/std", + "frame-system/std", + "frame-benchmarking/std", +] +runtime-benchmarks = [ + "frame-benchmarking", + "sp-runtime/runtime-benchmarks", + "frame-system/runtime-benchmarks", +] \ No newline at end of file diff --git a/modules/edge-assets/src/benchmarking.rs b/modules/edge-assets/src/benchmarking.rs new file mode 100644 index 00000000..a0b73498 --- /dev/null +++ b/modules/edge-assets/src/benchmarking.rs @@ -0,0 +1,298 @@ +// This file is part of Substrate. + +// Copyright (C) 2020 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. + +//! Assets pallet benchmarking. + +use super::*; +use sp_std::prelude::*; +use sp_runtime::traits::Bounded; +use frame_system::RawOrigin as SystemOrigin; +use frame_benchmarking::{benchmarks, account, whitelisted_caller}; + +use crate::Module as Assets; + +const SEED: u32 = 0; + +fn create_default_asset(max_zombies: u32) + -> (T::AccountId, ::Source) +{ + let caller: T::AccountId = whitelisted_caller(); + let caller_lookup = T::Lookup::unlookup(caller.clone()); + let root = SystemOrigin::Root.into(); + assert!(Assets::::force_create( + root, + Default::default(), + caller_lookup.clone(), + max_zombies, + 1u32.into(), + ).is_ok()); + (caller, caller_lookup) +} + +fn create_default_minted_asset(max_zombies: u32, amount: T::Balance) + -> (T::AccountId, ::Source) +{ + let (caller, caller_lookup) = create_default_asset::(max_zombies); + assert!(Assets::::mint( + SystemOrigin::Signed(caller.clone()).into(), + Default::default(), + caller_lookup.clone(), + amount, + ).is_ok()); + (caller, caller_lookup) +} + +fn add_zombies(minter: T::AccountId, n: u32) { + let origin = SystemOrigin::Signed(minter); + for i in 0..n { + let target = account("zombie", i, SEED); + let target_lookup = T::Lookup::unlookup(target); + assert!(Assets::::mint(origin.clone().into(), Default::default(), target_lookup, 100u32.into()).is_ok()); + } +} + +fn assert_last_event(generic_event: ::Event) { + let events = frame_system::Module::::events(); + let system_event: ::Event = generic_event.into(); + // compare to the last event record + let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; + assert_eq!(event, &system_event); +} + +benchmarks! { + _ { } + + create { + let caller: T::AccountId = whitelisted_caller(); + let caller_lookup = T::Lookup::unlookup(caller.clone()); + T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); + }: _(SystemOrigin::Signed(caller.clone()), Default::default(), caller_lookup, 1, 1u32.into()) + verify { + assert_last_event::(RawEvent::Created(Default::default(), caller.clone(), caller).into()); + } + + force_create { + let caller: T::AccountId = whitelisted_caller(); + let caller_lookup = T::Lookup::unlookup(caller.clone()); + }: _(SystemOrigin::Root, Default::default(), caller_lookup, 1, 1u32.into()) + verify { + assert_last_event::(RawEvent::ForceCreated(Default::default(), caller).into()); + } + + destroy { + let z in 0 .. 10_000; + let (caller, _) = create_default_asset::(10_000); + add_zombies::(caller.clone(), z); + }: _(SystemOrigin::Signed(caller), Default::default(), 10_000) + verify { + assert_last_event::(RawEvent::Destroyed(Default::default()).into()); + } + + force_destroy { + let z in 0 .. 10_000; + let (caller, _) = create_default_asset::(10_000); + add_zombies::(caller.clone(), z); + }: _(SystemOrigin::Root, Default::default(), 10_000) + verify { + assert_last_event::(RawEvent::Destroyed(Default::default()).into()); + } + + mint { + let (caller, caller_lookup) = create_default_asset::(10); + let amount = T::Balance::from(100u32); + }: _(SystemOrigin::Signed(caller.clone()), Default::default(), caller_lookup, amount) + verify { + assert_last_event::(RawEvent::Issued(Default::default(), caller, amount).into()); + } + + burn { + let amount = T::Balance::from(100u32); + let (caller, caller_lookup) = create_default_minted_asset::(10, amount); + }: _(SystemOrigin::Signed(caller.clone()), Default::default(), caller_lookup, amount) + verify { + assert_last_event::(RawEvent::Burned(Default::default(), caller, amount).into()); + } + + transfer { + let amount = T::Balance::from(100u32); + let (caller, caller_lookup) = create_default_minted_asset::(10, amount); + let target: T::AccountId = account("target", 0, SEED); + let target_lookup = T::Lookup::unlookup(target.clone()); + }: _(SystemOrigin::Signed(caller.clone()), Default::default(), target_lookup, amount) + verify { + assert_last_event::(RawEvent::Transferred(Default::default(), caller, target, amount).into()); + } + + force_transfer { + let amount = T::Balance::from(100u32); + let (caller, caller_lookup) = create_default_minted_asset::(10, amount); + let target: T::AccountId = account("target", 0, SEED); + let target_lookup = T::Lookup::unlookup(target.clone()); + }: _(SystemOrigin::Signed(caller.clone()), Default::default(), caller_lookup, target_lookup, amount) + verify { + assert_last_event::(RawEvent::ForceTransferred(Default::default(), caller, target, amount).into()); + } + + freeze { + let (caller, caller_lookup) = create_default_minted_asset::(10, 100u32.into()); + }: _(SystemOrigin::Signed(caller.clone()), Default::default(), caller_lookup) + verify { + assert_last_event::(RawEvent::Frozen(Default::default(), caller).into()); + } + + thaw { + let (caller, caller_lookup) = create_default_minted_asset::(10, 100u32.into()); + assert!(Assets::::freeze( + SystemOrigin::Signed(caller.clone()).into(), + Default::default(), + caller_lookup.clone() + ).is_ok()); + }: _(SystemOrigin::Signed(caller.clone()), Default::default(), caller_lookup) + verify { + assert_last_event::(RawEvent::Thawed(Default::default(), caller).into()); + } + + transfer_ownership { + let (caller, _) = create_default_asset::(10); + let target: T::AccountId = account("target", 0, SEED); + let target_lookup = T::Lookup::unlookup(target.clone()); + }: _(SystemOrigin::Signed(caller), Default::default(), target_lookup) + verify { + assert_last_event::(RawEvent::OwnerChanged(Default::default(), target).into()); + } + + set_team { + let (caller, _) = create_default_asset::(10); + let target0 = T::Lookup::unlookup(account("target", 0, SEED)); + let target1 = T::Lookup::unlookup(account("target", 1, SEED)); + let target2 = T::Lookup::unlookup(account("target", 2, SEED)); + }: _(SystemOrigin::Signed(caller), Default::default(), target0.clone(), target1.clone(), target2.clone()) + verify { + assert_last_event::(RawEvent::TeamChanged( + Default::default(), + account("target", 0, SEED), + account("target", 1, SEED), + account("target", 2, SEED), + ).into()); + } + + set_max_zombies { + let (caller, _) = create_default_asset::(10); + let max_zombies: u32 = 100; + T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); + }: _(SystemOrigin::Signed(caller), Default::default(), max_zombies) + verify { + assert_last_event::(RawEvent::MaxZombiesChanged(Default::default(), max_zombies).into()); + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::tests::{new_test_ext, Test}; + + #[test] + fn create() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_create::().is_ok()); + }); + } + + #[test] + fn force_create() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_force_create::().is_ok()); + }); + } + + #[test] + fn destroy() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_destroy::().is_ok()); + }); + } + + #[test] + fn force_destroy() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_force_destroy::().is_ok()); + }); + } + + #[test] + fn mint() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_mint::().is_ok()); + }); + } + + #[test] + fn burn() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_burn::().is_ok()); + }); + } + + #[test] + fn transfer() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_transfer::().is_ok()); + }); + } + + #[test] + fn force_transfer() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_force_transfer::().is_ok()); + }); + } + + #[test] + fn freeze() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_freeze::().is_ok()); + }); + } + + #[test] + fn thaw() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_thaw::().is_ok()); + }); + } + + #[test] + fn transfer_ownership() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_transfer_ownership::().is_ok()); + }); + } + + #[test] + fn set_team() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_set_team::().is_ok()); + }); + } + + #[test] + fn set_max_zombies() { + new_test_ext().execute_with(|| { + assert!(test_benchmark_set_max_zombies::().is_ok()); + }); + } +} \ No newline at end of file diff --git a/modules/edge-assets/src/lib.rs b/modules/edge-assets/src/lib.rs new file mode 100644 index 00000000..de92c089 --- /dev/null +++ b/modules/edge-assets/src/lib.rs @@ -0,0 +1,1398 @@ +// This file is part of Substrate. + +// Copyright (C) 2017-2020 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. + +//! # Assets Module +//! +//! A simple, secure module for dealing with fungible assets. +//! +//! ## Overview +//! +//! The Assets module provides functionality for asset management of fungible asset classes +//! with a fixed supply, including: +//! +//! * Asset Issuance (Minting) +//! * Asset Transferal +//! * Asset Freezing +//! * Asset Destruction (Burning) +//! +//! To use it in your runtime, you need to implement the assets [`Config`](./trait.Config.html). +//! +//! The supported dispatchable functions are documented in the [`Call`](./enum.Call.html) enum. +//! +//! ### Terminology +//! +//! * **Admin**: An account ID uniquely privileged to be able to unfreeze (thaw) an account and it's +//! assets, as well as forcibly transfer a particular class of assets between arbitrary accounts +//! and reduce the balance of a particular class of assets of arbitrary accounts. +//! * **Asset issuance/minting**: The creation of a new asset, whose total supply will belong to the +//! account that issues the asset. This is a privileged operation. +//! * **Asset transfer**: The reduction of the balance of an asset of one account with the +//! corresponding increase in the balance of another. +//! * **Asset destruction**: The process of reduce the balance of an asset of one account. This is +//! a privileged operation. +//! * **Fungible asset**: An asset whose units are interchangeable. +//! * **Issuer**: An account ID uniquely privileged to be able to mint a particular class of assets. +//! * **Freezer**: An account ID uniquely privileged to be able to freeze an account from +//! transferring a particular class of assets. +//! * **Freezing**: Removing the possibility of an unpermissioned transfer of an asset from a +//! particular account. +//! * **Non-fungible asset**: An asset for which each unit has unique characteristics. +//! * **Owner**: An account ID uniquely privileged to be able to destroy a particular asset class, +//! or to set the Issuer, Freezer or Admin of that asset class. +//! * **Zombie**: An account which has a balance of some assets in this pallet, but no other +//! footprint on-chain, in particular no account managed in the `frame_system` pallet. +//! +//! ### Goals +//! +//! The assets system in Substrate is designed to make the following possible: +//! +//! * Issue a new assets in a permissioned or permissionless way, if permissionless, then with a +//! deposit required. +//! * Allow accounts to hold these assets without otherwise existing on-chain (*zombies*). +//! * Move assets between accounts. +//! * Update the asset's total supply. +//! * Allow administrative activities by specially privileged accounts including freezing account +//! balances and minting/burning assets. +//! +//! ## Interface +//! +//! ### Permissionless Functions +//! +//! * `create`: Creates a new asset class, taking the required deposit. +//! * `transfer`: Transfer sender's assets to another account. +//! +//! ### Permissioned Functions +//! +//! * `force_create`: Creates a new asset class without taking any deposit. +//! * `force_destroy`: Destroys an asset class. +//! +//! ### Privileged Functions +//! * `destroy`: Destroys an entire asset class; called by the asset class's Owner. +//! * `mint`: Increases the asset balance of an account; called by the asset class's Issuer. +//! * `burn`: Decreases the asset balance of an account; called by the asset class's Admin. +//! * `force_transfer`: Transfers between arbitrary accounts; called by the asset class's Admin. +//! * `freeze`: Disallows further `transfer`s from an account; called by the asset class's Freezer. +//! * `thaw`: Allows further `transfer`s from an account; called by the asset class's Admin. +//! * `transfer_ownership`: Changes an asset class's Owner; called by the asset class's Owner. +//! * `set_team`: Changes an asset class's Admin, Freezer and Issuer; called by the asset class's +//! Owner. +//! +//! Please refer to the [`Call`](./enum.Call.html) enum and its associated variants for documentation on each function. +//! +//! ### Public Functions +//! +//! +//! * `balance` - Get the asset `id` balance of `who`. +//! * `total_supply` - Get the total supply of an asset `id`. +//! +//! Please refer to the [`Module`](./struct.Module.html) struct for details on publicly available functions. +//! +//! ## Related Modules +//! +//! * [`System`](../frame_system/index.html) +//! * [`Support`](../frame_support/index.html) + +// Ensure we're `no_std` when compiling for Wasm. +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; +pub mod weights; + +use sp_std::{fmt::Debug}; +use sp_runtime::{RuntimeDebug, traits::{ + Member, AtLeast32BitUnsigned, Zero, StaticLookup, Saturating, CheckedSub, CheckedAdd, + MaybeSerializeDeserialize, +}}; +use codec::{Encode, Decode, HasCompact}; +use frame_support::{Parameter, decl_module, decl_event, decl_storage, decl_error, ensure, + traits::{ + Currency, ReservableCurrency, EnsureOrigin, Get, BalanceStatus::Reserved + }, + dispatch::{DispatchResult, DispatchError}, +}; +use frame_system::ensure_signed; +pub use weights::WeightInfo; + +pub mod token_traits; +pub use token_traits::{FungibleAsset, MintableAsset, BurnableAsset, FreezableAsset, ManageableAsset}; + +type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; + +/// The module configuration trait. +pub trait Config: frame_system::Config { + /// The overarching event type. + type Event: From> + Into<::Event>; + + /// The units in which we record balances. + type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + Debug; + + /// The arithmetic type of asset identifier. + type AssetId: Member + Parameter + Default + Copy + HasCompact; + + /// The currency mechanism. + type Currency: ReservableCurrency; + + /// The origin which may forcibly create or destroy an asset. + type ForceOrigin: EnsureOrigin; + + /// The basic amount of funds that must be reserved when creating a new asset class. + type AssetDepositBase: Get>; + + /// The additional funds that must be reserved for every zombie account that an asset class + /// supports. + type AssetDepositPerZombie: Get>; + + /// Weight information for extrinsics in this pallet. + type WeightInfo: WeightInfo; + + /// The flag for determining asset freezing and thawing support. + type AllowFreezing: Get; + + /// The flag for determing asset burning support. + type AllowBurning: Get; + + /// The flag for determining asset minting support. + type AllowMinting: Get; +} + +#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug)] +pub struct AssetDetails< + Balance: Encode + Decode + Clone + Debug + Eq + PartialEq, + AccountId: Encode + Decode + Clone + Debug + Eq + PartialEq, + DepositBalance: Encode + Decode + Clone + Debug + Eq + PartialEq, +> { + /// Can change `owner`, `issuer`, `freezer` and `admin` accounts. + owner: AccountId, + /// Can mint tokens. + issuer: AccountId, + /// Can thaw tokens, force transfers and burn tokens from any account. + admin: AccountId, + /// Can freeze tokens. + freezer: AccountId, + /// The total supply across all accounts. + supply: Balance, + /// The balance deposited for this asset. + /// + /// This pays for the data stored here together with any virtual accounts. + deposit: DepositBalance, + /// The number of balance-holding accounts that this asset may have, excluding those that were + /// created when they had a system-level ED. + max_zombies: u32, + /// The ED for virtual accounts. + min_balance: Balance, + /// The current number of zombie accounts. + zombies: u32, + /// The total number of accounts. + accounts: u32, +} + +#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default)] +pub struct AssetBalance< + Balance: Encode + Decode + Clone + Debug + Eq + PartialEq, +> { + /// The balance. + balance: Balance, + /// Whether the account is frozen. + is_frozen: bool, + /// Whether the account is a zombie. If not, then it has a reference. + is_zombie: bool, +} + +decl_storage! { + trait Store for Module as Assets { + /// Details of an asset. + pub Asset: map hasher(blake2_128_concat) T::AssetId => Option, + >>; + + /// The number of units of assets held by any given account. + pub Account: double_map + hasher(blake2_128_concat) T::AssetId, + hasher(blake2_128_concat) T::AccountId + => AssetBalance; + } +} + +decl_event! { + pub enum Event where + ::AccountId, + ::Balance, + ::AssetId, + { + /// Some asset class was created. \[asset_id, creator, owner\] + Created(AssetId, AccountId, AccountId), + /// Some assets were issued. \[asset_id, owner, total_supply\] + Issued(AssetId, AccountId, Balance), + /// Some assets were transferred. \[asset_id, from, to, amount\] + Transferred(AssetId, AccountId, AccountId, Balance), + /// Some assets were destroyed. \[asset_id, owner, balance\] + Burned(AssetId, AccountId, Balance), + /// The management team changed \[asset_id, issuer, admin, freezer\] + TeamChanged(AssetId, AccountId, AccountId, AccountId), + /// The owner changed \[asset_id, owner\] + OwnerChanged(AssetId, AccountId), + /// Some account `who` was frozen. \[asset_id, who\] + Frozen(AssetId, AccountId), + /// Some account `who` was thawed. \[asset_id, who\] + Thawed(AssetId, AccountId), + /// An asset class was destroyed. + Destroyed(AssetId), + /// Some asset class was force-created. \[asset_id, owner\] + ForceCreated(AssetId, AccountId), + /// The maximum amount of zombies allowed has changed. \[asset_id, max_zombies\] + MaxZombiesChanged(AssetId, u32), + } +} + +decl_error! { + pub enum Error for Module { + /// Transfer amount should be non-zero. + AmountZero, + /// Account balance must be greater than or equal to the transfer amount. + BalanceLow, + /// Balance should be non-zero. + BalanceZero, + /// The signing account has no permission to do the operation. + NoPermission, + /// The given asset ID is unknown. + Unknown, + /// The origin account is frozen. + Frozen, + /// The asset ID is already taken. + InUse, + /// Too many zombie accounts in use. + TooManyZombies, + /// Attempt to destroy an asset class when non-zombie, reference-bearing accounts exist. + RefsLeft, + /// Invalid witness data given. + BadWitness, + /// Minimum balance should be non-zero. + MinBalanceZero, + /// A mint operation lead to an overflow. + Overflow, + /// The asset does not allow freezing or thawing functionality + NoFreezingAllowed, + /// The asset does not allow burning functionality. + NoBurningAllowed, + /// The asset does not allow minting functionality + NoMintingAllowed, + } +} + +decl_module! { + pub struct Module for enum Call where origin: T::Origin { + type Error = Error; + + fn deposit_event() = default; + + /// Issue a new class of fungible assets from a public origin. + /// + /// This new asset class has no assets initially. + /// + /// The origin must be Signed and the sender must have sufficient funds free. + /// + /// Funds of sender are reserved according to the formula: + /// `AssetDepositBase + AssetDepositPerZombie * max_zombies`. + /// + /// Parameters: + /// - `id`: The identifier of the new asset. This must not be currently in use to identify + /// an existing asset. + /// - `owner`: The owner of this class of assets. The owner has full superuser permissions + /// over this asset, but may later change and configure the permissions using `transfer_ownership` + /// and `set_team`. + /// - `max_zombies`: The total number of accounts which may hold assets in this class yet + /// have no existential deposit. + /// - `min_balance`: The minimum balance of this new asset that any single account must + /// have. If an account's balance is reduced below this, then it collapses to zero. + /// + /// Emits `Created` event when successful. + /// + /// Weight: `O(1)` + #[weight = T::WeightInfo::create()] + fn create(origin, + #[compact] id: T::AssetId, + admin: ::Source, + max_zombies: u32, + min_balance: T::Balance, + ) { + let owner = ensure_signed(origin)?; + let admin = T::Lookup::lookup(admin)?; + + ensure!(!Asset::::contains_key(id), Error::::InUse); + ensure!(!min_balance.is_zero(), Error::::MinBalanceZero); + + let deposit = T::AssetDepositPerZombie::get() + .saturating_mul(max_zombies.into()) + .saturating_add(T::AssetDepositBase::get()); + T::Currency::reserve(&owner, deposit)?; + + Asset::::insert(id, AssetDetails { + owner: owner.clone(), + issuer: admin.clone(), + admin: admin.clone(), + freezer: admin.clone(), + supply: Zero::zero(), + deposit, + max_zombies, + min_balance, + zombies: Zero::zero(), + accounts: Zero::zero(), + }); + Self::deposit_event(RawEvent::Created(id, owner, admin)); + } + + /// Issue a new class of fungible assets from a privileged origin. + /// + /// This new asset class has no assets initially. + /// + /// The origin must conform to `ForceOrigin`. + /// + /// Unlike `create`, no funds are reserved. + /// + /// - `id`: The identifier of the new asset. This must not be currently in use to identify + /// an existing asset. + /// - `owner`: The owner of this class of assets. The owner has full superuser permissions + /// over this asset, but may later change and configure the permissions using `transfer_ownership` + /// and `set_team`. + /// - `max_zombies`: The total number of accounts which may hold assets in this class yet + /// have no existential deposit. + /// - `min_balance`: The minimum balance of this new asset that any single account must + /// have. If an account's balance is reduced below this, then it collapses to zero. + /// + /// Emits `ForceCreated` event when successful. + /// + /// Weight: `O(1)` + #[weight = T::WeightInfo::force_create()] + fn force_create(origin, + #[compact] id: T::AssetId, + owner: ::Source, + #[compact] max_zombies: u32, + #[compact] min_balance: T::Balance, + ) { + T::ForceOrigin::ensure_origin(origin)?; + let owner = T::Lookup::lookup(owner)?; + + ensure!(!Asset::::contains_key(id), Error::::InUse); + ensure!(!min_balance.is_zero(), Error::::MinBalanceZero); + + Asset::::insert(id, AssetDetails { + owner: owner.clone(), + issuer: owner.clone(), + admin: owner.clone(), + freezer: owner.clone(), + supply: Zero::zero(), + deposit: Zero::zero(), + max_zombies, + min_balance, + zombies: Zero::zero(), + accounts: Zero::zero(), + }); + Self::deposit_event(RawEvent::ForceCreated(id, owner)); + } + + /// Destroy a class of fungible assets owned by the sender. + /// + /// The origin must be Signed and the sender must be the owner of the asset `id`. + /// + /// - `id`: The identifier of the asset to be destroyed. This must identify an existing + /// asset. + /// + /// Emits `Destroyed` event when successful. + /// + /// Weight: `O(z)` where `z` is the number of zombie accounts. + #[weight = T::WeightInfo::destroy(*zombies_witness)] + fn destroy(origin, + #[compact] id: T::AssetId, + #[compact] zombies_witness: u32, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + + Asset::::try_mutate_exists(id, |maybe_details| { + let details = maybe_details.take().ok_or(Error::::Unknown)?; + ensure!(details.owner == origin, Error::::NoPermission); + ensure!(details.accounts == details.zombies, Error::::RefsLeft); + ensure!(details.zombies <= zombies_witness, Error::::BadWitness); + T::Currency::unreserve(&details.owner, details.deposit); + + *maybe_details = None; + Account::::remove_prefix(&id); + + Self::deposit_event(RawEvent::Destroyed(id)); + Ok(()) + }) + } + + /// Destroy a class of fungible assets. + /// + /// The origin must conform to `ForceOrigin`. + /// + /// - `id`: The identifier of the asset to be destroyed. This must identify an existing + /// asset. + /// + /// Emits `Destroyed` event when successful. + /// + /// Weight: `O(1)` + #[weight = T::WeightInfo::force_destroy(*zombies_witness)] + fn force_destroy(origin, + #[compact] id: T::AssetId, + #[compact] zombies_witness: u32, + ) -> DispatchResult { + T::ForceOrigin::ensure_origin(origin)?; + + Asset::::try_mutate_exists(id, |maybe_details| { + let details = maybe_details.take().ok_or(Error::::Unknown)?; + ensure!(details.accounts == details.zombies, Error::::RefsLeft); + ensure!(details.zombies <= zombies_witness, Error::::BadWitness); + T::Currency::unreserve(&details.owner, details.deposit); + + *maybe_details = None; + Account::::remove_prefix(&id); + + Self::deposit_event(RawEvent::Destroyed(id)); + Ok(()) + }) + } + + /// Mint assets of a particular class. + /// + /// The origin must be Signed and the sender must be the Issuer of the asset `id`. + /// + /// - `id`: The identifier of the asset to have some amount minted. + /// - `beneficiary`: The account to be credited with the minted assets. + /// - `amount`: The amount of the asset to be minted. + /// + /// Emits `Destroyed` event when successful. + /// + /// Weight: `O(1)` + /// Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. + #[weight = T::WeightInfo::mint()] + fn mint(origin, + #[compact] id: T::AssetId, + beneficiary: ::Source, + #[compact] amount: T::Balance + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + + ensure!(T::AllowMinting::get(), Error::::NoMintingAllowed); + + let details = Asset::::get(id).ok_or(Error::::Unknown)?; + ensure!(&origin == &details.issuer, Error::::NoPermission); + + let beneficiary = T::Lookup::lookup(beneficiary)?; + >::mint(id, beneficiary, amount) + } + + /// Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. + /// + /// Origin must be Signed and the sender should be the Manager of the asset `id`. + /// + /// Bails with `BalanceZero` if the `who` is already dead. + /// + /// - `id`: The identifier of the asset to have some amount burned. + /// - `who`: The account to be debited from. + /// - `amount`: The maximum amount by which `who`'s balance should be reduced. + /// + /// Emits `Burned` with the actual amount burned. If this takes the balance to below the + /// minimum for the asset, then the amount burned is increased to take it to zero. + /// + /// Weight: `O(1)` + /// Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + #[weight = T::WeightInfo::burn()] + fn burn(origin, + #[compact] id: T::AssetId, + who: ::Source, + #[compact] amount: T::Balance + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + ensure!(T::AllowBurning::get(), Error::::NoBurningAllowed); + + let details = Asset::::get(id).ok_or(Error::::Unknown)?; + ensure!(&origin == &details.admin, Error::::NoPermission); + + let who = T::Lookup::lookup(who)?; + >::burn(id, who, amount) + } + + /// Move some assets from the sender account to another. + /// + /// Origin must be Signed. + /// + /// - `id`: The identifier of the asset to have some amount transferred. + /// - `target`: The account to be credited. + /// - `amount`: The amount by which the sender's balance of assets should be reduced and + /// `target`'s balance increased. The amount actually transferred may be slightly greater in + /// the case that the transfer would otherwise take the sender balance above zero but below + /// the minimum balance. Must be greater than zero. + /// + /// Emits `Transferred` with the actual amount transferred. If this takes the source balance + /// to below the minimum for the asset, then the amount transferred is increased to take it + /// to zero. + /// + /// Weight: `O(1)` + /// Modes: Pre-existence of `target`; Post-existence of sender; Prior & post zombie-status + /// of sender; Account pre-existence of `target`. + #[weight = T::WeightInfo::transfer()] + fn transfer(origin, + #[compact] id: T::AssetId, + target: ::Source, + #[compact] amount: T::Balance + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + ensure!(!amount.is_zero(), Error::::AmountZero); + + let mut origin_account = Account::::get(id, &origin); + ensure!(!origin_account.is_frozen, Error::::Frozen); + origin_account.balance = origin_account.balance.checked_sub(&amount) + .ok_or(Error::::BalanceLow)?; + + let target = T::Lookup::lookup(target)?; + >::transfer(id, origin.clone(), target.clone(), amount)?; + Ok(()) + } + + /// Move some assets from one account to another. + /// + /// Origin must be Signed and the sender should be the Admin of the asset `id`. + /// + /// - `id`: The identifier of the asset to have some amount transferred. + /// - `source`: The account to be debited. + /// - `dest`: The account to be credited. + /// - `amount`: The amount by which the `source`'s balance of assets should be reduced and + /// `dest`'s balance increased. The amount actually transferred may be slightly greater in + /// the case that the transfer would otherwise take the `source` balance above zero but + /// below the minimum balance. Must be greater than zero. + /// + /// Emits `Transferred` with the actual amount transferred. If this takes the source balance + /// to below the minimum for the asset, then the amount transferred is increased to take it + /// to zero. + /// + /// Weight: `O(1)` + /// Modes: Pre-existence of `dest`; Post-existence of `source`; Prior & post zombie-status + /// of `source`; Account pre-existence of `dest`. + #[weight = T::WeightInfo::force_transfer()] + fn force_transfer(origin, + #[compact] id: T::AssetId, + source: ::Source, + dest: ::Source, + #[compact] amount: T::Balance, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + + let details = Asset::::get(id).ok_or(Error::::Unknown)?; + ensure!(&origin == &details.admin, Error::::NoPermission); + + let source = T::Lookup::lookup(source)?; + let source_account = Account::::get(id, &source); + let amount = amount.min(source_account.balance); + ensure!(!amount.is_zero(), Error::::AmountZero); + + let dest = T::Lookup::lookup(dest)?; + >::transfer(id, source.clone(), dest.clone(), amount)?; + Ok(()) + } + + /// Disallow further unprivileged transfers from an account. + /// + /// Origin must be Signed and the sender should be the Freezer of the asset `id`. + /// + /// - `id`: The identifier of the asset to be frozen. + /// - `who`: The account to be frozen. + /// + /// Emits `Frozen`. + /// + /// Weight: `O(1)` + #[weight = T::WeightInfo::freeze()] + fn freeze(origin, #[compact] id: T::AssetId, who: ::Source) { + let origin = ensure_signed(origin)?; + + ensure!(T::AllowFreezing::get(), Error::::NoFreezingAllowed); + + let d = Asset::::get(id).ok_or(Error::::Unknown)?; + ensure!(&origin == &d.freezer, Error::::NoPermission); + + let who = T::Lookup::lookup(who)?; + let _ = >::freeze(id, who)?; + } + + /// Allow unprivileged transfers from an account again. + /// + /// Origin must be Signed and the sender should be the Admin of the asset `id`. + /// + /// - `id`: The identifier of the asset to be frozen. + /// - `who`: The account to be unfrozen. + /// + /// Emits `Thawed`. + /// + /// Weight: `O(1)` + #[weight = T::WeightInfo::thaw()] + fn thaw(origin, #[compact] id: T::AssetId, who: ::Source) { + let origin = ensure_signed(origin)?; + + ensure!(T::AllowFreezing::get(), Error::::NoFreezingAllowed); + + let details = Asset::::get(id).ok_or(Error::::Unknown)?; + ensure!(&origin == &details.admin, Error::::NoPermission); + + let who = T::Lookup::lookup(who)?; + let _ = >::thaw(id, who)?; + } + + /// Change the Owner of an asset. + /// + /// Origin must be Signed and the sender should be the Owner of the asset `id`. + /// + /// - `id`: The identifier of the asset to be frozen. + /// - `owner`: The new Owner of this asset. + /// + /// Emits `OwnerChanged`. + /// + /// Weight: `O(1)` + #[weight = T::WeightInfo::transfer_ownership()] + fn transfer_ownership(origin, + #[compact] id: T::AssetId, + new_owner: ::Source, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + let details = Asset::::get(id).ok_or(Error::::Unknown)?; + ensure!(&origin == &details.owner, Error::::NoPermission); + + let new_owner = T::Lookup::lookup(new_owner)?; + Self::set_owner(id, new_owner) + } + + /// Change the Issuer, Admin and Freezer of an asset. + /// + /// Origin must be Signed and the sender should be the Owner of the asset `id`. + /// + /// - `id`: The identifier of the asset to be frozen. + /// - `issuer`: The new Issuer of this asset. + /// - `admin`: The new Admin of this asset. + /// - `freezer`: The new Freezer of this asset. + /// + /// Emits `TeamChanged`. + /// + /// Weight: `O(1)` + #[weight = T::WeightInfo::set_team()] + fn set_team(origin, + #[compact] id: T::AssetId, + issuer: ::Source, + admin: ::Source, + freezer: ::Source, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + + let details = Asset::::get(id).ok_or(Error::::Unknown)?; + ensure!(&origin == &details.admin, Error::::NoPermission); + + let issuer = T::Lookup::lookup(issuer)?; + let admin = T::Lookup::lookup(admin)?; + let freezer = T::Lookup::lookup(freezer)?; + + >::set_team(id, issuer, admin, freezer) + } + + #[weight = T::WeightInfo::set_max_zombies()] + fn set_max_zombies(origin, + #[compact] id: T::AssetId, + #[compact] max_zombies: u32, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + + Asset::::try_mutate(id, |maybe_details| { + let details = maybe_details.as_mut().ok_or(Error::::Unknown)?; + ensure!(&origin == &details.owner, Error::::NoPermission); + ensure!(max_zombies >= details.zombies, Error::::TooManyZombies); + + let new_deposit = T::AssetDepositPerZombie::get() + .saturating_mul(max_zombies.into()) + .saturating_add(T::AssetDepositBase::get()); + + if new_deposit > details.deposit { + T::Currency::reserve(&origin, new_deposit - details.deposit)?; + } else { + T::Currency::unreserve(&origin, details.deposit - new_deposit); + } + + details.max_zombies = max_zombies; + + Self::deposit_event(RawEvent::MaxZombiesChanged(id, max_zombies)); + Ok(()) + }) + } + } +} + +// The main implementation block for the module. +impl Module { + // Public immutables + + /// Get the asset `id` balance of `who`. + pub fn balance(id: T::AssetId, who: T::AccountId) -> T::Balance { + Account::::get(id, who).balance + } + + /// Get the total supply of an asset `id`. + pub fn total_supply(id: T::AssetId) -> T::Balance { + Asset::::get(id).map(|x| x.supply).unwrap_or_else(Zero::zero) + } + + /// Check the number of zombies allow yet for an asset. + pub fn zombie_allowance(id: T::AssetId) -> u32 { + Asset::::get(id).map(|x| x.max_zombies - x.zombies).unwrap_or_else(Zero::zero) + } + + fn new_account( + who: &T::AccountId, + d: &mut AssetDetails>, + ) -> Result { + let accounts = d.accounts.checked_add(1).ok_or(Error::::Overflow)?; + let r = Ok(if frame_system::Module::::account_exists(who) { + frame_system::Module::::inc_ref(who); + false + } else { + ensure!(d.zombies < d.max_zombies, Error::::TooManyZombies); + d.zombies += 1; + true + }); + d.accounts = accounts; + r + } + + /// If `who`` exists in system and it's a zombie, dezombify it. + fn dezombify( + who: &T::AccountId, + d: &mut AssetDetails>, + is_zombie: &mut bool, + ) { + if *is_zombie && frame_system::Module::::account_exists(who) { + frame_system::Module::::inc_ref(who); + *is_zombie = false; + d.zombies = d.zombies.saturating_sub(1); + } + } + + fn dead_account( + who: &T::AccountId, + d: &mut AssetDetails>, + is_zombie: bool, + ) { + if is_zombie { + d.zombies = d.zombies.saturating_sub(1); + } else { + frame_system::Module::::dec_ref(who); + } + d.accounts = d.accounts.saturating_sub(1); + } +} + +impl FungibleAsset for Module where + T::Balance: MaybeSerializeDeserialize + Debug +{ + type Balance = T::Balance; + type AssetId = T::AssetId; + + // PUBLIC IMMUTABLES + + /// The total amount of issuance in the system for a specific asset. + fn total_issuance(id: Self::AssetId) -> Self::Balance { + Self::total_supply(id) + } + + fn balance_of(id: Self::AssetId, who: T::AccountId) -> Self::Balance { + Self::balance(id, who) + } + + // PUBLIC MUTABLES (DANGEROUS) + + fn transfer( + id: Self::AssetId, + from: T::AccountId, + dest: T::AccountId, + amount: Self::Balance + ) -> DispatchResult { + if dest == from { + return Ok(()) + } + + let mut from_account = Account::::get(id, &from); + from_account.balance = from_account.balance.checked_sub(&amount) + .ok_or(Error::::BalanceLow)?; + + Asset::::try_mutate(id, |maybe_details| { + let details = maybe_details.as_mut().ok_or(Error::::Unknown)?; + + let mut amount = amount; + if from_account.balance < details.min_balance { + amount += from_account.balance; + from_account.balance = Zero::zero(); + } + + Account::::try_mutate(id, &dest, |a| -> DispatchResult { + let new_balance = a.balance.saturating_add(amount); + ensure!(new_balance >= details.min_balance, Error::::BalanceLow); + if a.balance.is_zero() { + a.is_zombie = Self::new_account(&dest, details)?; + } + a.balance = new_balance; + Ok(()) + })?; + + match from_account.balance.is_zero() { + false => { + Self::dezombify(&from, details, &mut from_account.is_zombie); + Account::::insert(id, &from, &from_account) + } + true => { + Self::dead_account(&from, details, from_account.is_zombie); + Account::::remove(id, &from); + } + } + + Self::deposit_event(RawEvent::Transferred(id, from, dest, amount)); + + Ok(()) + }) + } +} + +impl BurnableAsset for Module { + fn burn( + id: Self::AssetId, + who: T::AccountId, + amount: Self::Balance + ) -> DispatchResult { + Asset::::try_mutate(id, |maybe_details| { + let d = maybe_details.as_mut().ok_or(Error::::Unknown)?; + + let burned = Account::::try_mutate_exists( + id, + &who, + |maybe_account| -> Result { + let mut account = maybe_account.take().ok_or(Error::::BalanceZero)?; + let mut burned = amount.min(account.balance); + account.balance -= burned; + *maybe_account = if account.balance < d.min_balance { + burned += account.balance; + Self::dead_account(&who, d, account.is_zombie); + None + } else { + Some(account) + }; + Ok(burned) + } + )?; + + d.supply = d.supply.saturating_sub(burned); + + Self::deposit_event(RawEvent::Burned(id, who, burned)); + Ok(()) + }) + } +} + +impl MintableAsset for Module { + fn mint( + id: Self::AssetId, + beneficiary: T::AccountId, + amount: Self::Balance + ) -> DispatchResult { + Asset::::try_mutate(id, |maybe_details| { + let details = maybe_details.as_mut().ok_or(Error::::Unknown)?; + details.supply = details.supply.checked_add(&amount).ok_or(Error::::Overflow)?; + + Account::::try_mutate(id, &beneficiary, |t| -> DispatchResult { + let new_balance = t.balance.saturating_add(amount); + ensure!(new_balance >= details.min_balance, Error::::BalanceLow); + if t.balance.is_zero() { + t.is_zombie = Self::new_account(&beneficiary, details)?; + } + t.balance = new_balance; + Ok(()) + })?; + Self::deposit_event(RawEvent::Issued(id, beneficiary, amount)); + Ok(()) + }) + } +} + +impl FreezableAsset for Module { + fn freeze(id: Self::AssetId, who: T::AccountId) -> DispatchResult { + ensure!(Account::::contains_key(id, &who), Error::::BalanceZero); + + Account::::mutate(id, &who, |a| a.is_frozen = true); + + Self::deposit_event(Event::::Frozen(id, who)); + Ok(()) + } + + fn thaw(id: Self::AssetId, who: T::AccountId) -> DispatchResult { + ensure!(Account::::contains_key(id, &who), Error::::BalanceZero); + + Account::::mutate(id, &who, |a| a.is_frozen = false); + + Self::deposit_event(Event::::Thawed(id, who)); + Ok(()) + } +} + +impl ManageableAsset for Module { + fn set_owner(id: Self::AssetId, owner: T::AccountId) -> DispatchResult { + Asset::::try_mutate(id, |maybe_details| { + let details = maybe_details.as_mut().ok_or(Error::::Unknown)?; + if details.owner == owner { return Ok(()) } + + // Move the deposit to the new owner. + T::Currency::repatriate_reserved(&details.owner, &owner, details.deposit, Reserved)?; + + details.owner = owner.clone(); + + Self::deposit_event(RawEvent::OwnerChanged(id, owner)); + Ok(()) + }) + } + + fn set_team( + id: Self::AssetId, + issuer: T::AccountId, + admin: T::AccountId, + freezer: T::AccountId + ) -> DispatchResult { + Asset::::try_mutate(id, |maybe_details| { + let details = maybe_details.as_mut().ok_or(Error::::Unknown)?; + + details.issuer = issuer.clone(); + details.admin = admin.clone(); + details.freezer = freezer.clone(); + + Self::deposit_event(RawEvent::TeamChanged(id, issuer, admin, freezer)); + Ok(()) + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + use frame_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types, impl_outer_event}; + use sp_core::H256; + use sp_runtime::{traits::{BlakeTwo256, IdentityLookup}, testing::Header}; + + mod pallet_assets { + pub use crate::Event; + } + + impl_outer_event! { + pub enum Event for Test { + frame_system, + pallet_balances, + pallet_assets, + } + } + + impl_outer_origin! { + pub enum Origin for Test where system = frame_system {} + } + + #[derive(Clone, Eq, PartialEq)] + pub struct Test; + parameter_types! { + pub const BlockHashCount: u64 = 250; + } + impl frame_system::Config for Test { + type BaseCallFilter = (); + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type Origin = Origin; + type Index = u64; + type Call = (); + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type Event = Event; + type BlockHashCount = BlockHashCount; + type Version = (); + type PalletInfo = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + } + + parameter_types! { + pub const ExistentialDeposit: u64 = 1; + } + + impl pallet_balances::Config for Test { + type MaxLocks = (); + type Balance = u64; + type DustRemoval = (); + type Event = Event; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); + } + + parameter_types! { + pub const AssetDepositBase: u64 = 1; + pub const AssetDepositPerZombie: u64 = 1; + pub const AllowFreezing: bool = true; + pub const AllowBurning: bool = true; + pub const AllowMinting: bool = true; + } + + impl Config for Test { + type Currency = Balances; + type Event = Event; + type Balance = u64; + type AssetId = u32; + type ForceOrigin = frame_system::EnsureRoot; + type AssetDepositBase = AssetDepositBase; + type AssetDepositPerZombie = AssetDepositPerZombie; + type AllowFreezing = AllowFreezing; + type AllowBurning = AllowBurning; + type AllowMinting = AllowMinting; + type WeightInfo = (); + } + + type System = frame_system::Module; + type Balances = pallet_balances::Module; + type Assets = Module; + + pub(crate) fn new_test_ext() -> sp_io::TestExternalities { + frame_system::GenesisConfig::default().build_storage::().unwrap().into() + } + + #[test] + fn basic_minting_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_ok!(Assets::mint(Origin::signed(1), 0, 2, 100)); + assert_eq!(Assets::balance(0, 2), 100); + }); + } + + #[test] + fn lifecycle_should_work() { + new_test_ext().execute_with(|| { + Balances::make_free_balance_be(&1, 100); + assert_ok!(Assets::create(Origin::signed(1), 0, 1, 10, 1)); + assert_eq!(Balances::reserved_balance(&1), 11); + + assert_ok!(Assets::destroy(Origin::signed(1), 0, 100)); + assert_eq!(Balances::reserved_balance(&1), 0); + + assert_ok!(Assets::create(Origin::signed(1), 0, 1, 10, 1)); + assert_eq!(Balances::reserved_balance(&1), 11); + + assert_ok!(Assets::force_destroy(Origin::root(), 0, 100)); + assert_eq!(Balances::reserved_balance(&1), 0); + }); + } + + #[test] + fn destroy_with_non_zombies_should_not_work() { + new_test_ext().execute_with(|| { + Balances::make_free_balance_be(&1, 100); + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_noop!(Assets::destroy(Origin::signed(1), 0, 100), Error::::RefsLeft); + assert_noop!(Assets::force_destroy(Origin::root(), 0, 100), Error::::RefsLeft); + assert_ok!(Assets::burn(Origin::signed(1), 0, 1, 100)); + assert_ok!(Assets::destroy(Origin::signed(1), 0, 100)); + }); + } + + #[test] + fn destroy_with_bad_witness_should_not_work() { + new_test_ext().execute_with(|| { + Balances::make_free_balance_be(&1, 100); + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 10, 100)); + assert_noop!(Assets::destroy(Origin::signed(1), 0, 0), Error::::BadWitness); + assert_noop!(Assets::force_destroy(Origin::root(), 0, 0), Error::::BadWitness); + }); + } + + #[test] + fn max_zombies_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 2, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 0, 100)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + + assert_eq!(Assets::zombie_allowance(0), 0); + assert_noop!(Assets::mint(Origin::signed(1), 0, 2, 100), Error::::TooManyZombies); + assert_noop!(Assets::transfer(Origin::signed(1), 0, 2, 50), Error::::TooManyZombies); + assert_noop!(Assets::force_transfer(Origin::signed(1), 0, 1, 2, 50), Error::::TooManyZombies); + + Balances::make_free_balance_be(&3, 100); + assert_ok!(Assets::mint(Origin::signed(1), 0, 3, 100)); + + assert_ok!(Assets::transfer(Origin::signed(0), 0, 1, 100)); + assert_eq!(Assets::zombie_allowance(0), 1); + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 50)); + }); + } + + #[test] + fn resetting_max_zombies_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 2, 1)); + Balances::make_free_balance_be(&1, 100); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 2, 100)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 3, 100)); + + assert_eq!(Assets::zombie_allowance(0), 0); + + assert_noop!(Assets::set_max_zombies(Origin::signed(1), 0, 1), Error::::TooManyZombies); + + assert_ok!(Assets::set_max_zombies(Origin::signed(1), 0, 3)); + assert_eq!(Assets::zombie_allowance(0), 1); + }); + } + + #[test] + fn dezombifying_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 10)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::zombie_allowance(0), 9); + + // introduce a bit of balance for account 2. + Balances::make_free_balance_be(&2, 100); + + // transfer 25 units, nothing changes. + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 25)); + assert_eq!(Assets::zombie_allowance(0), 9); + + // introduce a bit of balance; this will create the account. + Balances::make_free_balance_be(&1, 100); + + // now transferring 25 units will create it. + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 25)); + assert_eq!(Assets::zombie_allowance(0), 10); + }); + } + + #[test] + fn min_balance_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 10)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Asset::::get(0).unwrap().accounts, 1); + + // Cannot create a new account with a balance that is below minimum... + assert_noop!(Assets::mint(Origin::signed(1), 0, 2, 9), Error::::BalanceLow); + assert_noop!(Assets::transfer(Origin::signed(1), 0, 2, 9), Error::::BalanceLow); + assert_noop!(Assets::force_transfer(Origin::signed(1), 0, 1, 2, 9), Error::::BalanceLow); + + // When deducting from an account to below minimum, it should be reaped. + + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 91)); + assert!(Assets::balance(0, 1).is_zero()); + assert_eq!(Assets::balance(0, 2), 100); + assert_eq!(Asset::::get(0).unwrap().accounts, 1); + + assert_ok!(Assets::force_transfer(Origin::signed(1), 0, 2, 1, 91)); + assert!(Assets::balance(0, 2).is_zero()); + assert_eq!(Assets::balance(0, 1), 100); + assert_eq!(Asset::::get(0).unwrap().accounts, 1); + + assert_ok!(Assets::burn(Origin::signed(1), 0, 1, 91)); + assert!(Assets::balance(0, 1).is_zero()); + assert_eq!(Asset::::get(0).unwrap().accounts, 0); + }); + } + + #[test] + fn querying_total_supply_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 50)); + assert_eq!(Assets::balance(0, 1), 50); + assert_eq!(Assets::balance(0, 2), 50); + assert_ok!(Assets::transfer(Origin::signed(2), 0, 3, 31)); + assert_eq!(Assets::balance(0, 1), 50); + assert_eq!(Assets::balance(0, 2), 19); + assert_eq!(Assets::balance(0, 3), 31); + assert_ok!(Assets::burn(Origin::signed(1), 0, 3, u64::max_value())); + assert_eq!(Assets::total_supply(0), 69); + }); + } + + #[test] + fn transferring_amount_below_available_balance_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 50)); + assert_eq!(Assets::balance(0, 1), 50); + assert_eq!(Assets::balance(0, 2), 50); + }); + } + + #[test] + fn transferring_frozen_balance_should_not_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_ok!(Assets::freeze(Origin::signed(1), 0, 1)); + assert_noop!(Assets::transfer(Origin::signed(1), 0, 2, 50), Error::::Frozen); + assert_ok!(Assets::thaw(Origin::signed(1), 0, 1)); + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 50)); + }); + } + + #[test] + fn origin_guards_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_noop!(Assets::transfer_ownership(Origin::signed(2), 0, 2), Error::::NoPermission); + assert_noop!(Assets::set_team(Origin::signed(2), 0, 2, 2, 2), Error::::NoPermission); + assert_noop!(Assets::freeze(Origin::signed(2), 0, 1), Error::::NoPermission); + assert_noop!(Assets::thaw(Origin::signed(2), 0, 2), Error::::NoPermission); + assert_noop!(Assets::mint(Origin::signed(2), 0, 2, 100), Error::::NoPermission); + assert_noop!(Assets::burn(Origin::signed(2), 0, 1, 100), Error::::NoPermission); + assert_noop!(Assets::force_transfer(Origin::signed(2), 0, 1, 2, 100), Error::::NoPermission); + assert_noop!(Assets::set_max_zombies(Origin::signed(2), 0, 11), Error::::NoPermission); + assert_noop!(Assets::destroy(Origin::signed(2), 0, 100), Error::::NoPermission); + }); + } + + #[test] + fn transfer_owner_should_work() { + new_test_ext().execute_with(|| { + Balances::make_free_balance_be(&1, 100); + Balances::make_free_balance_be(&2, 1); + assert_ok!(Assets::create(Origin::signed(1), 0, 1, 10, 1)); + + assert_eq!(Balances::reserved_balance(&1), 11); + + assert_ok!(Assets::transfer_ownership(Origin::signed(1), 0, 2)); + assert_eq!(Balances::reserved_balance(&2), 11); + assert_eq!(Balances::reserved_balance(&1), 0); + + assert_noop!(Assets::transfer_ownership(Origin::signed(1), 0, 1), Error::::NoPermission); + + assert_ok!(Assets::transfer_ownership(Origin::signed(2), 0, 1)); + assert_eq!(Balances::reserved_balance(&1), 11); + assert_eq!(Balances::reserved_balance(&2), 0); + }); + } + + #[test] + fn set_team_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::set_team(Origin::signed(1), 0, 2, 3, 4)); + + assert_ok!(Assets::mint(Origin::signed(2), 0, 2, 100)); + assert_ok!(Assets::freeze(Origin::signed(4), 0, 2)); + assert_ok!(Assets::thaw(Origin::signed(3), 0, 2)); + assert_ok!(Assets::force_transfer(Origin::signed(3), 0, 2, 3, 100)); + assert_ok!(Assets::burn(Origin::signed(3), 0, 3, 100)); + }); + } + + #[test] + fn transferring_to_frozen_account_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 2, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_eq!(Assets::balance(0, 2), 100); + assert_ok!(Assets::freeze(Origin::signed(1), 0, 2)); + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 50)); + assert_eq!(Assets::balance(0, 2), 150); + }); + } + + #[test] + fn transferring_amount_more_than_available_balance_should_not_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_ok!(Assets::transfer(Origin::signed(1), 0, 2, 50)); + assert_eq!(Assets::balance(0, 1), 50); + assert_eq!(Assets::balance(0, 2), 50); + assert_ok!(Assets::burn(Origin::signed(1), 0, 1, u64::max_value())); + assert_eq!(Assets::balance(0, 1), 0); + assert_noop!(Assets::transfer(Origin::signed(1), 0, 1, 50), Error::::BalanceLow); + assert_noop!(Assets::transfer(Origin::signed(2), 0, 1, 51), Error::::BalanceLow); + }); + } + + #[test] + fn transferring_less_than_one_unit_should_not_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_noop!(Assets::transfer(Origin::signed(1), 0, 2, 0), Error::::AmountZero); + }); + } + + #[test] + fn transferring_more_units_than_total_supply_should_not_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_noop!(Assets::transfer(Origin::signed(1), 0, 2, 101), Error::::BalanceLow); + }); + } + + #[test] + fn burning_asset_balance_with_positive_balance_should_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 1), 100); + assert_ok!(Assets::burn(Origin::signed(1), 0, 1, u64::max_value())); + assert_eq!(Assets::balance(0, 1), 0); + }); + } + + #[test] + fn burning_asset_balance_with_zero_balance_should_not_work() { + new_test_ext().execute_with(|| { + assert_ok!(Assets::force_create(Origin::root(), 0, 1, 10, 1)); + assert_ok!(Assets::mint(Origin::signed(1), 0, 1, 100)); + assert_eq!(Assets::balance(0, 2), 0); + assert_noop!(Assets::burn(Origin::signed(1), 0, 2, u64::max_value()), Error::::BalanceZero); + }); + } +} diff --git a/modules/edge-assets/src/token_traits.rs b/modules/edge-assets/src/token_traits.rs new file mode 100644 index 00000000..dc7cc5aa --- /dev/null +++ b/modules/edge-assets/src/token_traits.rs @@ -0,0 +1,76 @@ +use super::*; +use codec::FullCodec; +use frame_support::dispatch::DispatchResult; + +/// Abstraction over a fungible asset system. +pub trait FungibleAsset { + /// The balance of an account. + type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + + Default + HasCompact; + + type AssetId: Member + Parameter + Default + Copy + HasCompact; + + // PUBLIC IMMUTABLES + /// The total amount of issuance in the system for a specific asset. + fn total_issuance(id: Self::AssetId) -> Self::Balance; + + /// The balance of a given account. + /// + /// This is the only balance that matters in terms of most operations on tokens. It alone + /// is used to determine the balance when in the contract execution environment. When this + /// balance falls below the value of `ExistentialDeposit`, then the 'current account' is + /// deleted: specifically `FreeBalance`. + /// + /// `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets + /// collapsed to zero if it ever becomes less than `ExistentialDeposit`. + fn balance_of(id: Self::AssetId, who: AccountId) -> Self::Balance; + + // PUBLIC MUTABLES (DANGEROUS) + + /// Transfer some liquid free balance of an asset to another account. + fn transfer(id: Self::AssetId, from: AccountId, to: AccountId, amount: Self::Balance) -> DispatchResult; +} + +pub trait MintableAsset: FungibleAsset { + /// Increase the total issuance of of a specific asset by `amount` for a specific account. + /// + /// Returns `Ok` iff the mint was successful. + /// `Err` with the reason why otherwise. + fn mint(id: Self::AssetId, beneficiary: AccountId, amount: Self::Balance) -> DispatchResult; +} + +pub trait BurnableAsset: FungibleAsset { + /// Reduce the total number of assets a specific account owns for a specific asset. + /// + /// Returns `Ok` iff the burn was successful. + /// `Err` with the reason why otherwise. + fn burn(id: Self::AssetId, who: AccountId, amount: Self::Balance) -> DispatchResult; +} + +pub trait FreezableAsset: FungibleAsset { + /// Freeze an amount of tokens for a specific account. + /// + /// Returns `Ok` iff the mint was successful. + /// `Err` with the reason why otherwise. + fn freeze(id: Self::AssetId, who: AccountId) -> DispatchResult; + + /// Unfreeze an amount of tokens for a specific account. + /// + /// Returns `Ok` iff the mint was successful. + /// `Err` with the reason why otherwise. + fn thaw(id: Self::AssetId, who: AccountId) -> DispatchResult; +} + +pub trait ManageableAsset: FungibleAsset { + /// Set ownership of administrative functions for a specific token. + /// + /// Returns `Ok` iff the ownership transfer was successful. + /// `Err` with the reason why otherwise. + fn set_team(id: Self::AssetId, issuer: AccountId, admin: AccountId, freezer: AccountId) -> DispatchResult; + + /// Set ownership of administrative functions for a specific token. + /// + /// Returns `Ok` iff the ownership transfer was successful. + /// `Err` with the reason why otherwise. + fn set_owner(id: Self::AssetId, owner: AccountId) -> DispatchResult; +} diff --git a/modules/edge-assets/src/weights.rs b/modules/edge-assets/src/weights.rs new file mode 100644 index 00000000..8a7be663 --- /dev/null +++ b/modules/edge-assets/src/weights.rs @@ -0,0 +1,211 @@ +// This file is part of Substrate. + +// Copyright (C) 2020 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. + +//! Autogenerated weights for pallet_assets +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 +//! DATE: 2020-12-19, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 + +// Executed Command: +// target/release/substrate +// benchmark +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_assets +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./frame/assets/src/weights.rs +// --template=./.maintain/frame-weight-template.hbs + + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_assets. +pub trait WeightInfo { + fn create() -> Weight; + fn force_create() -> Weight; + fn destroy(z: u32, ) -> Weight; + fn force_destroy(z: u32, ) -> Weight; + fn mint() -> Weight; + fn burn() -> Weight; + fn transfer() -> Weight; + fn force_transfer() -> Weight; + fn freeze() -> Weight; + fn thaw() -> Weight; + fn transfer_ownership() -> Weight; + fn set_team() -> Weight; + fn set_max_zombies() -> Weight; +} + +/// Weights for pallet_assets using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + fn create() -> Weight { + (62_897_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn force_create() -> Weight { + (32_783_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn destroy(z: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 2_000 + .saturating_add((1_181_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(z as Weight))) + } + fn force_destroy(z: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 2_000 + .saturating_add((1_181_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(z as Weight))) + } + fn mint() -> Weight { + (53_822_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn burn() -> Weight { + (48_151_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn transfer() -> Weight { + (68_208_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn force_transfer() -> Weight { + (73_521_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn freeze() -> Weight { + (45_803_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn thaw() -> Weight { + (45_669_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn transfer_ownership() -> Weight { + (38_957_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn set_team() -> Weight { + (39_605_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn set_max_zombies() -> Weight { + (61_609_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + fn create() -> Weight { + (62_897_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn force_create() -> Weight { + (32_783_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn destroy(z: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 2_000 + .saturating_add((1_181_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(z as Weight))) + } + fn force_destroy(z: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 2_000 + .saturating_add((1_181_000 as Weight).saturating_mul(z as Weight)) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(z as Weight))) + } + fn mint() -> Weight { + (53_822_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + fn burn() -> Weight { + (48_151_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + fn transfer() -> Weight { + (68_208_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + } + fn force_transfer() -> Weight { + (73_521_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + } + fn freeze() -> Weight { + (45_803_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn thaw() -> Weight { + (45_669_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn transfer_ownership() -> Weight { + (38_957_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn set_team() -> Weight { + (39_605_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn set_max_zombies() -> Weight { + (61_609_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } +} diff --git a/modules/edge-chainbridge/Cargo.toml b/modules/edge-chainbridge/Cargo.toml new file mode 100644 index 00000000..a9cb752c --- /dev/null +++ b/modules/edge-chainbridge/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = 'edge-chainbridge' +version = '1.0.0' +authors = ['drew@commonwealth.im'] +edition = '2018' + +[dependencies] +# third-party dependencies +codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.101", optional = true } + +# primitives +sp-std = { version = "2.0", default-features = false } +sp-runtime = { version = "2.0", default-features = false } +sp-io = { version = "2.0", default-features = false } +sp-core = { version = "2.0", default-features = false } +sp-arithmetic = { version = "2.0", default-features = false } + +# frame dependencies +frame-support = { version = "2.0", default-features = false } +frame-system = { version = "2.0", default-features = false } +pallet-balances = { version = "2.0", default-features = false } + +chainbridge = { path = "../chainbridge", default-features = false, features = ["runtime-benchmarks"] } + +[features] +default = ["std"] +std = [ + "codec/std", + "serde", + "sp-std/std", + "sp-runtime/std", + "sp-io/std", + "sp-core/std", + "sp-arithmetic/std", + "frame-support/std", + "frame-system/std", + "pallet-balances/std", + "chainbridge/std", +] + +runtime-benchmarks = [ + "chainbridge/runtime-benchmarks", +] \ No newline at end of file diff --git a/modules/edge-chainbridge/src/lib.rs b/modules/edge-chainbridge/src/lib.rs new file mode 100644 index 00000000..4d670e88 --- /dev/null +++ b/modules/edge-chainbridge/src/lib.rs @@ -0,0 +1,82 @@ +// Ensure we're `no_std` when compiling for Wasm. +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::traits::{Currency, EnsureOrigin, ExistenceRequirement::AllowDeath, Get}; +use frame_support::{decl_error, decl_event, decl_module, dispatch::DispatchResult, ensure}; +use frame_system::{ensure_signed}; +use sp_arithmetic::traits::SaturatedConversion; +use sp_core::U256; +use sp_std::prelude::*; + +mod mock; +mod tests; + +type ResourceId = chainbridge::ResourceId; + +type BalanceOf = + <::Currency as Currency<::AccountId>>::Balance; + +pub trait Config: pallet_balances::Config + chainbridge::Config { + type Event: From> + Into<::Event>; + /// Specifies the origin check provided by the bridge for calls that can only be called by the bridge pallet + type BridgeOrigin: EnsureOrigin; + /// The currency mechanism. + type Currency: Currency; + /// Ids can be defined by the runtime and passed in, perhaps from blake2b_128 hashes. + type NativeTokenId: Get; + + type NativeTransferFee: Get; +} + +decl_event! { + pub enum Event where + ::AccountId, + Balance = BalanceOf, + { + /// A bridge transfer event from an Edgeware account to a destination account + TransferOverBridge(AccountId, Vec, chainbridge::ChainId, Balance), + } +} + +decl_error! { + pub enum Error for Module{ + InvalidTransfer, + } +} + +decl_module! { + pub struct Module for enum Call where origin: T::Origin { + const NativeTokenId: ResourceId = T::NativeTokenId::get(); + + fn deposit_event() = default; + + // + // Initiation calls. These start a bridge transfer. + // + + /// Transfers some amount of the native token to some recipient on a (whitelisted) destination chain. + #[weight = 195_000_000] + pub fn transfer_native(origin, amount: BalanceOf, recipient: Vec, dest_id: chainbridge::ChainId) -> DispatchResult { + let source = ensure_signed(origin)?; + ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); + let bridge_id = >::account_id(); + ::Currency::transfer(&source, &bridge_id, amount.into(), AllowDeath)?; + + let resource_id = T::NativeTokenId::get(); + Self::deposit_event(RawEvent::TransferOverBridge(source, recipient.clone(), dest_id, amount.clone())); + >::transfer_fungible(dest_id, resource_id, recipient, U256::from(amount.saturated_into::())) + } + + // + // Executable calls. These can be triggered by a bridge transfer initiated on another chain + // + + /// Executes a simple currency transfer using the bridge account as the source + #[weight = 195_000_000] + pub fn transfer(origin, to: T::AccountId, amount: BalanceOf) -> DispatchResult { + let source = T::BridgeOrigin::ensure_origin(origin)?; + ::Currency::transfer(&source, &to, amount.into(), AllowDeath)?; + Ok(()) + } + } +} diff --git a/modules/edge-chainbridge/src/mock.rs b/modules/edge-chainbridge/src/mock.rs new file mode 100644 index 00000000..3627c9e0 --- /dev/null +++ b/modules/edge-chainbridge/src/mock.rs @@ -0,0 +1,159 @@ +#![cfg(test)] + +use super::*; + +use frame_support::{ord_parameter_types, parameter_types, weights::Weight}; +use frame_system::{self as system}; +use sp_core::hashing::blake2_128; +use sp_core::H256; +use sp_runtime::{ + testing::Header, + traits::{AccountIdConversion, BlakeTwo256, Block as BlockT, IdentityLookup}, + ModuleId, Perbill, +}; + +use crate::{self as example, Config}; +pub use pallet_balances as balances; + +parameter_types! { + pub const BlockHashCount: u64 = 250; + pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockLength: u32 = 2 * 1024; + pub const AvailableBlockRatio: Perbill = Perbill::one(); + pub const MaxLocks: u32 = 100; +} + +impl frame_system::Config for Test { + type BaseCallFilter = (); + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type Origin = Origin; + type Index = u64; + type Call = Call; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type Event = Event; + type BlockHashCount = BlockHashCount; + type Version = (); + type PalletInfo = (); + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); +} + +parameter_types! { + pub const ExistentialDeposit: u64 = 1; +} + +ord_parameter_types! { + pub const One: u64 = 1; +} + +impl pallet_balances::Config for Test { + type Balance = u64; + type DustRemoval = (); + type Event = Event; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type MaxLocks = MaxLocks; + type WeightInfo = (); +} + +parameter_types! { + pub const TestChainId: u8 = 5; + pub const ProposalLifetime: u64 = 100; +} + +impl chainbridge::Config for Test { + type Event = Event; + type AdminOrigin = frame_system::EnsureRoot; + type Proposal = Call; + type ChainId = TestChainId; + type ProposalLifetime = ProposalLifetime; +} + +parameter_types! { + pub NativeTokenId: chainbridge::ResourceId = chainbridge::derive_resource_id(1, &blake2_128(b"EDG")); +} + +parameter_types! { + pub const NativeTransferFee: u64 = 1; +} + +impl Config for Test { + type Event = Event; + type BridgeOrigin = chainbridge::EnsureBridge; + type Currency = Balances; + type NativeTokenId = NativeTokenId; + type NativeTransferFee = NativeTransferFee; +} + +pub type Block = sp_runtime::generic::Block; +pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; + +frame_support::construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: frame_system::{Module, Call, Config, Storage, Event}, + Balances: balances::{Module, Call, Storage, Config, Event}, + Bridge: chainbridge::{Module, Call, Storage, Event}, + Example: example::{Module, Call, Event} + } +); + +pub const RELAYER_A: u64 = 0x2; +pub const RELAYER_B: u64 = 0x3; +pub const RELAYER_C: u64 = 0x4; +pub const ENDOWED_BALANCE: u64 = 100_000_000; + +pub fn new_test_ext() -> sp_io::TestExternalities { + let bridge_id = ModuleId(*b"cb/bridg").into_account(); + let mut t = frame_system::GenesisConfig::default() + .build_storage::() + .unwrap(); + balances::GenesisConfig:: { + balances: vec![(bridge_id, ENDOWED_BALANCE), (RELAYER_A, ENDOWED_BALANCE)], + } + .assimilate_storage(&mut t) + .unwrap(); + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext +} + +fn last_event() -> Event { + system::Module::::events() + .pop() + .map(|e| e.event) + .expect("Event expected") +} + +pub fn expect_event>(e: E) { + assert_eq!(last_event(), e.into()); +} + +// Checks events against the latest. A contiguous set of events must be provided. They must +// include the most recent event, but do not have to include every past event. +pub fn assert_events(mut expected: Vec) { + let mut actual: Vec = system::Module::::events() + .iter() + .map(|e| e.event.clone()) + .collect(); + + expected.reverse(); + + for evt in expected { + let next = actual.pop().expect("event expected"); + assert_eq!(next, evt.into(), "Events don't match"); + } +} diff --git a/modules/edge-chainbridge/src/tests.rs b/modules/edge-chainbridge/src/tests.rs new file mode 100644 index 00000000..e7a60cd6 --- /dev/null +++ b/modules/edge-chainbridge/src/tests.rs @@ -0,0 +1,157 @@ +#![cfg(test)] + +use super::mock::{ + assert_events, balances, expect_event, new_test_ext, Balances, Bridge, Call, + Event, Example, NativeTokenId, Origin, ProposalLifetime, + ENDOWED_BALANCE, RELAYER_A, RELAYER_B, RELAYER_C, +}; +use super::*; + +use frame_support::{assert_ok}; + + + + +const TEST_THRESHOLD: u32 = 2; + + +fn make_transfer_proposal(to: u64, amount: u64) -> Call { + Call::Example(crate::Call::transfer(to, amount.into())) +} + +#[test] +fn transfer_native() { + new_test_ext().execute_with(|| { + let dest_chain = 0; + let resource_id = NativeTokenId::get(); + let amount: u64 = 100; + let recipient = vec![99]; + + assert_ok!(Bridge::whitelist_chain(Origin::root(), dest_chain.clone())); + assert_ok!(Example::transfer_native( + Origin::signed(RELAYER_A), + amount.clone(), + recipient.clone(), + dest_chain, + )); + + expect_event(chainbridge::RawEvent::FungibleTransfer( + dest_chain, + 1, + resource_id, + amount.into(), + recipient, + )); + }) +} + +#[test] +fn transfer() { + new_test_ext().execute_with(|| { + // Check inital state + let bridge_id: u64 = Bridge::account_id(); + assert_eq!(Balances::free_balance(&bridge_id), ENDOWED_BALANCE); + // Transfer and check result + assert_ok!(Example::transfer( + Origin::signed(Bridge::account_id()), + RELAYER_A, + 10 + )); + assert_eq!(Balances::free_balance(&bridge_id), ENDOWED_BALANCE - 10); + assert_eq!(Balances::free_balance(RELAYER_A), ENDOWED_BALANCE + 10); + + assert_events(vec![Event::balances(balances::RawEvent::Transfer( + Bridge::account_id(), + RELAYER_A, + 10, + ))]); + }) +} + +#[test] +fn create_sucessful_transfer_proposal() { + new_test_ext().execute_with(|| { + let prop_id = 1; + let src_id = 1; + let r_id = chainbridge::derive_resource_id(src_id, b"transfer"); + let resource = b"Example.transfer".to_vec(); + let proposal = make_transfer_proposal(RELAYER_A, 10); + + assert_ok!(Bridge::set_threshold(Origin::root(), TEST_THRESHOLD,)); + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_A)); + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_B)); + assert_ok!(Bridge::add_relayer(Origin::root(), RELAYER_C)); + assert_ok!(Bridge::whitelist_chain(Origin::root(), src_id)); + assert_ok!(Bridge::set_resource(Origin::root(), r_id, resource)); + + // Create proposal (& vote) + assert_ok!(Bridge::acknowledge_proposal( + Origin::signed(RELAYER_A), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = chainbridge::ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![], + status: chainbridge::ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Second relayer votes against + assert_ok!(Bridge::reject_proposal( + Origin::signed(RELAYER_B), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = chainbridge::ProposalVotes { + votes_for: vec![RELAYER_A], + votes_against: vec![RELAYER_B], + status: chainbridge::ProposalStatus::Initiated, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + // Third relayer votes in favour + assert_ok!(Bridge::acknowledge_proposal( + Origin::signed(RELAYER_C), + prop_id, + src_id, + r_id, + Box::new(proposal.clone()) + )); + let prop = Bridge::votes(src_id, (prop_id.clone(), proposal.clone())).unwrap(); + let expected = chainbridge::ProposalVotes { + votes_for: vec![RELAYER_A, RELAYER_C], + votes_against: vec![RELAYER_B], + status: chainbridge::ProposalStatus::Approved, + expiry: ProposalLifetime::get() + 1, + }; + assert_eq!(prop, expected); + + assert_eq!(Balances::free_balance(RELAYER_A), ENDOWED_BALANCE + 10); + assert_eq!( + Balances::free_balance(Bridge::account_id()), + ENDOWED_BALANCE - 10 + ); + + assert_events(vec![ + Event::chainbridge(chainbridge::RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), + Event::chainbridge(chainbridge::RawEvent::VoteAgainst(src_id, prop_id, RELAYER_B)), + Event::chainbridge(chainbridge::RawEvent::VoteFor(src_id, prop_id, RELAYER_C)), + Event::chainbridge(chainbridge::RawEvent::ProposalApproved(src_id, prop_id)), + Event::balances(balances::RawEvent::Transfer( + Bridge::account_id(), + RELAYER_A, + 10, + )), + Event::chainbridge(chainbridge::RawEvent::ProposalSucceeded(src_id, prop_id)), + ]); + }) +} diff --git a/modules/edge-signaling/.gitignore b/modules/edge-signaling/.gitignore deleted file mode 100644 index 69369904..00000000 --- a/modules/edge-signaling/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -**/*.rs.bk -Cargo.lock diff --git a/modules/edge-signaling/Cargo.toml b/modules/edge-signaling/Cargo.toml deleted file mode 100644 index 0e9cd70b..00000000 --- a/modules/edge-signaling/Cargo.toml +++ /dev/null @@ -1,41 +0,0 @@ -[package] -name = "edge-signaling" -version = "1.0.0" -authors = ["Jake Naviasky , Drew Stone "] -edition = "2018" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" -description = "Edgeware signaling module" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -serde = { version = "1.0", default-features = false, optional = true } -serde_derive = { version = "1.0", optional = true } -safe-mix = { version = "1.0", default-features = false } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-support = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-balances = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -voting = { version = "1.0.0", package ="edge-voting", path = "../edge-voting", default-features = false } - -[dev-dependencies] -sp-io = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } - -[features] -default = ["std"] -std = [ - "serde", - "serde_derive", - "safe-mix/std", - "codec/std", - "sp-std/std", - "sp-runtime/std", - "pallet-balances/std", - "frame-support/std", - "frame-system/std", - "voting/std", -] diff --git a/modules/edge-signaling/README.md b/modules/edge-signaling/README.md deleted file mode 100644 index 5cd509e0..00000000 --- a/modules/edge-signaling/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# edge_signaling -This module contains the logic that powers Edgeware's governance UI. It is presented as a broader governance module that forms something akin to a forum for signaling proposals. Users can submit proposals, vote on proposals, and track progress of proposals through Edgeware's governance process. - -## Functionality - -The module exposes 2 public functions: -* `create_proposal`, which allows submission of a new governance proposal for the purpose of `Signaling`. -* `advance_proposal`, which allows the author of a proposal to shift the proposal's state, either starting or completing the voting process. - -## Setup - -Install rust or update to the latest versions. -``` -curl https://sh.rustup.rs -sSf | sh -rustup update nightly -rustup target add wasm32-unknown-unknown --toolchain nightly -rustup update stable -cargo install --git https://github.com/alexcrichton/wasm-gc -``` - -You will also need to install the following packages: - -Linux: -``` -sudo apt install cmake pkg-config libssl-dev git -``` - -Mac: -``` -brew install cmake pkg-config openssl git -``` - -# Signalling Lifecycle -This module enables one to create signalling proposals and vote on them. This is useful for engaging parts of the community and understanding how the community reacts to a given idea before putting it forth in a state-changing proposal through the main governance mechanism. - -The lifecycle for using this module is: -1. Create proposals -2. Vote on proposals -3. Engage in off-chain discussion - - -## Proposal Lifecycle -Proposals go through the lifecycle that votes go through from the [edge-voting](modules/edge-voting) module. These specific stages are described there. -1. PreVoting -2. Voting -3. Completed diff --git a/modules/edge-signaling/src/lib.rs b/modules/edge-signaling/src/lib.rs deleted file mode 100644 index 4b74e8a0..00000000 --- a/modules/edge-signaling/src/lib.rs +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright 2018-2020 Commonwealth Labs, Inc. -// This file is part of Edgeware. - -// Edgeware is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Edgeware is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . - -#![recursion_limit="128"] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg(test)] -mod tests; - -use frame_support::traits::{Currency, Get, ReservableCurrency,}; -use sp_std::prelude::*; - -use frame_system::{ensure_signed}; -use frame_support::{dispatch::DispatchResult, weights::Weight}; -use codec::{Decode, Encode}; - -use sp_runtime::RuntimeDebug; -use sp_runtime::traits::{Hash}; -use frame_support::{decl_event, decl_module, decl_storage, decl_error, ensure, StorageMap}; - -pub use voting::{VoteType, VoteOutcome, VoteStage, TallyType}; - -#[derive(Encode, Decode, Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug)] -pub struct ProposalRecord { - pub index: u32, - pub author: AccountId, - pub stage: VoteStage, - pub transition_time: Moment, - pub title: Vec, - pub contents: Vec, - pub vote_id: u64, -} - -pub trait Trait: voting::Trait + pallet_balances::Trait { - /// The overarching event type - type Event: From> + Into<::Event>; - /// The account balance. - type Currency: Currency + ReservableCurrency; -} - -pub type ProposalTitle = Vec; -pub type ProposalContents = Vec; -type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; - -decl_error! { - pub enum Error for Module { - VoteRecordDoesntExist, - } -} - -decl_module! { - pub struct Module for enum Call where origin: T::Origin { - type Error = Error; - fn deposit_event() = default; - - fn on_runtime_upgrade() -> Weight { - migration::migrate::(); - T::MaximumBlockWeight::get() - } - - /// Creates a new signaling proposal. - #[weight = 0] - pub fn create_proposal( - origin, - title: ProposalTitle, - contents: ProposalContents, - outcomes: Vec, - vote_type: voting::VoteType, - tally_type: voting::TallyType - ) -> DispatchResult { - let _sender = ensure_signed(origin)?; - ensure!(!title.is_empty(), "Proposal must have title"); - ensure!(!contents.is_empty(), "Proposal must not be empty"); - - // construct hash(origin + proposal) and check existence - let mut buf = Vec::new(); - buf.extend_from_slice(&_sender.encode()); - buf.extend_from_slice(&contents.as_ref()); - let hash = T::Hashing::hash(&buf[..]); - ensure!(>::get(hash) == None, "Proposal already exists"); - - // Reserve the proposal creation bond amount - T::Currency::reserve(&_sender, Self::proposal_creation_bond()).map_err(|_| "Not enough currency for reserve bond")?; - // create a vote to go along with the proposal - let vote_id = >::create_vote( - _sender.clone(), - vote_type, - false, // not commit-reveal - tally_type, - outcomes, - )?; - - let index = ::get(); - let transition_time = >::block_number() + Self::voting_length(); - ::mutate(|i| *i += 1); - >::insert(hash, ProposalRecord { - index: index, - author: _sender.clone(), - stage: VoteStage::PreVoting, - transition_time: transition_time, - title: title, - contents: contents, - vote_id: vote_id, - }); - >::mutate(|proposals| proposals.push((hash, transition_time))); - Self::deposit_event(RawEvent::NewProposal(_sender, hash)); - Ok(()) - } - - /// Advance a signaling proposal into the "voting" or "commit" stage. - /// Can only be performed by the original author of the proposal. - #[weight = 0] - pub fn advance_proposal(origin, proposal_hash: T::Hash) -> DispatchResult { - let _sender = ensure_signed(origin)?; - let record = >::get(&proposal_hash).ok_or("Proposal does not exist")?; - - // only permit original author to advance - ensure!(record.author == _sender, "Proposal must be advanced by author"); - ensure!(record.stage == VoteStage::PreVoting - || record.stage == VoteStage::Commit, "Proposal not in pre-voting or commit stage"); - - // prevoting -> voting or commit - >::advance_stage(record.vote_id)?; - if let Some(vote_record) = >::get_vote_record(record.vote_id) { - let transition_time = >::block_number() + Self::voting_length(); - let vote_id = record.vote_id; - >::insert(proposal_hash, ProposalRecord { - stage: vote_record.data.stage, - transition_time: transition_time.clone(), - ..record - }); - >::mutate(|proposals| proposals.retain(|x| x.0 != proposal_hash)); - >::mutate(|proposals| proposals.push((proposal_hash, transition_time.clone()))); - - // emit event for voting if at this stage - if vote_record.data.stage == VoteStage::Voting { - Self::deposit_event(RawEvent::VotingStarted(proposal_hash, vote_id, transition_time)); - } - - // emit event for committing if at this stage - if vote_record.data.stage == VoteStage::Commit { - Self::deposit_event(RawEvent::CommitStarted(proposal_hash, vote_id, transition_time)); - } - Ok(()) - } else { - return Err(Error::::VoteRecordDoesntExist)? - } - } - - /// Check all active proposals to see if they're completed. If so, update - /// them in storage and emit an event. - fn on_finalize(_n: T::BlockNumber) { - let (finished, mut active): (Vec<_>, _) = >::get() - .into_iter() - .partition(|(_, exp)| _n > *exp); - - let (completed, mut pending): (Vec<_>, _) = >::get() - .into_iter() - .partition(|(_, exp)| _n > *exp); - - let (doubly_inactive, still_inactive): (Vec<_>, _) = >::get() - .into_iter() - .partition(|(_, exp)| _n > *exp); - - finished.into_iter().for_each(|(finished_hash, _)| { - match >::get(finished_hash) { - Some(record) => { - let vote_id = record.vote_id; - let _ = >::advance_stage(vote_id); - if let Some(vote_record) = >::get_vote_record(record.vote_id) { - // get next transition time - let transition_time = >::block_number() + Self::voting_length(); - // switch on either completed or voting stage from voting or committed stage - if vote_record.data.stage == VoteStage::Completed { - // unreserve the proposal creation bond amount - T::Currency::unreserve(&record.author, Self::proposal_creation_bond()); - // add these completed proposals, to the pending "deletion" collection - pending.push((finished_hash, transition_time.clone())); - Self::deposit_event(RawEvent::VotingCompleted(finished_hash, vote_id)); - } else { - // add the vote record identifier back into the collection - active.push((finished_hash, transition_time)); - Self::deposit_event(RawEvent::VotingStarted(finished_hash, vote_id, transition_time)); - } - // edit the proposal record to its respective stage - >::insert(finished_hash.clone(), ProposalRecord { - stage: vote_record.data.stage, - transition_time: transition_time, - ..record - }); - } - }, - None => {} - } - }); - - // delete all artifacts of "completed", completed proposals - completed.iter().for_each(|(finished_hash, _)| { - >::remove(finished_hash); - }); - // we want to delete the doubly inactive, inactive proposals which never - // proceeded into a commit or voting stage, always remaining in prevoting, - // while also returning the bond. - doubly_inactive.into_iter().for_each(|(hash, _)| { - if let Some(record) = >::get(hash) { - T::Currency::unreserve(&record.author, Self::proposal_creation_bond()); - } - >::remove(hash); - }); - - // put back all active proposals - >::put(active); - // put back only pending "to-be-deleted", completed proposals - >::put(pending); - // put back singly, still_inactive, inactive proposals - >::put(still_inactive); - } - } -} - -decl_event!( - pub enum Event where ::Hash, - ::AccountId, - ::BlockNumber { - /// Emitted at proposal creation: (Creator, ProposalHash) - NewProposal(AccountId, Hash), - /// Emitted when commit stage begins: (ProposalHash, VoteId, CommitEndTime) - CommitStarted(Hash, u64, BlockNumber), - /// Emitted when voting begins: (ProposalHash, VoteId, VotingEndTime) - VotingStarted(Hash, u64, BlockNumber), - /// Emitted when voting is completed: (ProposalHash, VoteId, VoteResults) - VotingCompleted(Hash, u64), - } -); - -decl_storage! { - trait Store for Module as Signaling { - /// The total number of proposals created thus far. - pub ProposalCount get(fn proposal_count) : u32; - /// A list of all extant proposals. - pub InactiveProposals get(fn inactive_proposals): Vec<(T::Hash, T::BlockNumber)>; - /// A list of active proposals along with the time at which they complete. - pub ActiveProposals get(fn active_proposals): Vec<(T::Hash, T::BlockNumber)>; - /// A list of completed proposals, pending deletion - pub CompletedProposals get(fn completed_proposals): Vec<(T::Hash, T::BlockNumber)>; - /// Amount of time a proposal remains in "Voting" stage. - pub VotingLength get(fn voting_length) config(): T::BlockNumber; - /// Map for retrieving the information about any proposal from its hash. - pub ProposalOf get(fn proposal_of): map hasher(twox_64_concat) T::Hash => Option>; - /// Registration bond - pub ProposalCreationBond get(fn proposal_creation_bond) config(): BalanceOf; - } -} - -mod migration { - use super::*; - - pub fn migrate() { - for (hash, _n) in InactiveProposals::::get() { - ProposalOf::::migrate_key_from_blake(hash); - } - for (hash, _n) in ActiveProposals::::get() { - ProposalOf::::migrate_key_from_blake(hash); - } - for (hash, _n) in CompletedProposals::::get() { - ProposalOf::::migrate_key_from_blake(hash); - } - } -} \ No newline at end of file diff --git a/modules/edge-signaling/src/tests.rs b/modules/edge-signaling/src/tests.rs deleted file mode 100644 index f75ae753..00000000 --- a/modules/edge-signaling/src/tests.rs +++ /dev/null @@ -1,630 +0,0 @@ -// Copyright 2018-2020 Commonwealth Labs, Inc. -// This file is part of Edgeware. - -// Edgeware is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Edgeware is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . - -use super::*; - -use frame_support::{ - parameter_types, impl_outer_origin, assert_err, assert_ok, weights::Weight, - traits::{OnFinalize}, Twox128, Blake2_256, StorageHasher, - storage::{unhashed, generator::StorageMap as GeneratorMap}, -}; -use sp_core::{H256, Blake2Hasher, Hasher}; -use sp_runtime::{ - Perbill, - traits::{BlakeTwo256, IdentityLookup}, - testing::{Header} -}; -pub use crate::{Event, Module, RawEvent, Trait, GenesisConfig}; -use voting::{VoteOutcome, TallyType, VoteStage, VoteType}; - -impl_outer_origin! { - pub enum Origin for Test {} -} - -#[derive(Clone, PartialEq, Eq, Debug)] -pub struct Test; - -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = 1024; - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); - pub const MaximumExtrinsicWeight: Weight = 1024; -} - -type AccountId = u64; -type BlockNumber = u64; - -impl frame_system::Trait for Test { - type BaseCallFilter = (); - type Origin = Origin; - type Index = u64; - type BlockNumber = BlockNumber; - type Call = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type Header = Header; - type Event = (); - type BlockHashCount = BlockHashCount; - type MaximumBlockWeight = MaximumBlockWeight; - type DbWeight = (); - type BlockExecutionWeight = (); - type ExtrinsicBaseWeight = (); - type MaximumBlockLength = MaximumBlockLength; - type AvailableBlockRatio = AvailableBlockRatio; - type Version = (); - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type MigrateAccount = (); - type OnKilledAccount = (); - type MaximumExtrinsicWeight = MaximumExtrinsicWeight; - type PalletInfo = (); - type SystemWeightInfo = (); -} - -parameter_types! { - pub const ExistentialDeposit: u128 = 1; -} - -impl pallet_balances::Trait for Test { - type Balance = u128; - type Event = (); - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = frame_system::Module; - type WeightInfo = (); - type MaxLocks = (); -} - -impl voting::Trait for Test { - type Event = (); -} - -impl Trait for Test { - type Event = (); - type Currency = pallet_balances::Module; -} - -pub type Balances = pallet_balances::Module; -pub type System = frame_system::Module; -pub type Voting = voting::Module; -pub type Signaling = Module; - -const BOND: u128 = 10; -const YES_VOTE: voting::VoteOutcome = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; -const NO_VOTE: voting::VoteOutcome = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; -const OTHER_VOTE: voting::VoteOutcome = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]; - -fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); - // We use default for brevity, but you can configure as desired if needed. - GenesisConfig:: { - voting_length: 10000, - proposal_creation_bond: BOND, - }.assimilate_storage(&mut t).unwrap(); - pallet_balances::GenesisConfig:: { - balances: vec![ - (1, 100), - (2, 100), - (3, 100), - (4, 100), - ], - }.assimilate_storage(&mut t).unwrap(); - t.into() -} - -fn propose( - who: u64, - title: &[u8], - proposal: &[u8], - outcomes: Vec, - vote_type: VoteType, - tally_type: TallyType -) -> DispatchResult { - Signaling::create_proposal( - Origin::signed(who), - title.to_vec(), - proposal.to_vec(), - outcomes, - vote_type, - tally_type) -} - -fn advance_proposal(who: u64, proposal_hash: H256) -> DispatchResult { - Signaling::advance_proposal(Origin::signed(who), proposal_hash) -} - -fn build_proposal_hash(who: u64, proposal: &[u8]) -> H256 { - let mut buf = Vec::new(); - buf.extend_from_slice(&who.encode()); - buf.extend_from_slice(proposal.as_ref()); - return Blake2Hasher::hash(&buf[..]); -} - -fn get_test_key() -> u64 { - let public = 1_u64; - return public; -} - -fn generate_proposal() -> (&'static[u8], &'static[u8]) { - let title: &[u8] = b"Make Edgeware Free"; - let proposal: &[u8] = b"Simple: make Edgeware free for everyone"; - return (title, proposal); -} - -fn make_record( - author: u64, - title: &[u8], - contents: &[u8]) - -> ProposalRecord { - ProposalRecord { - index: 0, - author: author, - stage: VoteStage::PreVoting, - transition_time: 0, - title: title.to_vec(), - contents: contents.to_vec(), - vote_id: 1, - } -} - -#[test] -fn propose_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - let _vote_id = Signaling::proposal_of(hash).unwrap().vote_id; - let title2: &[u8] = b"Proposal 2"; - let proposal2: &[u8] = b"Proposal 2"; - let hash2 = build_proposal_hash(public, &proposal2); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title2, proposal2, outcomes, VoteType::Binary, TallyType::OneCoin)); - let vote_id2 = Signaling::proposal_of(hash2).unwrap().vote_id; - - assert_eq!(Signaling::proposal_count(), 2); - assert_eq!(Signaling::inactive_proposals(), vec![(hash, 10001), (hash2, 10001)]); - assert_eq!(Signaling::active_proposals(), vec![]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - transition_time: 10001, - ..make_record(public, title, proposal) - }) - ); - assert_eq!( - Signaling::proposal_of(hash2), - Some(ProposalRecord { - index: 1, - vote_id: vote_id2, - transition_time: 10001, - ..make_record(public, title2, proposal2) - }) - ); - }); -} - -#[test] -fn propose_duplicate_should_fail() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes.clone(), VoteType::Binary, TallyType::OneCoin)); - assert_err!( - propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin), - "Proposal already exists"); - assert_eq!(Signaling::proposal_count(), 1); - assert_eq!(Signaling::inactive_proposals(), vec![(hash, 10001)]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - transition_time: 10001, - ..make_record(public, title, proposal) - }) - ); - }); -} - -#[test] -fn propose_empty_should_fail() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, _) = generate_proposal(); - let proposal = vec![]; - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_err!( - propose(public, title, &proposal, outcomes, VoteType::Binary, TallyType::OneCoin), - "Proposal must not be empty" - ); - assert_eq!(Signaling::proposal_count(), 0); - assert_eq!(Signaling::inactive_proposals(), vec![]); - assert_eq!(Signaling::proposal_of(hash), None); - }); -} - -#[test] -fn propose_empty_title_should_fail() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (_, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let title = vec![]; - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_err!( - propose(public, &title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin), - "Proposal must have title" - ); - assert_eq!(Signaling::proposal_count(), 0); - assert_eq!(Signaling::inactive_proposals(), vec![]); - assert_eq!(Signaling::proposal_of(hash), None); - }); -} - -#[test] -fn advance_proposal_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - let vote_id = Signaling::proposal_of(hash).unwrap().vote_id; - assert_eq!(vote_id, 1); - assert_ok!(advance_proposal(public, hash)); - - let vote_time = Signaling::voting_length(); - let now = System::block_number(); - let _vote_ends_at = now + vote_time; - - assert_eq!(Signaling::active_proposals(), vec![(hash, 10001)]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - stage: VoteStage::Voting, - transition_time: 10001, - ..make_record(public, title, proposal) - }) - ); - }); -} - -#[test] -fn advance_proposal_if_voting_should_fail() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - assert_ok!(advance_proposal(public, hash)); - assert_err!(advance_proposal(public, hash), - "Proposal not in pre-voting or commit stage"); - assert_eq!(Signaling::active_proposals(), vec![(hash, 10001)]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - stage: VoteStage::Voting, - transition_time: 10001, - ..make_record(public, title, proposal) - }) - ); - }); -} - -#[test] -fn voting_proposal_should_advance() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - let vote_id = Signaling::proposal_of(hash).unwrap().vote_id; - assert_eq!(vote_id, 1); - assert_ok!(advance_proposal(public, hash)); - - let vote_time = Signaling::voting_length(); - let now = System::block_number(); - let _vote_ends_at = now + vote_time; - - assert_eq!(Signaling::active_proposals(), vec![(hash, 10001)]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - stage: VoteStage::Voting, - transition_time: 10001, - ..make_record(public, title, proposal) - }) - ); - - System::set_block_number(2); - >::on_finalize(2); - System::set_block_number(3); - - System::set_block_number(10002); - >::on_finalize(10002); - System::set_block_number(10003); - - assert_eq!(Signaling::active_proposals(), vec![]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - stage: VoteStage::Completed, - transition_time: 20002, - ..make_record(public, title, proposal) - }) - ); - }); -} - -#[test] -fn advance_proposal_if_completed_should_fail() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - assert_ok!(advance_proposal(public, hash)); - assert_eq!(Signaling::active_proposals(), vec![(hash, 10001)]); - System::set_block_number(10002); - >::on_finalize(10002); - System::set_block_number(10003); - assert_err!(advance_proposal(public, hash), "Proposal not in pre-voting or commit stage"); - assert_eq!(Signaling::active_proposals(), vec![]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - stage: VoteStage::Completed, - transition_time: 20002, - ..make_record(public, title, proposal) - }) - ); - }); -} - -#[test] -fn non_author_advance_should_fail() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - - let other_public = 2_u64; - let outcomes = vec![YES_VOTE, NO_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - assert_err!(advance_proposal(other_public, hash), "Proposal must be advanced by author"); - assert_eq!(Signaling::active_proposals(), vec![]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord{ - transition_time: 10001, - ..make_record(public, title, proposal) - }) - ); - }); -} - -#[test] -fn creating_proposal_with_insufficient_balance_fails() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = 100_u64; - let (title, proposal) = generate_proposal(); - let outcomes = vec![YES_VOTE, NO_VOTE]; - - assert_err!( - propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin), - "Not enough currency for reserve bond"); - }); -} - -#[test] -fn completed_proposal_should_return_creation_bond() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let outcomes = vec![YES_VOTE, NO_VOTE]; - let hash = build_proposal_hash(public, &proposal); - let balance = Balances::free_balance(public); - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - let after_propose_balance = Balances::free_balance(public); - assert_eq!(balance - BOND, after_propose_balance); - assert_ok!(advance_proposal(public, hash)); - println!("{:?}", Signaling::proposal_of(hash)); - System::set_block_number(10002); - >::on_finalize(10002); - System::set_block_number(10003); - - let after_completion_balance = Balances::free_balance(public); - assert_eq!(balance, after_completion_balance); - }); -} - -#[test] -fn expired_inactive_proposal_should_return_creation_bond() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let outcomes = vec![YES_VOTE, NO_VOTE]; - let hash = build_proposal_hash(public, &proposal); - let balance = Balances::free_balance(public); - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - let after_propose_balance = Balances::free_balance(public); - assert_eq!(balance - BOND, after_propose_balance); - System::set_block_number(10002); - >::on_finalize(10002); - System::set_block_number(10003); - - let after_completion_balance = Balances::free_balance(public); - assert_eq!(balance, after_completion_balance); - assert_eq!( - Signaling::proposal_of(hash), - None - ); - }); -} - -#[test] -fn completed_proposal_should_remain_before_deletion() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let outcomes = vec![YES_VOTE, NO_VOTE]; - let hash = build_proposal_hash(public, &proposal); - assert_ok!(propose(public, title, proposal, outcomes, VoteType::Binary, TallyType::OneCoin)); - assert_ok!(advance_proposal(public, hash)); - System::set_block_number(10002); - >::on_finalize(10002); - System::set_block_number(10003); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord{ - stage: VoteStage::Completed, - transition_time: 20002, - ..make_record(public, title, proposal) - }) - ); - System::set_block_number(20003); - >::on_finalize(20003); - System::set_block_number(20004); - assert_eq!( - Signaling::proposal_of(hash), - None - ); - }); -} - -#[test] -fn propose_multichoice_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE, OTHER_VOTE]; - assert_ok!(propose(public, title, proposal, outcomes, VoteType::MultiOption, TallyType::OneCoin)); - let _vote_id = Signaling::proposal_of(hash).unwrap().vote_id; - let title2: &[u8] = b"Proposal 2"; - let proposal2: &[u8] = b"Proposal 2"; - let hash2 = build_proposal_hash(public, &proposal2); - let outcomes = vec![YES_VOTE, NO_VOTE, OTHER_VOTE]; - assert_ok!(propose(public, title2, proposal2, outcomes, VoteType::MultiOption, TallyType::OneCoin)); - let vote_id2 = Signaling::proposal_of(hash2).unwrap().vote_id; - - assert_eq!(Signaling::proposal_count(), 2); - assert_eq!(Signaling::inactive_proposals(), vec![(hash, 10001), (hash2, 10001)]); - assert_eq!(Signaling::active_proposals(), vec![]); - assert_eq!( - Signaling::proposal_of(hash), - Some(ProposalRecord { - transition_time: 10001, - ..make_record(public, title, proposal) - }) - ); - assert_eq!( - Signaling::proposal_of(hash2), - Some(ProposalRecord { - index: 1, - vote_id: vote_id2, - transition_time: 10001, - ..make_record(public, title2, proposal2) - }) - ); - }); -} - -#[test] -fn change_hasher_migration() { - mod deprecated { - use sp_std::prelude::*; - - use codec::{Encode, Decode}; - use frame_support::{decl_module, decl_storage}; - - use crate::{Trait, ProposalRecord}; - - decl_module! { - pub struct Module for enum Call where origin: T::Origin { } - } - decl_storage! { - trait Store for Module as Signaling { - pub ProposalOf get(fn proposal_of): map hasher(opaque_blake2_256) - T::Hash => Option>; - } - } - } - - new_test_ext().execute_with(|| { - System::set_block_number(1); - // build proposal, vote and record - let public = get_test_key(); - let (title, proposal) = generate_proposal(); - let hash = build_proposal_hash(public, &proposal); - let outcomes = vec![YES_VOTE, NO_VOTE]; - let index = ProposalCount::get(); - let vote_id = Voting::create_vote( - public.clone(), - VoteType::Binary, - false, // not commit-reveal - TallyType::OneCoin, - outcomes, - ).expect("Voting::create_vote failed"); - let transition_time = System::block_number() + Signaling::voting_length(); - let record = ProposalRecord { - index: index, - author: public.clone(), - stage: VoteStage::PreVoting, - transition_time: transition_time, - title: title.to_vec(), - contents: proposal.to_vec(), - vote_id: vote_id, - }; - // insert the record with the old hasher - deprecated::ProposalOf::::insert(hash, &record); - InactiveProposals::::mutate(|proposals| proposals.push((hash, transition_time))); - assert!( - Signaling::proposal_of(hash).is_none(), - "proposal should not (yet) be available with the new hasher" - ); - // do the migration - crate::migration::migrate::(); - let maybe_prop = Signaling::proposal_of(hash); - // check that it was successfull - assert!(maybe_prop.is_some()); - let prop = maybe_prop.unwrap(); - assert_eq!(prop, record); - }); -} \ No newline at end of file diff --git a/modules/edge-treasury-reward/Cargo.toml b/modules/edge-treasury-reward/Cargo.toml index 0ca337fc..4c5c301e 100644 --- a/modules/edge-treasury-reward/Cargo.toml +++ b/modules/edge-treasury-reward/Cargo.toml @@ -13,22 +13,22 @@ targets = ["x86_64-unknown-linux-gnu"] serde = { version = "1.0", default-features = false, optional = true } safe-mix = { version = "1.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-support = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-authorship = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-staking = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-balances = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-treasury = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } +sp-std = { version = "2.0", default-features = false } +sp-runtime = { version = "2.0", default-features = false } +frame-support = { version = "2.0", default-features = false } +frame-system = { version = "2.0", default-features = false } +pallet-authorship = { version = "2.0", default-features = false } +pallet-staking = { version = "2.0", default-features = false } +pallet-balances = { version = "2.0", default-features = false } +pallet-treasury = { version = "2.0", default-features = false } [dev-dependencies] -sp-io = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-staking = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-staking-reward-curve = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-session = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-timestamp = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } +sp-io = { version = "2.0", default-features = false } +sp-staking = { version = "2.0", default-features = false } +sp-core = { version = "2.0", default-features = false } +pallet-staking-reward-curve = { version = "2.0", default-features = false } +pallet-session = { version = "2.0", default-features = false } +pallet-timestamp = { version = "2.0", default-features = false } [features] default = ["std"] diff --git a/modules/edge-treasury-reward/src/lib.rs b/modules/edge-treasury-reward/src/lib.rs index d774a8db..04d2c72d 100644 --- a/modules/edge-treasury-reward/src/lib.rs +++ b/modules/edge-treasury-reward/src/lib.rs @@ -26,23 +26,23 @@ use sp_runtime::traits::{Zero}; use frame_support::{decl_event, decl_module, decl_storage}; use frame_system::{ensure_root}; -pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; +pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; -pub trait Trait: pallet_staking::Trait + pallet_treasury::Trait + pallet_balances::Trait { +pub trait Config: pallet_treasury::Config + pallet_balances::Config { /// The overarching event type. - type Event: From> + Into<::Event>; + type Event: From> + Into<::Event>; /// The account balance type Currency: Currency; } decl_module! { - pub struct Module for enum Call where origin: T::Origin { + pub struct Module for enum Call where origin: T::Origin { fn deposit_event() = default; /// Mint money for the treasury! fn on_finalize(_n: T::BlockNumber) { if >::block_number() % Self::minting_interval() == Zero::zero() { let reward = Self::current_payout(); - ::Currency::deposit_creating(&>::account_id(), reward); + ::Currency::deposit_creating(&>::account_id(), reward); Self::deposit_event(RawEvent::TreasuryMinting( >::free_balance(>::account_id()), >::block_number(), @@ -68,15 +68,15 @@ decl_module! { } decl_event!( - pub enum Event where ::BlockNumber, - ::AccountId, - Balance = ::Balance { + pub enum Event where ::BlockNumber, + ::AccountId, + Balance = ::Balance { TreasuryMinting(Balance, BlockNumber, AccountId), } ); decl_storage! { - trait Store for Module as TreasuryReward { + trait Store for Module as TreasuryReward { /// Interval in number of blocks to reward treasury pub MintingInterval get(fn minting_interval) config(): T::BlockNumber; /// Current payout of module diff --git a/modules/edge-treasury-reward/src/tests.rs b/modules/edge-treasury-reward/src/tests.rs index c7932134..9a1b3fcf 100644 --- a/modules/edge-treasury-reward/src/tests.rs +++ b/modules/edge-treasury-reward/src/tests.rs @@ -14,341 +14,73 @@ // You should have received a copy of the GNU General Public License // along with Edgeware. If not, see . - - - -use frame_support::traits::OnUnbalanced; -use pallet_staking::EraIndex; +use sp_runtime::traits::BlakeTwo256; use super::*; -use sp_runtime::curve::PiecewiseLinear; -use sp_runtime::traits::{Convert, SaturatedConversion, Zero}; -use sp_runtime::testing::{UintAuthorityId, TestXt}; -use sp_staking::{SessionIndex}; use frame_support::{ - impl_outer_origin, parameter_types, impl_outer_dispatch, impl_outer_event, - StorageValue, StorageMap, StorageDoubleMap, - traits::{Currency, Get, FindAuthor, OnFinalize}, - weights::{Weight, constants::RocksDbWeight}, + impl_outer_origin, parameter_types, + traits::{OnFinalize}, }; -#[cfg(feature = "std")] -use std::{collections::HashSet, cell::RefCell}; use sp_core::{H256}; -use frame_support::{traits::{Contains, ContainsLengthBound}}; - use sp_runtime::{ - Perbill, Permill, ModuleId, + Permill, ModuleId, testing::{Header}, Percent, traits::{IdentityLookup, One}, }; use crate::GenesisConfig; -/// The AccountId alias in this test module. -pub(crate) type AccountId = u64; -pub(crate) type AccountIndex = u64; -pub(crate) type BlockNumber = u64; -pub(crate) type Balance = u128; - -/// Simple structure that exposes how u64 currency can be represented as... u64. -pub struct CurrencyToVoteHandler; -impl Convert for CurrencyToVoteHandler { - fn convert(x: Balance) -> u64 { - x.saturated_into() - } -} -impl Convert for CurrencyToVoteHandler { - fn convert(x: u128) -> Balance { - x - } -} - -thread_local! { - static SESSION: RefCell<(Vec, HashSet)> = RefCell::new(Default::default()); - static SESSION_PER_ERA: RefCell = RefCell::new(3); - static EXISTENTIAL_DEPOSIT: RefCell = RefCell::new(0); - static SLASH_DEFER_DURATION: RefCell = RefCell::new(0); - static ELECTION_LOOKAHEAD: RefCell = RefCell::new(0); - static PERIOD: RefCell = RefCell::new(1); - static MAX_ITERATIONS: RefCell = RefCell::new(0); -} - -/// Another session handler struct to test on_disabled. -pub struct OtherSessionHandler; -impl pallet_session::OneSessionHandler for OtherSessionHandler { - type Key = UintAuthorityId; - - fn on_genesis_session<'a, I: 'a>(_: I) - where I: Iterator, AccountId: 'a {} - - fn on_new_session<'a, I: 'a>(_: bool, validators: I, _: I,) - where I: Iterator, AccountId: 'a - { - SESSION.with(|x| { - *x.borrow_mut() = ( - validators.map(|x| x.0.clone()).collect(), - HashSet::new(), - ) - }); - } - - fn on_disabled(validator_index: usize) { - SESSION.with(|d| { - let mut d = d.borrow_mut(); - let value = d.0[validator_index]; - d.1.insert(value); - }) - } -} - -impl sp_runtime::BoundToRuntimeAppPublic for OtherSessionHandler { - type Public = UintAuthorityId; -} - -pub fn is_disabled(controller: AccountId) -> bool { - let stash = Staking::ledger(&controller).unwrap().stash; - SESSION.with(|d| d.borrow().1.contains(&stash)) -} - -pub struct ExistentialDeposit; -impl Get for ExistentialDeposit { - fn get() -> Balance { - EXISTENTIAL_DEPOSIT.with(|v| *v.borrow()) - } -} - -pub struct SessionsPerEra; -impl Get for SessionsPerEra { - fn get() -> SessionIndex { - SESSION_PER_ERA.with(|v| *v.borrow()) - } -} -impl Get for SessionsPerEra { - fn get() -> BlockNumber { - SESSION_PER_ERA.with(|v| *v.borrow() as BlockNumber) - } -} - -pub struct ElectionLookahead; -impl Get for ElectionLookahead { - fn get() -> BlockNumber { - ELECTION_LOOKAHEAD.with(|v| *v.borrow()) - } -} - -pub struct Period; -impl Get for Period { - fn get() -> BlockNumber { - PERIOD.with(|v| *v.borrow()) - } -} - -pub struct SlashDeferDuration; -impl Get for SlashDeferDuration { - fn get() -> EraIndex { - SLASH_DEFER_DURATION.with(|v| *v.borrow()) - } -} - -pub struct MaxIterations; -impl Get for MaxIterations { - fn get() -> u32 { - MAX_ITERATIONS.with(|v| *v.borrow()) - } -} - impl_outer_origin! { pub enum Origin for Test where system = frame_system {} } -impl_outer_dispatch! { - pub enum Call for Test where origin: Origin { - staking::Staking, - } -} - -/// Author of block is always 11 -pub struct Author11; -impl FindAuthor for Author11 { - fn find_author<'a, I>(_digests: I) -> Option - where I: 'a + IntoIterator, - { - Some(11) - } -} - // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. #[derive(Clone, Eq, PartialEq, Debug)] pub struct Test; parameter_types! { pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = 1024; - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); } -impl frame_system::Trait for Test { +impl frame_system::Config for Test { type BaseCallFilter = (); + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); type Origin = Origin; - type Index = AccountIndex; - type BlockNumber = BlockNumber; - type Call = Call; + type Index = u64; + type Call = (); + type BlockNumber = u64; type Hash = H256; - type Hashing = ::sp_runtime::traits::BlakeTwo256; - type AccountId = AccountId; + type Hashing = BlakeTwo256; + type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; type Event = (); type BlockHashCount = BlockHashCount; - type MaximumBlockWeight = MaximumBlockWeight; - type DbWeight = RocksDbWeight; - type BlockExecutionWeight = (); - type ExtrinsicBaseWeight = (); - type MaximumExtrinsicWeight = MaximumBlockWeight; - type AvailableBlockRatio = AvailableBlockRatio; - type MaximumBlockLength = MaximumBlockLength; type Version = (); type PalletInfo = (); - type AccountData = pallet_balances::AccountData; + type AccountData = pallet_balances::AccountData; type OnNewAccount = (); type OnKilledAccount = (); type SystemWeightInfo = (); - type MigrateAccount = (); -} -impl pallet_balances::Trait for Test { - type MaxLocks = (); - type Balance = Balance; - type Event = (); - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = (); -} -parameter_types! { - pub const Offset: BlockNumber = 0; - pub const UncleGenerations: u64 = 0; - pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(25); -} -sp_runtime::impl_opaque_keys! { - pub struct SessionKeys { - pub other: OtherSessionHandler, - } -} -impl pallet_session::Trait for Test { - type SessionManager = pallet_session::historical::NoteHistoricalRoot; - type Keys = SessionKeys; - type ShouldEndSession = pallet_session::PeriodicSessions; - type SessionHandler = (OtherSessionHandler,); - type Event = (); - type ValidatorId = AccountId; - type ValidatorIdOf = pallet_staking::StashOf; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; - type NextSessionRotation = pallet_session::PeriodicSessions; - type WeightInfo = (); + type SS58Prefix = (); } -impl pallet_session::historical::Trait for Test { - type FullIdentification = pallet_staking::Exposure; - type FullIdentificationOf = pallet_staking::ExposureOf; -} -impl pallet_authorship::Trait for Test { - type FindAuthor = Author11; - type UncleGenerations = UncleGenerations; - type FilterUncle = (); - type EventHandler = pallet_staking::Module; -} -parameter_types! { - pub const MinimumPeriod: u64 = 5; -} -impl pallet_timestamp::Trait for Test { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = MinimumPeriod; - type WeightInfo = (); -} -pallet_staking_reward_curve::build! { - const I_NPOS: PiecewiseLinear<'static> = curve!( - min_inflation: 0_025_000, - max_inflation: 0_100_000, - ideal_stake: 0_500_000, - falloff: 0_050_000, - max_piece_count: 40, - test_precision: 0_005_000, - ); -} parameter_types! { - pub const BondingDuration: EraIndex = 3; - pub const RewardCurve: &'static PiecewiseLinear<'static> = &I_NPOS; - pub const MaxNominatorRewardedPerValidator: u32 = 64; - pub const UnsignedPriority: u64 = 1 << 20; - pub const MinSolutionScoreBump: Perbill = Perbill::zero(); -} - -thread_local! { - pub static REWARD_REMAINDER_UNBALANCED: RefCell = RefCell::new(0); + pub const ExistentialDeposit: u64 = 1; } -impl pallet_staking::Trait for Test { - type Currency = Balances; - type UnixTime = Timestamp; - type CurrencyToVote = CurrencyToVoteHandler; - type RewardRemainder = (); +impl pallet_balances::Config for Test { + type MaxLocks = (); + type Balance = u64; type Event = (); - type Slash = (); - type Reward = (); - type SessionsPerEra = SessionsPerEra; - type SlashDeferDuration = SlashDeferDuration; - type SlashCancelOrigin = frame_system::EnsureRoot; - type BondingDuration = BondingDuration; - type SessionInterface = Self; - type RewardCurve = RewardCurve; - type NextNewSession = Session; - type ElectionLookahead = ElectionLookahead; - type Call = Call; - type MaxIterations = MaxIterations; - type MinSolutionScoreBump = MinSolutionScoreBump; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; - type UnsignedPriority = UnsignedPriority; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; type WeightInfo = (); } -impl frame_system::offchain::SendTransactionTypes for Test where - Call: From, -{ - type OverarchingCall = Call; - type Extrinsic = Extrinsic; -} - -pub type Extrinsic = TestXt; - - -thread_local! { - static TEN_TO_FOURTEEN: RefCell> = RefCell::new(vec![10,11,12,13,14]); -} -pub struct TenToFourteen; -impl Contains for TenToFourteen { - fn sorted_members() -> Vec { - TEN_TO_FOURTEEN.with(|v| { - v.borrow().clone() - }) - } - #[cfg(feature = "runtime-benchmarks")] - fn add(new: &u64) { - TEN_TO_FOURTEEN.with(|v| { - let mut members = v.borrow_mut(); - members.push(*new); - members.sort(); - }) - } -} -impl ContainsLengthBound for TenToFourteen { - fn max_len() -> usize { - TEN_TO_FOURTEEN.with(|v| v.borrow().len()) - } - fn min_len() -> usize { 0 } -} - parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: u64 = 1; @@ -360,50 +92,30 @@ parameter_types! { pub const TipReportDepositPerByte: u64 = 1; pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry"); } - -impl pallet_treasury::Trait for Test { +impl pallet_treasury::Config for Test { type ModuleId = TreasuryModuleId; - type Currency = pallet_balances::Module; + type Currency = Balances; type ApproveOrigin = frame_system::EnsureRoot; type RejectOrigin = frame_system::EnsureRoot; - type Tippers = TenToFourteen; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; type Event = (); + type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type SpendPeriod = SpendPeriod; type Burn = Burn; - type DataDepositPerByte = (); - type BountyDepositBase = (); - type BountyDepositPayoutDelay = (); - type BountyUpdatePeriod = (); - type BountyCuratorDeposit = (); - type BountyValueMinimum = (); - type MaximumReasonLength = (); type BurnDestination = (); + type SpendFunds = (); type WeightInfo = (); - type OnSlash = (); -} - - -parameter_types! { - pub const MinimumTreasuryPct: Percent = Percent::from_percent(50); - pub const MaximumRecipientPct: Percent = Percent::from_percent(50); } -impl Trait for Test { +impl Config for Test { type Event = (); type Currency = Balances; } pub type Balances = pallet_balances::Module; -pub type Session = pallet_session::Module; pub type System = frame_system::Module; -pub type Staking = pallet_staking::Module; pub type Treasury = pallet_treasury::Module; -pub type Timestamp = pallet_timestamp::Module; pub type TreasuryReward = Module; pub struct ExtBuilder { @@ -446,15 +158,7 @@ impl ExtBuilder { (999, 1_000_000_000_000), ], }.assimilate_storage(&mut t).unwrap(); - - pallet_staking::GenesisConfig:: { - stakers: vec![], - validator_count: 2, - minimum_validator_count: 0, - invulnerables: vec![], - slash_reward_fraction: Perbill::from_percent(10), - .. Default::default() - }.assimilate_storage(&mut t).unwrap(); + GenesisConfig:: { current_payout: 9500000, minting_interval: One::one(), diff --git a/modules/edge-voting/.gitignore b/modules/edge-voting/.gitignore deleted file mode 100644 index 69369904..00000000 --- a/modules/edge-voting/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -**/*.rs.bk -Cargo.lock diff --git a/modules/edge-voting/Cargo.toml b/modules/edge-voting/Cargo.toml deleted file mode 100644 index 4c0e01b7..00000000 --- a/modules/edge-voting/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -name = "edge-voting" -version = "1.0.0" -authors = ["Drew Stone "] -edition = "2018" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" -description = "Edgeware auxiliary voting module" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -serde = { version = "1.0", default-features = false, optional = true } -safe-mix = { version = "1.0", default-features = false } -codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-support = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-balances = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } - -[dev-dependencies] -sp-io = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } - -[features] -default = ["std"] -std = [ - "serde", - "safe-mix/std", - "codec/std", - "sp-std/std", - "sp-runtime/std", - "frame-support/std", - "frame-system/std", - "pallet-balances/std", -] diff --git a/modules/edge-voting/README.md b/modules/edge-voting/README.md deleted file mode 100644 index f3cd4fa0..00000000 --- a/modules/edge-voting/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# edge_voting -This module contains logic for voting. It currently supports binary and multi-option elections with optional commit/reveal schemes using the Blake2Hash function as the hashing algorithm. - -# Setup -Install rust or update to the latest versions. -``` -curl https://sh.rustup.rs -sSf | sh -rustup update nightly -rustup target add wasm32-unknown-unknown --toolchain nightly -rustup update stable -cargo install --git https://github.com/alexcrichton/wasm-gc -``` - -You will also need to install the following packages: - -Linux: -``` -sudo apt install cmake pkg-config libssl-dev git clang libclang-dev -``` - -Mac: -``` -brew install cmake pkg-config openssl git llvm -``` - -# Voting Lifecycle -Votes go through a number of stages, conditional on the type of vote. -1. Prevoting -2. (Optional) Commit -3. Voting -4. Completed - -## Tally types -- One person, one vote -- One coin, one vote - -## Voting types -- Binary votes -- Multi-option votes -- Commit-reveal votes - -## Prevoting -The prevoting stage marks the creation of a vote. Additionally, in this stage no voting can take place. This is currently being used by the [edge-signaling](modules/edge-signaling) module. - -## Commit -The commit stage is used for votes that require commit-reveal schemes. Within this stage, all participants submit commitments. After the commit phase, all participants should reveal. - -## Voting -The voting stage doubles as a reveal phase when the vote uses a commit-reveal scheme and simply a general public vote otherwise. - -## Completed -The completed stage marks the ending of a vote, meaning no further votes will be considered in a tally. \ No newline at end of file diff --git a/modules/edge-voting/src/lib.rs b/modules/edge-voting/src/lib.rs deleted file mode 100644 index dc26b213..00000000 --- a/modules/edge-voting/src/lib.rs +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright 2018 Commonwealth Labs, Inc. -// This file is part of Edgeware. - -// Edgeware is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Edgeware is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . - -#![recursion_limit="128"] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg(test)] -mod tests; - -use sp_std::prelude::*; -use sp_std::result; -use frame_system::{ensure_signed}; -use frame_support::{dispatch::DispatchResult, traits::Get, weights::Weight}; -use codec::{Decode, Encode}; - -use sp_runtime::RuntimeDebug; -use sp_runtime::traits::{ - Hash -}; - -use frame_support::{decl_event, decl_module, decl_storage, decl_error, ensure, StorageMap}; - -/// A potential outcome of a vote, with 2^32 possible options -pub type VoteOutcome = [u8; 32]; - -#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug)] -pub enum VoteStage { - // Before voting stage, no votes accepted - PreVoting, - // Commit stage, only for commit-reveal-type elections - Commit, - // Active voting stage, votes (reveals) allowed - Voting, - // Completed voting stage, no more votes allowed - Completed, -} - -#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug)] -pub enum VoteType { - // Binary decision vote, i.e. 2 outcomes - Binary, - // Multi option decision vote, i.e. > 2 possible outcomes - MultiOption, - // Ranked choice voting - RankedChoice, -} - -#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug)] -pub enum TallyType { - // 1 person 1 vote, i.e. 1 account 1 vote - OnePerson, - // 1 coin 1 vote, i.e. by balances - OneCoin, -} - -#[derive(Encode, Decode, Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug)] -pub struct VoteData { - // creator of vote - pub initiator: AccountId, - // Stage of the vote - pub stage: VoteStage, - // Type of vote defined abovoe - pub vote_type: VoteType, - // Tally metric - pub tally_type: TallyType, - // Flag for commit/reveal voting scheme - pub is_commit_reveal: bool, -} - -#[derive(Encode, Decode, Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug)] -pub struct VoteRecord { - // Identifier of the vote - pub id: u64, - // Vote commitments - pub commitments: Vec<(AccountId, VoteOutcome)>, - // Vote reveals - pub reveals: Vec<(AccountId, Vec)>, - // Vote data record - pub data: VoteData, - // Vote outcomes - pub outcomes: Vec, -} - -pub trait Trait: frame_system::Trait { - /// The overarching event type. - type Event: From> + Into<::Event>; -} - -decl_error! { - pub enum Error for Module { - VoteCompleted - } -} - -decl_module! { - pub struct Module for enum Call where origin: T::Origin { - type Error = Error; - fn deposit_event() = default; - - fn on_runtime_upgrade() -> Weight { - migration::migrate::(); - T::MaximumBlockWeight::get() - } - - /// A function for commit-reveal voting schemes that adds a vote commitment. - /// - /// A vote commitment is formatted using the native hash function. There - /// are currently no cryptoeconomic punishments against not revealing the - /// commitment. - #[weight = 0] - pub fn commit(origin, vote_id: u64, commit: VoteOutcome) -> DispatchResult { - let _sender = ensure_signed(origin)?; - let mut record = >::get(vote_id).ok_or("Vote record does not exist")?; - ensure!(record.data.is_commit_reveal, "Commitments are not configured for this vote"); - ensure!(record.data.stage == VoteStage::Commit, "Vote is not in commit stage"); - // No changing of commitments once placed - ensure!(!record.commitments.iter().any(|c| &c.0 == &_sender), "Duplicate commits are not allowed"); - - // Add commitment to record - record.commitments.push((_sender.clone(), commit)); - let id = record.id; - >::insert(id, record); - Self::deposit_event(RawEvent::VoteCommitted(id, _sender)); - Ok(()) - } - - /// A function that reveals a vote commitment or serves as the general vote function. - /// - /// There are currently no cryptoeconomic incentives for revealing commited votes. - #[weight = 0] - pub fn reveal(origin, vote_id: u64, vote: Vec, secret: Option) -> DispatchResult { - let _sender = ensure_signed(origin)?; - let mut record = >::get(vote_id).ok_or("Vote record does not exist")?; - ensure!(record.data.stage == VoteStage::Voting, "Vote is not in voting stage"); - // Check vote is for valid outcomes - if record.data.vote_type == VoteType::RankedChoice { - ensure!(Self::is_ranked_choice_vote_valid( - vote.clone(), - record.outcomes.clone() - ), "Ranked choice vote invalid"); - } else { - ensure!(Self::is_valid_vote( - vote.clone(), - record.outcomes.clone() - ), "Vote outcome is not valid"); - } - // Ensure ranked choice votes have same number of votes as outcomes - if record.data.vote_type == VoteType::RankedChoice { - ensure!(record.outcomes.len() == vote.len(), "Vote must rank all outcomes in order"); - } - // Reject vote or reveal changes - ensure!(!record.reveals.iter().any(|c| &c.0 == &_sender), "Duplicate votes are not allowed"); - // Ensure voter committed - if record.data.is_commit_reveal { - // Ensure secret is passed in - ensure!(secret.is_some(), "Secret is invalid"); - // Ensure the current sender has already committed previously - ensure!(record.commitments.iter().any(|c| &c.0 == &_sender), "Sender not yet committed"); - let commit: (T::AccountId, VoteOutcome) = record.commitments - .iter() - .find(|c| &c.0 == &_sender) - .unwrap() - .clone(); - // Create commitment hash using reported secret and ranked choice ordering - let mut buf = Vec::new(); - buf.extend_from_slice(&_sender.encode()); - buf.extend_from_slice(&secret.unwrap().encode()); - for i in 0..vote.len() { - buf.extend_from_slice(&vote[i]); - } - let hash = T::Hashing::hash_of(&buf); - // Ensure the hashes match - ensure!(hash.encode() == commit.1.encode(), "Commitments do not match"); - } - // Record the revealed vote and emit an event - let id = record.id; - record.reveals.push((_sender.clone(), vote.clone())); - >::insert(id, record); - Self::deposit_event(RawEvent::VoteRevealed(id, _sender, vote)); - Ok(()) - } - } -} - -impl Module { - /// A helper function for creating a new vote/ballot. - pub fn create_vote( - sender: T::AccountId, - vote_type: VoteType, - is_commit_reveal: bool, - tally_type: TallyType, - outcomes: Vec - ) -> result::Result { - if vote_type == VoteType::Binary { ensure!(outcomes.len() == 2, "Invalid binary outcomes") } - if vote_type == VoteType::MultiOption { ensure!(outcomes.len() > 2, "Invalid multi option outcomes") } - if vote_type == VoteType::RankedChoice { ensure!(outcomes.len() > 2, "Invalid ranked choice outcomes") } - - let id = Self::vote_record_count() + 1; - >::insert(id, VoteRecord { - id: id, - commitments: vec![], - reveals: vec![], - outcomes: outcomes, - data: VoteData { - initiator: sender.clone(), - stage: VoteStage::PreVoting, - vote_type: vote_type, - tally_type: tally_type, - is_commit_reveal: is_commit_reveal, - }, - }); - - ::mutate(|i| *i += 1); - Self::deposit_event(RawEvent::VoteCreated(id, sender, vote_type)); - return Ok(id); - } - - /// A helper function for advancing the stage of a vote, as a state machine - pub fn advance_stage(vote_id: u64) -> DispatchResult { - let mut record = >::get(vote_id).ok_or("Vote record does not exist")?; - let curr_stage = record.data.stage; - let next_stage = match curr_stage { - VoteStage::PreVoting if record.data.is_commit_reveal => VoteStage::Commit, - VoteStage::PreVoting | VoteStage::Commit => VoteStage::Voting, - VoteStage::Voting => VoteStage::Completed, - VoteStage::Completed => return Err(Error::::VoteCompleted)?, - }; - record.data.stage = next_stage; - >::insert(record.id, record); - Self::deposit_event(RawEvent::VoteAdvanced(vote_id, curr_stage, next_stage)); - Ok(()) - } - - pub fn is_ranked_choice_vote_valid(mut vote: Vec, mut outcomes: Vec) -> bool { - // check length equality - if vote.len() == outcomes.len() { - // sort both sets - vote.sort(); - outcomes.sort(); - // check element wise equality - for i in 0..vote.len() { - if vote[i] == outcomes[i] { continue; } - else { return false } - } - - true - } else { - false - } - } - - pub fn is_valid_vote(vote: Vec, outcomes: Vec) -> bool { - for i in 0..vote.len() { - if outcomes.iter().any(|o| o == &vote[i]) { - continue; - } else { - return false; - } - } - - true - } - - pub fn get_vote_record(vote_id: u64) -> Option> { - return >::get(vote_id); - } -} - -decl_event!( - pub enum Event where ::AccountId { - /// new vote (id, creator, type of vote) - VoteCreated(u64, AccountId, VoteType), - /// vote stage transition (id, old stage, new stage) - VoteAdvanced(u64, VoteStage, VoteStage), - /// user commits - VoteCommitted(u64, AccountId), - /// user reveals a vote - VoteRevealed(u64, AccountId, Vec), - } -); - -decl_storage! { - trait Store for Module as Voting { - /// The map of all vote records indexed by id - pub VoteRecords get(fn vote_records): map hasher(twox_64_concat) u64 => Option>; - /// The number of vote records that have been created - pub VoteRecordCount get(fn vote_record_count): u64; - } -} - -mod migration { - use super::*; - - pub fn migrate() { - for idx in 0..(VoteRecordCount::get() + 1) { - VoteRecords::::migrate_key_from_blake(idx); - } - } -} diff --git a/modules/edge-voting/src/tests.rs b/modules/edge-voting/src/tests.rs deleted file mode 100644 index 6e4d4a35..00000000 --- a/modules/edge-voting/src/tests.rs +++ /dev/null @@ -1,628 +0,0 @@ -// Copyright 2018 Commonwealth Labs, Inc. -// This file is part of Edgeware. - -// Edgeware is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Edgeware is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . - -use sp_runtime::{ - Perbill, - testing::Header, - traits::{BlakeTwo256, IdentityLookup}, -}; -use sp_core::H256; -use frame_support::{ - parameter_types, impl_outer_origin, assert_err, assert_ok, weights::Weight, - traits::{OnFinalize} -}; - -use super::*; -use crate::{Trait, Module, VoteType, TallyType}; - -static SECRET: [u8; 32] = [1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4]; - -impl_outer_origin! { - pub enum Origin for Test {} -} - -#[derive(Clone, PartialEq, Eq, Debug)] -pub struct Test; - -parameter_types! { - pub const BlockHashCount: u64 = 250; - pub const MaximumBlockWeight: Weight = 1024; - pub const MaximumBlockLength: u32 = 2 * 1024; - pub const AvailableBlockRatio: Perbill = Perbill::one(); - pub const MaximumExtrinsicWeight: Weight = 1024; -} - -impl frame_system::Trait for Test { - type BaseCallFilter = (); - type Origin = Origin; - type Index = u64; - type BlockNumber = u64; - type Call = (); - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Header = Header; - type Event = (); - type BlockHashCount = BlockHashCount; - type MaximumBlockWeight = MaximumBlockWeight; - type DbWeight = (); - type BlockExecutionWeight = (); - type ExtrinsicBaseWeight = (); - type MaximumBlockLength = MaximumBlockLength; - type AvailableBlockRatio = AvailableBlockRatio; - type Version = (); - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type MigrateAccount = (); - type OnKilledAccount = (); - type MaximumExtrinsicWeight = MaximumExtrinsicWeight; - type PalletInfo = (); - type SystemWeightInfo = (); -} - - -impl Trait for Test { - type Event = (); -} - -pub type System = frame_system::Module; -pub type Voting = Module; - -// This function basically just builds a genesis storage key/value store according to -// our desired mockup. -fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); - // We use default for brevity, but you can configure as desired if needed. - t.into() -} - -fn create_vote( - who: u64, - vote_type: VoteType, - is_commit_reveal: bool, - tally_type: TallyType, - outcomes: &[[u8; 32]] -) -> result::Result { - Voting::create_vote(who, - vote_type, - is_commit_reveal, - tally_type, - outcomes.to_vec()) -} - -fn commit(who: u64, vote_id: u64, commit: [u8; 32]) -> DispatchResult { - Voting::commit(Origin::signed(who), vote_id, commit) -} - -fn reveal(who: u64, vote_id: u64, vote: Vec<[u8; 32]>, secret: Option<[u8; 32]>) -> DispatchResult { - Voting::reveal(Origin::signed(who), vote_id, vote, secret) -} - -fn advance_stage(vote_id: u64) -> DispatchResult { - Voting::advance_stage(vote_id) -} - -fn get_test_key() -> u64 { - let public = 1_u64; - return public; -} - -fn get_test_key_2() -> u64 { - let public = 2_u64; - return public; -} - -fn generate_1p1v_public_binary_vote() -> (VoteType, bool, TallyType, [[u8; 32]; 2]) { - let vote_type = VoteType::Binary; - let tally_type = TallyType::OnePerson; - let is_commit_reveal = false; - let yes_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; - let no_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; - - return (vote_type, is_commit_reveal, tally_type, [yes_outcome, no_outcome]); -} - -fn generate_1p1v_commit_reveal_binary_vote() -> (VoteType, bool, TallyType, [[u8; 32]; 2]) { - let vote_type = VoteType::Binary; - let tally_type = TallyType::OnePerson; - let is_commit_reveal = true; - let yes_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; - let no_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; - - return (vote_type, is_commit_reveal, tally_type, [yes_outcome, no_outcome]); -} - -fn generate_1p1v_public_multi_vote() -> (VoteType, bool, TallyType, [[u8; 32]; 4]) { - let vote_type = VoteType::MultiOption; - let tally_type = TallyType::OnePerson; - let is_commit_reveal = false; - let one_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; - let two_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]; - let three_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]; - let four_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4]; - - return (vote_type, is_commit_reveal, tally_type, [ - one_outcome, - two_outcome, - three_outcome, - four_outcome - ]); -} - -fn generate_1p1v_public_ranked_choice_vote() -> (VoteType, bool, TallyType, [[u8; 32]; 4]) { - let vote_type = VoteType::RankedChoice; - let tally_type = TallyType::OnePerson; - let is_commit_reveal = false; - let one_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; - let two_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]; - let three_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]; - let four_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4]; - - return (vote_type, is_commit_reveal, tally_type, [ - one_outcome, - two_outcome, - three_outcome, - four_outcome - ]); -} - -fn generate_1p1v_commit_reveal_ranked_choice_vote() -> (VoteType, bool, TallyType, [[u8; 32]; 4]) { - let vote_type = VoteType::RankedChoice; - let tally_type = TallyType::OnePerson; - let is_commit_reveal = true; - let one_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; - let two_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]; - let three_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]; - let four_outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4]; - - return (vote_type, is_commit_reveal, tally_type, [ - one_outcome, - two_outcome, - three_outcome, - four_outcome - ]); -} - -fn make_record( - id: u64, - author: u64, - vote_type: VoteType, - is_commit_reveal: bool, - tally_type: TallyType, - outcomes: &[[u8; 32]], - stage: VoteStage -) -> VoteRecord { - VoteRecord { - id: id, - commitments: vec![], - reveals: vec![], - outcomes: outcomes.to_vec(), - data: VoteData { - initiator: author, - stage: stage, - vote_type: vote_type, - tally_type: tally_type, - is_commit_reveal: is_commit_reveal, - }, - } -} - -#[test] -fn create_binary_vote_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_eq!(Voting::vote_record_count(), 1); - assert_eq!( - Voting::vote_records(1), - Some(make_record(1, public, vote.0, vote.1, vote.2, &vote.3, VoteStage::PreVoting)) - ); - }); -} - -#[test] -fn create_binary_vote_with_multi_options_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - let multi_vote = generate_1p1v_public_multi_vote(); - assert_err!(create_vote(public, vote.0, vote.1, vote.2, &multi_vote.3), "Invalid binary outcomes"); - assert_eq!(Voting::vote_record_count(), 0); - assert_eq!(Voting::vote_records(1), None); - }); -} - -#[test] -fn create_multi_vote_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_multi_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_eq!(Voting::vote_record_count(), 1); - assert_eq!( - Voting::vote_records(1), - Some(make_record(1, public, vote.0, vote.1, vote.2, &vote.3, VoteStage::PreVoting)) - ); - }); -} - -#[test] -fn create_multi_vote_with_binary_options_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - let multi_vote = generate_1p1v_public_multi_vote(); - assert_err!(create_vote(public, multi_vote.0, multi_vote.1, multi_vote.2, &vote.3), "Invalid multi option outcomes"); - assert_eq!(Voting::vote_record_count(), 0); - assert_eq!(Voting::vote_records(1), None); - }); -} - -#[test] -fn create_vote_with_one_outcome_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_multi_vote(); - let outcome: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4]; - assert_err!(create_vote(public, vote.0, vote.1, vote.2, &[outcome]), "Invalid multi option outcomes"); - assert_eq!(Voting::vote_record_count(), 0); - assert_eq!(Voting::vote_records(1), None); - }); -} - -#[test] -fn commit_to_nonexistent_record_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let commit_value = SECRET; - assert_err!(commit(public, 1, commit_value), "Vote record does not exist"); - }); -} - -#[test] -fn commit_to_non_commit_record_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - let commit_value = SECRET; - assert_err!(commit(public, 1, commit_value), "Commitments are not configured for this vote"); - }); -} - -#[test] -fn reveal_to_nonexistent_record_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let commit_value = SECRET; - assert_err!(reveal(public, 1, vec![commit_value], Some(commit_value)), "Vote record does not exist"); - }); -} - -#[test] -fn reveal_to_record_before_voting_period_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - let vote_outcome = vote.3[0]; - assert_err!(reveal(public, 1, vec![vote_outcome], Some(vote_outcome)), "Vote is not in voting stage"); - }); -} - -#[test] -fn advance_from_initiator_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - assert_eq!( - Voting::vote_records(1), - Some(make_record(1, public, vote.0, vote.1, vote.2, &vote.3, VoteStage::Voting)) - ); - }); -} - -#[test] -fn reveal_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - let public2 = get_test_key_2(); - assert_ok!(reveal(public2, 1, vec![vote.3[0]], Some(vote.3[0]))); - assert_eq!( - Voting::vote_records(1).unwrap().reveals, - vec![(public2, vec![vote.3[0]])] - ); - }); -} - -#[test] -fn reveal_invalid_outcome_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - let public2 = get_test_key_2(); - let invalid_outcome = SECRET; - assert_err!(reveal(public2, 1, vec![invalid_outcome], None), "Vote outcome is not valid"); - }); -} - -#[test] -fn reveal_multi_outcome_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_multi_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - - - for i in 0..vote.3.len() { - assert_ok!(reveal(i as u64, 1, vec![vote.3[i]], None)); - } - }); -} - -#[test] -fn complete_after_reveal_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - let public2 = get_test_key_2(); - assert_ok!(reveal(public2, 1, vec![vote.3[0]], Some(vote.3[0]))); - assert_ok!(advance_stage(1)); - assert_eq!( - Voting::vote_records(1).unwrap().data.stage, - VoteStage::Completed - ); - }); -} - -#[test] -fn transition_to_commit_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_commit_reveal_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_eq!( - Voting::vote_records(1).unwrap().data.is_commit_reveal, - true - ); - assert_ok!(advance_stage(1)); - assert_eq!( - Voting::vote_records(1).unwrap().data.stage, - VoteStage::Commit - ); - }); -} - -#[test] -fn reveal_before_commit_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_commit_reveal_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_eq!( - Voting::vote_records(1).unwrap().data.is_commit_reveal, - true - ); - let public2 = get_test_key_2(); - assert_err!(reveal(public2, 1, vec![vote.3[0]], Some(vote.3[0])), "Vote is not in voting stage"); - }); -} - -#[test] -fn reveal_commit_before_stage_change_should_not_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_commit_reveal_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - let public2 = get_test_key_2(); - let secret = SECRET; - let mut buf = Vec::new(); - buf.extend_from_slice(&public2.encode()); - buf.extend_from_slice(&secret); - buf.extend_from_slice(&vote.3[0]); - let commit_hash: [u8; 32] = BlakeTwo256::hash_of(&buf).into(); - assert_ok!(commit(public2, 1, commit_hash)); - assert_eq!( - Voting::vote_records(1).unwrap().commitments, - vec![(public2, commit_hash)] - ); - - assert_err!(reveal(public2, 1, vec![vote.3[0]], Some(secret)), "Vote is not in voting stage"); - }); -} - -#[test] -fn reveal_commit_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_commit_reveal_binary_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - let public2 = get_test_key_2(); - let secret = SECRET; - let mut buf = Vec::new(); - buf.extend_from_slice(&public2.encode()); - buf.extend_from_slice(&secret); - buf.extend_from_slice(&vote.3[0]); - let commit_hash: [u8; 32] = BlakeTwo256::hash_of(&buf).into(); - assert_ok!(commit(public2, 1, commit_hash)); - assert_eq!( - Voting::vote_records(1).unwrap().commitments, - vec![(public2, commit_hash)] - ); - - assert_ok!(advance_stage(1)); - assert_ok!(reveal(public2, 1, vec![vote.3[0]], Some(secret))); - }); -} - -#[test] -fn create_public_ranked_choice_vote_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_ranked_choice_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_eq!(Voting::vote_record_count(), 1); - assert_eq!( - Voting::vote_records(1), - Some(make_record(1, public, vote.0, vote.1, vote.2, &vote.3, VoteStage::PreVoting)) - ); - - assert_ok!(advance_stage(1)); - assert_eq!( - Voting::vote_records(1), - Some(make_record(1, public, vote.0, vote.1, vote.2, &vote.3, VoteStage::Voting)) - ); - }); -} - -#[test] -fn reveal_public_ranked_choice_vote_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_ranked_choice_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - assert_ok!(reveal(public, 1, vote.3.to_vec(), None)); - }); -} - -#[test] -fn reveal_incorrect_outcomes_ranked_choice_should_fail() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_public_ranked_choice_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - assert_err!(reveal(public, 1, vec![vote.3[0]], None), "Ranked choice vote invalid"); - }); -} - -#[test] -fn commit_reveal_ranked_choice_vote_should_work() { - new_test_ext().execute_with(|| { - System::set_block_number(1); - let public = get_test_key(); - let vote = generate_1p1v_commit_reveal_ranked_choice_vote(); - assert_eq!(Ok(1), create_vote(public, vote.0, vote.1, vote.2, &vote.3)); - assert_ok!(advance_stage(1)); - - let mut buf = vec![]; - buf.extend_from_slice(&public.encode()); - buf.extend_from_slice(&SECRET.encode()); - for i in 0..vote.3.len() { - buf.extend_from_slice(&vote.3[i].encode()); - } - let hash = BlakeTwo256::hash_of(&buf); - assert_ok!(commit(public, 1, hash.into())); - assert_ok!(advance_stage(1)); - assert_ok!(reveal(public, 1, vote.3.to_vec(), Some(SECRET))); - }); -} - -#[test] -fn change_hasher_migration() { - mod deprecated { - use sp_std::prelude::*; - - use codec::{Encode, Decode}; - use frame_support::{decl_module, decl_storage}; - - use crate::{Trait, VoteRecord}; - - decl_module! { - pub struct Module for enum Call where origin: T::Origin { } - } - decl_storage! { - trait Store for Module as Voting { - pub VoteRecords get(fn vote_records): map hasher(opaque_blake2_256) - u64 => Option>; - } - } - } - - new_test_ext().execute_with(|| { - System::set_block_number(1); - // build vote record - let public = get_test_key(); - let yes_vote: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]; - let no_vote: [u8; 32] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; - let outcomes = vec![yes_vote, no_vote]; - let id = VoteRecordCount::get() + 1; - let record = VoteRecord { - id: id, - commitments: vec![], - reveals: vec![], - outcomes: outcomes, - data: VoteData { - initiator: public.clone(), - stage: VoteStage::PreVoting, - vote_type: VoteType::Binary, - tally_type: TallyType::OneCoin, - is_commit_reveal: false, - }, - }; - - // insert the record with the old hasher - deprecated::VoteRecords::::insert(id, &record); - VoteRecordCount::mutate(|i| *i += 1); - assert!( - Voting::vote_records(id).is_none(), - "proposal should not (yet) be available with the new hasher" - ); - // do the migration - crate::migration::migrate::(); - let maybe_vote = Voting::vote_records(id); - // check that it was successfull - assert!(maybe_vote.is_some()); - let vote = maybe_vote.unwrap(); - assert_eq!(vote, record); - }); -} diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index 51ac0097..e5f23d50 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-cli" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] description = "Edgeware implementation using a substrate node." build = "build.rs" @@ -36,6 +36,8 @@ codec = { package = "parity-scale-codec", version = "1.3.4" } serde = { version = "1.0.102", features = ["derive"] } futures = { version = "0.3.1", features = ["compat"] } hex-literal = "0.3.1" +jsonrpc-core = "15.0.0" +jsonrpc-pubsub = "15.0.0" log = "0.4.8" rand = "0.7.2" structopt = { version = "0.3.8", optional = true } @@ -45,78 +47,80 @@ hex = "0.3.2" serde_json = "1.0" # primitives -sp-authority-discovery = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-blockchain = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate", branch = "master" } -sp-consensus-aura = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-finality-grandpa = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-timestamp = { version = "2.0.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-finality-tracker = { version = "2.0.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-inherents = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-keyring = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-io = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-consensus = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-transaction-pool = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +sp-authority-discovery = { version = "2.0" } +sp-blockchain = { version = "2.0" } +sp-consensus-aura = { version = "0.8" } +sp-finality-grandpa = { version = "2.0" } +sp-core = { version = "2.0" } +sp-runtime = { version = "2.0" } +sp-timestamp = { version = "2.0", default-features = false } +sp-inherents = { version = "2.0" } +sp-keyring = { version = "2.0" } +sp-io = { version = "2.0" } +sp-consensus = { version = "0.8" } +sp-transaction-pool = { version = "2.0" } # client dependencies -sc-client-api = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-chain-spec = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-consensus = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-transaction-pool = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-network = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-consensus-aura = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-finality-grandpa = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-client-db = { version = "0.8.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-offchain = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-rpc = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-basic-authorship = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-service = { version = "0.8.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-tracing = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-telemetry = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-authority-discovery = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +sc-client-api = { version = "2.0" } +sc-chain-spec = { version = "2.0" } +sc-consensus = { version = "0.8" } +sc-transaction-pool = { version = "2.0" } +sc-network = { version = "0.8" } +sc-consensus-aura = { version = "0.8" } +sc-finality-grandpa = { version = "0.8" } +sc-client-db = { version = "0.8", default-features = false } +sc-offchain = { version = "2.0" } +sc-rpc = { version = "2.0" } +sc-basic-authorship = { version = "0.8" } +sc-service = { version = "0.8", default-features = false } +sc-tracing = { version = "2.0" } +sc-telemetry = { version = "2.0" } +sc-authority-discovery = { version = "0.8" } # frame dependencies -pallet-indices = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-timestamp = { version = "2.0.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-contracts = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-balances = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-transaction-payment = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-support = { version = "2.0.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-im-online = { version = "2.0.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-authority-discovery = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-staking = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-grandpa = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +pallet-indices = { version = "2.0" } +pallet-timestamp = { version = "2.0", default-features = false } +pallet-contracts = { version = "2.0" } +frame-system = { version = "2.0" } +pallet-balances = { version = "2.0" } +pallet-transaction-payment = { version = "2.0" } +frame-support = { version = "2.0", default-features = false } +pallet-im-online = { version = "2.0", default-features = false } +pallet-authority-discovery = { version = "2.0" } +pallet-staking = { version = "2.0" } +pallet-grandpa = { version = "2.0" } +pallet-evm = { version = "2.0" } # node-specific dependencies -edgeware-runtime = { version = "3.1.0", path = "../runtime" } -edgeware-rpc = { version = "3.1.0", path = "../rpc" } -edgeware-primitives = { version = "3.1.0", path = "../primitives" } -edgeware-executor = { version = "3.1.0", path = "../executor" } +edgeware-runtime = { version = "3.2.0", path = "../runtime" } +edgeware-rpc = { version = "3.2.0", path = "../rpc" } +edgeware-primitives = { version = "3.2.0", path = "../primitives" } +edgeware-executor = { version = "3.2.0", path = "../executor" } # CLI-specific dependencies -sc-cli = { version = "0.8.0", optional = true, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-benchmarking-cli = { version = "2.0.0", optional = true, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -edgeware-inspect = { version = "3.1.0", optional = true, path = "../inspect" } +sc-cli = { version = "0.8", optional = true } +frame-benchmarking-cli = { version = "2.0", optional = true } +fc-consensus = { version = "0.1" } +fp-consensus = { version = "0.1" } +fc-rpc-core = { version = "0.1" } # WASM-specific dependencies wasm-bindgen = { version = "0.2.57", optional = true } wasm-bindgen-futures = { version = "0.4.7", optional = true } -browser-utils = { version = "0.8.0", package = "substrate-browser-utils", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", optional = true } +browser-utils = { version = "0.8", package = "substrate-browser-utils", optional = true } [target.'cfg(target_arch="x86_64")'.dependencies] -edgeware-executor = { version = "3.1.0", path = "../executor", features = [ "wasmtime" ] } -sc-cli = { version = "0.8.0", optional = true, git = "https://github.com/hicommonwealth/substrate.git", branch = "master", features = [ "wasmtime" ] } -sc-service = { version = "0.8.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master", features = [ "wasmtime" ] } -sp-trie = { version = "2.0.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master", features = ["memory-tracker"] } +edgeware-executor = { path = "../executor", features = [ "wasmtime" ] } +sc-cli = { version = "0.8", optional = true, features = [ "wasmtime" ] } +sc-service = { version = "0.8", default-features = false, features = [ "wasmtime" ] } +sp-trie = { version = "2.0", default-features = false, features = ["memory-tracker"] } [dev-dependencies] -sc-keystore = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-consensus = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-consensus-epochs = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-service-test = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +sc-keystore = { version = "2.0" } +sc-consensus = { version = "0.8" } +sc-consensus-epochs = { version = "0.8" } + futures = "0.3.4" tempfile = "3.1.0" assert_cmd = "1.0" @@ -127,17 +131,10 @@ platforms = "0.2.1" [build-dependencies] structopt = { version = "0.3.8", optional = true } -edgeware-inspect = { version = "3.1.0", optional = true, path = "../inspect" } -frame-benchmarking-cli = { version = "2.0.0", optional = true, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -substrate-build-script-utils = { version = "2.0.0", optional = true, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -substrate-frame-cli = { version = "2.0.0", optional = true, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } - -[build-dependencies.sc-cli] -version = "0.8.0" -package = "sc-cli" -git = "https://github.com/hicommonwealth/substrate.git" -branch = "master" -optional = true +frame-benchmarking-cli = { version = "2.0", optional = true } +substrate-build-script-utils = { version = "2.0", optional = true } +substrate-frame-cli = { version = "2.0", optional = true } +sc-cli = { version = "0.8", optional = true } [features] default = [ "cli" ] @@ -148,7 +145,6 @@ browser = [ ] cli = [ "edgeware-executor/wasmi-errno", - "edgeware-inspect", "sc-cli", "frame-benchmarking-cli", "substrate-frame-cli", @@ -156,3 +152,8 @@ cli = [ "structopt", "substrate-build-script-utils", ] + +runtime-benchmarks = [ + "edgeware-runtime/runtime-benchmarks", + "frame-benchmarking-cli", +] \ No newline at end of file diff --git a/node/cli/src/chain_spec.rs b/node/cli/src/chain_spec.rs index a3ffc213..ab2823c4 100644 --- a/node/cli/src/chain_spec.rs +++ b/node/cli/src/chain_spec.rs @@ -21,8 +21,8 @@ use edgeware_runtime::Block; use edgeware_runtime::{ AuraConfig, AuthorityDiscoveryConfig, BalancesConfig, CouncilConfig, DemocracyConfig, GrandpaConfig, ImOnlineConfig, IndicesConfig, SessionConfig, - SessionKeys, SignalingConfig, StakerStatus, StakingConfig, SudoConfig, SystemConfig, - TreasuryRewardConfig, VestingConfig, wasm_binary_unwrap, + SessionKeys, StakerStatus, StakingConfig, SudoConfig, SystemConfig, + TreasuryRewardConfig, VestingConfig, wasm_binary_unwrap, EVMConfig, }; use pallet_im_online::ed25519::AuthorityId as ImOnlineId; use sc_chain_spec::ChainSpecExtension; @@ -31,7 +31,7 @@ use sc_telemetry::TelemetryEndpoints; use serde::{Deserialize, Serialize}; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_aura::ed25519::AuthorityId as AuraId; -use sp_core::{sr25519, Pair, Public}; +use sp_core::{sr25519, Pair, Public, U256, H160,}; use sp_finality_grandpa::AuthorityId as GrandpaId; use sp_runtime::{ traits::{IdentifyAccount, One, Verify}, @@ -47,6 +47,8 @@ use serde_json::Result; use std::fs::File; use std::io::Read; use std::path::Path; +use std::collections::BTreeMap; +use std::str::FromStr; type AccountPublic = ::Signer; @@ -158,7 +160,19 @@ pub fn testnet_genesis( vesting: Vec<(AccountId, BlockNumber, BlockNumber, Balance)>, founder_allocation: Vec<(AccountId, Balance)>, ) -> GenesisConfig { - let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(|| { + let alice_evm_account_id = H160::from_str("19e7e376e7c213b7e7e7e46cc70a5dd086daff2a").unwrap(); + let mut evm_accounts = BTreeMap::new(); + evm_accounts.insert( + alice_evm_account_id, + pallet_evm::GenesisAccount { + nonce: 0.into(), + balance: U256::from(123456_123_000_000_000_000_000u128), + storage: BTreeMap::new(), + code: vec![], + }, + ); + + let mut endowed_accounts: Vec = endowed_accounts.unwrap_or_else(|| { vec![ get_account_id_from_seed::("Alice"), get_account_id_from_seed::("Bob"), @@ -175,7 +189,27 @@ pub fn testnet_genesis( ] }); + initial_authorities.iter().for_each(|x| { + if !endowed_accounts.contains(&x.0) { + endowed_accounts.push(x.0.clone()); + } + if !endowed_accounts.contains(&x.1) { + endowed_accounts.push(x.1.clone()); + } + }); + const STASH: Balance = 100000000 * DOLLARS; + let mut endowed_balances: Vec<(AccountId, Balance)> = endowed_accounts + .iter() + .map(|k| (k.clone(), STASH)) + .collect(); + + // add founders and balances to endowed if not already in list + founder_allocation.iter().chain(balances.iter()).for_each(|x| { + if !endowed_accounts.contains(&x.0) { + endowed_balances.push((x.0.clone(), x.1.clone())); + } + }); GenesisConfig { frame_system: Some(SystemConfig { @@ -183,19 +217,7 @@ pub fn testnet_genesis( changes_trie_config: Default::default(), }), pallet_balances: Some(BalancesConfig { - balances: endowed_accounts - .iter() - .cloned() - .map(|k| (k, STASH)) - .chain( - founder_allocation - .iter() - .map(|x| (x.0.clone(), x.1.clone())), - ) - .chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH))) - .chain(initial_authorities.iter().map(|x| (x.1.clone(), STASH))) - .chain(balances.clone()) - .collect(), + balances: endowed_balances, }), pallet_indices: Some(IndicesConfig { indices: vec![] }), pallet_session: Some(SessionConfig { @@ -238,11 +260,9 @@ pub fn testnet_genesis( pallet_elections_phragmen: Some(Default::default()), pallet_sudo: Some(SudoConfig { key: _root_key }), pallet_vesting: Some(VestingConfig { vesting: vesting }), + pallet_evm: Some(EVMConfig { accounts: evm_accounts }), pallet_contracts: Some(Default::default()), - signaling: Some(SignalingConfig { - voting_length: 7 * DAYS, - proposal_creation_bond: 1 * DOLLARS, - }), + pallet_ethereum: Some(Default::default()), treasury_reward: Some(TreasuryRewardConfig { current_payout: 95 * DOLLARS, minting_interval: One::one(), @@ -316,6 +336,7 @@ pub fn edgeware_testnet_config(testnet_name: String, testnet_node_name: String) ) } +/// Development config with 6 node validator set fn multi_development_config_genesis() -> GenesisConfig { testnet_genesis( vec![ @@ -335,6 +356,7 @@ fn multi_development_config_genesis() -> GenesisConfig { ) } +/// Development config with single node validator set pub fn development_config_genesis() -> GenesisConfig { testnet_genesis( vec![get_authority_keys_from_seed("Alice")], @@ -499,11 +521,9 @@ pub fn mainnet_genesis( key: crate::mainnet_fixtures::get_mainnet_root_key(), }), pallet_vesting: Some(VestingConfig { vesting: vesting }), + pallet_evm: Some(Default::default()), pallet_contracts: Some(Default::default()), - signaling: Some(SignalingConfig { - voting_length: 7 * DAYS, - proposal_creation_bond: 1 * DOLLARS, - }), + pallet_ethereum: Some(Default::default()), treasury_reward: Some(TreasuryRewardConfig { current_payout: 95 * DOLLARS, minting_interval: One::one(), diff --git a/node/cli/src/cli.rs b/node/cli/src/cli.rs index 293a8ea4..64cae8f3 100644 --- a/node/cli/src/cli.rs +++ b/node/cli/src/cli.rs @@ -14,9 +14,20 @@ // You should have received a copy of the GNU General Public License // along with Edgeware. If not, see . -use sc_cli::{RunCmd, KeySubcommand, SignCmd, VanityCmd, VerifyCmd}; +use sc_cli::{KeySubcommand, SignCmd, VanityCmd, VerifyCmd}; use structopt::StructOpt; +#[allow(missing_docs)] +#[derive(Debug, StructOpt)] +pub struct RunCmd { + #[allow(missing_docs)] + #[structopt(flatten)] + pub base: sc_cli::RunCmd, + + #[structopt(long = "enable-dev-signer")] + pub enable_dev_signer: bool, +} + /// An overarching CLI command definition. #[derive(Debug, StructOpt)] pub struct Cli { @@ -34,13 +45,6 @@ pub enum Subcommand { /// Key management cli utilities Key(KeySubcommand), - /// The custom inspect subcommmand for decoding blocks and extrinsics. - #[structopt( - name = "inspect", - about = "Decode given block or extrinsic using current native runtime." - )] - Inspect(edgeware_inspect::cli::InspectCmd), - /// The custom benchmark subcommmand benchmarking runtime pallets. #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")] Benchmark(frame_benchmarking_cli::BenchmarkCmd), @@ -57,9 +61,6 @@ pub enum Subcommand { /// Build a chain specification. BuildSpec(sc_cli::BuildSpecCmd), - /// Build a chain specification with a light client sync state. - BuildSyncSpec(sc_cli::BuildSyncSpecCmd), - /// Validate blocks. CheckBlock(sc_cli::CheckBlockCmd), @@ -77,4 +78,4 @@ pub enum Subcommand { /// Revert the chain to a previous state. Revert(sc_cli::RevertCmd), -} \ No newline at end of file +} diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index f1e1d97e..9b7912e3 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -16,10 +16,10 @@ use crate::{chain_spec, service, Cli, Subcommand}; use edgeware_executor::Executor; -use edgeware_runtime::{Block, RuntimeApi}; +use edgeware_runtime::Block; use sc_cli::{Result, SubstrateCli, RuntimeVersion, Role, ChainSpec}; use sc_service::PartialComponents; -use crate::service::{new_partial, new_full_base, NewFullBase}; +use crate::service::{new_partial}; impl SubstrateCli for Cli { fn impl_name() -> String { @@ -78,17 +78,14 @@ pub fn run() -> Result<()> { match &cli.subcommand { None => { - let runner = cli.create_runner(&cli.run)?; - runner.run_node_until_exit(|config| match config.role { - Role::Light => service::new_light(config), - _ => service::new_full(config), + let runner = cli.create_runner(&cli.run.base)?; + runner.run_node_until_exit(|config| async move { + match config.role { + Role::Light => service::new_light(config), + _ => service::new_full(config, cli.run.enable_dev_signer), + } }) } - Some(Subcommand::Inspect(cmd)) => { - let runner = cli.create_runner(cmd)?; - - runner.sync_run(|config| cmd.run::(config)) - } Some(Subcommand::Benchmark(cmd)) => { if cfg!(feature = "runtime-benchmarks") { let runner = cli.create_runner(cmd)?; @@ -99,7 +96,7 @@ pub fn run() -> Result<()> { You can enable it with `--features runtime-benchmarks`.".into()) } } - Some(Subcommand::Key(cmd)) => cmd.run(), + Some(Subcommand::Key(cmd)) => cmd.run(&cli), Some(Subcommand::Sign(cmd)) => cmd.run(), Some(Subcommand::Verify(cmd)) => cmd.run(), Some(Subcommand::Vanity(cmd)) => cmd.run(), @@ -107,17 +104,6 @@ pub fn run() -> Result<()> { let runner = cli.create_runner(cmd)?; runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) }, - Some(Subcommand::BuildSyncSpec(cmd)) => { - let runner = cli.create_runner(cmd)?; - runner.async_run(|config| { - let chain_spec = config.chain_spec.cloned_box(); - let network_config = config.network.clone(); - let NewFullBase { task_manager, client, network_status_sinks, .. } - = new_full_base(config, |_, _| ())?; - - Ok((cmd.run(chain_spec, network_config, client, network_status_sinks), task_manager)) - }) - }, Some(Subcommand::CheckBlock(cmd)) => { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { diff --git a/node/cli/src/service.rs b/node/cli/src/service.rs index 7e8f695e..a1314877 100644 --- a/node/cli/src/service.rs +++ b/node/cli/src/service.rs @@ -19,21 +19,22 @@ //! Service implementation. Specialized wrapper over substrate service. use sc_service::ChainSpec; -use std::sync::Arc; +use std::{sync::{Arc, Mutex}, collections::HashMap}; +use fc_rpc_core::types::PendingTransactions; +use sc_client_api::{ExecutorProvider, RemoteBackend, BlockchainEvents}; use sc_consensus_aura; use sc_finality_grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider}; +use fc_consensus::FrontierBlockImport; use edgeware_primitives::Block; use edgeware_runtime::RuntimeApi; use sc_service::{ - config::{Role, Configuration}, error::{Error as ServiceError}, + config::{Configuration}, error::{Error as ServiceError}, RpcHandlers, TaskManager, }; use sp_inherents::InherentDataProviders; use sc_network::{Event, NetworkService}; use sp_runtime::traits::Block as BlockT; use futures::prelude::*; -use sc_client_api::{ExecutorProvider, RemoteBackend}; -use sp_core::traits::BareCryptoStorePtr; use edgeware_executor::Executor; type FullClient = sc_service::TFullClient; @@ -67,26 +68,21 @@ pub fn new_partial(config: &Configuration) -> Result, sc_transaction_pool::FullPool, ( - impl Fn( - edgeware_rpc::DenyUnsafe, - sc_rpc::SubscriptionTaskExecutor - ) -> edgeware_rpc::IoHandler, - ( - sc_consensus_aura::AuraBlockImport< + sc_consensus_aura::AuraBlockImport< + Block, + FullClient, + FrontierBlockImport< Block, - FullClient, FullGrandpaBlockImport, - sp_consensus_aura::ed25519::AuthorityPair + FullClient >, - sc_finality_grandpa::LinkHalf, - ), - ( - sc_finality_grandpa::SharedVoterState, - Arc>, - ), + sp_consensus_aura::ed25519::AuthorityPair + >, + sc_finality_grandpa::LinkHalf, + PendingTransactions, ) >, ServiceError> { - let (client, backend, keystore, task_manager) = + let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::(&config)?; let client = Arc::new(client); @@ -99,15 +95,24 @@ pub fn new_partial(config: &Configuration) -> Result), select_chain.clone(), )?; + let frontier_block_import = FrontierBlockImport::new( + grandpa_block_import.clone(), + client.clone(), + true + ); + let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, sp_consensus_aura::ed25519::AuthorityPair>::new( - grandpa_block_import.clone(), + frontier_block_import, client.clone() ); @@ -117,7 +122,6 @@ pub fn new_partial(config: &Configuration) -> Result Result, sp_consensus_aura::ed25519::AuthorityPair >, &sc_finality_grandpa::LinkHalf, ), ) -> Result { let sc_service::PartialComponents { - client, backend, mut task_manager, import_queue, keystore, select_chain, transaction_pool, - inherent_data_providers, - other: (rpc_extensions_builder, import_setup, rpc_setup), + client, backend, mut task_manager, import_queue, keystore_container, + select_chain, transaction_pool, inherent_data_providers, + other: (block_import, grandpa_link, pending_transactions), } = new_partial(&config)?; - let finality_proof_provider = - GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); + config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config()); let (network, network_status_sinks, system_rpc_tx, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { @@ -201,8 +171,6 @@ pub fn new_full_base( import_queue, on_demand: None, block_announce_validator_builder: None, - finality_proof_request_builder: None, - finality_proof_provider: Some(finality_proof_provider.clone()), })?; if config.offchain_worker.enabled { @@ -218,11 +186,53 @@ pub fn new_full_base( let prometheus_registry = config.prometheus_registry().cloned(); let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default(); + let (rpc_extensions_builder, rpc_setup) = { + let justification_stream = grandpa_link.justification_stream(); + let shared_authority_set = grandpa_link.shared_authority_set().clone(); + let shared_voter_state = sc_finality_grandpa::SharedVoterState::empty(); + let finality_proof_provider = + GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); + + let rpc_setup = (shared_voter_state.clone(), finality_proof_provider.clone()); + let client = client.clone(); + let pool = transaction_pool.clone(); + let select_chain = select_chain.clone(); + let network = network.clone(); + let pending = pending_transactions.clone(); + let is_authority = config.role.clone().is_authority(); + let _keystore = keystore_container.sync_keystore(); + let subscription_executor = sc_rpc::SubscriptionTaskExecutor::new(task_manager.spawn_handle()); + + let rpc_extensions_builder = move |deny_unsafe, _| { + let deps = edgeware_rpc::FullDeps { + client: client.clone(), + pool: pool.clone(), + select_chain: select_chain.clone(), + network: network.clone(), + pending_transactions: pending.clone(), + is_authority, + enable_dev_signer, + deny_unsafe, + grandpa: edgeware_rpc::GrandpaDeps { + shared_voter_state: shared_voter_state.clone(), + shared_authority_set: shared_authority_set.clone(), + justification_stream: justification_stream.clone(), + subscription_executor: subscription_executor.clone(), + finality_provider: finality_proof_provider.clone(), + }, + }; + + edgeware_rpc::create_full(deps, subscription_executor.clone()) + }; + + (rpc_extensions_builder, rpc_setup) + }; + sc_service::spawn_tasks(sc_service::SpawnTasksParams { config, backend: backend.clone(), client: client.clone(), - keystore: keystore.clone(), + keystore: keystore_container.sync_keystore(), network: network.clone(), rpc_extensions_builder: Box::new(rpc_extensions_builder), transaction_pool: transaction_pool.clone(), @@ -234,13 +244,55 @@ pub fn new_full_base( system_rpc_tx, })?; - let (block_import, grandpa_link) = import_setup; + // Spawn Frontier pending transactions maintenance task (as essential, otherwise we leak). + if pending_transactions.is_some() { + use futures::StreamExt; + use fp_consensus::{FRONTIER_ENGINE_ID, ConsensusLog}; + use sp_runtime::generic::OpaqueDigestItemId; + + const TRANSACTION_RETAIN_THRESHOLD: u64 = 5; + task_manager.spawn_essential_handle().spawn( + "frontier-pending-transactions", + client.import_notification_stream().for_each(move |notification| { + + if let Ok(locked) = &mut pending_transactions.clone().unwrap().lock() { + // As pending transactions have a finite lifespan anyway + // we can ignore MultiplePostRuntimeLogs error checks. + let mut frontier_log: Option<_> = None; + for log in notification.header.digest.logs { + let log = log.try_to::(OpaqueDigestItemId::Consensus(&FRONTIER_ENGINE_ID)); + if let Some(log) = log { + frontier_log = Some(log); + } + } + + let imported_number: u64 = notification.header.number as u64; + + if let Some(ConsensusLog::EndBlock { + block_hash: _, transaction_hashes, + }) = frontier_log { + // Retain all pending transactions that were not + // processed in the current block. + locked.retain(|&k, _| !transaction_hashes.contains(&k)); + } + locked.retain(|_, v| { + // Drop all the transactions that exceeded the given lifespan. + let lifespan_limit = v.at_block + TRANSACTION_RETAIN_THRESHOLD; + lifespan_limit > imported_number + }); + } + futures::future::ready(()) + }) + ); + } + let (shared_voter_state, _finality_proof_provider) = rpc_setup; (with_startup_data)(&block_import, &grandpa_link); if let sc_service::config::Role::Authority { .. } = &role { let proposer = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), client.clone(), transaction_pool.clone(), prometheus_registry.as_ref(), @@ -249,7 +301,8 @@ pub fn new_full_base( let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, sp_consensus_aura::ed25519::AuthorityPair, _, _, _>( + let backoff_authoring_blocks: Option<()> = None; + let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, sp_consensus_aura::ed25519::AuthorityPair, _, _, _, _>( sc_consensus_aura::slot_duration(&*client)?, client.clone(), select_chain, @@ -258,7 +311,8 @@ pub fn new_full_base( network.clone(), inherent_data_providers.clone(), force_authoring, - keystore.clone(), + backoff_authoring_blocks, + keystore_container.sync_keystore(), can_author_with, )?; @@ -268,42 +322,30 @@ pub fn new_full_base( } // Spawn authority discovery module. - if matches!(role, Role::Authority{..} | Role::Sentry {..}) { - let (sentries, authority_discovery_role) = match role { - sc_service::config::Role::Authority { ref sentry_nodes } => ( - sentry_nodes.clone(), - sc_authority_discovery::Role::Authority ( - keystore.clone(), - ), - ), - sc_service::config::Role::Sentry {..} => ( - vec![], - sc_authority_discovery::Role::Sentry, - ), - _ => unreachable!("Due to outer matches! constraint; qed.") - }; - + if role.is_authority() { + let authority_discovery_role = sc_authority_discovery::Role::PublishAndDiscover( + keystore_container.keystore(), + ); let dht_event_stream = network.event_stream("authority-discovery") .filter_map(|e| async move { match e { Event::Dht(e) => Some(e), _ => None, - }}).boxed(); + }}); let (authority_discovery_worker, _service) = sc_authority_discovery::new_worker_and_service( client.clone(), network.clone(), - sentries, - dht_event_stream, + Box::pin(dht_event_stream), authority_discovery_role, prometheus_registry.clone(), ); - task_manager.spawn_handle().spawn("authority-discovery-worker", authority_discovery_worker); + task_manager.spawn_handle().spawn("authority-discovery-worker", authority_discovery_worker.run()); } // if the node isn't actively participating in consensus then it doesn't // need a keystore, regardless of which protocol we use below. let keystore = if role.is_authority() { - Some(keystore as BareCryptoStorePtr) + Some(keystore_container.sync_keystore()) } else { None }; @@ -329,7 +371,6 @@ pub fn new_full_base( config, link: grandpa_link, network: network.clone(), - inherent_data_providers: inherent_data_providers.clone(), telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), prometheus_registry, @@ -342,12 +383,6 @@ pub fn new_full_base( "grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)? ); - } else { - sc_finality_grandpa::setup_disabled_grandpa( - client.clone(), - &inherent_data_providers, - network.clone(), - )?; } network_starter.start_network(); @@ -367,9 +402,9 @@ pub struct NewFullBase { } /// Builds a new service for a full client. -pub fn new_full(config: Configuration) +pub fn new_full(config: Configuration, enable_dev_signer: bool) -> Result { - new_full_base(config, |_, _| ()).map(|NewFullBase { task_manager, .. }| { + new_full_base(config, enable_dev_signer, |_, _| ()).map(|NewFullBase { task_manager, .. }| { task_manager }) } @@ -379,9 +414,11 @@ pub fn new_light_base(config: Configuration) -> Result<( Arc::Hash>>, Arc>> ), ServiceError> { - let (client, backend, keystore, mut task_manager, on_demand) = + let (client, backend, keystore_container, mut task_manager, on_demand) = sc_service::new_light_parts::(&config)?; + let select_chain = sc_consensus::LongestChain::new(backend.clone()); + let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( config.transaction_pool.clone(), config.prometheus_registry(), @@ -390,20 +427,21 @@ pub fn new_light_base(config: Configuration) -> Result<( on_demand.clone(), )); - let grandpa_block_import = sc_finality_grandpa::light_block_import( - client.clone(), backend.clone(), &(client.clone() as Arc<_>), - Arc::new(on_demand.checker().clone()), + let (grandpa_block_import, _) = sc_finality_grandpa::block_import( + client.clone(), + &(client.clone() as Arc<_>), + select_chain.clone(), )?; - let finality_proof_import = grandpa_block_import.clone(); - let finality_proof_request_builder = - finality_proof_import.create_finality_proof_request_builder(); + let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, sp_consensus_aura::ed25519::AuthorityPair>::new( + grandpa_block_import.clone(), + client.clone(), + ); let import_queue = sc_consensus_aura::import_queue::<_, _, _, sp_consensus_aura::ed25519::AuthorityPair, _, _>( sc_consensus_aura::slot_duration(&*client)?, - grandpa_block_import, - None, - Some(Box::new(finality_proof_import)), + aura_block_import, + Some(Box::new(grandpa_block_import)), client.clone(), InherentDataProviders::new(), &task_manager.spawn_handle(), @@ -411,9 +449,6 @@ pub fn new_light_base(config: Configuration) -> Result<( sp_consensus::NeverCanAuthor, )?; - let finality_proof_provider = - GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); - let (network, network_status_sinks, system_rpc_tx, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, @@ -423,8 +458,6 @@ pub fn new_light_base(config: Configuration) -> Result<( import_queue, on_demand: Some(on_demand.clone()), block_announce_validator_builder: None, - finality_proof_request_builder: Some(finality_proof_request_builder), - finality_proof_provider: Some(finality_proof_provider), })?; network_starter.start_network(); @@ -450,7 +483,8 @@ pub fn new_light_base(config: Configuration) -> Result<( rpc_extensions_builder: Box::new(sc_service::NoopRpcExtensionBuilder(rpc_extensions)), client: client.clone(), transaction_pool: transaction_pool.clone(), - config, keystore, backend, network_status_sinks, system_rpc_tx, + keystore: keystore_container.sync_keystore(), + config, backend, network_status_sinks, system_rpc_tx, network: network.clone(), telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(), task_manager: &mut task_manager, diff --git a/node/executor/Cargo.toml b/node/executor/Cargo.toml index fc8e5e35..c3c8cbee 100644 --- a/node/executor/Cargo.toml +++ b/node/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-executor" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] description = "Edgeware implementation using a substrate node." edition = "2018" @@ -12,33 +12,32 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] trie-root = "0.16.0" codec = { package = "parity-scale-codec", version = "1.3.0" } -sp-io = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-state-machine = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-executor = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-trie = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-benchmarking = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +sp-io = { version = "2.0"} +sp-state-machine = { version = "0.8"} +sc-executor = { version = "0.8"} +sp-core = { version = "2.0"} +sp-trie = { version = "2.0"} +frame-benchmarking = { version = "2.0"} -edgeware-primitives = { version = "3.1.0", path = "../primitives" } -edgeware-runtime = { version = "3.1.0", path = "../runtime" } -edgeware-runtime-interface = { version = "3.1.0", path = "../runtime-interface" } +edgeware-primitives = { version = "3.2.0", path = "../primitives" } +edgeware-runtime = { version = "3.2.0", path = "../runtime" } +edgeware-runtime-interface = { version = "3.2.0", path = "../runtime-interface" } [dev-dependencies] -test-client = { package = "substrate-test-client", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-support = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-balances = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-transaction-payment = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-session = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-timestamp = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-treasury = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-grandpa = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-indices = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +sp-runtime = { version = "2.0"} +frame-support = { version = "2.0"} +pallet-balances = { version = "2.0"} +pallet-transaction-payment = { version = "2.0"} +pallet-session = { version = "2.0"} +frame-system = { version = "2.0"} +pallet-timestamp = { version = "2.0"} +pallet-treasury = { version = "2.0"} +pallet-grandpa = { version = "2.0"} +pallet-indices = { version = "2.0"} wabt = "0.10.0" criterion = "0.3.0" -edgeware-testing = { version = "3.1.0", path = "../testing" } +edgeware-testing = { version = "3.2.0", path = "../testing" } [features] wasmtime = [ diff --git a/node/inspect/Cargo.toml b/node/inspect/Cargo.toml deleted file mode 100644 index ee760d3c..00000000 --- a/node/inspect/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "edgeware-inspect" -version = "3.1.0" -authors = ["Commonwealth Labs "] -edition = "2018" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" -description = "Edgeware runtime inspect utils" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[dependencies] -codec = { package = "parity-scale-codec", version = "1.3.4" } -derive_more = "0.99" -log = "0.4.8" -sc-cli = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-client-api = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-service = { version = "0.8.0", default-features = false, git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-blockchain = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -structopt = "0.3.8" diff --git a/node/inspect/src/cli.rs b/node/inspect/src/cli.rs deleted file mode 100644 index ff6b6987..00000000 --- a/node/inspect/src/cli.rs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2018-2020 Commonwealth Labs, Inc. -// This file is part of Edgeware. - -// Edgeware is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Edgeware is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . - -//! Structs to easily compose inspect sub-command for CLI. - -use std::fmt::Debug; -use sc_cli::{ImportParams, SharedParams}; -use structopt::StructOpt; - -/// The `inspect` command used to print decoded chain data. -#[derive(Debug, StructOpt)] -pub struct InspectCmd { - #[allow(missing_docs)] - #[structopt(flatten)] - pub command: InspectSubCmd, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub import_params: ImportParams, -} - -/// A possible inspect sub-commands. -#[derive(Debug, StructOpt)] -pub enum InspectSubCmd { - /// Decode block with native version of runtime and print out the details. - Block { - /// Address of the block to print out. - /// - /// Can be either a block hash (no 0x prefix) or a number to retrieve existing block, - /// or a 0x-prefixed bytes hex string, representing SCALE encoding of - /// a block. - #[structopt(value_name = "HASH or NUMBER or BYTES")] - input: String, - }, - /// Decode extrinsic with native version of runtime and print out the details. - Extrinsic { - /// Address of an extrinsic to print out. - /// - /// Can be either a block hash (no 0x prefix) or number and the index, in the form - /// of `{block}:{index}` or a 0x-prefixed bytes hex string, - /// representing SCALE encoding of an extrinsic. - #[structopt(value_name = "BLOCK:INDEX or BYTES")] - input: String, - }, -} diff --git a/node/inspect/src/command.rs b/node/inspect/src/command.rs deleted file mode 100644 index 19a0a0b9..00000000 --- a/node/inspect/src/command.rs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2018-2020 Commonwealth Labs, Inc. -// This file is part of Edgeware. - -// Edgeware is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Edgeware is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . - -//! Command ran by the CLI - -use crate::cli::{InspectCmd, InspectSubCmd}; -use crate::Inspector; -use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams}; -use sc_service::{new_full_client, Configuration, NativeExecutionDispatch}; -use sp_runtime::traits::Block; -use std::str::FromStr; - -impl InspectCmd { - /// Run the inspect command, passing the inspector. - pub fn run(&self, config: Configuration) -> Result<()> - where - B: Block, - B::Hash: FromStr, - RA: Send + Sync + 'static, - EX: NativeExecutionDispatch + 'static, - { - let client = new_full_client::(&config)?; - let inspect = Inspector::::new(client); - - match &self.command { - InspectSubCmd::Block { input } => { - let input = input.parse()?; - let res = inspect.block(input).map_err(|e| format!("{}", e))?; - println!("{}", res); - Ok(()) - } - InspectSubCmd::Extrinsic { input } => { - let input = input.parse()?; - let res = inspect.extrinsic(input).map_err(|e| format!("{}", e))?; - println!("{}", res); - Ok(()) - } - } - } -} - -impl CliConfiguration for InspectCmd { - fn shared_params(&self) -> &SharedParams { - &self.shared_params - } - - fn import_params(&self) -> Option<&ImportParams> { - Some(&self.import_params) - } -} diff --git a/node/inspect/src/lib.rs b/node/inspect/src/lib.rs deleted file mode 100644 index f3cfb43b..00000000 --- a/node/inspect/src/lib.rs +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright 2018-2020 Commonwealth Labs, Inc. -// This file is part of Edgeware. - -// Edgeware is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Edgeware is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . - -//! A CLI extension for substrate node, adding sub-command to pretty print debug info -//! about blocks and extrinsics. -//! -//! The blocks and extrinsics can either be retrieved from the database (on-chain), -//! or a raw SCALE-encoding can be provided. - -#![warn(missing_docs)] - -pub mod cli; -pub mod command; - -use std::{ - fmt, - fmt::Debug, - marker::PhantomData, - str::FromStr, -}; -use codec::{Encode, Decode}; -use sc_client_api::BlockBackend; -use sp_blockchain::HeaderBackend; -use sp_core::hexdisplay::HexDisplay; -use sp_runtime::{ - generic::BlockId, - traits::{Block, HashFor, NumberFor, Hash} -}; - -/// A helper type for a generic block input. -pub type BlockAddressFor = BlockAddress< - as Hash>::Output, - NumberFor ->; - -/// A Pretty formatter implementation. -pub trait PrettyPrinter { - /// Nicely format block. - fn fmt_block(&self, fmt: &mut fmt::Formatter, block: &TBlock) -> fmt::Result; - /// Nicely format extrinsic. - fn fmt_extrinsic(&self, fmt: &mut fmt::Formatter, extrinsic: &TBlock::Extrinsic) -> fmt::Result; -} - -/// Default dummy debug printer. -#[derive(Default)] -pub struct DebugPrinter; -impl PrettyPrinter for DebugPrinter { - fn fmt_block(&self, fmt: &mut fmt::Formatter, block: &TBlock) -> fmt::Result { - writeln!(fmt, "Header:")?; - writeln!(fmt, "{:?}", block.header())?; - writeln!(fmt, "Block bytes: {:?}", HexDisplay::from(&block.encode()))?; - writeln!(fmt, "Extrinsics ({})", block.extrinsics().len())?; - for (idx, ex) in block.extrinsics().iter().enumerate() { - writeln!(fmt, "- {}:", idx)?; - >::fmt_extrinsic(self, fmt, ex)?; - } - Ok(()) - } - - fn fmt_extrinsic(&self, fmt: &mut fmt::Formatter, extrinsic: &TBlock::Extrinsic) -> fmt::Result { - writeln!(fmt, " {:?}", extrinsic)?; - writeln!(fmt, " Bytes: {:?}", HexDisplay::from(&extrinsic.encode()))?; - Ok(()) - } -} - -/// Aggregated error for `Inspector` operations. -#[derive(Debug, derive_more::From, derive_more::Display)] -pub enum Error { - /// Could not decode Block or Extrinsic. - Codec(codec::Error), - /// Error accessing blockchain DB. - Blockchain(sp_blockchain::Error), - /// Given block has not been found. - NotFound(String), -} - -impl std::error::Error for Error { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - match *self { - Self::Codec(ref e) => Some(e), - Self::Blockchain(ref e) => Some(e), - Self::NotFound(_) => None, - } - } -} - -/// A helper trait to access block headers and bodies. -pub trait ChainAccess: - HeaderBackend + - BlockBackend -{} - -impl ChainAccess for T where - TBlock: Block, - T: sp_blockchain::HeaderBackend + sc_client_api::BlockBackend, -{} - -/// Blockchain inspector. -pub struct Inspector = DebugPrinter> { - printer: TPrinter, - chain: Box>, - _block: PhantomData, -} - -impl> Inspector { - /// Create new instance of the inspector with default printer. - pub fn new( - chain: impl ChainAccess + 'static, - ) -> Self where TPrinter: Default { - Self::with_printer(chain, Default::default()) - } - - /// Customize pretty-printing of the data. - pub fn with_printer( - chain: impl ChainAccess + 'static, - printer: TPrinter, - ) -> Self { - Inspector { - chain: Box::new(chain) as _, - printer, - _block: Default::default(), - } - } - - /// Get a pretty-printed block. - pub fn block(&self, input: BlockAddressFor) -> Result { - struct BlockPrinter<'a, A, B>(A, &'a B); - impl<'a, A: Block, B: PrettyPrinter> fmt::Display for BlockPrinter<'a, A, B> { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - self.1.fmt_block(fmt, &self.0) - } - } - - let block = self.get_block(input)?; - Ok(format!("{}", BlockPrinter(block, &self.printer))) - } - - fn get_block(&self, input: BlockAddressFor) -> Result { - Ok(match input { - BlockAddress::Bytes(bytes) => { - TBlock::decode(&mut &*bytes)? - }, - BlockAddress::Number(number) => { - let id = BlockId::number(number); - let not_found = format!("Could not find block {:?}", id); - let body = self.chain.block_body(&id)? - .ok_or_else(|| Error::NotFound(not_found.clone()))?; - let header = self.chain.header(id)? - .ok_or_else(|| Error::NotFound(not_found.clone()))?; - TBlock::new(header, body) - }, - BlockAddress::Hash(hash) => { - let id = BlockId::hash(hash); - let not_found = format!("Could not find block {:?}", id); - let body = self.chain.block_body(&id)? - .ok_or_else(|| Error::NotFound(not_found.clone()))?; - let header = self.chain.header(id)? - .ok_or_else(|| Error::NotFound(not_found.clone()))?; - TBlock::new(header, body) - }, - }) - } - - /// Get a pretty-printed extrinsic. - pub fn extrinsic( - &self, - input: ExtrinsicAddress< as Hash>::Output, NumberFor>, - ) -> Result { - struct ExtrinsicPrinter<'a, A: Block, B>(A::Extrinsic, &'a B); - impl<'a, A: Block, B: PrettyPrinter> fmt::Display for ExtrinsicPrinter<'a, A, B> { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - self.1.fmt_extrinsic(fmt, &self.0) - } - } - - let ext = match input { - ExtrinsicAddress::Block(block, index) => { - let block = self.get_block(block)?; - block.extrinsics() - .get(index) - .cloned() - .ok_or_else(|| Error::NotFound(format!( - "Could not find extrinsic {} in block {:?}", index, block - )))? - }, - ExtrinsicAddress::Bytes(bytes) => { - TBlock::Extrinsic::decode(&mut &*bytes)? - } - }; - - Ok(format!("{}", ExtrinsicPrinter(ext, &self.printer))) - } -} - -/// A block to retrieve. -#[derive(Debug, Clone, PartialEq)] -pub enum BlockAddress { - /// Get block by hash. - Hash(Hash), - /// Get block by number. - Number(Number), - /// Raw SCALE-encoded bytes. - Bytes(Vec), -} - -impl FromStr for BlockAddress { - type Err = String; - - fn from_str(s: &str) -> Result { - // try to parse hash first - if let Ok(hash) = s.parse() { - return Ok(Self::Hash(hash)) - } - - // then number - if let Ok(number) = s.parse() { - return Ok(Self::Number(number)) - } - - // then assume it's bytes (hex-encoded) - sp_core::bytes::from_hex(s) - .map(Self::Bytes) - .map_err(|e| format!( - "Given string does not look like hash or number. It could not be parsed as bytes either: {}", - e - )) - } -} - -/// An extrinsic address to decode and print out. -#[derive(Debug, Clone, PartialEq)] -pub enum ExtrinsicAddress { - /// Extrinsic as part of existing block. - Block(BlockAddress, usize), - /// Raw SCALE-encoded extrinsic bytes. - Bytes(Vec), -} - -impl FromStr for ExtrinsicAddress { - type Err = String; - - fn from_str(s: &str) -> Result { - // first try raw bytes - if let Ok(bytes) = sp_core::bytes::from_hex(s).map(Self::Bytes) { - return Ok(bytes) - } - - // split by a bunch of different characters - let mut it = s.split(|c| c == '.' || c == ':' || c == ' '); - let block = it.next() - .expect("First element of split iterator is never empty; qed") - .parse()?; - - let index = it.next() - .ok_or_else(|| format!("Extrinsic index missing: example \"5:0\""))? - .parse() - .map_err(|e| format!("Invalid index format: {}", e))?; - - Ok(Self::Block(block, index)) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use sp_core::hash::H160 as Hash; - - #[test] - fn should_parse_block_strings() { - type BlockAddress = super::BlockAddress; - - let b0 = BlockAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258"); - let b1 = BlockAddress::from_str("1234"); - let b2 = BlockAddress::from_str("0"); - let b3 = BlockAddress::from_str("0x0012345f"); - - - assert_eq!(b0, Ok(BlockAddress::Hash( - "3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap() - ))); - assert_eq!(b1, Ok(BlockAddress::Number(1234))); - assert_eq!(b2, Ok(BlockAddress::Number(0))); - assert_eq!(b3, Ok(BlockAddress::Bytes(vec![0, 0x12, 0x34, 0x5f]))); - } - - #[test] - fn should_parse_extrinsic_address() { - type BlockAddress = super::BlockAddress; - type ExtrinsicAddress = super::ExtrinsicAddress; - - let e0 = ExtrinsicAddress::from_str("1234"); - let b0 = ExtrinsicAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258:5"); - let b1 = ExtrinsicAddress::from_str("1234:0"); - let b2 = ExtrinsicAddress::from_str("0 0"); - let b3 = ExtrinsicAddress::from_str("0x0012345f"); - - - assert_eq!(e0, Err("Extrinsic index missing: example \"5:0\"".into())); - assert_eq!(b0, Ok(ExtrinsicAddress::Block( - BlockAddress::Hash("3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()), - 5 - ))); - assert_eq!(b1, Ok(ExtrinsicAddress::Block( - BlockAddress::Number(1234), - 0 - ))); - assert_eq!(b2, Ok(ExtrinsicAddress::Block( - BlockAddress::Number(0), - 0 - ))); - assert_eq!(b3, Ok(ExtrinsicAddress::Bytes(vec![0, 0x12, 0x34, 0x5f]))); - } -} diff --git a/node/primitives/Cargo.toml b/node/primitives/Cargo.toml index 055bb96d..b324cd8e 100644 --- a/node/primitives/Cargo.toml +++ b/node/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-primitives" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] edition = "2018" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,13 +11,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-application-crypto = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } +frame-system = { version = "2.0", default-features = false } +sp-application-crypto = { version = "2.0", default-features = false } +sp-core = { version = "2.0", default-features = false } +sp-runtime = { version = "2.0", default-features = false } [dev-dependencies] -sp-serializer = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +sp-serializer = { version = "2.0" } pretty_assertions = "0.6.1" [features] diff --git a/node/rpc-client/Cargo.toml b/node/rpc-client/Cargo.toml index 48008a1b..45ac351f 100644 --- a/node/rpc-client/Cargo.toml +++ b/node/rpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-rpc-client" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] edition = "2018" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -14,6 +14,7 @@ futures = "0.1.29" hyper = "0.12.35" jsonrpc-core-client = { version = "15.0.0", default-features = false, features = ["http"] } log = "0.4.8" -edgeware-primitives = { version = "3.1.0", path = "../primitives" } -sp-tracing = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master"} -sc-rpc = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master"} \ No newline at end of file +edgeware-primitives = { path = "../primitives" } +sp-tracing = { version = "2.0" } +sc-rpc = { version = "2.0" } + diff --git a/node/rpc/Cargo.toml b/node/rpc/Cargo.toml index 77544aa0..c5790496 100644 --- a/node/rpc/Cargo.toml +++ b/node/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-rpc" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] edition = "2018" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,24 +11,29 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] jsonrpc-core = "15.0.0" -edgeware-primitives = { version = "3.1.0", path = "../primitives" } -edgeware-runtime = { version = "3.1.0", path = "../runtime" } -pallet-contracts-rpc = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-transaction-payment-rpc = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-client-api = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-consensus-babe = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-consensus-babe-rpc = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-consensus-epochs = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-finality-grandpa = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-finality-grandpa-rpc = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-keystore = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-rpc-api = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-rpc = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-api = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-block-builder = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-blockchain = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-consensus = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-consensus-babe = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-transaction-pool = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -substrate-frame-rpc-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +jsonrpc-pubsub = "15.0.0" +edgeware-primitives = { path = "../primitives" } +edgeware-runtime = { path = "../runtime" } +pallet-contracts-rpc = { version = "0.8" } +pallet-transaction-payment-rpc = { version = "2.0" } +sc-client-api = { version = "2.0" } +sc-consensus-aura = { version = "0.8" } +sc-consensus-epochs = { version = "0.8" } +sc-finality-grandpa = { version = "0.8" } +sc-finality-grandpa-rpc = { version = "0.8" } +sc-keystore = { version = "2.0" } +sc-network = { version = "0.8" } +sc-rpc-api = { version = "0.8" } +sc-rpc = { version = "2.0" } +sp-api = { version = "2.0" } +sp-block-builder = { version = "2.0" } +sp-blockchain = { version = "2.0" } +sp-consensus = { version = "0.8" } +sp-consensus-aura = { version = "0.8" } +sp-runtime = { version = "2.0" } +sp-transaction-pool = { version = "2.0" } +substrate-frame-rpc-system = { version = "2.0" } +pallet-ethereum = { version = "0.1" } +fc-rpc = { version = "0.1", features = ["rpc_binary_search_estimate"] } +fp-rpc = { version = "0.1" } +fc-rpc-core = { version = "0.1" } diff --git a/node/rpc/src/lib.rs b/node/rpc/src/lib.rs index 7df12da6..785a7aa4 100644 --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -30,18 +30,25 @@ #![warn(missing_docs)] use std::{sync::Arc}; +use fc_rpc_core::types::PendingTransactions; use edgeware_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index}; +use jsonrpc_pubsub::manager::SubscriptionManager; use sc_finality_grandpa::{ SharedVoterState, SharedAuthoritySet, FinalityProofProvider, GrandpaJustificationStream }; use sc_finality_grandpa_rpc::GrandpaRpcHandler; +use sp_transaction_pool::TransactionPool; pub use sc_rpc_api::DenyUnsafe; +use sc_network::NetworkService; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend}; use sp_consensus::SelectChain; +use sc_client_api::{ + backend::{StorageProvider, AuxStore}, + client::BlockchainEvents, +}; use sc_rpc::SubscriptionTaskExecutor; -use sp_transaction_pool::TransactionPool; /// Public io handler for exporting into other modules pub type IoHandler = jsonrpc_core::IoHandler; @@ -80,6 +87,14 @@ pub struct FullDeps { pub pool: Arc

, /// 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>, + /// Ethereum pending transactions. + pub pending_transactions: PendingTransactions, /// Whether to deny unsafe calls pub deny_unsafe: DenyUnsafe, /// GRANDPA specific dependencies. @@ -90,15 +105,19 @@ pub struct FullDeps { /// Instantiate all Full RPC extensions. pub fn create_full( deps: FullDeps, + subscription_task_executor: SubscriptionTaskExecutor, ) -> jsonrpc_core::IoHandler where - C: ProvideRuntimeApi, + C: ProvideRuntimeApi + StorageProvider + AuxStore, C: HeaderBackend + HeaderMetadata + 'static, C: Send + Sync + 'static, + C: BlockchainEvents, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_contracts_rpc::ContractsRuntimeApi, + C::Api: BlockBuilder, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: fp_rpc::EthereumRuntimeRPCApi, C::Api: BlockBuilder, - P: TransactionPool + 'static, + P: TransactionPool + 'static, SC: SelectChain +'static, B: sc_client_api::Backend + Send + Sync + 'static, B::State: sc_client_api::backend::StateBackend>, @@ -106,12 +125,20 @@ pub fn create_full( use substrate_frame_rpc_system::{FullSystem, SystemApi}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; use pallet_contracts_rpc::{Contracts, ContractsApi}; + use fc_rpc::{ + EthApi, EthApiServer, NetApi, NetApiServer, EthPubSubApiServer, EthPubSubApi, + EthDevSigner, EthSigner, HexEncodedIdProvider, + }; let mut io = jsonrpc_core::IoHandler::default(); let FullDeps { client, pool, select_chain: _, + enable_dev_signer, + is_authority, + network, + pending_transactions, deny_unsafe, grandpa, } = deps; @@ -124,7 +151,7 @@ pub fn create_full( } = grandpa; io.extend_with( - SystemApi::to_delegate(FullSystem::new(client.clone(), pool, deny_unsafe)) + SystemApi::to_delegate(FullSystem::new(client.clone(), pool.clone(), deny_unsafe)) ); // Making synchronous calls in light client freezes the browser currently, // more context: https://github.com/paritytech/substrate/pull/3480 @@ -136,6 +163,38 @@ pub fn create_full( TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone())) ); + let mut signers = Vec::new(); + if enable_dev_signer { + signers.push(Box::new(EthDevSigner::new()) as Box); + } + io.extend_with( + EthApiServer::to_delegate(EthApi::new( + client.clone(), + pool.clone(), + edgeware_runtime::TransactionConverter, + network.clone(), + pending_transactions.clone(), + signers, + is_authority, + )) + ); + io.extend_with( + NetApiServer::to_delegate(NetApi::new( + client.clone(), + network.clone(), + )) + ); + io.extend_with( + EthPubSubApiServer::to_delegate(EthPubSubApi::new( + pool.clone(), + client.clone(), + network.clone(), + SubscriptionManager::::with_id_provider( + HexEncodedIdProvider::default(), + Arc::new(subscription_task_executor) + ), + )) + ); io.extend_with( sc_finality_grandpa_rpc::GrandpaApi::to_delegate( GrandpaRpcHandler::new( diff --git a/node/runtime-interface/Cargo.toml b/node/runtime-interface/Cargo.toml index 44321add..4aaebef1 100644 --- a/node/runtime-interface/Cargo.toml +++ b/node/runtime-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-runtime-interface" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] description = "Edgeware runtime interface helpers and functions" edition = "2018" @@ -11,10 +11,10 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "1.3.0" } -sp-runtime = { git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-runtime-interface = { git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-runtime-interface-proc-macro = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -edgeware-primitives = { version = "3.1.0", path = "../primitives" } +sp-runtime = { version = "2.0" } +sp-runtime-interface = { version = "2.0" } +sp-runtime-interface-proc-macro = { version = "2.0" } +edgeware-primitives = { path = "../primitives" } [features] default = [ "std" ] diff --git a/node/runtime/Cargo.toml b/node/runtime/Cargo.toml index 4559a0e5..4ef33331 100644 --- a/node/runtime/Cargo.toml +++ b/node/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-runtime" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] edition = "2018" build = "build.rs" @@ -23,81 +23,94 @@ safe-mix = { version = "1.0", default-features = false } rustc-hex = { version = "2.0", optional = true } serde = { version = "1.0.102", optional = true } static_assertions = "1.1.0" +evm-runtime = { version = "0.21.0", default-features = false } # primitives -sp-application-crypto = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-authority-discovery = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-consensus-aura = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-block-builder = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false} -sp-inherents = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-std = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-api = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-staking = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-keyring = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", optional = true } -sp-session = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-transaction-pool = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-version = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -sp-offchain = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } +sp-application-crypto = { version = "2.0", default-features = false } +sp-authority-discovery = { version = "2.0", default-features = false } +sp-consensus-aura = { version = "0.8", default-features = false } +sp-block-builder = { version = "2.0", default-features = false} +sp-inherents = { version = "2.0", default-features = false } +sp-core = { version = "2.0", default-features = false } +sp-io = { version = "2.0", default-features = false } +sp-std = { version = "2.0", default-features = false } +sp-api = { version = "2.0", default-features = false } +sp-runtime = { version = "2.0", default-features = false } +sp-staking = { version = "2.0", default-features = false } +sp-keyring = { version = "2.0", optional = true } +sp-session = { version = "2.0", default-features = false } +sp-transaction-pool = { version = "2.0", default-features = false } +sp-version = { version = "2.0", default-features = false } +sp-offchain = { version = "2.0", default-features = false } # edgeware primitives -edgeware-primitives = { version = "3.1.0", path = "../primitives", default-features = false } +edgeware-primitives = { version = "3.2.0", path = "../primitives", default-features = false } # pallet dependencies -pallet-assets = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-authority-discovery = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-authorship = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-aura = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-balances = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-collective = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-contracts = { default-features = false, version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-contracts-primitives = { default-features = false, version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-contracts-rpc-runtime-api = { default-features = false, version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-democracy = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-elections-phragmen = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-executive = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-finality-tracker = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-grandpa = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-identity = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-im-online = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-indices = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-multisig = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-offences = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-proxy = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-randomness-collective-flip = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-recovery = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-scheduler = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-session = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false, features = ["historical"] } -pallet-staking = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-staking-reward-curve = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-sudo = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-support = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-timestamp = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-treasury = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-utility = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-transaction-payment = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } -pallet-vesting = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", default-features = false } +pallet-authority-discovery = { version = "2.0", default-features = false } +pallet-authorship = { version = "2.0", default-features = false } +pallet-aura = { version = "2.0", default-features = false } +pallet-balances = { version = "2.0", default-features = false } +pallet-collective = { version = "2.0", default-features = false, features = ["runtime-benchmarks"] } +pallet-contracts = { default-features = false, version = "2.0" } +pallet-contracts-primitives = { default-features = false, version = "2.0" } +pallet-contracts-rpc-runtime-api = { default-features = false, version = "0.8" } +pallet-democracy = { version = "2.0", default-features = false } +pallet-elections-phragmen = { version = "2.0", default-features = false } +frame-executive = { version = "2.0", default-features = false } +pallet-grandpa = { version = "2.0", default-features = false } +pallet-identity = { version = "2.0", default-features = false } +pallet-im-online = { version = "2.0", default-features = false } +pallet-indices = { version = "2.0", default-features = false } +pallet-multisig = { version = "2.0", default-features = false } +pallet-offences = { version = "2.0", default-features = false } +pallet-proxy = { version = "2.0", default-features = false } +pallet-randomness-collective-flip = { version = "2.0", default-features = false } +pallet-recovery = { version = "2.0", default-features = false } +pallet-scheduler = { version = "2.0", default-features = false } +pallet-session = { version = "2.0", default-features = false, features = ["historical"] } +pallet-staking = { version = "2.0", default-features = false } +pallet-staking-reward-curve = { version = "2.0" } +pallet-sudo = { version = "2.0", default-features = false } +frame-support = { version = "2.0", default-features = false } +frame-system = { version = "2.0", default-features = false } +frame-system-rpc-runtime-api = { version = "2.0", default-features = false } +pallet-timestamp = { version = "2.0", default-features = false } +pallet-treasury = { version = "2.0", default-features = false } +pallet-tips = { version = "2.0", default-features = false } +pallet-bounties = { version = "2.0", default-features = false } +pallet-utility = { version = "2.0", default-features = false } +pallet-transaction-payment = { version = "2.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0", default-features = false } +pallet-vesting = { version = "2.0", default-features = false } +treasury-reward = { package = "edge-treasury-reward", path = "../../modules/edge-treasury-reward", default-features = false } +edge-chainbridge = { path = "../../modules/edge-chainbridge", default-features = false } +chainbridge = { path = "../../modules/chainbridge", default-features = false } +edge-assets = { path = "../../modules/edge-assets", default-features = false } -signaling = { version = "1.0.0", package = "edge-signaling", path = "../../modules/edge-signaling", default-features = false } -treasury-reward = { version = "1.0.0", package = "edge-treasury-reward", path = "../../modules/edge-treasury-reward", default-features = false } -voting = { version = "1.0.0", package = "edge-voting", path = "../../modules/edge-voting", default-features = false } +fp-rpc = { version = "0.1", default-features = false } +pallet-ethereum = { version = "0.1", default-features = false } +pallet-evm = { version = "2.0", default-features = false } +pallet-evm-precompile-simple = { version = "2.0", default-features = false } +pallet-evm-precompile-modexp = { version = "2.0", default-features = false } +pallet-evm-precompile-ed25519 = { version = "2.0", default-features = false } + +# used for runtime benchmarking +frame-benchmarking = { version = "2.0", default-features = false, optional = true } +frame-system-benchmarking = { version = "2.0", default-features = false, optional = true } +hex-literal = { version = "0.3.1", optional = true } [build-dependencies] -wasm-builder-runner = { package = "substrate-wasm-builder-runner", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", version = "1.0.6" } +substrate-wasm-builder = { package = "substrate-wasm-builder", version = "3.0.0" } [dev-dependencies] -sp-io = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } +sp-io = { version = "2.0" } [features] default = ["std"] std = [ "sp-authority-discovery/std", - "pallet-assets/std", "pallet-authority-discovery/std", "pallet-authorship/std", "sp-consensus-aura/std", @@ -112,7 +125,6 @@ std = [ "pallet-democracy/std", "pallet-elections-phragmen/std", "frame-executive/std", - "pallet-finality-tracker/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-im-online/std", @@ -123,6 +135,7 @@ std = [ "pallet-proxy/std", "pallet-recovery/std", "sp-core/std", + "sp-io/std", "pallet-randomness-collective-flip/std", "sp-std/std", "rustc-hex", @@ -150,7 +163,26 @@ std = [ "sp-version/std", "sp-offchain/std", "edgeware-primitives/std", - "signaling/std", "treasury-reward/std", - "voting/std", + "edge-chainbridge/std", + "chainbridge/std", + "edge-assets/std", + "fp-rpc/std", + "pallet-ethereum/std", + "evm-runtime/std", + "pallet-evm-precompile-simple/std", + "pallet-evm-precompile-modexp/std", + "pallet-evm-precompile-ed25519/std", + "pallet-tips/std", + "pallet-bounties/std", ] + +runtime-benchmarks = [ + "frame-benchmarking", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "frame-system-benchmarking", + "hex-literal", + "chainbridge/runtime-benchmarks", + "edge-assets/runtime-benchmarks", +] \ No newline at end of file diff --git a/node/runtime/build.rs b/node/runtime/build.rs index fc46ed1e..c1fa7498 100644 --- a/node/runtime/build.rs +++ b/node/runtime/build.rs @@ -14,12 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Edgeware. If not, see . -use wasm_builder_runner::WasmBuilder; +use substrate_wasm_builder::WasmBuilder; fn main() { WasmBuilder::new() .with_current_project() - .with_wasm_builder_from_crates("2.0.0") .export_heap_base() .import_memory() .build() diff --git a/node/runtime/src/constants.rs b/node/runtime/src/constants.rs index 5dca7f0b..acc64ff4 100644 --- a/node/runtime/src/constants.rs +++ b/node/runtime/src/constants.rs @@ -20,6 +20,8 @@ pub mod currency { use edgeware_primitives::Balance; + pub type AssetId = u32; + pub const MILLICENTS: Balance = 10_000_000_000_000; pub const CENTS: Balance = 1_000 * MILLICENTS; // assume this is worth about a cent. pub const DOLLARS: Balance = 100 * CENTS; diff --git a/node/runtime/src/impls.rs b/node/runtime/src/impls.rs index 78f1f925..89f5095d 100644 --- a/node/runtime/src/impls.rs +++ b/node/runtime/src/impls.rs @@ -16,8 +16,6 @@ //! Some configurable implementations as associated type for the substrate runtime. -use edgeware_primitives::Balance; -use sp_runtime::traits::Convert; use frame_support::traits::{OnUnbalanced, Currency}; use crate::{Balances, Authorship, NegativeImbalance}; @@ -27,19 +25,3 @@ impl OnUnbalanced for Author { Balances::resolve_creating(&Authorship::author(), amount); } } - -/// Struct that handles the conversion of Balance -> `u64`. This is used for staking's election -/// calculation. -pub struct CurrencyToVoteHandler; - -impl CurrencyToVoteHandler { - fn factor() -> Balance { (Balances::total_issuance() / u64::max_value() as Balance).max(1) } -} - -impl Convert for CurrencyToVoteHandler { - fn convert(x: Balance) -> u64 { (x / Self::factor()) as u64 } -} - -impl Convert for CurrencyToVoteHandler { - fn convert(x: u128) -> Balance { x * Self::factor() } -} diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 95dafc7e..582ef9a5 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -20,21 +20,22 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] -use sp_std::{prelude::*}; +use sp_std::{prelude::*, convert::TryFrom, marker::PhantomData}; pub use edgeware_primitives::{ AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature, Nonce, }; use frame_support::{ - construct_runtime, parameter_types, debug, RuntimeDebug, + construct_runtime, parameter_types, debug, RuntimeDebug, ConsensusEngineId, weights::{ Weight, IdentityFee, - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, DispatchClass, }, - traits::{Currency, Imbalance, KeyOwnerProofSystem, OnUnbalanced, Randomness, LockIdentifier}, + traits::{Currency, FindAuthor, Imbalance, KeyOwnerProofSystem, OnUnbalanced, Randomness, LockIdentifier, U128CurrencyToVote}, }; use frame_system::{EnsureRoot, EnsureOneOf}; +use frame_system::limits::{BlockLength, BlockWeights}; use frame_support::traits::InstanceFilter; use codec::{Encode, Decode}; @@ -44,13 +45,14 @@ pub use pallet_im_online::ed25519::AuthorityId as ImOnlineId; pub use sp_api::impl_runtime_apis; pub use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; pub use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; -pub use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; +pub use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment, CurrencyAdapter}; pub use sp_consensus_aura::ed25519::AuthorityId as AuraId; pub use sp_core::{ crypto::KeyTypeId, u32_trait::{_1, _2, _3, _4, _5}, OpaqueMetadata, U256, H160, H256, }; +use sp_io::hashing::blake2_128; use sp_runtime::{ Permill, Perbill, Perquintill, Percent, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str, ModuleId, FixedPointNumber, @@ -59,20 +61,27 @@ use sp_runtime::{ pub use sp_runtime::curve::PiecewiseLinear; use sp_runtime::traits::{ self, BlakeTwo256, Block as BlockT, StaticLookup, SaturatedConversion, - ConvertInto, OpaqueKeys, NumberFor, Saturating, + ConvertInto, OpaqueKeys, NumberFor, }; pub use sp_runtime::transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority}; #[cfg(any(feature = "std", test))] pub use sp_version::NativeVersion; +use sp_core::crypto::Public; pub use sp_version::RuntimeVersion; pub use pallet_session::{historical as pallet_session_historical}; -use pallet_contracts_rpc_runtime_api::ContractExecResult; +use pallet_evm::{ + Account as EVMAccount, FeeCalculator, HashedAddressMapping, + EnsureAddressTruncated, Runner +}; +use fp_rpc::{TransactionStatus}; +use evm_runtime::Config as EvmConfig; pub use sp_inherents::{CheckInherentsResult, InherentData}; use static_assertions::const_assert; +use pallet_contracts::WeightInfo; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -84,14 +93,12 @@ pub use frame_system::Call as SystemCall; pub use pallet_staking::StakerStatus; /// Implementations of some helper traits passed into runtime modules as associated types. pub mod impls; -use impls::{CurrencyToVoteHandler, Author}; +use impls::{Author}; /// Constant values used within the runtime. pub mod constants; use constants::{currency::*, time::*}; use sp_runtime::generic::Era; -/// Weights for pallets used in the runtime. -mod weights; // Make the WASM binary available. #[cfg(feature = "std")] @@ -114,8 +121,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to equal spec_version. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 42, - impl_version: 42, + spec_version: 45, + impl_version: 45, apis: RUNTIME_API_VERSIONS, transaction_version: 1, }; @@ -147,24 +154,46 @@ impl OnUnbalanced for DealWithFees { } } -const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10); +/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers. +/// This is used to limit the maximal weight of a single extrinsic. +const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); +/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used +/// by Operational extrinsics. +const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); +/// We allow for 2 seconds of compute with a 6 second average block time. +const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND; + parameter_types! { - pub const BlockHashCount: BlockNumber = 250; - pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; - pub MaximumExtrinsicWeight: Weight = - AvailableBlockRatio::get().saturating_sub(AVERAGE_ON_INITIALIZE_WEIGHT) - * MaximumBlockWeight::get(); - pub const MaximumBlockLength: u32 = 5 * 1024 * 1024; + pub const BlockHashCount: BlockNumber = 2400; pub const Version: RuntimeVersion = VERSION; - pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); -} - -const_assert!( - AvailableBlockRatio::get().deconstruct() >= AVERAGE_ON_INITIALIZE_WEIGHT.deconstruct() -); - -impl frame_system::Trait for Runtime { + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); + pub const SS58Prefix: u8 = 7; +} + +impl frame_system::Config for Runtime { type BaseCallFilter = (); + type BlockWeights = RuntimeBlockWeights; + type BlockLength = RuntimeBlockLength; + type DbWeight = RocksDbWeight; type Origin = Origin; type Call = Call; type Index = Index; @@ -176,26 +205,19 @@ impl frame_system::Trait for Runtime { type Header = generic::Header; type Event = Event; type BlockHashCount = BlockHashCount; - type MaximumBlockWeight = MaximumBlockWeight; - type DbWeight = RocksDbWeight; - type BlockExecutionWeight = BlockExecutionWeight; - type ExtrinsicBaseWeight = ExtrinsicBaseWeight; - type MaximumExtrinsicWeight = MaximumExtrinsicWeight; - type MaximumBlockLength = MaximumBlockLength; - type AvailableBlockRatio = AvailableBlockRatio; type Version = Version; type PalletInfo = PalletInfo; type AccountData = pallet_balances::AccountData; type OnNewAccount = (); type OnKilledAccount = (); - type SystemWeightInfo = weights::frame_system::WeightInfo; - type MigrateAccount = (Balances, Democracy, Elections, ImOnline, Recovery, Staking, Session, Vesting); + type SystemWeightInfo = frame_system::weights::SubstrateWeight; + type SS58Prefix = SS58Prefix; } -impl pallet_utility::Trait for Runtime { +impl pallet_utility::Config for Runtime { type Event = Event; type Call = Call; - type WeightInfo = weights::pallet_utility::WeightInfo; + type WeightInfo = pallet_utility::weights::SubstrateWeight; } parameter_types! { @@ -206,14 +228,14 @@ parameter_types! { pub const MaxSignatories: u16 = 100; } -impl pallet_multisig::Trait for Runtime { +impl pallet_multisig::Config for Runtime { type Event = Event; type Call = Call; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; } parameter_types! { @@ -230,30 +252,61 @@ parameter_types! { /// The type used to represent the kinds of proxying allowed. #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] pub enum ProxyType { - Any, - NonTransfer, - Governance, - Staking, + Any = 0, + NonTransfer = 1, + Governance = 2, + Staking = 3, + // Skip 4 as it is now removed (was SudoBalances) + IdentityJudgement = 5, } + impl Default for ProxyType { fn default() -> Self { Self::Any } } impl InstanceFilter for ProxyType { fn filter(&self, c: &Call) -> bool { match self { ProxyType::Any => true, - ProxyType::NonTransfer => !matches!( - c, - Call::Balances(..) | - Call::Vesting(pallet_vesting::Call::vested_transfer(..)) | - Call::Indices(pallet_indices::Call::transfer(..)) + ProxyType::NonTransfer => matches!(c, + Call::System(..) | + Call::Scheduler(..) | + Call::Timestamp(..) | + Call::Indices(pallet_indices::Call::claim(..)) | + Call::Indices(pallet_indices::Call::free(..)) | + Call::Indices(pallet_indices::Call::freeze(..)) | + // Specifically omitting Indices `transfer`, `force_transfer` + // Specifically omitting the entire Balances pallet + Call::Authorship(..) | + Call::Staking(..) | + Call::Offences(..) | + Call::Session(..) | + Call::Grandpa(..) | + Call::ImOnline(..) | + Call::AuthorityDiscovery(..) | + Call::Democracy(..) | + Call::Council(..) | + Call::Treasury(..) | + Call::Vesting(pallet_vesting::Call::vest(..)) | + Call::Vesting(pallet_vesting::Call::vest_other(..)) | + // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` + Call::Utility(..) | + Call::Identity(..) | + Call::Proxy(..) | + Call::Multisig(..) ), - ProxyType::Governance => matches!( - c, + ProxyType::Governance => matches!(c, Call::Democracy(..) | Call::Council(..) | - Call::Elections(..) | - Call::Treasury(..) + Call::Treasury(..) | + Call::Utility(..) ), - ProxyType::Staking => matches!(c, Call::Staking(..)), + ProxyType::Staking => matches!(c, + Call::Staking(..) | + Call::Session(..) | + Call::Utility(..) + ), + ProxyType::IdentityJudgement => matches!(c, + Call::Identity(pallet_identity::Call::provide_judgement(..)) | + Call::Utility(..) + ) } } fn is_superset(&self, o: &Self) -> bool { @@ -267,7 +320,7 @@ impl InstanceFilter for ProxyType { } } -impl pallet_proxy::Trait for Runtime { +impl pallet_proxy::Config for Runtime { type Event = Event; type Call = Call; type Currency = Balances; @@ -275,7 +328,7 @@ impl pallet_proxy::Trait for Runtime { type ProxyDepositBase = ProxyDepositBase; type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; - type WeightInfo = weights::pallet_proxy::WeightInfo; + type WeightInfo = pallet_proxy::weights::SubstrateWeight; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; type AnnouncementDepositBase = AnnouncementDepositBase; @@ -283,11 +336,11 @@ impl pallet_proxy::Trait for Runtime { } parameter_types! { - pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * MaximumBlockWeight::get(); + pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * RuntimeBlockWeights::get().max_block; pub const MaxScheduledPerBlock: u32 = 50; } -impl pallet_scheduler::Trait for Runtime { +impl pallet_scheduler::Config for Runtime { type Event = Event; type Origin = Origin; type PalletsOrigin = OriginCaller; @@ -295,10 +348,10 @@ impl pallet_scheduler::Trait for Runtime { type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRoot; type MaxScheduledPerBlock = MaxScheduledPerBlock; - type WeightInfo = weights::pallet_scheduler::WeightInfo; + type WeightInfo = pallet_scheduler::weights::SubstrateWeight; } -impl pallet_aura::Trait for Runtime { +impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; } @@ -306,12 +359,12 @@ parameter_types! { pub const IndexDeposit: Balance = 1 * DOLLARS; } -impl pallet_indices::Trait for Runtime { +impl pallet_indices::Config for Runtime { type AccountIndex = AccountIndex; type Currency = Balances; type Deposit = IndexDeposit; type Event = Event; - type WeightInfo = weights::pallet_indices::WeightInfo; + type WeightInfo = pallet_indices::weights::SubstrateWeight; } parameter_types! { @@ -321,14 +374,14 @@ parameter_types! { pub const MaxLocks: u32 = 50; } -impl pallet_balances::Trait for Runtime { +impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; type DustRemoval = (); type Event = Event; type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Module; - type WeightInfo = weights::pallet_balances::WeightInfo; + type WeightInfo = pallet_balances::weights::SubstrateWeight; } parameter_types! { @@ -338,9 +391,8 @@ parameter_types! { pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128); } -impl pallet_transaction_payment::Trait for Runtime { - type Currency = Balances; - type OnTransactionPayment = DealWithFees; +impl pallet_transaction_payment::Config for Runtime { + type OnChargeTransaction = CurrencyAdapter; type TransactionByteFee = TransactionByteFee; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = @@ -351,18 +403,18 @@ parameter_types! { pub const MinimumPeriod: Moment = SLOT_DURATION / 2; } -impl pallet_timestamp::Trait for Runtime { +impl pallet_timestamp::Config for Runtime { type Moment = Moment; type OnTimestampSet = Aura; type MinimumPeriod = MinimumPeriod; - type WeightInfo = weights::pallet_timestamp::WeightInfo; + type WeightInfo = pallet_timestamp::weights::SubstrateWeight; } parameter_types! { pub const UncleGenerations: BlockNumber = 5; } -impl pallet_authorship::Trait for Runtime { +impl pallet_authorship::Config for Runtime { type FindAuthor = pallet_session::FindAccountFromAuthorIndex; type UncleGenerations = UncleGenerations; type FilterUncle = (); @@ -384,9 +436,9 @@ parameter_types! { pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(33); } -impl pallet_session::Trait for Runtime { +impl pallet_session::Config for Runtime { type Event = Event; - type ValidatorId = ::AccountId; + type ValidatorId = ::AccountId; type ValidatorIdOf = pallet_staking::StashOf; type ShouldEndSession = pallet_session::PeriodicSessions; type NextSessionRotation = pallet_session::PeriodicSessions; @@ -394,10 +446,10 @@ impl pallet_session::Trait for Runtime { type SessionHandler = ::KeyTypeIdProviders; type Keys = SessionKeys; type DisabledValidatorsThreshold = DisabledValidatorsThreshold; - type WeightInfo = weights::pallet_session::WeightInfo; + type WeightInfo = pallet_session::weights::SubstrateWeight; } -impl pallet_session::historical::Trait for Runtime { +impl pallet_session::historical::Config for Runtime { type FullIdentification = pallet_staking::Exposure; type FullIdentificationOf = pallet_staking::ExposureOf; } @@ -426,12 +478,16 @@ parameter_types! { pub const MaxIterations: u32 = 5; // 0.05%. The higher the value, the more strict solution acceptance becomes. pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); + pub OffchainSolutionWeightLimit: Weight = RuntimeBlockWeights::get() + .get(DispatchClass::Normal) + .max_extrinsic.expect("Normal extrinsics have a weight limit configured; qed") + .saturating_sub(BlockExecutionWeight::get()); } -impl pallet_staking::Trait for Runtime { +impl pallet_staking::Config for Runtime { type Currency = Balances; type UnixTime = Timestamp; - type CurrencyToVote = CurrencyToVoteHandler; + type CurrencyToVote = U128CurrencyToVote; type RewardRemainder = Treasury; type Event = Event; type Slash = Treasury; // send the slashed funds to the treasury. @@ -454,12 +510,13 @@ impl pallet_staking::Trait for Runtime { type MinSolutionScoreBump = MinSolutionScoreBump; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type UnsignedPriority = StakingUnsignedPriority; - type WeightInfo = weights::pallet_staking::WeightInfo; + type OffchainSolutionWeightLimit = OffchainSolutionWeightLimit; + type WeightInfo = pallet_staking::weights::SubstrateWeight; } parameter_types! { pub const LaunchPeriod: BlockNumber = 2 * 24 * 60 * MINUTES; - pub const VotingPeriod: BlockNumber = 4 * 24 * 60 * MINUTES; + pub const VotingPeriod: BlockNumber = 7 * 24 * 60 * MINUTES; pub const FastTrackVotingPeriod: BlockNumber = 2 * 24 * 60 * MINUTES; pub const MinimumDeposit: Balance = 100 * DOLLARS; pub const InstantAllowed: bool = false; @@ -467,9 +524,10 @@ parameter_types! { pub const CooloffPeriod: BlockNumber = 7 * 24 * 60 * MINUTES; pub const PreimageByteDeposit: Balance = 1 * CENTS; pub const MaxVotes: u32 = 100; + pub const MaxProposals: u32 = 100; } -impl pallet_democracy::Trait for Runtime { +impl pallet_democracy::Config for Runtime { type Proposal = Call; type Event = Event; type Currency = Balances; @@ -504,6 +562,14 @@ impl pallet_democracy::Trait for Runtime { pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>, frame_system::EnsureRoot, >; + // To cancel a proposal before it has been passed, the technical committee must be unanimous or + // Root must agree. + type CancelProposalOrigin = EnsureOneOf< + AccountId, + EnsureRoot, + pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>, + >; + type BlacklistOrigin = EnsureRoot; // No vetoing type VetoOrigin = frame_system::EnsureNever; type CooloffPeriod = CooloffPeriod; @@ -513,7 +579,8 @@ impl pallet_democracy::Trait for Runtime { type Scheduler = Scheduler; type PalletsOrigin = OriginCaller; type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; + type WeightInfo = pallet_democracy::weights::SubstrateWeight; + type MaxProposals = MaxProposals; } parameter_types! { @@ -522,7 +589,7 @@ parameter_types! { } type CouncilCollective = pallet_collective::Instance1; -impl pallet_collective::Trait for Runtime { +impl pallet_collective::Config for Runtime { type Origin = Origin; type Proposal = Call; type Event = Event; @@ -530,7 +597,7 @@ impl pallet_collective::Trait for Runtime { type MaxProposals = CouncilMaxProposals; type MaxMembers = CouncilMaxMembers; type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; + type WeightInfo = pallet_collective::weights::SubstrateWeight; } parameter_types! { @@ -545,7 +612,7 @@ parameter_types! { const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); -impl pallet_elections_phragmen::Trait for Runtime { +impl pallet_elections_phragmen::Config for Runtime { type Event = Event; type ModuleId = ElectionsPhragmenModuleId; type Currency = Balances; @@ -553,7 +620,7 @@ impl pallet_elections_phragmen::Trait for Runtime { // NOTE: this implies that council's genesis members cannot be set directly and must come from // this module. type InitializeMembers = Council; - type CurrencyToVote = CurrencyToVoteHandler; + type CurrencyToVote = U128CurrencyToVote; type CandidacyBond = CandidacyBond; type VotingBond = VotingBond; type LoserCandidate = (); @@ -562,13 +629,13 @@ impl pallet_elections_phragmen::Trait for Runtime { type DesiredMembers = DesiredMembers; type DesiredRunnersUp = DesiredRunnersUp; type TermDuration = TermDuration; - type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; + type WeightInfo = pallet_elections_phragmen::weights::SubstrateWeight; } parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 1_000 * DOLLARS; - pub const SpendPeriod: BlockNumber = 14 * DAYS; + pub const SpendPeriod: BlockNumber = 3 * DAYS; pub const Burn: Permill = Permill::from_percent(0); pub const TipCountdown: BlockNumber = 1 * DAYS; pub const TipFindersFee: Percent = Percent::from_percent(20); @@ -577,13 +644,13 @@ parameter_types! { pub const BountyDepositBase: Balance = 10 * DOLLARS; pub const BountyDepositPayoutDelay: BlockNumber = 7 * DAYS; pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry"); - pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 3 * DAYS; pub const MaximumReasonLength: u32 = 16384; pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); pub const BountyValueMinimum: Balance = 100 * DOLLARS; } -impl pallet_treasury::Trait for Runtime { +impl pallet_treasury::Config for Runtime { type ModuleId = TreasuryModuleId; type Currency = Balances; type ApproveOrigin = EnsureOneOf< @@ -592,25 +659,38 @@ impl pallet_treasury::Trait for Runtime { pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective> >; type RejectOrigin = EnsureRootOrHalfCouncil; - type Tippers = Elections; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; - type DataDepositPerByte = DataDepositPerByte; type Event = Event; type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; type SpendPeriod = SpendPeriod; type Burn = Burn; + type BurnDestination = (); + type SpendFunds = Bounties; + type WeightInfo = pallet_treasury::weights::SubstrateWeight; +} + +impl pallet_bounties::Config for Runtime { + type Event = Event; type BountyDepositBase = BountyDepositBase; type BountyDepositPayoutDelay = BountyDepositPayoutDelay; type BountyUpdatePeriod = BountyUpdatePeriod; type BountyCuratorDeposit = BountyCuratorDeposit; type BountyValueMinimum = BountyValueMinimum; + type DataDepositPerByte = DataDepositPerByte; type MaximumReasonLength = MaximumReasonLength; - type BurnDestination = (); - type WeightInfo = weights::pallet_treasury::WeightInfo; + type WeightInfo = pallet_bounties::weights::SubstrateWeight; +} + +impl pallet_tips::Config for Runtime { + type Event = Event; + type DataDepositPerByte = DataDepositPerByte; + type MaximumReasonLength = MaximumReasonLength; + type Tippers = Elections; + type TipCountdown = TipCountdown; + type TipFindersFee = TipFindersFee; + type TipReportDepositBase = TipReportDepositBase; + type WeightInfo = pallet_tips::weights::SubstrateWeight; } parameter_types! { @@ -620,6 +700,8 @@ parameter_types! { pub const StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2; } +/// Submits a transaction with the node's public and signature type. Adheres to the signed extension +/// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime where Call: From, @@ -678,29 +760,30 @@ impl frame_system::offchain::SendTransactionTypes for Runtime where type OverarchingCall = Call; } -impl pallet_im_online::Trait for Runtime { +impl pallet_im_online::Config for Runtime { type AuthorityId = ImOnlineId; type Event = Event; type SessionDuration = SessionDuration; type ReportUnresponsiveness = Offences; type UnsignedPriority = ImOnlineUnsignedPriority; - type WeightInfo = weights::pallet_im_online::WeightInfo; + type WeightInfo = pallet_im_online::weights::SubstrateWeight; } parameter_types! { - pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get(); + pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * + RuntimeBlockWeights::get().max_block; } -impl pallet_offences::Trait for Runtime { +impl pallet_offences::Config for Runtime { type Event = Event; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; type WeightSoftLimit = OffencesWeightSoftLimit; } -impl pallet_authority_discovery::Trait for Runtime {} +impl pallet_authority_discovery::Config for Runtime {} -impl pallet_grandpa::Trait for Runtime { +impl pallet_grandpa::Config for Runtime { type Event = Event; type Call = Call; @@ -720,17 +803,6 @@ impl pallet_grandpa::Trait for Runtime { type WeightInfo = (); } -parameter_types! { - pub const WindowSize: BlockNumber = 101; - pub const ReportLatency: BlockNumber = 1000; -} - -impl pallet_finality_tracker::Trait for Runtime { - type OnFinalizationStalled = Grandpa; - type WindowSize = WindowSize; - type ReportLatency = ReportLatency; -} - parameter_types! { pub const BasicDeposit: Balance = 5 * DOLLARS; // 258 bytes on-chain pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain @@ -746,7 +818,7 @@ type EnsureRootOrHalfCouncil = EnsureOneOf< pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective> >; -impl pallet_identity::Trait for Runtime { +impl pallet_identity::Config for Runtime { type Event = Event; type Currency = Balances; type BasicDeposit = BasicDeposit; @@ -758,7 +830,7 @@ impl pallet_identity::Trait for Runtime { type Slashed = Treasury; type ForceOrigin = EnsureRootOrHalfCouncil; type RegistrarOrigin = EnsureRootOrHalfCouncil; - type WeightInfo = weights::pallet_identity::WeightInfo; + type WeightInfo = pallet_identity::weights::SubstrateWeight; } parameter_types! { @@ -768,7 +840,7 @@ parameter_types! { pub const RecoveryDeposit: Balance = 5 * DOLLARS; } -impl pallet_recovery::Trait for Runtime { +impl pallet_recovery::Config for Runtime { type Event = Event; type Call = Call; type Currency = Balances; @@ -782,63 +854,242 @@ parameter_types! { pub const MinVestedTransfer: Balance = 100 * DOLLARS; } -impl pallet_vesting::Trait for Runtime { +impl pallet_vesting::Config for Runtime { type Event = Event; type Currency = Balances; type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = weights::pallet_vesting::WeightInfo; + type WeightInfo = pallet_vesting::weights::SubstrateWeight; } -impl pallet_sudo::Trait for Runtime { +impl pallet_sudo::Config for Runtime { type Event = Event; type Call = Call; } parameter_types! { - pub const TombstoneDeposit: Balance = 16 * MILLICENTS; - pub const RentByteFee: Balance = 1 * MILLICENTS; - pub const RentDepositOffset: Balance = 100 * MILLICENTS; - pub const SurchargeReward: Balance = 15 * MILLICENTS; -} - -impl pallet_contracts::Trait for Runtime { + pub const TombstoneDeposit: Balance = deposit( + 1, + sp_std::mem::size_of::>() as u32 + ); + pub const DepositPerContract: Balance = TombstoneDeposit::get(); + pub const DepositPerStorageByte: Balance = deposit(0, 1); + pub const DepositPerStorageItem: Balance = deposit(1, 0); + pub RentFraction: Perbill = Perbill::from_rational_approximation(1u32, 30 * DAYS); + pub const SurchargeReward: Balance = 150 * MILLICENTS; + pub const SignedClaimHandicap: u32 = 2; + pub const MaxDepth: u32 = 32; + pub const MaxValueSize: u32 = 16 * 1024; + // The lazy deletion runs inside on_initialize. + pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * + RuntimeBlockWeights::get().max_block; + // The weight needed for decoding the queue should be less or equal than a fifth + // of the overall weight dedicated to the lazy deletion. + pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / ( + ::WeightInfo::on_initialize_per_queue_item(1) - + ::WeightInfo::on_initialize_per_queue_item(0) + )) / 5) as u32; +} + +impl pallet_contracts::Config for Runtime { type Time = Timestamp; type Randomness = RandomnessCollectiveFlip; type Currency = Balances; type Event = Event; - type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminer; - type TrieIdGenerator = pallet_contracts::TrieIdFromParentCounter; type RentPayment = (); - type SignedClaimHandicap = pallet_contracts::DefaultSignedClaimHandicap; + type SignedClaimHandicap = SignedClaimHandicap; type TombstoneDeposit = TombstoneDeposit; - type StorageSizeOffset = pallet_contracts::DefaultStorageSizeOffset; - type RentByteFee = RentByteFee; - type RentDepositOffset = RentDepositOffset; + type DepositPerContract = DepositPerContract; + type DepositPerStorageByte = DepositPerStorageByte; + type DepositPerStorageItem = DepositPerStorageItem; + type RentFraction = RentFraction; type SurchargeReward = SurchargeReward; - type MaxDepth = pallet_contracts::DefaultMaxDepth; - type MaxValueSize = pallet_contracts::DefaultMaxValueSize; + type MaxDepth = MaxDepth; + type MaxValueSize = MaxValueSize; type WeightPrice = pallet_transaction_payment::Module; + type WeightInfo = pallet_contracts::weights::SubstrateWeight; + type ChainExtension = (); + type DeletionQueueDepth = DeletionQueueDepth; + type DeletionWeightLimit = DeletionWeightLimit; } -impl pallet_assets::Trait for Runtime { +parameter_types! { + pub const EthChainId: u64 = 2021; +} + +/// Clone of Istanbul config with `create_contract_limit` raised. +static EVM_CONFIG: EvmConfig = EvmConfig { + gas_ext_code: 700, + gas_ext_code_hash: 700, + gas_balance: 700, + gas_sload: 800, + gas_sstore_set: 20000, + gas_sstore_reset: 5000, + refund_sstore_clears: 15000, + gas_suicide: 5000, + gas_suicide_new_account: 25000, + gas_call: 700, + gas_expbyte: 50, + gas_transaction_create: 53000, + gas_transaction_call: 21000, + gas_transaction_zero_data: 4, + gas_transaction_non_zero_data: 16, + sstore_gas_metering: true, + sstore_revert_under_stipend: true, + err_on_call_with_more_gas: false, + empty_considered_exists: false, + create_increase_nonce: true, + call_l64_after_gas: true, + stack_limit: 1024, + memory_limit: usize::max_value(), + call_stack_limit: 1024, + create_contract_limit: None, + call_stipend: 2300, + has_delegate_call: true, + has_create2: true, + has_revert: true, + has_return_data: true, + has_bitwise_shifting: true, + has_chain_id: true, + has_self_balance: true, + has_ext_code_hash: true, + estimate: false, +}; + +/// Current (safe) approximation of the gas/s consumption considering +/// EVM execution over compiled WASM. +pub const GAS_PER_SECOND: u64 = 8_000_000; + +/// Approximate ratio of the amount of Weight per Gas. +/// u64 works for approximations because Weight is a very small unit compared to gas. +pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND / GAS_PER_SECOND; + +pub struct EdgewareGasWeightMapping; + +impl pallet_evm::GasWeightMapping for EdgewareGasWeightMapping { + fn gas_to_weight(gas: u64) -> Weight { + Weight::try_from(gas.saturating_mul(WEIGHT_PER_GAS)).unwrap_or(Weight::MAX) + } + fn weight_to_gas(weight: Weight) -> u64 { + weight.wrapping_div(WEIGHT_PER_GAS) + } +} + +/// Fixed gas price of `1`. +pub struct FixedGasPrice; + +impl pallet_evm::FeeCalculator for FixedGasPrice { + fn min_gas_price() -> U256 { + // Gas price is always one token per gas. + 1.into() + } +} + +impl pallet_evm::Config for Runtime { + type FeeCalculator = FixedGasPrice; // TODO: permit validators to set minimum gas prices + type CallOrigin = EnsureAddressTruncated; + type WithdrawOrigin = EnsureAddressTruncated; + type AddressMapping = HashedAddressMapping; + type Currency = Balances; type Event = Event; - type Balance = Balance; - type AssetId = Nonce; + type Runner = pallet_evm::runner::stack::Runner; + type Precompiles = ( + pallet_evm_precompile_simple::ECRecover, + pallet_evm_precompile_simple::Sha256, + pallet_evm_precompile_simple::Ripemd160, + pallet_evm_precompile_simple::Identity, + pallet_evm_precompile_modexp::Modexp, + pallet_evm_precompile_ed25519::Ed25519Verify, + ); + type ChainId = EthChainId; + type GasWeightMapping = EdgewareGasWeightMapping; + + /// EVM config used in the module. + fn config() -> &'static EvmConfig { + &EVM_CONFIG + } +} + +pub struct EthereumFindAuthor(PhantomData); +impl> FindAuthor for EthereumFindAuthor +{ + fn find_author<'a, I>(digests: I) -> Option where + I: 'a + IntoIterator + { + 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 + } } -impl signaling::Trait for Runtime { +parameter_types! { + pub BlockGasLimit: U256 = U256::from(u32::max_value()); +} + +impl pallet_ethereum::Config for Runtime { type Event = Event; - type Currency = Balances; + type FindAuthor = EthereumFindAuthor; + type StateRoot = pallet_ethereum::IntermediateStateRoot; + type BlockGasLimit = BlockGasLimit; } -impl treasury_reward::Trait for Runtime { +impl treasury_reward::Config for Runtime { type Event = Event; type Currency = Balances; } -impl voting::Trait for Runtime { +parameter_types! { + pub const ChainId: u8 = 5; + pub const ProposalLifetime: u32 = 100; +} + +impl chainbridge::Config for Runtime { + type Event = Event; + // Allow 2/3 council to approve proposals + type AdminOrigin = frame_system::EnsureOneOf, + frame_system::EnsureRoot, + >; + type Proposal = Call; + type ChainId = ChainId; + type ProposalLifetime = ProposalLifetime; +} + +parameter_types! { + pub NativeTokenId: chainbridge::ResourceId = chainbridge::derive_resource_id(1, &blake2_128(b"EDG")); + pub const NativeTransferFee: Balance = 1 * DOLLARS; +} + +impl edge_chainbridge::Config for Runtime { + type Event = Event; + type BridgeOrigin = chainbridge::EnsureBridge; + type Currency = Balances; + type NativeTokenId = NativeTokenId; + type NativeTransferFee = NativeTransferFee; +} + +parameter_types! { + pub const AssetDepositBase: u64 = 1; + pub const AssetDepositPerZombie: u64 = 1; + pub const AllowFreezing: bool = true; + pub const AllowBurning: bool = true; + pub const AllowMinting: bool = true; +} + +impl edge_assets::Config for Runtime { + type Currency = Balances; type Event = Event; + type Balance = Balance; + type AssetId = constants::currency::AssetId; + type ForceOrigin = frame_system::EnsureRoot; + type AssetDepositBase = AssetDepositBase; + type AssetDepositPerZombie = AssetDepositPerZombie; + type AllowFreezing = AllowFreezing; + type AllowBurning = AllowBurning; + type AllowMinting = AllowMinting; + type WeightInfo = edge_assets::weights::SubstrateWeight; } construct_runtime!( @@ -847,47 +1098,67 @@ construct_runtime!( NodeBlock = edgeware_primitives::Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: frame_system::{Module, Call, Config, Storage, Event}, - Utility: pallet_utility::{Module, Call, Event}, - Aura: pallet_aura::{Module, Config, Inherent}, - - Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent}, - Authorship: pallet_authorship::{Module, Call, Storage, Inherent}, - Indices: pallet_indices::{Module, Call, Storage, Config, Event}, - Balances: pallet_balances::{Module, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Module, Storage}, - - Staking: pallet_staking::{Module, Call, Config, Storage, Event, ValidateUnsigned}, - Session: pallet_session::{Module, Call, Storage, Event, Config}, - Democracy: pallet_democracy::{Module, Call, Storage, Config, Event}, - Council: pallet_collective::::{Module, Call, Storage, Origin, Event, Config}, - Elections: pallet_elections_phragmen::{Module, Call, Storage, Event, Config}, - - FinalityTracker: pallet_finality_tracker::{Module, Call, Inherent}, - Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned}, - Treasury: pallet_treasury::{Module, Call, Storage, Config, Event}, - Contracts: pallet_contracts::{Module, Call, Config, Storage, Event}, - Sudo: pallet_sudo::{Module, Call, Config, Storage, Event}, - ImOnline: pallet_im_online::{Module, Call, Storage, Event, ValidateUnsigned, Config}, - AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config}, - Offences: pallet_offences::{Module, Call, Storage, Event}, - Historical: pallet_session_historical::{Module}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage}, - Identity: pallet_identity::{Module, Call, Storage, Event}, - - Recovery: pallet_recovery::{Module, Call, Storage, Event}, - Vesting: pallet_vesting::{Module, Call, Storage, Event, Config}, - Scheduler: pallet_scheduler::{Module, Call, Storage, Event}, - Proxy: pallet_proxy::{Module, Call, Storage, Event}, - Multisig: pallet_multisig::{Module, Call, Storage, Event}, - Assets: pallet_assets::{Module, Call, Storage, Event}, - - Signaling: signaling::{Module, Call, Storage, Config, Event}, - Voting: voting::{Module, Call, Storage, Event}, - TreasuryReward: treasury_reward::{Module, Call, Storage, Config, Event}, + System: frame_system::{Module, Call, Config, Storage, Event} = 0, + Utility: pallet_utility::{Module, Call, Event} = 1, + Aura: pallet_aura::{Module, Config, Inherent} = 2, + + Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent} = 3, + Authorship: pallet_authorship::{Module, Call, Storage, Inherent} = 4, + Indices: pallet_indices::{Module, Call, Storage, Config, Event} = 5, + Balances: pallet_balances::{Module, Call, Storage, Config, Event} = 6, + TransactionPayment: pallet_transaction_payment::{Module, Storage} = 7, + + Staking: pallet_staking::{Module, Call, Config, Storage, Event, ValidateUnsigned} = 8, + Session: pallet_session::{Module, Call, Storage, Event, Config} = 9, + Democracy: pallet_democracy::{Module, Call, Storage, Config, Event} = 10, + Council: pallet_collective::::{Module, Call, Storage, Origin, Event, Config} = 11, + Elections: pallet_elections_phragmen::{Module, Call, Storage, Event, Config} = 12, + + Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned} = 14, + Treasury: pallet_treasury::{Module, Call, Storage, Config, Event} = 15, + Contracts: pallet_contracts::{Module, Call, Config, Storage, Event} = 16, + Sudo: pallet_sudo::{Module, Call, Config, Storage, Event} = 17, + ImOnline: pallet_im_online::{Module, Call, Storage, Event, ValidateUnsigned, Config} = 18, + AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config} = 19, + Offences: pallet_offences::{Module, Call, Storage, Event} = 20, + Historical: pallet_session_historical::{Module} = 21, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage} = 22, + Identity: pallet_identity::{Module, Call, Storage, Event} = 23, + + Recovery: pallet_recovery::{Module, Call, Storage, Event} = 24, + Vesting: pallet_vesting::{Module, Call, Storage, Event, Config} = 25, + Scheduler: pallet_scheduler::{Module, Call, Storage, Event} = 26, + Proxy: pallet_proxy::{Module, Call, Storage, Event} = 27, + Multisig: pallet_multisig::{Module, Call, Storage, Event} = 28, + Assets: edge_assets::{Module, Call, Storage, Event} = 29, + + TreasuryReward: treasury_reward::{Module, Call, Storage, Config, Event} = 32, + Ethereum: pallet_ethereum::{Module, Call, Storage, Event, Config, ValidateUnsigned} = 33, + EVM: pallet_evm::{Module, Config, Call, Storage, Event} = 34, + ChainBridge: chainbridge::{Module, Call, Storage, Event} = 35, + EdgeBridge: edge_chainbridge::{Module, Call, Event} = 36, + + Bounties: pallet_bounties::{Module, Call, Storage, Event} = 37, + Tips: pallet_tips::{Module, Call, Storage, Event} = 38, } ); +pub struct TransactionConverter; + +impl fp_rpc::ConvertTransaction for TransactionConverter { + fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { + UncheckedExtrinsic::new_unsigned(pallet_ethereum::Call::::transact(transaction).into()) + } +} + +impl fp_rpc::ConvertTransaction for TransactionConverter { + fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> sp_runtime::OpaqueExtrinsic { + let extrinsic = UncheckedExtrinsic::new_unsigned(pallet_ethereum::Call::::transact(transaction).into()); + let encoded = extrinsic.encode(); + sp_runtime::OpaqueExtrinsic::decode(&mut &encoded[..]).expect("Encoded extrinsic is always valid") + } +} + /// The address format for describing accounts. pub type Address = ::Source; /// Block header type as expected by this runtime. @@ -1044,17 +1315,8 @@ impl_runtime_apis! { value: Balance, gas_limit: u64, input_data: Vec, - ) -> ContractExecResult { - let (exec_result, gas_consumed) = - Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data); - match exec_result { - Ok(v) => ContractExecResult::Success { - flags: v.flags.bits(), - data: v.data, - gas_consumed: gas_consumed, - }, - Err(_) => ContractExecResult::Error, - } + ) -> pallet_contracts_primitives::ContractExecResult { + Contracts::bare_call(origin, dest, value, gas_limit, input_data) } fn get_storage( @@ -1091,4 +1353,147 @@ impl_runtime_apis! { SessionKeys::decode_into_raw_public_keys(&encoded) } } + + impl fp_rpc::EthereumRuntimeRPCApi for Runtime { + fn chain_id() -> u64 { + ::ChainId::get() + } + + fn account_basic(address: H160) -> EVMAccount { + EVM::account_basic(&address) + } + + fn gas_price() -> U256 { + ::FeeCalculator::min_gas_price() + } + + fn account_code_at(address: H160) -> Vec { + EVM::account_codes(address) + } + + fn author() -> H160 { + >::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, + value: U256, + gas_limit: U256, + gas_price: Option, + nonce: Option, + estimate: bool, + ) -> Result { + let config = if estimate { + let mut config = ::config().clone(); + config.estimate = true; + Some(config) + } else { + None + }; + + ::Runner::call( + from, + to, + data, + value, + gas_limit.low_u32(), + gas_price, + nonce, + config.as_ref().unwrap_or(::config()), + ).map_err(|err| err.into()) + } + + fn create( + from: H160, + data: Vec, + value: U256, + gas_limit: U256, + gas_price: Option, + nonce: Option, + estimate: bool, + ) -> Result { + let config = if estimate { + let mut config = ::config().clone(); + config.estimate = true; + Some(config) + } else { + None + }; + + ::Runner::create( + from, + data, + value, + gas_limit.low_u32(), + gas_price, + nonce, + config.as_ref().unwrap_or(::config()), + ).map_err(|err| err.into()) + } + + fn current_transaction_statuses() -> Option> { + Ethereum::current_transaction_statuses() + } + + fn current_block() -> Option { + Ethereum::current_block() + } + + fn current_receipts() -> Option> { + Ethereum::current_receipts() + } + + fn current_all() -> ( + Option, + Option>, + Option> + ) { + ( + Ethereum::current_block(), + Ethereum::current_receipts(), + Ethereum::current_transaction_statuses() + ) + } + } + + #[cfg(feature = "runtime-benchmarks")] + impl frame_benchmarking::Benchmark for Runtime { + fn dispatch_benchmark( + config: frame_benchmarking::BenchmarkConfig + ) -> Result, sp_runtime::RuntimeString> { + use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; + + use frame_system_benchmarking::Module as SystemBench; + impl frame_system_benchmarking::Config for Runtime {} + + let whitelist: Vec = vec![ + // Block Number + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), + // Total Issuance + hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(), + // Execution Phase + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(), + // Event Count + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(), + // System Events + hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), + ]; + + let mut batches = Vec::::new(); + let params = (&config, &whitelist); + + add_benchmark!(params, batches, frame_system, SystemBench::); + + if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } + Ok(batches) + } + } } diff --git a/node/runtime/src/weights/frame_system.rs b/node/runtime/src/weights/frame_system.rs deleted file mode 100644 index 9522fa75..00000000 --- a/node/runtime/src/weights/frame_system.rs +++ /dev/null @@ -1,58 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2017-2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5 - -#![allow(unused_parens)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl frame_system::WeightInfo for WeightInfo { - // WARNING! Some components were not used: ["b"] - fn remark() -> Weight { - (1305000 as Weight) - } - fn set_heap_pages() -> Weight { - (2023000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - // WARNING! Some components were not used: ["d"] - fn set_changes_trie_config() -> Weight { - (10026000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn set_storage(i: u32, ) -> Weight { - (0 as Weight) - .saturating_add((656000 as Weight).saturating_mul(i as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - fn kill_storage(i: u32, ) -> Weight { - (4327000 as Weight) - .saturating_add((478000 as Weight).saturating_mul(i as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) - } - fn kill_prefix(p: u32, ) -> Weight { - (8349000 as Weight) - .saturating_add((838000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } - fn suicide() -> Weight { - (29247000 as Weight) - } -} diff --git a/node/runtime/src/weights/mod.rs b/node/runtime/src/weights/mod.rs deleted file mode 100644 index 2058227a..00000000 --- a/node/runtime/src/weights/mod.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2020 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. - -//! A list of the different weight modules for our runtime. - -pub mod frame_system; -pub mod pallet_balances; -pub mod pallet_treasury; -pub mod pallet_collective; -pub mod pallet_democracy; -pub mod pallet_identity; -pub mod pallet_indices; -pub mod pallet_im_online; -pub mod pallet_multisig; -pub mod pallet_proxy; -pub mod pallet_scheduler; -pub mod pallet_session; -pub mod pallet_staking; -pub mod pallet_timestamp; -pub mod pallet_utility; -pub mod pallet_vesting; -pub mod pallet_elections_phragmen; diff --git a/node/runtime/src/weights/pallet_balances.rs b/node/runtime/src/weights/pallet_balances.rs deleted file mode 100644 index bcbc4ced..00000000 --- a/node/runtime/src/weights/pallet_balances.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5 - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_balances::WeightInfo for WeightInfo { - fn transfer() -> Weight { - (65949000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn transfer_keep_alive() -> Weight { - (46665000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_balance_creating() -> Weight { - (27086000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_balance_killing() -> Weight { - (33424000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn force_transfer() -> Weight { - (65343000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_collective.rs b/node/runtime/src/weights/pallet_collective.rs deleted file mode 100644 index 32b4ad02..00000000 --- a/node/runtime/src/weights/pallet_collective.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_collective::WeightInfo for WeightInfo { - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { - (0 as Weight) - .saturating_add((21040000 as Weight).saturating_mul(m as Weight)) - .saturating_add((173000 as Weight).saturating_mul(n as Weight)) - .saturating_add((31595000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) - .saturating_add(DbWeight::get().writes(2 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } - fn execute(b: u32, m: u32, ) -> Weight { - (43359000 as Weight) - .saturating_add((4000 as Weight).saturating_mul(b as Weight)) - .saturating_add((123000 as Weight).saturating_mul(m as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - } - fn propose_execute(b: u32, m: u32, ) -> Weight { - (54134000 as Weight) - .saturating_add((4000 as Weight).saturating_mul(b as Weight)) - .saturating_add((239000 as Weight).saturating_mul(m as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - } - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (90650000 as Weight) - .saturating_add((5000 as Weight).saturating_mul(b as Weight)) - .saturating_add((152000 as Weight).saturating_mul(m as Weight)) - .saturating_add((970000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) - } - fn vote(m: u32, ) -> Weight { - (74460000 as Weight) - .saturating_add((290000 as Weight).saturating_mul(m as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (86360000 as Weight) - .saturating_add((232000 as Weight).saturating_mul(m as Weight)) - .saturating_add((954000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (123653000 as Weight) - .saturating_add((1000 as Weight).saturating_mul(b as Weight)) - .saturating_add((287000 as Weight).saturating_mul(m as Weight)) - .saturating_add((920000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn close_disapproved(m: u32, p: u32, ) -> Weight { - (95395000 as Weight) - .saturating_add((236000 as Weight).saturating_mul(m as Weight)) - .saturating_add((965000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (135284000 as Weight) - .saturating_add((4000 as Weight).saturating_mul(b as Weight)) - .saturating_add((218000 as Weight).saturating_mul(m as Weight)) - .saturating_add((951000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn disapprove_proposal(p: u32, ) -> Weight { - (50500000 as Weight) - .saturating_add((966000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_democracy.rs b/node/runtime/src/weights/pallet_democracy.rs deleted file mode 100644 index 2c55a848..00000000 --- a/node/runtime/src/weights/pallet_democracy.rs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (C) 2020 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. - -//! Weights for the Democracy Pallet -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5 - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_democracy::WeightInfo for WeightInfo { - fn propose() -> Weight { - (49113000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn second(s: u32, ) -> Weight { - (42067000 as Weight) - .saturating_add((220000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn vote_new(r: u32, ) -> Weight { - (54159000 as Weight) - .saturating_add((252000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn vote_existing(r: u32, ) -> Weight { - (54145000 as Weight) - .saturating_add((262000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn emergency_cancel() -> Weight { - (31071000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn external_propose(v: u32, ) -> Weight { - (14282000 as Weight) - .saturating_add((109000 as Weight).saturating_mul(v as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn external_propose_majority() -> Weight { - (3478000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn external_propose_default() -> Weight { - (3442000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn fast_track() -> Weight { - (30820000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn veto_external(v: u32, ) -> Weight { - (30971000 as Weight) - .saturating_add((184000 as Weight).saturating_mul(v as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn cancel_referendum() -> Weight { - (20431000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn cancel_queued(r: u32, ) -> Weight { - (42438000 as Weight) - .saturating_add((3284000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn on_initialize_base(r: u32, ) -> Weight { - (70826000 as Weight) - .saturating_add((10716000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(6 as Weight)) - .saturating_add(DbWeight::get().reads((2 as Weight).saturating_mul(r as Weight))) - .saturating_add(DbWeight::get().writes(5 as Weight)) - } - fn delegate(r: u32, ) -> Weight { - (72046000 as Weight) - .saturating_add((7837000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(DbWeight::get().writes(4 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - fn undelegate(r: u32, ) -> Weight { - (41028000 as Weight) - .saturating_add((7810000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(DbWeight::get().writes(2 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - fn clear_public_proposals() -> Weight { - (3643000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn note_preimage(b: u32, ) -> Weight { - (46629000 as Weight) - .saturating_add((4000 as Weight).saturating_mul(b as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn note_imminent_preimage(b: u32, ) -> Weight { - (31147000 as Weight) - .saturating_add((3000 as Weight).saturating_mul(b as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn reap_preimage(b: u32, ) -> Weight { - (42848000 as Weight) - .saturating_add((3000 as Weight).saturating_mul(b as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn unlock_remove(r: u32, ) -> Weight { - (45333000 as Weight) - .saturating_add((171000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn unlock_set(r: u32, ) -> Weight { - (44424000 as Weight) - .saturating_add((291000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn remove_vote(r: u32, ) -> Weight { - (28250000 as Weight) - .saturating_add((283000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn remove_other_vote(r: u32, ) -> Weight { - (28250000 as Weight) - .saturating_add((283000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_elections_phragmen.rs b/node/runtime/src/weights/pallet_elections_phragmen.rs deleted file mode 100644 index f7ce1620..00000000 --- a/node/runtime/src/weights/pallet_elections_phragmen.rs +++ /dev/null @@ -1,89 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2019-2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_elections_phragmen::WeightInfo for WeightInfo { - fn vote(v: u32, ) -> Weight { - (91_489_000 as Weight) - .saturating_add((199_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn vote_update(v: u32, ) -> Weight { - (56_511_000 as Weight) - .saturating_add((245_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn remove_voter() -> Weight { - (76_714_000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn report_defunct_voter_correct(c: u32, v: u32, ) -> Weight { - (0 as Weight) - .saturating_add((1_743_000 as Weight).saturating_mul(c as Weight)) - .saturating_add((31_750_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(DbWeight::get().reads(7 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn report_defunct_voter_incorrect(c: u32, v: u32, ) -> Weight { - (0 as Weight) - .saturating_add((1_733_000 as Weight).saturating_mul(c as Weight)) - .saturating_add((31_861_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(DbWeight::get().reads(6 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn submit_candidacy(c: u32, ) -> Weight { - (74_714_000 as Weight) - .saturating_add((315_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn renounce_candidacy_candidate(c: u32, ) -> Weight { - (50_408_000 as Weight) - .saturating_add((159_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn renounce_candidacy_members() -> Weight { - (79_626_000 as Weight) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) - } - fn renounce_candidacy_runners_up() -> Weight { - (49_715_000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn remove_member_with_replacement() -> Weight { - (76_572_000 as Weight) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(5 as Weight)) - } - fn remove_member_wrong_refund() -> Weight { - (8_777_000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_identity.rs b/node/runtime/src/weights/pallet_identity.rs deleted file mode 100644 index 2995a767..00000000 --- a/node/runtime/src/weights/pallet_identity.rs +++ /dev/null @@ -1,136 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2019-2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_identity::WeightInfo for WeightInfo { - fn add_registrar(r: u32, ) -> Weight { - (39_603_000 as Weight) - .saturating_add((418_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_identity(r: u32, x: u32, ) -> Weight { - (110_679_000 as Weight) - .saturating_add((389_000 as Weight).saturating_mul(r as Weight)) - .saturating_add((2_985_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_subs_new(s: u32, ) -> Weight { - (78_697_000 as Weight) - .saturating_add((15_225_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(DbWeight::get().writes(1 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - fn set_subs_old(p: u32, ) -> Weight { - (71_308_000 as Weight) - .saturating_add((5_772_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) - } - fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (91_553_000 as Weight) - .saturating_add((284_000 as Weight).saturating_mul(r as Weight)) - .saturating_add((5_749_000 as Weight).saturating_mul(s as Weight)) - .saturating_add((1_621_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - fn request_judgement(r: u32, x: u32, ) -> Weight { - (110_856_000 as Weight) - .saturating_add((496_000 as Weight).saturating_mul(r as Weight)) - .saturating_add((3_221_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn cancel_request(r: u32, x: u32, ) -> Weight { - (96_857_000 as Weight) - .saturating_add((311_000 as Weight).saturating_mul(r as Weight)) - .saturating_add((3_204_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_fee(r: u32, ) -> Weight { - (16_276_000 as Weight) - .saturating_add((381_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_account_id(r: u32, ) -> Weight { - (18_530_000 as Weight) - .saturating_add((391_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_fields(r: u32, ) -> Weight { - (16_359_000 as Weight) - .saturating_add((379_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn provide_judgement(r: u32, x: u32, ) -> Weight { - (72_869_000 as Weight) - .saturating_add((423_000 as Weight).saturating_mul(r as Weight)) - .saturating_add((3_187_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (123_199_000 as Weight) - .saturating_add((71_000 as Weight).saturating_mul(r as Weight)) - .saturating_add((5_730_000 as Weight).saturating_mul(s as Weight)) - .saturating_add((2_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - fn add_sub(s: u32, ) -> Weight { - (110_070_000 as Weight) - .saturating_add((262_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn rename_sub(s: u32, ) -> Weight { - (37_130_000 as Weight) - .saturating_add((79_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn remove_sub(s: u32, ) -> Weight { - (103_295_000 as Weight) - .saturating_add((235_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn quit_sub(s: u32, ) -> Weight { - (65_716_000 as Weight) - .saturating_add((227_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_im_online.rs b/node/runtime/src/weights/pallet_im_online.rs deleted file mode 100644 index 25daff6a..00000000 --- a/node/runtime/src/weights/pallet_im_online.rs +++ /dev/null @@ -1,34 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_im_online::WeightInfo for WeightInfo { - fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (139830000 as Weight) - .saturating_add((211000 as Weight).saturating_mul(k as Weight)) - .saturating_add((654000 as Weight).saturating_mul(e as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_indices.rs b/node/runtime/src/weights/pallet_indices.rs deleted file mode 100644 index f6a708bb..00000000 --- a/node/runtime/src/weights/pallet_indices.rs +++ /dev/null @@ -1,52 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2017-2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_indices::WeightInfo for WeightInfo { - fn claim() -> Weight { - (56_237_000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn transfer() -> Weight { - (63_665_000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn free() -> Weight { - (50_736_000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn force_transfer() -> Weight { - (52_361_000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn freeze() -> Weight { - (46_483_000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_multisig.rs b/node/runtime/src/weights/pallet_multisig.rs deleted file mode 100644 index 1de1d9a6..00000000 --- a/node/runtime/src/weights/pallet_multisig.rs +++ /dev/null @@ -1,90 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2019-2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_multisig::WeightInfo for WeightInfo { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (17_161_000 as Weight) - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (79_857_000 as Weight) - .saturating_add((131_000 as Weight).saturating_mul(s as Weight)) - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (90_218_000 as Weight) - .saturating_add((129_000 as Weight).saturating_mul(s as Weight)) - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (48_402_000 as Weight) - .saturating_add((132_000 as Weight).saturating_mul(s as Weight)) - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (88_390_000 as Weight) - .saturating_add((120_000 as Weight).saturating_mul(s as Weight)) - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (98_960_000 as Weight) - .saturating_add((276_000 as Weight).saturating_mul(s as Weight)) - .saturating_add((6_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn approve_as_multi_create(s: u32, ) -> Weight { - (80_185_000 as Weight) - .saturating_add((121_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn approve_as_multi_approve(s: u32, ) -> Weight { - (48_386_000 as Weight) - .saturating_add((143_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn approve_as_multi_complete(s: u32, ) -> Weight { - (177_181_000 as Weight) - .saturating_add((273_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn cancel_as_multi(s: u32, ) -> Weight { - (126_334_000 as Weight) - .saturating_add((124_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_proxy.rs b/node/runtime/src/weights/pallet_proxy.rs deleted file mode 100644 index 92c43cd4..00000000 --- a/node/runtime/src/weights/pallet_proxy.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5 - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_proxy::WeightInfo for WeightInfo { - fn proxy(p: u32, ) -> Weight { - (26127000 as Weight) - .saturating_add((214000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - } - fn proxy_announced(a: u32, p: u32, ) -> Weight { - (55405000 as Weight) - .saturating_add((774000 as Weight).saturating_mul(a as Weight)) - .saturating_add((209000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn remove_announcement(a: u32, p: u32, ) -> Weight { - (35879000 as Weight) - .saturating_add((783000 as Weight).saturating_mul(a as Weight)) - .saturating_add((20000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn reject_announcement(a: u32, p: u32, ) -> Weight { - (36097000 as Weight) - .saturating_add((780000 as Weight).saturating_mul(a as Weight)) - .saturating_add((12000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn announce(a: u32, p: u32, ) -> Weight { - (53769000 as Weight) - .saturating_add((675000 as Weight).saturating_mul(a as Weight)) - .saturating_add((214000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn add_proxy(p: u32, ) -> Weight { - (36082000 as Weight) - .saturating_add((234000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn remove_proxy(p: u32, ) -> Weight { - (32885000 as Weight) - .saturating_add((267000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn remove_proxies(p: u32, ) -> Weight { - (31735000 as Weight) - .saturating_add((215000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn anonymous(p: u32, ) -> Weight { - (50907000 as Weight) - .saturating_add((61000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn kill_anonymous(p: u32, ) -> Weight { - (33926000 as Weight) - .saturating_add((208000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_scheduler.rs b/node/runtime/src/weights/pallet_scheduler.rs deleted file mode 100644 index 110a0545..00000000 --- a/node/runtime/src/weights/pallet_scheduler.rs +++ /dev/null @@ -1,51 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_scheduler::WeightInfo for WeightInfo { - fn schedule(s: u32, ) -> Weight { - (37_835_000 as Weight) - .saturating_add((81_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn cancel(s: u32, ) -> Weight { - (34_707_000 as Weight) - .saturating_add((3_125_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn schedule_named(s: u32, ) -> Weight { - (48_065_000 as Weight) - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn cancel_named(s: u32, ) -> Weight { - (38_776_000 as Weight) - .saturating_add((3_138_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_session.rs b/node/runtime/src/weights/pallet_session.rs deleted file mode 100644 index 39739362..00000000 --- a/node/runtime/src/weights/pallet_session.rs +++ /dev/null @@ -1,37 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2017-2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_session::WeightInfo for WeightInfo { - fn set_keys() -> Weight { - (88_411_000 as Weight) - .saturating_add(DbWeight::get().reads(6 as Weight)) - .saturating_add(DbWeight::get().writes(5 as Weight)) - } - fn purge_keys() -> Weight { - (51_843_000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(5 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_staking.rs b/node/runtime/src/weights/pallet_staking.rs deleted file mode 100644 index f5a70830..00000000 --- a/node/runtime/src/weights/pallet_staking.rs +++ /dev/null @@ -1,170 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2017-2020 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. - -//! Default weights of pallet-staking. -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_staking::WeightInfo for WeightInfo { - fn bond() -> Weight { - (144278000 as Weight) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) - } - fn bond_extra() -> Weight { - (110715000 as Weight) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn unbond() -> Weight { - (99840000 as Weight) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn withdraw_unbonded_update(s: u32, ) -> Weight { - (100728000 as Weight) - .saturating_add((63000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (168879000 as Weight) - .saturating_add((6666000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(7 as Weight)) - .saturating_add(DbWeight::get().writes(8 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - fn validate() -> Weight { - (35539000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn nominate(n: u32, ) -> Weight { - (48596000 as Weight) - .saturating_add((308000 as Weight).saturating_mul(n as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn chill() -> Weight { - (35144000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn set_payee() -> Weight { - (24255000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_controller() -> Weight { - (52294000 as Weight) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn set_validator_count() -> Weight { - (5185000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn force_no_eras() -> Weight { - (5907000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn force_new_era() -> Weight { - (5917000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn force_new_era_always() -> Weight { - (5952000 as Weight) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn set_invulnerables(v: u32, ) -> Weight { - (6324000 as Weight) - .saturating_add((9000 as Weight).saturating_mul(v as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn force_unstake(s: u32, ) -> Weight { - (119691000 as Weight) - .saturating_add((6681000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(8 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - fn cancel_deferred_slash(s: u32, ) -> Weight { - (5820201000 as Weight) - .saturating_add((34672000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (0 as Weight) - .saturating_add((92486000 as Weight).saturating_mul(n as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) - } - fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (0 as Weight) - .saturating_add((117324000 as Weight).saturating_mul(n as Weight)) - .saturating_add(DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) - .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) - } - fn rebond(l: u32, ) -> Weight { - (71316000 as Weight) - .saturating_add((142000 as Weight).saturating_mul(l as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn set_history_depth(e: u32, ) -> Weight { - (0 as Weight) - .saturating_add((51901000 as Weight).saturating_mul(e as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) - .saturating_add(DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) - } - fn reap_stash(s: u32, ) -> Weight { - (147166000 as Weight) - .saturating_add((6661000 as Weight).saturating_mul(s as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(8 as Weight)) - .saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - fn new_era(v: u32, n: u32, ) -> Weight { - (0 as Weight) - .saturating_add((1440459000 as Weight).saturating_mul(v as Weight)) - .saturating_add((182580000 as Weight).saturating_mul(n as Weight)) - .saturating_add(DbWeight::get().reads(10 as Weight)) - .saturating_add(DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight))) - .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) - .saturating_add(DbWeight::get().writes(8 as Weight)) - .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) - } - fn submit_solution_better(v: u32, n: u32, a: u32, w: u32, ) -> Weight { - (0 as Weight) - .saturating_add((964000 as Weight).saturating_mul(v as Weight)) - .saturating_add((432000 as Weight).saturating_mul(n as Weight)) - .saturating_add((204294000 as Weight).saturating_mul(a as Weight)) - .saturating_add((9546000 as Weight).saturating_mul(w as Weight)) - .saturating_add(DbWeight::get().reads(6 as Weight)) - .saturating_add(DbWeight::get().reads((4 as Weight).saturating_mul(a as Weight))) - .saturating_add(DbWeight::get().reads((1 as Weight).saturating_mul(w as Weight))) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } -} diff --git a/node/runtime/src/weights/pallet_timestamp.rs b/node/runtime/src/weights/pallet_timestamp.rs deleted file mode 100644 index cfd5f192..00000000 --- a/node/runtime/src/weights/pallet_timestamp.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5 - -#![allow(unused_parens)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_timestamp::WeightInfo for WeightInfo { - // WARNING! Some components were not used: ["t"] - fn set() -> Weight { - (9133000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - // WARNING! Some components were not used: ["t"] - fn on_finalize() -> Weight { - (5915000 as Weight) - } -} diff --git a/node/runtime/src/weights/pallet_treasury.rs b/node/runtime/src/weights/pallet_treasury.rs deleted file mode 100644 index fe1a3166..00000000 --- a/node/runtime/src/weights/pallet_treasury.rs +++ /dev/null @@ -1,140 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_treasury::WeightInfo for WeightInfo { - fn propose_spend() -> Weight { - (79604000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn reject_proposal() -> Weight { - (61001000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn approve_proposal() -> Weight { - (17835000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn report_awesome(r: u32, ) -> Weight { - (101602000 as Weight) - .saturating_add((2000 as Weight).saturating_mul(r as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - // WARNING! Some components were not used: ["r"] - fn retract_tip() -> Weight { - (82970000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn tip_new(r: u32, t: u32, ) -> Weight { - (63995000 as Weight) - .saturating_add((2000 as Weight).saturating_mul(r as Weight)) - .saturating_add((153000 as Weight).saturating_mul(t as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn tip(t: u32, ) -> Weight { - (46765000 as Weight) - .saturating_add((711000 as Weight).saturating_mul(t as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn close_tip(t: u32, ) -> Weight { - (160874000 as Weight) - .saturating_add((379000 as Weight).saturating_mul(t as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn propose_bounty(d: u32, ) -> Weight { - (86198000 as Weight) - .saturating_add((1000 as Weight).saturating_mul(d as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) - } - fn approve_bounty() -> Weight { - (23063000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn propose_curator() -> Weight { - (18890000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn unassign_curator() -> Weight { - (66768000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn accept_curator() -> Weight { - (69131000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn award_bounty() -> Weight { - (48184000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn claim_bounty() -> Weight { - (243104000 as Weight) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(5 as Weight)) - } - fn close_bounty_proposed() -> Weight { - (65917000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn close_bounty_active() -> Weight { - (157232000 as Weight) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) - } - fn extend_bounty_expiry() -> Weight { - (46216000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn on_initialize_proposals(p: u32, ) -> Weight { - (119765000 as Weight) - .saturating_add((108368000 as Weight).saturating_mul(p as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(DbWeight::get().writes(2 as Weight)) - .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) - } - fn on_initialize_bounties(b: u32, ) -> Weight { - (112536000 as Weight) - .saturating_add((107132000 as Weight).saturating_mul(b as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) - .saturating_add(DbWeight::get().writes(2 as Weight)) - .saturating_add(DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight))) - } -} diff --git a/node/runtime/src/weights/pallet_utility.rs b/node/runtime/src/weights/pallet_utility.rs deleted file mode 100644 index 75e3fe60..00000000 --- a/node/runtime/src/weights/pallet_utility.rs +++ /dev/null @@ -1,36 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2017-2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; - -impl pallet_utility::WeightInfo for WeightInfo { - fn batch(c: u32, ) -> Weight { - (16461000 as Weight) - .saturating_add((1982000 as Weight).saturating_mul(c as Weight)) - } - // WARNING! Some components were not used: ["u"] - fn as_derivative() -> Weight { - (4086000 as Weight) - } -} diff --git a/node/runtime/src/weights/pallet_vesting.rs b/node/runtime/src/weights/pallet_vesting.rs deleted file mode 100644 index b2a4b57e..00000000 --- a/node/runtime/src/weights/pallet_vesting.rs +++ /dev/null @@ -1,63 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2020 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. - -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc6 - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; - -pub struct WeightInfo; -impl pallet_vesting::WeightInfo for WeightInfo { - fn vest_locked(l: u32, ) -> Weight { - (82109000 as Weight) - .saturating_add((332000 as Weight).saturating_mul(l as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) - } - fn vest_unlocked(l: u32, ) -> Weight { - (88419000 as Weight) - .saturating_add((3000 as Weight).saturating_mul(l as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn vest_other_locked(l: u32, ) -> Weight { - (81277000 as Weight) - .saturating_add((321000 as Weight).saturating_mul(l as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) - } - fn vest_other_unlocked(l: u32, ) -> Weight { - (87584000 as Weight) - .saturating_add((19000 as Weight).saturating_mul(l as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn vested_transfer(l: u32, ) -> Weight { - (185916000 as Weight) - .saturating_add((625000 as Weight).saturating_mul(l as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) - } - fn force_vested_transfer(l: u32, ) -> Weight { - (185916000 as Weight) - .saturating_add((625000 as Weight).saturating_mul(l as Weight)) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) - } -} diff --git a/node/testing/Cargo.toml b/node/testing/Cargo.toml index 6cef50cb..17f035ce 100644 --- a/node/testing/Cargo.toml +++ b/node/testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edgeware-testing" -version = "3.1.0" +version = "3.2.0" authors = ["Commonwealth Labs "] description = "Test utilities for Edgeware." edition = "2018" @@ -10,28 +10,45 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -pallet-balances = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -codec = { package = "parity-scale-codec", version = "1.3.0" } -sc-service = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master", features = ["test-helpers", "db"] } -pallet-grandpa = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-indices = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-keyring = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-core = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-io = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-support = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-session = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sp-runtime = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-staking = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -sc-executor = { version = "0.8.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -frame-system = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -substrate-test-client = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-timestamp = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-transaction-payment = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -pallet-treasury = { version = "2.0.0", git = "https://github.com/hicommonwealth/substrate.git", branch = "master" } -wabt = "0.10.0" +pallet-balances = { version = "2.0" } +sc-service = { version = "0.8", features = ["test-helpers", "db"] } +sc-client-db = { version = "0.8", features = ["kvdb-rocksdb", "parity-db"] } +sc-client-api = { version = "2.0" } +codec = { package = "parity-scale-codec", version = "1.3.4" } +pallet-contracts = { version = "2.0" } +pallet-grandpa = { version = "2.0" } +pallet-indices = { version = "2.0" } +sp-keyring = { version = "2.0" } +sp-core = { version = "2.0" } +sp-io = { version = "2.0" } +frame-support = { version = "2.0" } +pallet-session = { version = "2.0" } +sp-runtime = { version = "2.0" } +pallet-staking = { version = "2.0" } +sc-executor = { version = "0.8" } +sp-consensus = { version = "0.8" } +frame-system = { version = "2.0" } +substrate-test-client = { version = "2.0" } +pallet-timestamp = { version = "2.0" } +pallet-transaction-payment = { version = "2.0" } +pallet-treasury = { version = "2.0" } +sp-api = { version = "2.0" } +sp-timestamp = { version = "2.0", default-features = false } +sp-block-builder = { version = "2.0" } +sc-block-builder = { version = "0.8" } +sp-inherents = { version = "2.0" } +sp-blockchain = { version = "2.0" } +log = "0.4.8" +tempfile = "3.1.0" +fs_extra = "1" +futures = "0.3.1" + +edgeware-executor = { path = "../executor" } +edgeware-primitives = { path = "../primitives" } +edgeware-runtime = { path = "../runtime" } +treasury-reward = { package = "edge-treasury-reward", path = "../../modules/edge-treasury-reward" } + +[dev-dependencies] +criterion = "0.3.0" +sc-cli = { version = "0.8" } -edgeware-executor = { version = "3.1.0", path = "../executor" } -edgeware-primitives = { version = "3.1.0", path = "../primitives" } -edgeware-runtime = { version = "3.1.0", path = "../runtime" } -signaling = { package = "edge-signaling", version = "1.0.0", path = "../../modules/edge-signaling" } -treasury-reward = { package = "edge-treasury-reward", version = "1.0.0", path = "../../modules/edge-treasury-reward" } \ No newline at end of file diff --git a/node/testing/src/client.rs b/node/testing/src/client.rs index e36dd142..9dcc5fca 100644 --- a/node/testing/src/client.rs +++ b/node/testing/src/client.rs @@ -16,9 +16,9 @@ //! Utilites to build a `TestClient` for `node-runtime`. -use sc_service::client; +use sp_runtime::Storage; use sp_runtime::BuildStorage; - +use sc_service::client; /// Re-export test-client utilities. pub use substrate_test_client::*; @@ -36,6 +36,9 @@ pub type Client = client::Client< edgeware_runtime::RuntimeApi, >; +/// Transaction for node-runtime. +pub type Transaction = sc_client_api::backend::TransactionFor; + /// Genesis configuration parameters for `TestClient`. #[derive(Default)] pub struct GenesisParameters { @@ -44,9 +47,7 @@ pub struct GenesisParameters { impl substrate_test_client::GenesisInit for GenesisParameters { fn genesis_storage(&self) -> Storage { - crate::genesis::config(self.support_changes_trie, None) - .build_storage() - .unwrap() + crate::genesis::config(self.support_changes_trie, None).build_storage().unwrap() } } @@ -59,15 +60,13 @@ pub trait TestClientBuilderExt: Sized { fn build(self) -> Client; } -impl TestClientBuilderExt - for substrate_test_client::TestClientBuilder< - edgeware_primitives::Block, - client::LocalCallExecutor, - Backend, - GenesisParameters, - > -{ - fn new() -> Self { +impl TestClientBuilderExt for substrate_test_client::TestClientBuilder< + edgeware_primitives::Block, + client::LocalCallExecutor, + Backend, + GenesisParameters, +> { + fn new() -> Self{ Self::default() } diff --git a/node/testing/src/genesis.rs b/node/testing/src/genesis.rs index d56284c6..41ca8c04 100644 --- a/node/testing/src/genesis.rs +++ b/node/testing/src/genesis.rs @@ -105,8 +105,9 @@ pub fn config(support_changes_trie: bool, code: Option<&[u8]>) -> GenesisConfig pallet_elections_phragmen: Some(Default::default()), pallet_sudo: Some(Default::default()), pallet_vesting: Some(Default::default()), + pallet_evm: Some(Default::default()), + pallet_ethereum: Some(Default::default()), pallet_contracts: Some(Default::default()), - signaling: Some(Default::default()), treasury_reward: Some(Default::default()), } } diff --git a/node/testing/src/keyring.rs b/node/testing/src/keyring.rs index 1be124ad..f0740ad1 100644 --- a/node/testing/src/keyring.rs +++ b/node/testing/src/keyring.rs @@ -1,26 +1,28 @@ -// Copyright 2018-2020 Commonwealth Labs, Inc. -// This file is part of Edgeware. +// This file is part of Substrate. -// Edgeware is free software: you can redistribute it and/or modify +// Copyright (C) 2019-2020 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// Edgeware is distributed in the hope that it will be useful, +// This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License -// along with Edgeware. If not, see . +// along with this program. If not, see . //! Test accounts. -use codec::Encode; +use sp_keyring::{AccountKeyring, Sr25519Keyring, Ed25519Keyring}; use edgeware_primitives::{AccountId, Balance, Index}; -use edgeware_runtime::{CheckedExtrinsic, SessionKeys, SignedExtra, UncheckedExtrinsic}; -use sp_keyring::{AccountKeyring, Ed25519Keyring, Sr25519Keyring}; +use edgeware_runtime::{CheckedExtrinsic, UncheckedExtrinsic, SessionKeys, SignedExtra}; use sp_runtime::generic::Era; +use codec::Encode; /// Alice's account id. pub fn alice() -> AccountId { @@ -79,38 +81,20 @@ pub fn signed_extra(nonce: Index, extra_fee: Balance) -> SignedExtra { } /// Sign given `CheckedExtrinsic`. -pub fn sign( - xt: CheckedExtrinsic, - spec_version: u32, - tx_version: u32, - genesis_hash: [u8; 32], -) -> UncheckedExtrinsic { +pub fn sign(xt: CheckedExtrinsic, spec_version: u32, tx_version: u32, genesis_hash: [u8; 32]) -> UncheckedExtrinsic { match xt.signed { Some((signed, extra)) => { - let payload = ( - xt.function, - extra.clone(), - spec_version, - tx_version, - genesis_hash, - genesis_hash, - ); + let payload = (xt.function, extra.clone(), spec_version, tx_version, genesis_hash, genesis_hash); let key = AccountKeyring::from_account_id(&signed).unwrap(); - let signature = payload - .using_encoded(|b| { - if b.len() > 256 { - key.sign(&sp_io::hashing::blake2_256(b)) - } else { - key.sign(b) - } - }) - .into(); + let signature = payload.using_encoded(|b| { + if b.len() > 256 { + key.sign(&sp_io::hashing::blake2_256(b)) + } else { + key.sign(b) + } + }).into(); UncheckedExtrinsic { - signature: Some(( - pallet_indices::address::Address::Id(signed), - signature, - extra, - )), + signature: Some((sp_runtime::MultiAddress::Id(signed), signature, extra)), function: payload.0, } } @@ -120,3 +104,4 @@ pub fn sign( }, } } + \ No newline at end of file diff --git a/scripts/init.sh b/scripts/init.sh index 33354859..c477f40a 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -9,7 +9,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then SUDO_PREFIX='sudo' fi $SUDO_PREFIX apt update - $SUDO_PREFIX apt install -y build-essential cmake pkg-config libssl-dev openssl git clang libclang-dev + $SUDO_PREFIX apt install -y curl build-essential cmake pkg-config libssl-dev openssl git clang libclang-dev elif [[ "$OSTYPE" == "darwin"* ]]; then echo "Found macbook" brew install cmake pkg-config openssl git llvm @@ -26,9 +26,3 @@ fi rustup update stable rustup update nightly rustup target add wasm32-unknown-unknown --toolchain nightly - -if [[ $(wasm-gc) ]]; then - echo "Found wasm-gc" -else - cargo install --git https://github.com/alexcrichton/wasm-gc -fi diff --git a/scripts/prometheus_setup.sh b/scripts/prometheus_setup.sh new file mode 100644 index 00000000..d80d97ba --- /dev/null +++ b/scripts/prometheus_setup.sh @@ -0,0 +1,57 @@ +# Ensure edgeware is up +if ! curl -s localhost:9615/metrics -o /dev/null; then + echo "Could not query edgeware metrics endpoint" + exit 1 +fi + +# Install prometheus +sudo apt-get install prometheus -y + +# Configure prometheus +sudo echo "" >> /etc/prometheus/prometheus.yml +sudo echo " - job_name: substrate_node" >> /etc/prometheus/prometheus.yml +sudo echo " scrape_interval: 5s" >> /etc/prometheus/prometheus.yml +sudo echo " static_configs:" >> /etc/prometheus/prometheus.yml +sudo echo " - targets: ['127.0.0.1:9615']" >> /etc/prometheus/prometheus.yml + +if ! test -f /usr/bin/prometheus; then + echo "Prometheus installed in an unexpected location." + echo "Binary should be '/usr/bin/prometheus'" + exit 1 +fi + +# Create service +sudo tee -a /etc/systemd/system/prometheus.service << END +[Unit] + Description=Prometheus Monitoring + Wants=network-online.target + After=network-online.target + +[Service] + User=prometheus + Group=prometheus + Type=simple + ExecStart=/usr/bin/prometheus \ + --config.file /etc/prometheus/prometheus.yml \ + --storage.tsdb.path /var/lib/prometheus/ \ + --web.console.templates=/etc/prometheus/consoles \ + --web.console.libraries=/etc/prometheus/console_libraries + ExecReload=/bin/kill -HUP $MAINPID + +[Install] + WantedBy=multi-user.target +END + +# Enable and run the service +sudo systemctl daemon-reload +sudo systemctl enable prometheus +sudo systemctl start prometheus + +# Verify prometheus installed +if ! curl -s localhost:9090 -o /dev/null; then + echo "Could not query prometheus!" + exit 1 +else + echo "Prometheus installed successfully!" + exit 0 +fi diff --git a/ts-tests/frontier-tester/README.md b/ts-tests/frontier-tester/README.md new file mode 100644 index 00000000..b0e148ad --- /dev/null +++ b/ts-tests/frontier-tester/README.md @@ -0,0 +1,33 @@ +## Edgeware Frontier Tester + +Unit tests for Edgeware Frontier. You must have the node built to run these tests. The location of the binary is defined in the environment variable `BINARY_PATH`, whose default is set in [utils.js](contracts/utils.js) as `../../target/release/edgeware`. + +To run a single test, use: + +``` +yarn test tests/ +``` + +To run all included frontier tests, use the following: + +``` +yarn test-ci +``` + +The following functionality is tested: +- Adding Liquidity to a fresh Uniswap deployment +- Generating an ERC20 Token Allowance +- Create Factory Contract +- Create2 Factory Contract +- Calling a precompile (ECRecover) +- Event emission and subscription +- Fallback function +- Hashing (on chain and with web3 provider): keccak256, sha3, ripemd +- Identity, modexp, and ed25519 precompiles. +- Contract Interfaces +- Edgeware Lockdrop +- Modifiers +- Transferring balance into EVM pallet +- Timestamps +- Contract creation with non-zero contract balance +- Basic substrate-native functionality including democracy proposals, treasury proposals, and identity registration. \ No newline at end of file diff --git a/ts-tests/frontier-tester/contracts/ContractImpl.sol b/ts-tests/frontier-tester/contracts/ContractImpl.sol new file mode 100644 index 00000000..d4875a60 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/ContractImpl.sol @@ -0,0 +1,9 @@ +pragma solidity ^0.5.0; + +import './IContract.sol'; + +contract ContractImpl is IContract { + function doSomething() external view returns (bool) { + return true; + } +} diff --git a/ts-tests/frontier-tester/contracts/Create2Factory.sol b/ts-tests/frontier-tester/contracts/Create2Factory.sol new file mode 100644 index 00000000..709a26e3 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/Create2Factory.sol @@ -0,0 +1,25 @@ +pragma solidity ^0.5.0; + +import './ValueContract.sol'; + +contract Create2Factory { + address addr; + + constructor() public { } + + function deploy(uint256 salt) public { + address addrLocal; + bytes memory bytecode = type(ValueContract).creationCode; + assembly { + addrLocal := create2(0, add(bytecode, 0x20), mload(bytecode), salt) + if iszero(extcodesize(addrLocal)) { + revert(0, 0) + } + } + addr = addrLocal; + } + + function viewAddr() public view returns (address) { + return addr; + } +} diff --git a/ts-tests/frontier-tester/contracts/CreateContract.sol b/ts-tests/frontier-tester/contracts/CreateContract.sol new file mode 100644 index 00000000..d010dbe6 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/CreateContract.sol @@ -0,0 +1,30 @@ +pragma solidity ^0.5.0; + +contract SubContract { + constructor() public payable { } + function getAddress() external view returns (address ownAddress) { + return address(this); + } + + function getValue() external view returns (uint) { + return address(this).balance; + } +} + +contract CreateContract { + address public deployed; + + constructor() public { } + + function spawn() external returns (SubContract subAddress) { + SubContract result = new SubContract(); + deployed = address(result); + return result; + } + + function spawnWithValue() external payable returns (SubContract subAddress) { + SubContract result = (new SubContract).value(msg.value)(); + deployed = address(result); + return result; + } +} diff --git a/ts-tests/frontier-tester/contracts/ECRecovery.sol b/ts-tests/frontier-tester/contracts/ECRecovery.sol new file mode 100644 index 00000000..c7ce0dd2 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/ECRecovery.sol @@ -0,0 +1,39 @@ +pragma solidity ^0.5.0; + +contract ECRecovery { + + /** + * @dev Recover signer address from a message by using his signature + * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address. + * @param sig bytes signature, the signature is generated using web3.eth.sign() + */ + function recover(bytes32 hash, bytes memory sig) public pure returns (address) { + bytes32 r; + bytes32 s; + uint8 v; + + //Check the signature length + if (sig.length != 65) { + return (address(0)); + } + + // Divide the signature in r, s and v variables + assembly { + r := mload(add(sig, 32)) + s := mload(add(sig, 64)) + v := byte(0, mload(add(sig, 96))) + } + + // Version of signature should be 27 or 28, but 0 and 1 are also possible versions + if (v < 27) { + v += 27; + } + + // If the version is correct return the signer address + if (v != 27 && v != 28) { + return (address(0)); + } else { + return ecrecover(hash, v, r, s); + } + } +} \ No newline at end of file diff --git a/ts-tests/frontier-tester/contracts/EventContract.sol b/ts-tests/frontier-tester/contracts/EventContract.sol new file mode 100644 index 00000000..4debd8c7 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/EventContract.sol @@ -0,0 +1,9 @@ +pragma solidity ^0.5.0; + +contract EventContract { + event e(address c); + + function emitEvent() public { + emit e(address(this)); + } +} diff --git a/ts-tests/frontier-tester/contracts/FallbackContract.sol b/ts-tests/frontier-tester/contracts/FallbackContract.sol new file mode 100644 index 00000000..a95aa5da --- /dev/null +++ b/ts-tests/frontier-tester/contracts/FallbackContract.sol @@ -0,0 +1,9 @@ +pragma solidity ^0.5.0; + +contract FallbackContract { + constructor() public { } + + function () external payable { + msg.sender.transfer(msg.value); + } +} \ No newline at end of file diff --git a/ts-tests/frontier-tester/contracts/Hashing.sol b/ts-tests/frontier-tester/contracts/Hashing.sol new file mode 100644 index 00000000..e28475a5 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/Hashing.sol @@ -0,0 +1,15 @@ +pragma solidity ^0.5.0; + +contract Hashing { + function callKeccak256(bytes memory input) public pure returns(bytes32 result) { + return keccak256(input); + } + + function callRipemd160(bytes memory input) public pure returns(bytes20 result) { + return ripemd160(input); + } + + function callSha256(bytes memory input) public pure returns(bytes32 result) { + return sha256(input); + } +} diff --git a/ts-tests/frontier-tester/contracts/IContract.sol b/ts-tests/frontier-tester/contracts/IContract.sol new file mode 100644 index 00000000..97da4318 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/IContract.sol @@ -0,0 +1,5 @@ +pragma solidity ^0.5.0; + +interface IContract { + function doSomething() external view returns (bool); +} diff --git a/ts-tests/frontier-tester/contracts/IContractUser.sol b/ts-tests/frontier-tester/contracts/IContractUser.sol new file mode 100644 index 00000000..299448f0 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/IContractUser.sol @@ -0,0 +1,17 @@ +pragma solidity ^0.5.0; + +import './IContract.sol'; + +contract IContractUser { + IContract created; + + constructor() public { } + + function linkContract(address a) public returns (bool) { + created = IContract(a); + } + + function doTheThing() public view returns (bool) { + return created.doSomething(); + } +} diff --git a/ts-tests/frontier-tester/contracts/Lockdrop.sol b/ts-tests/frontier-tester/contracts/Lockdrop.sol new file mode 100644 index 00000000..95907403 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/Lockdrop.sol @@ -0,0 +1,137 @@ +pragma solidity ^0.5.0; + +contract Lock { + // address owner; slot #0 + // address unlockTime; slot #1 + constructor (address owner, uint256 unlockTime) public payable { + assembly { + sstore(0x00, owner) + sstore(0x01, unlockTime) + } + } + + /** + * @dev Withdraw function once timestamp has passed unlock time + */ + function () external payable { // payable so solidity doesn't add unnecessary logic + assembly { + switch gt(timestamp, sload(0x01)) + case 0 { revert(0, 0) } + case 1 { + switch call(gas, sload(0x00), balance(address), 0, 0, 0, 0) + case 0 { revert(0, 0) } + } + } + } +} + +contract Lockdrop { + enum Term { + ThreeMo, + SixMo, + TwelveMo + } + // Time constants + uint256 constant public LOCK_DROP_PERIOD = 1 days * 92; // 3 months + uint256 public LOCK_START_TIME; + uint256 public LOCK_END_TIME; + // ETH locking events + event Locked(address indexed owner, uint256 eth, Lock lockAddr, Term term, bytes edgewareAddr, bool isValidator, uint time); + event Signaled(address indexed contractAddr, bytes edgewareAddr, uint time); + + constructor(uint startTime) public { + LOCK_START_TIME = startTime; + LOCK_END_TIME = startTime + LOCK_DROP_PERIOD; + } + + /** + * @dev Locks up the value sent to contract in a new Lock + * @param term The length of the lock up + * @param edgewareAddr The bytes representation of the target edgeware key + * @param isValidator Indicates if sender wishes to be a validator + */ + function lock(Term term, bytes calldata edgewareAddr, bool isValidator) + external + payable + // didStart + // didNotEnd + { + uint256 eth = msg.value; + address owner = msg.sender; + uint256 unlockTime = unlockTimeForTerm(term); + // Create ETH lock contract + Lock lockAddr = (new Lock).value(eth)(owner, unlockTime); + // ensure lock contract has at least all the ETH, or fail + assert(address(lockAddr).balance >= msg.value); + emit Locked(owner, eth, lockAddr, term, edgewareAddr, isValidator, now); + } + + /** + * @dev Signals a contract's (or address's) balance decided after lock period + * @param contractAddr The contract address from which to signal the balance of + * @param nonce The transaction nonce of the creator of the contract + * @param edgewareAddr The bytes representation of the target edgeware key + */ + function signal(address contractAddr, uint32 nonce, bytes calldata edgewareAddr) + external + didStart + didNotEnd + didCreate(contractAddr, msg.sender, nonce) + { + emit Signaled(contractAddr, edgewareAddr, now); + } + + function unlockTimeForTerm(Term term) internal view returns (uint256) { + if (term == Term.ThreeMo) return now + 92 days; + if (term == Term.SixMo) return now + 183 days; + if (term == Term.TwelveMo) return now + 365 days; + + revert(); + } + + /** + * @dev Ensures the lockdrop has started + */ + modifier didStart() { + require(now >= LOCK_START_TIME); + _; + } + + /** + * @dev Ensures the lockdrop has not ended + */ + modifier didNotEnd() { + require(now <= LOCK_END_TIME); + _; + } + + /** + * @dev Rebuilds the contract address from a normal address and transaction nonce + * @param _origin The non-contract address derived from a user's public key + * @param _nonce The transaction nonce from which to generate a contract address + */ + function addressFrom(address _origin, uint32 _nonce) public pure returns (address) { + if(_nonce == 0x00) return address(uint160(uint256(keccak256(abi.encodePacked(byte(0xd6), byte(0x94), _origin, byte(0x80)))))); + if(_nonce <= 0x7f) return address(uint160(uint256(keccak256(abi.encodePacked(byte(0xd6), byte(0x94), _origin, uint8(_nonce)))))); + if(_nonce <= 0xff) return address(uint160(uint256(keccak256(abi.encodePacked(byte(0xd7), byte(0x94), _origin, byte(0x81), uint8(_nonce)))))); + if(_nonce <= 0xffff) return address(uint160(uint256(keccak256(abi.encodePacked(byte(0xd8), byte(0x94), _origin, byte(0x82), uint16(_nonce)))))); + if(_nonce <= 0xffffff) return address(uint160(uint256(keccak256(abi.encodePacked(byte(0xd9), byte(0x94), _origin, byte(0x83), uint24(_nonce)))))); + return address(uint160(uint256(keccak256(abi.encodePacked(byte(0xda), byte(0x94), _origin, byte(0x84), uint32(_nonce)))))); // more than 2^32 nonces not realistic + } + + /** + * @dev Ensures the target address was created by a parent at some nonce + * @param target The target contract address (or trivially the parent) + * @param parent The creator of the alleged contract address + * @param nonce The creator's tx nonce at the time of the contract creation + */ + modifier didCreate(address target, address parent, uint32 nonce) { + // Trivially let senders "create" themselves + if (target == parent) { + _; + } else { + require(target == addressFrom(parent, nonce)); + _; + } + } +} \ No newline at end of file diff --git a/ts-tests/frontier-tester/contracts/Migrations.sol b/ts-tests/frontier-tester/contracts/Migrations.sol new file mode 100644 index 00000000..be990a09 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/Migrations.sol @@ -0,0 +1,26 @@ +pragma solidity ^0.5.0; + +contract Migrations { + address public owner; + + // A function with the signature `last_completed_migration()`, returning a uint, is required. + uint public last_completed_migration; + + modifier restricted() { + if (msg.sender == owner) _; + } + + constructor () public { + owner = msg.sender; + } + + // A function with the signature `setCompleted(uint)` is required. + function setCompleted(uint completed) public { + last_completed_migration = completed; + } + + function upgrade(address new_address) public { + Migrations upgraded = Migrations(new_address); + upgraded.setCompleted(last_completed_migration); + } +} diff --git a/ts-tests/frontier-tester/contracts/Multicall.sol b/ts-tests/frontier-tester/contracts/Multicall.sol new file mode 100644 index 00000000..7e6cd973 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/Multicall.sol @@ -0,0 +1,45 @@ +pragma solidity >=0.5.0; +pragma experimental ABIEncoderV2; + +/// @title Multicall - Aggregate results from multiple read-only function calls +/// @author Michael Elliot +/// @author Joshua Levine +/// @author Nick Johnson + +contract Multicall { + struct Call { + address target; + bytes callData; + } + function aggregate(Call[] memory calls) public returns (uint256 blockNumber, bytes[] memory returnData) { + blockNumber = block.number; + returnData = new bytes[](calls.length); + for(uint256 i = 0; i < calls.length; i++) { + (bool success, bytes memory ret) = calls[i].target.call(calls[i].callData); + require(success); + returnData[i] = ret; + } + } + // Helper functions + function getEthBalance(address addr) public view returns (uint256 balance) { + balance = addr.balance; + } + function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) { + blockHash = blockhash(blockNumber); + } + function getLastBlockHash() public view returns (bytes32 blockHash) { + blockHash = blockhash(block.number - 1); + } + function getCurrentBlockTimestamp() public view returns (uint256 timestamp) { + timestamp = block.timestamp; + } + function getCurrentBlockDifficulty() public view returns (uint256 difficulty) { + difficulty = block.difficulty; + } + function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) { + gaslimit = block.gaslimit; + } + function getCurrentBlockCoinbase() public view returns (address coinbase) { + coinbase = block.coinbase; + } +} diff --git a/ts-tests/frontier-tester/contracts/OwnerContract.sol b/ts-tests/frontier-tester/contracts/OwnerContract.sol new file mode 100644 index 00000000..3354ec6b --- /dev/null +++ b/ts-tests/frontier-tester/contracts/OwnerContract.sol @@ -0,0 +1,17 @@ +pragma solidity ^0.5.0; + +contract OwnerContract { + address owner; + constructor() public { + owner = msg.sender; + } + + function makeCall() public view isOwner returns(bool) { + return true; + } + + modifier isOwner() { + require(msg.sender == owner, "only owner"); + _; + } +} diff --git a/ts-tests/frontier-tester/contracts/StoreNum.sol b/ts-tests/frontier-tester/contracts/StoreNum.sol new file mode 100644 index 00000000..cfff179e --- /dev/null +++ b/ts-tests/frontier-tester/contracts/StoreNum.sol @@ -0,0 +1,13 @@ +pragma solidity ^0.5.0; + +contract StoreNum { + uint8[] store; + + function addToStore(uint8 number) public { + store.push(number); + } + + function getStore() public view returns(uint8[] memory) { + return store; + } +} diff --git a/ts-tests/frontier-tester/contracts/TimeContract.sol b/ts-tests/frontier-tester/contracts/TimeContract.sol new file mode 100644 index 00000000..ce41b412 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/TimeContract.sol @@ -0,0 +1,32 @@ +pragma solidity ^0.5.0; + +contract TimeContract { + uint timeCreated; + uint lastChecked; + + constructor() public { + timeCreated = now; + } + + modifier didNotEnd() { + require(now <= (timeCreated + 1 days)); + _; + } + + function timeBeforeEnd() public didNotEnd returns (uint) { + lastChecked = now; + return lastChecked; + } + + function viewTimeCreated() public view returns (uint) { + return timeCreated; + } + + function viewNow() public view returns (uint) { + return now; + } + + function viewBlockTimestamp() public view returns (uint) { + return block.timestamp; + } +} diff --git a/ts-tests/frontier-tester/contracts/TokenA.sol b/ts-tests/frontier-tester/contracts/TokenA.sol new file mode 100644 index 00000000..cab7bf90 --- /dev/null +++ b/ts-tests/frontier-tester/contracts/TokenA.sol @@ -0,0 +1,14 @@ +pragma solidity ^0.5.0; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; + +// This ERC-20 contract mints the specified amount of tokens to the contract creator. +contract TokenA is ERC20, ERC20Detailed { + constructor(uint256 initialSupply) + public + ERC20Detailed("TokenA", "TOKA", 18) + { + _mint(msg.sender, initialSupply); + } +} diff --git a/ts-tests/frontier-tester/contracts/TokenB.sol b/ts-tests/frontier-tester/contracts/TokenB.sol new file mode 100644 index 00000000..c9ee3fdd --- /dev/null +++ b/ts-tests/frontier-tester/contracts/TokenB.sol @@ -0,0 +1,14 @@ +pragma solidity ^0.5.0; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; + +// This ERC-20 contract mints the specified amount of tokens to the contract creator. +contract TokenB is ERC20, ERC20Detailed { + constructor(uint256 initialSupply) + public + ERC20Detailed("TokenB", "TOKB", 18) + { + _mint(msg.sender, initialSupply); + } +} diff --git a/ts-tests/frontier-tester/contracts/ValueContract.sol b/ts-tests/frontier-tester/contracts/ValueContract.sol new file mode 100644 index 00000000..26e1327e --- /dev/null +++ b/ts-tests/frontier-tester/contracts/ValueContract.sol @@ -0,0 +1,16 @@ +pragma solidity ^0.5.0; + +contract ValueContract { + uint valueStored; + constructor() public payable { + valueStored = msg.value; + } + + function sendValue() public payable { + valueStored = valueStored + msg.value; + } + + function getValue() public view returns (uint) { + return valueStored; + } +} diff --git a/ts-tests/frontier-tester/helpers/deployUniswap.js b/ts-tests/frontier-tester/helpers/deployUniswap.js new file mode 100644 index 00000000..b6125747 --- /dev/null +++ b/ts-tests/frontier-tester/helpers/deployUniswap.js @@ -0,0 +1,36 @@ +const contract = require("@truffle/contract"); + +// libraries +const Multicall = require('../build/contracts/Multicall.json'); +const WETH9 = require('@uniswap/v2-periphery/build/WETH9.json'); +const UniswapV2Factory = require('@uniswap/v2-core/build/UniswapV2Factory.json'); +const UniswapV2Router02 = require('@uniswap/v2-periphery/build/UniswapV2Router02.json'); + +// Initialization +const { account } = require('./utils'); + +const deploy = async (web3) => { + const d = async (name, Contract, args = []) => { + let c = contract({ + abi: Contract.abi, + unlinked_binary: Contract.bytecode, + }); + c.setProvider(web3.currentProvider); + let res = await c.new(...args, { from: account }); + console.log(`${name} deployed at address ${res.address}`); + return res; + }; + const multicall = await d("Multicall", Multicall); + const factory = await d("UniswapV2Factory", UniswapV2Factory, [ account ]); + const weth9 = await d("WETH9", WETH9); + const router = await d( + "UniswapV2Router02", + UniswapV2Router02, + [ factory.address, weth9.address ], + ); + return [factory.address, router.address]; +}; + +module.exports = { + deploy, +} \ No newline at end of file diff --git a/ts-tests/frontier-tester/helpers/flipper.json b/ts-tests/frontier-tester/helpers/flipper.json new file mode 100644 index 00000000..048997d4 --- /dev/null +++ b/ts-tests/frontier-tester/helpers/flipper.json @@ -0,0 +1,106 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0x11ba777b3457bf64cb99421786c90d421afde1c56579aa3dae336e58ccc8f783", + "language": "ink! 3.0.0-rc2", + "compiler": "rustc 1.47.0-nightly" + }, + "contract": { + "name": "flipper", + "version": "3.0.0-rc2", + "authors": [ + "Parity Technologies " + ] + }, + "spec": { + "constructors": [ + { + "args": [ + { + "name": "init_value", + "type": { + "displayName": [ + "bool" + ], + "type": 1 + } + } + ], + "docs": [ + " Creates a new flipper smart contract initialized with the given value." + ], + "name": [ + "new" + ], + "selector": "0xd183512b" + }, + { + "args": [], + "docs": [ + " Creates a new flipper smart contract initialized to `false`." + ], + "name": [ + "default" + ], + "selector": "0x6a3712e2" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [], + "docs": [ + " Flips the current value of the Flipper's bool." + ], + "mutates": true, + "name": [ + "flip" + ], + "payable": false, + "returnType": null, + "selector": "0xc096a5f3" + }, + { + "args": [], + "docs": [ + " Returns the current value of the Flipper's bool." + ], + "mutates": false, + "name": [ + "get" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "type": 1 + }, + "selector": "0x1e5ca456" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "value" + } + ] + } + }, + "types": [ + { + "def": { + "primitive": "bool" + } + } + ] +} \ No newline at end of file diff --git a/ts-tests/frontier-tester/helpers/flipper.wasm b/ts-tests/frontier-tester/helpers/flipper.wasm new file mode 100644 index 00000000..47b4bd92 Binary files /dev/null and b/ts-tests/frontier-tester/helpers/flipper.wasm differ diff --git a/ts-tests/frontier-tester/helpers/generalizedLocks.js b/ts-tests/frontier-tester/helpers/generalizedLocks.js new file mode 100644 index 00000000..9cbeab34 --- /dev/null +++ b/ts-tests/frontier-tester/helpers/generalizedLocks.js @@ -0,0 +1,5 @@ +module.exports.lockedContractAddresses = lockedContractAddresses = [ + "0x94bD4150e41c717B7E7564484693073239715376", + "0xdB0E7d784D6A7ca2CBDA6CE26ac3b1Bd348C06F8", + "0x3BfC20f0B9aFcAcE800D73D2191166FF16540258", +]; diff --git a/ts-tests/frontier-tester/helpers/initDefaultAccountBalance.ts b/ts-tests/frontier-tester/helpers/initDefaultAccountBalance.ts new file mode 100644 index 00000000..8541e478 --- /dev/null +++ b/ts-tests/frontier-tester/helpers/initDefaultAccountBalance.ts @@ -0,0 +1,50 @@ +import { ApiPromise, WsProvider } from '@polkadot/api'; +import { createTestPairs } from '@polkadot/keyring/testingPairs'; +import { assert } from 'chai'; +const { account, convertToSubstrateAddress, describeWithEdgeware } = require('./utils.js'); +import { spec } from '@edgeware/node-types'; +import Web3 from 'web3'; + +let sendSubstrateBalance = async (web3: Web3): Promise => { + // initialize polkadot API + const polkadotUrl = 'ws://localhost:9944'; + const api = await ApiPromise.create({ + provider: new WsProvider(polkadotUrl), + ...spec, + }); + + // configure funded substrate account, target account, and balance to send + const keyring = createTestPairs().dave; + const balance = await api.query.system.account(keyring.address); + if (balance.data.free.eqn(0)) { + throw new Error(`Fetched no balance for address ${keyring.address}`); + } + const value = balance.data.free.divn(2); // only send half of Bob's balance + const target = convertToSubstrateAddress(account); + + // send funds from Bob to the target account + console.log(`Transferring ${value.toString()} from Bob to default account.`); + const tx = api.tx.balances.transfer(target, value); + await new Promise((resolve) => { + tx.signAndSend(keyring, (result) => { + if (result.isError) { + assert.fail('tx failure'); + } + if (result.isCompleted) { + resolve(); + } + }); + }); + + // ensure the account has funds via web3 + const web3Balance = await web3.eth.getBalance(account); + await api.disconnect(); + console.log(`Transfer complete, web3 fetched balance: ${web3Balance}`); +} + +describeWithEdgeware('init default account balance', (context) => { + it('should initialize default account balance', async () => { + const web3 = context.web3; + await sendSubstrateBalance(web3); + }); +}); diff --git a/ts-tests/frontier-tester/helpers/lockdropHelper.js b/ts-tests/frontier-tester/helpers/lockdropHelper.js new file mode 100644 index 00000000..198860c5 --- /dev/null +++ b/ts-tests/frontier-tester/helpers/lockdropHelper.js @@ -0,0 +1,423 @@ +const Promise = require('bluebird'); +const keyring = require('@polkadot/keyring'); +const { toBN, fromWei, hexToNumber } = require('web3').utils; +const bs58 = require('bs58'); +const schedule = require('./schedule'); +const generalizedLocks = require('./generalizedLocks'); + +function getEffectiveValue(ethAmount, term, lockTime, lockStart, totalETH) { + // multiplicative bonus starts at 100 / 100 = 1 + let bonus = toBN(100); + // get multiplicative bonus if calculating allocation of locks + if (lockTime && lockStart) { + bonus = schedule.getEarlyParticipationBonus(lockTime, lockStart); + } + + if (term == '0') { + // three month term yields no bonus + return toBN(ethAmount).mul(toBN(100).mul(bonus)).div(toBN(10000)); + } else if (term == '1') { + // six month term yields 30% bonus + return toBN(ethAmount).mul(toBN(130).mul(bonus)).div(toBN(10000)); + } else if (term == '2') { + // twelve month term yields 120% bonus + return toBN(ethAmount).mul(toBN(220).mul(bonus)).div(toBN(10000)); + } else if (term == 'signaling') { + // 80% deduction + return toBN(ethAmount).mul(toBN(20)).div(toBN(100)); + } else { + // invalid term + return toBN(0); + } +} + +const getLocks = async (lockdropContract, address) => { + // let events = await lockdropContract.events.allEvents(); + // console.log(events); + // return events; + console.log(address); + + await lockdropContract.getPastEvents('Locked', + { + fromBlock: 0, + toBlock: 'latest', + filter: { + // edgewareAddr: 0xa469e40f0a073be5b28e2df6e746ce6519260cdd764bc5f6b3fb3aac5cda3c35, + // // // transacationHash: 0x2d0120f7efc7d594e738cf68013d2c8d8b6bee3d92d69a8f58f30fe5186daa56, + owner: address, + } + }).then((events) => { + console.log(events); + return events; + }); +}; + +const getSignals = async (lockdropContract, address) => { + return await lockdropContract.getPastEvents('Signaled', { + fromBlock: 0, + toBlock: 'latest', + filter: { + contractAddr: address, + } + }); +}; + +const getTotalLockedBalance = async (lockdropContract) => { + let { totalETHLocked, totalEffectiveETHLocked } = await calculateEffectiveLocks(lockdropContract); + return { totalETHLocked, totalEffectiveETHLocked }; +}; + +const getTotalSignaledBalance = async (web3, lockdropContract) => { + let { totalETHSignaled, totalEffectiveETHSignaled } = await calculateEffectiveSignals(web3, lockdropContract); + return { totalETHSignaled, totalEffectiveETHSignaled }; +}; + +const calculateEffectiveLocks = async (lockdropContract) => { + let totalETHLocked = toBN(0); + let totalEffectiveETHLocked = toBN(0); + const locks = {}; + const validatingLocks = {}; + + let lockEvents = [] + let events = await lockdropContract.getPastEvents('Locked', { + fromBlock: 0, + toBlock: 'latest', + }); + + lockEvents = [ ...lockEvents, ...events ]; + + // For truffle tests + let lockdropStartTime; + if (typeof lockdropContract.LOCK_START_TIME === 'function') { + lockdropStartTime = (await lockdropContract.LOCK_START_TIME()); + } else { + lockdropStartTime = (await lockdropContract.methods.LOCK_START_TIME().call()); + } + + lockEvents.forEach((event) => { + const data = event.returnValues; + let value = getEffectiveValue(data.eth, data.term, data.time, lockdropStartTime, totalETHLocked); + totalETHLocked = totalETHLocked.add(toBN(data.eth)); + totalEffectiveETHLocked = totalEffectiveETHLocked.add(value); + + // Add all validators to a separate collection to do validator election over later + if (data.isValidator) { + if (data.edgewareAddr in validatingLocks) { + validatingLocks[data.edgewareAddr] = { + lockAmt: toBN(data.eth).add(toBN(validatingLocks[data.edgewareAddr].lockAmt)).toString(), + effectiveValue: toBN(validatingLocks[data.edgewareAddr].effectiveValue).add(value).toString(), + lockAddrs: [data.lockAddr, ...validatingLocks[data.edgewareAddr].lockAddrs], + }; + } else { + validatingLocks[data.edgewareAddr] = { + lockAmt: toBN(data.eth).toString(), + effectiveValue: value.toString(), + lockAddrs: [data.lockAddr], + }; + } + } + + + // Add all locks to collection, calculating/updating effective value of lock + if (data.edgewareAddr in locks) { + locks[data.edgewareAddr] = { + lockAmt: toBN(data.eth).add(toBN(locks[data.edgewareAddr].lockAmt)).toString(), + effectiveValue: toBN(locks[data.edgewareAddr].effectiveValue).add(value).toString(), + lockAddrs: [data.lockAddr, ...locks[data.edgewareAddr].lockAddrs], + }; + } else { + locks[data.edgewareAddr] = { + lockAmt: toBN(data.eth).toString(), + effectiveValue: value.toString(), + lockAddrs: [data.lockAddr], + }; + } + }); + // Return validating locks, locks, and total ETH locked + return { validatingLocks, locks, totalETHLocked, totalEffectiveETHLocked }; +}; + +const calculateEffectiveSignals = async (web3, lockdropContracts, blockNumber=8461046) => { + let totalETHSignaled = toBN(0); + let totalEffectiveETHSignaled = toBN(0); + let signals = {}; + let seenContracts = {}; + let signalEvents = []; + for (index in lockdropContracts) { + let events = await lockdropContracts[index].getPastEvents('Signaled', { + fromBlock: 0, + toBlock: 'latest', + }); + + signalEvents = [ ...signalEvents, ...events ]; + } + + const promises = signalEvents.map(async (event) => { + const data = event.returnValues; + // Get balance at block that lockdrop ends + let balance = -1; + while (balance == -1) { + try { + if (blockNumber) { + balance = await web3.eth.getBalance(data.contractAddr, blockNumber); + } else { + balance = await web3.eth.getBalance(data.contractAddr); + } + } catch(e) { + console.log(`${balance} Couldn't find: ${JSON.stringify(data)}`); + await Promise.delay(5000); + } + } + + return balance; + }); + // Resolve promises to ensure all inner async functions have finished + let balances = await Promise.all(promises); + let gLocks = {}; + signalEvents.forEach((event, index) => { + const data = event.returnValues; + // if contract address has been seen (it is in a previously processed signal) + // then we ignore it; this means that we only acknolwedge the first signal + // for a given address. + if (!(data.contractAddr in seenContracts)) { + seenContracts[data.contractAddr] = true; + // Get value for each signal event and add it to the collection + let value; + // Treat generalized locks as 3 month locks + if (generalizedLocks.lockedContractAddresses.includes(data.contractAddr)) { + console.log('Generalized lock:', balances[index], data.contractAddr); + value = getEffectiveValue(balances[index], '0') + if (data.edgewareAddr in gLocks) { + gLocks[data.edgewareAddr] = toBN(gLocks[data.edgewareAddr]).add(value).toString(); + } else { + gLocks[data.edgewareAddr] = value.toString(); + } + } else { + value = getEffectiveValue(balances[index], 'signaling'); + } + // Add value to total signaled ETH + + totalETHSignaled = totalETHSignaled.add(toBN(balances[index])); + totalEffectiveETHSignaled = totalEffectiveETHSignaled.add(value); + // Iterate over signals, partition reward into delayed and immediate amounts + if (data.edgewareAddr in signals) { + signals[data.edgewareAddr] = { + signalAmt: toBN(balances[index]).add(toBN(signals[data.edgewareAddr].signalAmt)).toString(), + effectiveValue: toBN(signals[data.edgewareAddr] + .effectiveValue) + .add(value) + .toString(), + }; + } else { + signals[data.edgewareAddr] = { + signalAmt: toBN(balances[index]).toString(), + effectiveValue: value.toString(), + }; + } + } + }); + // Return signals and total ETH signaled + return { signals, totalETHSignaled, totalEffectiveETHSignaled, generalizedLocks: gLocks } +} + +const getLockStorage = async (web3, lockAddress) => { + return Promise.all([0,1].map(v => { + return web3.eth.getStorageAt(lockAddress, v); + })) + .then(vals => { + return { + owner: vals[0], + unlockTime: hexToNumber(vals[1]), + }; + }); +}; + +const selectEdgewareValidators = (validatingLocks, totalAllocation, totalEffectiveETH, numOfValidators, existentialBalance=100000000000000) => { + const sortable = []; + // Add the calculated edgeware balances with the respective key to a collection + for (var key in validatingLocks) { + const keys = key.slice(2).match(/.{1,64}/g).map(key => `0x${key}`);; + if (keys.length === 3) { + sortable.push([ + keys, + toBN(validatingLocks[key].effectiveValue).sub(toBN(existentialBalance)).mul(toBN(totalAllocation)).div(totalEffectiveETH) + ]); + } + } + + // Sort and take the top "numOfValidators" from the collection + return sortable + .sort((a,b) => (a[1].lt(b[1])) ? 1 : ((b[1].lt(a[1])) ? -1 : 0)) + .map(v => { + return ([ + ...v[0].map(k => (k.slice(2))), // stash, controller, session + v[1].toString(), // staked balance + ]); + }); +}; + +const getEdgewareBalanceObjects = (locks, signals, generalizedLocks, totalAllocation, totalEffectiveETH, existentialBalance=100000000000000) => { + let balances = []; + let vesting = []; + let existBalAllocation = mulByAllocationFraction(toBN(existentialBalance), totalAllocation, totalEffectiveETH).toString() + // handle locks separately than signals at first, then we'll scan over all + // entries and ensure that there are only unique entries in the collections. + for (var key in locks) { + let keys; + if (key.length === 194) { + keys = key.slice(2).match(/.{1,64}/g).map(key => `0x${key}`); + // remove existential balance from this lock for controller account + if (toBN(locks[key].effectiveValue).lte(toBN(existentialBalance))) { + console.log('Warning! Validating lock with not enough balance for controller account:', locks[key], key, keys) + } + // ensure encodings work + try { + const encoded1 = keyring.encodeAddress(keys[0]); + const encoded2 = keyring.encodeAddress(keys[1]); + // add entry in for stash account + balances.push([ + keys[0].slice(2), + mulByAllocationFraction(toBN(locks[key].effectiveValue).sub(toBN(existentialBalance)), totalAllocation, totalEffectiveETH).toString(), + ]); + // add entry in for controller account with minimal existential balance + balances.push([ + keys[1].slice(2), + existBalAllocation, + ]) + } catch(e) { + console.log(e); + console.log(`Error processing lock event: ${keys[0]} or ${keys[1]} (${locks[key].effectiveValue})`); + } + } else { + try { + const encoded = keyring.encodeAddress(key); + balances.push([ + key.slice(2), + mulByAllocationFraction(locks[key].effectiveValue, totalAllocation, totalEffectiveETH).toString(), + ]); + } catch(e) { + console.log(e); + console.log(`Error processing lock event: ${key} (${locks[key].effectiveValue})`); + } + } + } + // handle signal entries + for (var key in signals) { + try { + let keys = [key]; + // allocate signals to first key if multiple submitted + if (key.length === 194) { + keys = key.slice(2).match(/.{1,64}/g).map(key => `0x${key}`); + } + const encoded = keyring.encodeAddress(keys[0]); + + if (keys[0] in generalizedLocks) { + const gValue = generalizedLocks[keys[0]]; + const leftoverValue = toBN(signals[key].effectiveValue).sub(toBN(gValue)); + // add 25% of non-generalised signal value to the liquid amount for the vesting collection + const vestingValue = toBN(gValue).add(leftoverValue.mul(toBN(25)).div(toBN(100))) + // create new balance record for the signaler + balances.push([ + keys[0].slice(2), + mulByAllocationFraction(toBN(signals[key].effectiveValue), totalAllocation, totalEffectiveETH).toString(), + ]); + if (leftoverValue.gt(toBN(0))) { + // create vesting record + vesting.push([ + keys[0].slice(2), + 5256000, + 1, + mulByAllocationFraction(vestingValue, totalAllocation, totalEffectiveETH).toString(), + ]); + } + } else { + // the liquid amount of the vesting is 25% of signaled value + const vestingValue = toBN(signals[key].effectiveValue).mul(toBN(25)).div(toBN(100)); + // create new balance record for the signaler + balances.push([ + keys[0].slice(2), + mulByAllocationFraction(toBN(signals[key].effectiveValue), totalAllocation, totalEffectiveETH).toString(), + ]); + + // create vesting record + vesting.push([ + keys[0].slice(2), + 5256000, + 1, + mulByAllocationFraction(vestingValue, totalAllocation, totalEffectiveETH).toString(), + ]); + } + } catch(e) { + console.log(e); + console.log(`Error processing signal event: ${key} (${signals[key].effectiveValue})`); + } + } + + return { balances: balances, vesting: vesting }; +}; + +const combineToUnique = (balances, vesting) => { + let balancesMap = {}; + let vestingMap = {}; + balances.forEach(entry => { + let account = entry[0]; + let amount = entry[1]; + + if (account in balancesMap) { + balancesMap[account] = toBN(balancesMap[account]).add(toBN(amount)).toString(); + } else { + balancesMap[account] = amount + } + }); + + vesting.forEach(entry => { + let account = entry[0]; + let amount = entry[3]; + if (account in vestingMap) { + vestingMap[account] = toBN(vestingMap[account]).add(toBN(amount)).toString(); + } else { + vestingMap[account] = amount + } + }); + + let newBalances = [] + let newVesting = []; + let total = toBN(0); + Object.keys(balancesMap).forEach(key => { + total = total.add(toBN(balancesMap[key])); + newBalances.push([ + key, + balancesMap[key], + ]); + }); + + Object.keys(vestingMap).forEach(key => { + newVesting.push([ + key, + 5256000, + 1, + vestingMap[key], + ]); + }); + console.log(`Balances: ${balances.length}`); + console.log(`Balances with vesting: ${vesting.length}`); + console.log(`EDG Total: ${total.toString()}`); + return { balances: newBalances, vesting: newVesting, total: total }; +} + +const mulByAllocationFraction = (amount, totalAllocation, totalEffectiveETH) => { + return toBN(amount).mul(toBN(totalAllocation)).div(toBN(totalEffectiveETH)); +} + +module.exports = { + getLocks, + getSignals, + getTotalLockedBalance, + getTotalSignaledBalance, + calculateEffectiveLocks, + calculateEffectiveSignals, + getLockStorage, + selectEdgewareValidators, + getEdgewareBalanceObjects, + combineToUnique, +}; diff --git a/ts-tests/frontier-tester/helpers/lockdropWeb3Util.js b/ts-tests/frontier-tester/helpers/lockdropWeb3Util.js new file mode 100644 index 00000000..206eb287 --- /dev/null +++ b/ts-tests/frontier-tester/helpers/lockdropWeb3Util.js @@ -0,0 +1,100 @@ +const Promise = require('bluebird'); + +const advanceTimeAndBlock = async (time) => { + await advanceTime(time); + await advanceBlock(); + + return getCurrentBlock(); +}; + +const advanceTime = (time, web3) => { + return new Promise((resolve, reject) => { + web3.currentProvider.send({ + jsonrpc: '2.0', + method: 'evm_increaseTime', + params: [time], + id: new Date().getTime() + }, (err, result) => { + if (err) { return reject(err); } + else { + if (!err) { + web3.currentProvider.send({ + jsonrpc: '2.0', + method: 'evm_mine', + params: [], + id: new Date().getSeconds() + }, (e, res) => { + if (e) reject(e); + else resolve(res); + }); + } + } + }); + }); +}; + +const advanceBlock = (web3) => { + return new Promise((resolve, reject) => { + web3.currentProvider.send({ + jsonrpc: '2.0', + method: 'evm_mine', + id: new Date().getTime() + }, (err, result) => { + if (err) { return reject(err); } + web3.eth.getBlock('latest', function (err, res) { + if (err) reject(err); + resolve(res.hash); + }); + }); + }); +}; + +function getCurrentBlock(web3) { + return new Promise((resolve, reject) => { + web3.eth.getBlock('latest', function (err, res) { + if (err) return reject(err); + resolve(res); + }); + }); +} + +async function getCurrentTimestamp(web3) { + const block = await getCurrentBlock(web3); + return block.timestamp; +} + + +const getBalance = (account, web3) => { + return new Promise((resolve, reject) => { + web3.eth.getBalance(account, (err, res) => { + if (err) reject(err); + else resolve(res); + }); + }); +}; + +const getTxReceipt = async (txHash, web3) => { + return await web3.eth.getTransactionReceipt(txHash); +} + +async function assertRevert(promise, invariants = () => {}) { + try { + await promise; + assert.fail('Expected revert not received'); + } catch (error) { + const revertFound = error.message.search('revert') >= 0 || error.message.search('invalid opcode'); + assert(revertFound, `Expected 'revert', got ${error} instead`); + invariants.call() + } +} + +module.exports = { + advanceTimeAndBlock, + advanceTime, + advanceBlock, + getCurrentBlock, + getCurrentTimestamp, + getBalance, + assertRevert, + getTxReceipt, +}; diff --git a/ts-tests/frontier-tester/helpers/schedule.js b/ts-tests/frontier-tester/helpers/schedule.js new file mode 100644 index 00000000..638ae8fa --- /dev/null +++ b/ts-tests/frontier-tester/helpers/schedule.js @@ -0,0 +1,31 @@ +const { toBN, toWei } = require('web3').utils; + +const getEarlyParticipationBonus = (lockTime, lockStart) => { + const JUNE_1ST_UTC = 1559347200; + const JUNE_16TH_UTC = 1560643200; + const JULY_1ST_UTC = 1561939200; + const JULY_16TH_UTC = 1563235200; + const JULY_31ST_UTC = 1564531200; + const AUG_15TH_UTC = 1565827200; + const AUG_30TH_UTC = 1567123200; + + if (toBN(lockTime).lte(toBN(JUNE_16TH_UTC))) { + return toBN(150); + } else if (toBN(lockTime).lte(toBN(JULY_1ST_UTC))) { + return toBN(135); + } else if (toBN(lockTime).lte(toBN(JULY_16TH_UTC))) { + return toBN(123); + } else if (toBN(lockTime).lte(toBN(JULY_31ST_UTC))) { + return toBN(114); + } else if (toBN(lockTime).lte(toBN(AUG_15TH_UTC))) { + return toBN(108); + } else if (toBN(lockTime).lte(toBN(AUG_30TH_UTC))) { + return toBN(105); + } else { + return toBN(100); + } +}; + +module.exports = { + getEarlyParticipationBonus, +} diff --git a/ts-tests/frontier-tester/helpers/utils.js b/ts-tests/frontier-tester/helpers/utils.js new file mode 100644 index 00000000..1f66127d --- /dev/null +++ b/ts-tests/frontier-tester/helpers/utils.js @@ -0,0 +1,204 @@ +const Web3 = require('web3'); +const HDWalletProvider = require("@truffle/hdwallet-provider"); +const { decodeAddress, encodeAddress, blake2AsHex } = require('@polkadot/util-crypto'); +const child_process = require('child_process'); +const { exit } = require('process'); + +const DISPLAY_LOG = process.env.DISPLAY_LOG || false; +const BINARY_PATH = `../../target/release/edgeware`; +const SPAWNING_TIME = 30000; + +// const account = '0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b'; +const account = '0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a'; +// const privKey = '99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342'; +const privKey = '1111111111111111111111111111111111111111111111111111111111111111'; + +const initWeb3 = async (pkey = privKey) => { + // const provider = new Web3.providers.HttpProvider('http://localhost:9933/'); + const provider = new HDWalletProvider({ + privateKeys: [ pkey ], + providerOrUrl: "http://localhost:9933/", + }); + const web3 = new Web3(provider); + const chainId = await web3.eth.getChainId(); + + // ensure native web3 sending works as well as truffle provider + web3.eth.accounts.wallet.add(privKey); + web3.eth.defaultAccount = web3.eth.accounts.wallet[0].address; + return web3; +}; + +const deployContract = async (name, c, args = [], web3 = undefined) => { + let deployer, pkey; + if (!web3) { + web3 = context.web3; + deployer = account; + pkey = privKey; + } else { + deployer = web3.eth.accounts.wallet[0].address; + pkey = web3.eth.accounts.wallet[0].privateKey; + } + + console.log(`Attempting to deploy ${name} from account: ${deployer}`); + const contract = new web3.eth.Contract(c.abi); + + const contractTx = contract.deploy({ + data: c.bytecode, + arguments: args, + }); + const estimatedGas = await contractTx.estimateGas(); + console.log(estimatedGas); + + const data = contractTx.encodeABI(); + const createTransaction = await web3.eth.accounts.signTransaction( + { + from: deployer, + data, + gas: estimatedGas, + }, + pkey + ); + + const createReceipt = await web3.eth.sendSignedTransaction( + createTransaction.rawTransaction + ); + console.log(`${name} deployed at address ${createReceipt.contractAddress}`); + return new web3.eth.Contract(c.abi, createReceipt.contractAddress); +}; + +const convertToEvmAddress = (substrateAddress) => { + const addressBytes = decodeAddress(substrateAddress); + return '0x' + Buffer.from(addressBytes.subarray(0, 20)).toString('hex'); +} + +const convertToSubstrateAddress = (evmAddress, prefix = 7) => { + const addressBytes = Buffer.from(evmAddress.slice(2), 'hex'); + const prefixBytes = Buffer.from('evm:'); + const convertBytes = Uint8Array.from(Buffer.concat([ prefixBytes, addressBytes ])); + const finalAddressHex = blake2AsHex(convertBytes, 256); + return encodeAddress(finalAddressHex, prefix); +} + +async function startEdgewareNode() { + const basePath = process.env.BASE_PATH || './db'; + const chain = process.env.CHAIN_PATH || 'dev'; + const cmd = BINARY_PATH; + const args = [ + // '--dev', + `--chain=${chain}`, + '--pruning=archive', + '--no-telemetry', + '--no-prometheus', + // '--tmp', + `--base-path=${basePath}`, + '--force-authoring', + '--alice', + '--validator', + '-lrpc=trace', + // '-levm=trace', + ]; + // console.log(`Running node with args: ${JSON.stringify(args)}`); + const binary = child_process.spawn(cmd, args); + + binary.on("error", (err) => { + if (err.errno == "ENOENT") { + console.error( + `\x1b[31mMissing Frontier binary (${BINARY_PATH}).\nPlease compile the Frontier project:\ncargo build\x1b[0m` + ); + } else { + console.error(err); + } + process.exit(1); + }); + + const binaryLogs = []; + const web3 = await new Promise((resolve) => { + const errHandle = () => { + console.error(`\x1b[31m Failed to start Edgeware Node.\x1b[0m`); + console.error(`Command: ${cmd} ${args.join(" ")}`); + console.error(`Logs:`); + console.error(binaryLogs.map((chunk) => chunk.toString()).join("\n")); + process.exit(1); + }; + const timer = setTimeout(errHandle, SPAWNING_TIME - 2000); + + const onData = async (chunk) => { + if (DISPLAY_LOG) { + console.log(chunk.toString()); + } + binaryLogs.push(chunk); + if (chunk.toString().match(/Address already in use/)) { + clearTimeout(timer); + errHandle(); + } else if (chunk.toString().match(/Listening for new connections/)) { + const web3 = await initWeb3(); + await web3.eth.getChainId(); + + clearTimeout(timer); + if (!DISPLAY_LOG) { + binary.stderr.off("data", onData); + binary.stdout.off("data", onData); + } + // console.log(`\x1b[31m Starting RPC\x1b[0m`); + resolve(web3); + } + }; + + // hook interrupt handler + const exitHandler = () => { + // console.log(`\x1b[31m Exit Handler Called\x1b[0m`); + binary.kill(); + process.exit(); + }; + process.on('SIGINT', exitHandler); + // process.on('exit', exitHandler); + + // hook data printing + binary.stderr.on("data", onData); + binary.stdout.on("data", onData); + }); + return { web3, binary }; +} + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +function describeWithEdgeware(title, cb) { + describe(title, async () => { + const context = { web3: null, binary: null }; + before("Starting Edgeware Node", async () => { + const data = await startEdgewareNode(); + context.binary = data.binary; + context.web3 = data.web3; + }); + + after('Exiting Edgeware Node', async () => { + if (context.web3 && context.web3.currentProvider && context.web3.currentProvider.engine) { + context.web3.currentProvider.engine.stop(); + } + + // console.log(`\x1b[31m Stopping RPC\x1b[0m`); + await new Promise((resolve) => { + context.binary.on('exit', () => { + // console.log('RPC STOPPED'); + resolve(); + }) + context.binary.kill(); + }); + await sleep(2000); + }); + + await cb(context); + }); +} + +module.exports = { + account, + privKey, + initWeb3, + deployContract, + convertToEvmAddress, + convertToSubstrateAddress, + describeWithEdgeware, +} diff --git a/ts-tests/frontier-tester/package.json b/ts-tests/frontier-tester/package.json new file mode 100644 index 00000000..fe6b5bbc --- /dev/null +++ b/ts-tests/frontier-tester/package.json @@ -0,0 +1,47 @@ +{ + "name": "uniswap", + "version": "1.0.0", + "description": "", + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "compile": "truffle compile", + "add-liquidity": "mocha --timeout 1000000 --exit tests/addLiquidity.js", + "init-eth-balance": "ts-mocha --timeout 100000 helpers/initDefaultAccountBalance.ts", + "test": "truffle compile && ts-mocha --timeout 100000", + "test-ci": "truffle compile && ts-mocha --timeout 100000 ./tests/*.{ts,js}" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@edgeware/node-types": "^3.1.0-beta.14", + "@openzeppelin/contracts": "^2.5.0", + "@polkadot/api": "3.2.4-3", + "@polkadot/api-contract": "3.2.4-3", + "@polkadot/keyring": "^5.2.2", + "@polkadot/util": "^5.2.2", + "@polkadot/util-crypto": "^5.2.2", + "@truffle/contract": "^4.2.22", + "@truffle/hdwallet-provider": "^1.2.0", + "@types/chai": "^4.2.12", + "@types/mocha": "^8.0.3", + "@uniswap/v2-core": "^1.0.1", + "@uniswap/v2-periphery": "^1.1.0-beta.0", + "bn.js": "^5.1.3", + "chai": "^4.2.0", + "ethereumjs-wallet": "^1.0.0", + "hooked-web3-provider": "^1.0.0", + "js-sha256": "^0.9.0", + "mocha": "^8.2.1", + "openzeppelin-solidity": "^3.1.0", + "truffle": "^5.1.33", + "truffle-assertions": "^0.9.2", + "ts-mocha": "^7.0.0", + "ts-node": "^9.0.0", + "typescript": "^4.0.3", + "web3": "^1.2.0", + "web3-provider-engine": "https://github.com/MetaMask/web3-provider-engine.git" + } +} diff --git a/ts-tests/frontier-tester/tests/addLiquidity.js b/ts-tests/frontier-tester/tests/addLiquidity.js new file mode 100644 index 00000000..89b52b82 --- /dev/null +++ b/ts-tests/frontier-tester/tests/addLiquidity.js @@ -0,0 +1,107 @@ +const contract = require("@truffle/contract"); +const { assert } = require("chai"); +const { account, describeWithEdgeware } = require('../helpers/utils'); +const { deploy } = require('../helpers/deployUniswap'); + +const TokenA = require('../build/contracts/TokenA.json'); +const TokenB = require('../build/contracts/TokenB.json'); +const UniswapV2Router02 = require('../node_modules/@uniswap/v2-periphery/build/UniswapV2Router02.json'); +const UniswapV2Factory = require('../node_modules/@uniswap/v2-core/build/UniswapV2Factory.json'); +const UniswapV2Pair = require('../node_modules/@uniswap/v2-core/build/UniswapV2Pair.json'); + +describeWithEdgeware('Add Liquidity Test', async (context) => { + let FACTORY_ADDRESS; + let ROUTER_ADDRESS; + + before('Deploy uniswap contracts', async () => { + const d = await deploy(context.web3); + [FACTORY_ADDRESS, ROUTER_ADDRESS] = d; + }); + + it('should create uniswap pair', async () => { + // deploy two tokens + const web3 = context.web3; + const amount0 = web3.utils.toWei('10'); + const amount1 = web3.utils.toWei('10'); + + console.log('Deploying first token...'); + const TokenAContract = contract({ + abi: TokenA.abi, + unlinked_binary: TokenA.bytecode, + }); + TokenAContract.setProvider(web3.currentProvider); + const token0 = await TokenAContract.new(web3.utils.toWei('100'), { from: account }); + const address0 = token0.address; + + console.log('Deploying second token...'); + const TokenBContract = contract({ + abi: TokenB.abi, + unlinked_binary: TokenB.bytecode, + }); + TokenBContract.setProvider(web3.currentProvider); + const token1 = await TokenBContract.new(web3.utils.toWei('100'), { from: account }); + const address1 = token1.address; + + console.log('Approving first token...'); + const receipt0 = await token0.approve(ROUTER_ADDRESS, amount0, { + from: account + }); + console.log('Approving second token...'); + const receipt1 = await token1.approve(ROUTER_ADDRESS, amount1, { + from: account + }); + + // create the pair + const RouterContract = contract({ + abi: UniswapV2Router02.abi, + unlinked_binary: UniswapV2Router02.bytecode, + }); + RouterContract.setProvider(web3.currentProvider); + const router = await RouterContract.at(ROUTER_ADDRESS); + const args = [ + address0, address1, + amount0, amount1, + "0", "0", + account, + Math.ceil(Date.now() / 1000) + (60 * 20), // 1 day + { from: account }, + ]; + console.log('Adding liquidity with args: ', args); + const liquidityReceipt = await router.addLiquidity(...args); + + // query the pair + const FactoryContract = contract({ + abi: UniswapV2Factory.abi, + unlinked_binary: UniswapV2Factory.bytecode, + }); + FactoryContract.setProvider(web3.currentProvider); + console.log('Querying factory for pair...'); + const factory = await FactoryContract.at(FACTORY_ADDRESS, { from: account }); + const pairAddress = await factory.getPair.call(address0, address1, { + from: account, + }); + console.log(pairAddress); + const nPairs = await factory.allPairsLength.call({ from: account }); + + // query the pair's reserves + assert.notEqual(+nPairs, 0); + assert.notEqual(+(pairAddress.slice(2)), 0); + console.log(`Got pair: ${pairAddress} (${nPairs} total pairs).`); + const PairContract = contract({ + abi: UniswapV2Pair.abi, + unlinked_binary: UniswapV2Pair.bytecode, + }); + PairContract.setProvider(web3.currentProvider); + const pair = await PairContract.at(pairAddress); + const result = await pair.getReserves.call({ from: account }); + console.log(result); + console.log('result[0].toString()'); + console.log(result[0].toString()); + console.log(amount0); + console.log('result[1].toString()'); + console.log(result[1].toString()); + console.log(amount1); + assert.equal(result[0].toString(), amount0); + assert.equal(result[1].toString(), amount1); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testAllowance.js b/ts-tests/frontier-tester/tests/testAllowance.js new file mode 100644 index 00000000..33ae3dda --- /dev/null +++ b/ts-tests/frontier-tester/tests/testAllowance.js @@ -0,0 +1,27 @@ +const { assert } = require("chai"); +const { account, describeWithEdgeware } = require('../helpers/utils'); +// const UniswapV2ERC20 = require('../node_modules/@uniswap/v2-core/build/UniswapV2ERC20.json'); +const ERC20 = require('../node_modules/@openzeppelin/contracts/build/contracts/ERC20.json'); +const contract = require("@truffle/contract"); + +describeWithEdgeware("Allowance test", async (context) => { + it("should compute allowance", async () => { + const web3 = context.web3; + + let erc = contract({ + abi: ERC20.abi, + unlinked_binary: ERC20.bytecode, + }); + erc.setProvider(web3.currentProvider); + + const v = web3.utils.toWei('10', 'ether'); + let c = await erc.new({ from: account }); + + // create with value + const approvalAccount = '0xc0ffee254729296a45a3885639AC7E10F9d54979'; + await c.approve(approvalAccount, v, { from: account }); + + const allowance = await c.allowance.call(account, approvalAccount, { from: account }); + assert.equal(allowance, v); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testCreate.js b/ts-tests/frontier-tester/tests/testCreate.js new file mode 100644 index 00000000..4dc8edc6 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testCreate.js @@ -0,0 +1,71 @@ +const { assert } = require("chai"); +const { account, describeWithEdgeware } = require('../helpers/utils'); + +const CreateContract = require('../build/contracts/CreateContract.json'); +const SubContract = require('../build/contracts/SubContract.json'); +const contract = require("@truffle/contract"); + +describeWithEdgeware("CreateContract test", async (context) => { + it("should spawn subcontract", async () => { + const web3 = context.web3; + + let Create = contract({ + abi: CreateContract.abi, + unlinked_binary: CreateContract.bytecode, + }); + Create.setProvider(web3.currentProvider); + + let c = await Create.new({ from: account }); + let startNonce = await web3.eth.getTransactionCount(c.address); + console.log(`CreateContract address: ${c.address}, nonce: ${startNonce}`); + // create without value + let receipt = await c.spawn({ from: account }); + let address = await c.deployed.call({ from: account }); + + var Sub = contract({ + abi: SubContract.abi, + unlinked_binary: SubContract.bytecode, + }); + Sub.setProvider(web3.currentProvider); + let cSub = await Sub.at(address); + let balance = await cSub.getValue.call({ from: account }); + assert.equal(balance, '0', 'balance of deployed subcontract should be 0'); + + // check nonce + let nonce = await web3.eth.getTransactionCount(c.address); + assert.equal(nonce, startNonce + 1, 'contract nonce should increment'); + }); + + it("should spawn with value", async () => { + const web3 = context.web3; + + let Create = contract({ + abi: CreateContract.abi, + unlinked_binary: CreateContract.bytecode, + }); + Create.setProvider(web3.currentProvider); + + let c = await Create.new({ from: account }); + let startNonce = await web3.eth.getTransactionCount(c.address); + console.log(`CreateContract address: ${c.address}, nonce: ${startNonce}`); + // create with value + const value = web3.utils.toWei('10', 'ether'); + await c.spawnWithValue({ value, from: account }); + address = await c.deployed.call({ from: account }); + var Sub = contract({ + abi: SubContract.abi, + unlinked_binary: SubContract.bytecode, + }); + Sub.setProvider(web3.currentProvider); + let cSub = await Sub.at(address); + + let balOnContract = await cSub.getValue.call({ from: account }); + let balance = await web3.eth.getBalance(cSub.address); + assert.equal(balOnContract, value, 'new subcontract should have balance paid to it'); + assert.equal(balOnContract, balance, 'new subcontract should have balance paid to it'); + + // check nonce + const nonce = await web3.eth.getTransactionCount(c.address); + assert.equal(nonce, startNonce + 1, 'contract nonce should increment twice'); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testCreate2.js b/ts-tests/frontier-tester/tests/testCreate2.js new file mode 100644 index 00000000..d402ce82 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testCreate2.js @@ -0,0 +1,33 @@ +const { assert } = require('chai'); +const Create2Factory = require('../build/contracts/Create2Factory.json'); +const ValueContract = require('../build/contracts/ValueContract.json'); +const { describeWithEdgeware, account } = require('../helpers/utils'); +const contract = require("@truffle/contract"); + +describeWithEdgeware('Create2Factory test', async (context) => { + it('should deploy with create2', async () => { + const web3 = context.web3; + let Create2 = contract({ + abi: Create2Factory.abi, + unlinked_binary: Create2Factory.bytecode, + }); + Create2.setProvider(web3.currentProvider); + + let c = await Create2.new({ from: account }); + + // load bytecode and deploy + await c.deploy(5, { from: account, gasPrice: 1000000000 }); + const addr = await c.viewAddr.call({ from: account, gasPrice: 1000000000 }); + + let Value = contract({ + abi: ValueContract.abi, + unlinked_binary: ValueContract.bytecode, + }); + Value.setProvider(web3.currentProvider); + + // load new contract and check methods + const valueContract = await Value.at(addr); + const value = await valueContract.getValue.call({ from: account, gasPrice: 1000000000 }); + assert.equal(value, '0'); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testECRecovery.js b/ts-tests/frontier-tester/tests/testECRecovery.js new file mode 100644 index 00000000..69338b3c --- /dev/null +++ b/ts-tests/frontier-tester/tests/testECRecovery.js @@ -0,0 +1,65 @@ +const { assert } = require('chai'); +const contract = require("@truffle/contract"); +const { account, privKey, describeWithEdgeware } = require('../helpers/utils'); +const ECRecovery = require('../build/contracts/ECRecovery.json'); + +describeWithEdgeware('ECRecovery test', async (context) => { + it('should recover account from signature and hash', async () => { + const web3 = context.web3; + + let ECR = contract({ + abi: ECRecovery.abi, + unlinked_binary: ECRecovery.bytecode, + }); + ECR.setProvider(web3.currentProvider); + + const c = await ECR.new({ from: account }); + + // prepare a signed message + const message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tubulum fuisse, qua illum, cuius is condemnatus est rogatione, P. Eaedem res maneant alio modo.' + const messageHex = '0x' + Buffer.from(message).toString('hex'); + const signature = await web3.eth.sign(messageHex, account); + const hash = web3.utils.sha3('\x19Ethereum Signed Message:\n' + message.length + message); + + // recover the signer + const address = await c.recover(hash, signature, { from: account, gas: web3.utils.toWei('1', 'ether') }); + assert.equal(address.toLowerCase(), account.toLowerCase()); + }); + + it('should interact with precompile directly', async () => { + const web3 = context.web3; + const ECRECOVER_PRECOMPILE_ADDRESS = '0000000000000000000000000000000000000000'; + + const message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tubulum fuisse, qua illum, cuius is condemnatus est rogatione, P. Eaedem res maneant alio modo.' + const messageHex = '0x' + Buffer.from(message).toString('hex'); + const sig = (await web3.eth.sign(messageHex, account)).slice(2); + const r = `${sig.slice(0, 64)}` + const s = `${sig.slice(64, 128)}` + const v = `${sig.slice(128, 130)}` + const sigPart = `${Buffer.alloc(31).toString('hex')}${v}${r}${s}`; + const hash = web3.utils.sha3('\x19Ethereum Signed Message:\n' + message.length + message).slice(2); + + const RAW_TX = { + from: account, + gas: '27720', + to: ECRECOVER_PRECOMPILE_ADDRESS, + value: "0x0", + data: `0x${hash.toString('hex')}${sigPart}`, + }; + + const SIGNED_TX = await web3.eth.accounts.signTransaction( + RAW_TX, + privKey + ); + + const tx = await web3.eth.sendTransaction({ + from: account, + to: ECRECOVER_PRECOMPILE_ADDRESS, + value: '0x0', + gas: '27720', + data: `0x${hash.toString('hex')}${sigPart}`, + }); + + assert.equal(tx.transactionHash, SIGNED_TX.transactionHash); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testEvent.js b/ts-tests/frontier-tester/tests/testEvent.js new file mode 100644 index 00000000..b956f861 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testEvent.js @@ -0,0 +1,65 @@ +const { assert } = require('chai'); +const Web3 = require('web3'); +const EventContract = require('../build/contracts/EventContract.json'); +const { deployContract, account, describeWithEdgeware } = require('../helpers/utils'); +const contract = require("@truffle/contract"); + +describeWithEdgeware("EventContract test", async (context) => { + it("should emit event", async () => { + const web3 = context.web3; + let EC = contract({ + abi: EventContract.abi, + unlinked_binary: EventContract.bytecode, + }); + EC.setProvider(web3.currentProvider); + let c = await EC.new({ from: account }); + let res = await c.emitEvent({ from: account }); + assert.equal(res.receipt.logs.length, 1); + assert.equal(res.receipt.logs[0].event, 'e'); + }); + + it('should receive event thru web3 subscribe', async () => { + // init an HTTP web3 and use to set up another account for ws + const web3Http = context.web3; + const wsPrivKey = '99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342'; + const wsAccount = '0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b'; + const value = web3Http.utils.toWei(web3Http.utils.toBN('1'), 'ether'); + const gasEstimate = await web3Http.eth.estimateGas({ + from: account, to: wsAccount, value, + }); + const balanceTx = await web3Http.eth.sendTransaction({ + from: account, to: wsAccount, value, gas: gasEstimate, + }); + + // init web3 with wsprovider + const web3Ws = new Web3(new Web3.providers.WebsocketProvider("ws://localhost:9944/")); + web3Ws.eth.accounts.wallet.add(wsPrivKey); + web3Ws.eth.defaultAccount = wsAccount; + const c = await deployContract('EventContract', EventContract, [], web3Ws, wsPrivKey); + const cAddress = c._address; + + // init subscription + await new Promise(async (resolve) => { + const sid = await new Promise((innerResolve) => { + c.events.allEvents() + .on('data', (data) => { + assert.equal(data.event, 'e'); + assert.equal(data.address, cAddress); + resolve(); + }) + .on('error', console.error) + .on('connected', (id) => innerResolve(id)); + }) + console.log(`Event subscription connected with id ${sid}.`); + + // use HTTP web3 connection to fire a tx to emit event + let EC = contract({ + abi: EventContract.abi, + unlinked_binary: EventContract.bytecode, + }); + EC.setProvider(web3Http.currentProvider); + const cc = await EC.at(cAddress); + const emitTx = await cc.emitEvent({ from: account }); + }); + }) +}); diff --git a/ts-tests/frontier-tester/tests/testFallback.js b/ts-tests/frontier-tester/tests/testFallback.js new file mode 100644 index 00000000..adaadafb --- /dev/null +++ b/ts-tests/frontier-tester/tests/testFallback.js @@ -0,0 +1,37 @@ +const { assert } = require('chai'); +const { account, describeWithEdgeware } = require('../helpers/utils'); +const contract = require("@truffle/contract"); +const FallbackContract = require('../build/contracts/FallbackContract.json'); + +describeWithEdgeware('Fallback test', async (context) => { + it('should return funds sent to invalid function', async () => { + const web3 = context.web3; + + // deploy contract + const FB = contract({ + abi: FallbackContract.abi, + unlinked_binary: FallbackContract.bytecode, + }); + FB.setProvider(web3.currentProvider); + const c = await FB.new({ from: account }); + + // prepare an invalid function call + const balanceBefore = await web3.eth.getBalance(account); + const functionSig = web3.eth.abi.encodeFunctionSignature('myMethod()'); + const valueSent = new web3.utils.BN(web3.utils.toWei('10', 'ether')); + const receipt = await web3.eth.sendTransaction({ + from: account, + to: c.address, + value: valueSent.toString(), + gas: '200000', + data: functionSig, + gasPrice: '1', + }); + const balanceAfter = await web3.eth.getBalance(account); + const balanceDiff = new web3.utils.BN(balanceBefore).sub(new web3.utils.BN(balanceAfter)); + const gasUsed = new web3.utils.BN(receipt.gasUsed); + + // ensure the value sent was (mostly) returned besides gas + assert.isTrue(balanceDiff.eq(gasUsed)); + }); +}) \ No newline at end of file diff --git a/ts-tests/frontier-tester/tests/testGasWeighting.ts b/ts-tests/frontier-tester/tests/testGasWeighting.ts new file mode 100644 index 00000000..da6c5a93 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testGasWeighting.ts @@ -0,0 +1,47 @@ +// TODO: try to send in many txs at once with different gas values and ensure that the highest ones go through +// - see what happens, do some get dropped? how does it work? +// - basically try to break the gas system + +import { assert } from 'chai'; +import StoreNum from '../build/contracts/StoreNum.json'; +const contract = require("@truffle/contract"); +const { account, describeWithEdgeware } = require('../helpers/utils.js'); + +describeWithEdgeware('Gas Weighting Test', async (context) => { + it.skip('should resolve higher priced tx earlier', async () => { + const web3 = context.web3; + + // init a contract that stores numbers + let SN = contract({ + abi: StoreNum.abi, + unlinked_binary: StoreNum.bytecode, + }); + SN.setProvider(web3.currentProvider); + const sn = await SN.new({ from: account }); + + // send out then wait for several transactions with different gas prices + const txPs = []; + const gas = await sn.addToStore.estimateGas(1); + console.log(`Estimated gas: ${gas}.`); + for (let i = 1; i <= 200; ++i) { + try { + const tx = sn.addToStore(i, { + from: account, + gasPrice: `${i % 2 ? 0 : 1000}`, + gas: (new web3.utils.BN(gas)).muln(2).toString(), + }); + txPs.push(tx); + } catch (e) { + console.log(`Failed to submit tx ${i} -- stopping.`); + break; + } + } + const receipts = await Promise.all(txPs); + const indexedReceipts = receipts.map((v, i) => [ v.receipt, i ]); + console.log(indexedReceipts.map((r) => `tx idx ${r[0].transactionIndex} adding value ${r[1]} processed on block ${r[0].blockNumber}`)); + + // check which order they were processed + const store = await sn.getStore(); + console.log(store.map((n) => +n)); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testHashing.js b/ts-tests/frontier-tester/tests/testHashing.js new file mode 100644 index 00000000..0b1be81f --- /dev/null +++ b/ts-tests/frontier-tester/tests/testHashing.js @@ -0,0 +1,90 @@ +const { assert } = require('chai'); +const contract = require("@truffle/contract"); +const { account, describeWithEdgeware } = require('../helpers/utils'); +const HashingContract = require('../build/contracts/Hashing.json'); +const RIPEMD160 = require('ripemd160'); +const { sha256 } = require('js-sha256'); + +// web3.eth.call returns a 32-byte hex string, but RIPEMD160 only returns a 20-byte result, +// so we need to trim the leading 0s off the call's return value in order to compare strings +// for equality. +const trimLeadingHex0s = (web3, n) => { + return web3.utils.numberToHex(web3.utils.hexToNumberString(n)); +} + +describeWithEdgeware('Hashing test', async (context) => { + let web3; + let c; + const message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tubulum fuisse, qua illum, cuius is condemnatus est rogatione, P. Eaedem res maneant alio modo.' + const messageBuf = Buffer.from(message); + const messageHex = '0x' + messageBuf.toString('hex'); + + before(async () => { + // setup web3 and contract instance + web3 = context.web3; + const Hashing = contract({ + abi: HashingContract.abi, + unlinked_binary: HashingContract.bytecode, + }); + Hashing.setProvider(web3.currentProvider); + c = await Hashing.new({ from: account }); + }); + + it('should perform keccak256 thru contract', async () => { + const contractResult = await c.callKeccak256.call(messageBuf, { from: account }); + const localResult = web3.utils.keccak256(messageHex); + assert.equal(contractResult, localResult); + }); + + it('should perform ripemd160 thru contract', async () => { + const contractResult = await c.callRipemd160.call(messageHex, { from: account }); + const localResult = '0x' + (new RIPEMD160().update(messageBuf).digest('hex')); + assert.equal(contractResult, localResult); + }); + + it('should perform ripemd160 directly', async () => { + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000003', + from: account, + data: messageHex, + }); + const localResult = '0x' + (new RIPEMD160().update(messageBuf).digest('hex')); + assert.equal(trimLeadingHex0s(web3, callResult), localResult); + }); + + it('should obtain same ripemd results from contract and direct call', async () => { + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000003', + from: account, + data: messageHex, + }); + const contractResult = await c.callRipemd160.call(messageHex, { from: account }); + assert.equal(trimLeadingHex0s(web3, callResult), contractResult); + }) + + it('should perform sha256 thru contract', async () => { + const contractResult = await c.callSha256.call(messageHex, { from: account }); + const localResult = '0x' + sha256.hex(messageBuf); + assert.equal(contractResult, localResult); + }); + + it('should perform sha256 directly', async () => { + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000002', + from: account, + data: messageHex, + }); + const localResult = '0x' + sha256.hex(messageBuf); + assert.equal(callResult, localResult); + }); + + it('should obtain same sha256 results from contract and direct call', async () => { + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000002', + from: account, + data: messageHex, + }); + const contractResult = await c.callSha256.call(messageHex, { from: account }); + assert.equal(callResult, contractResult); + }) +}); diff --git a/ts-tests/frontier-tester/tests/testInterfaces.js b/ts-tests/frontier-tester/tests/testInterfaces.js new file mode 100644 index 00000000..802f95d9 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testInterfaces.js @@ -0,0 +1,35 @@ +const { assert } = require("chai"); +const IContractUser = require('../build/contracts/IContractUser.json'); +const ContractImpl = require('../build/contracts/ContractImpl.json'); +const { account, describeWithEdgeware } = require('../helpers/utils'); +const contract = require("@truffle/contract"); + +describeWithEdgeware('Interfaces test', async (context) => { + it('should access deployed interface', async () => { + const web3 = context.web3; + + console.log('Deploying something-doer...') + let CIContract = contract({ + abi: ContractImpl.abi, + unlinked_binary: ContractImpl.bytecode, + }); + CIContract.setProvider(web3.currentProvider); + let ci = await CIContract.new({ from: account }); + + console.log('Deploying caller of interface...'); + let ICUContract = contract({ + abi: IContractUser.abi, + unlinked_binary: IContractUser.bytecode, + }); + ICUContract.setProvider(web3.currentProvider); + let icu = await ICUContract.new({ from: account }); + + // test calling the subcontract + console.log('Linking contracts...'); + const tx = await icu.linkContract(ci.address, { from: account }) + + console.log('Calling method on subcontract...'); + const res = await icu.doTheThing.call({ from: account }); + assert.isTrue(res); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testLockdrop.js b/ts-tests/frontier-tester/tests/testLockdrop.js new file mode 100644 index 00000000..e8497c53 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testLockdrop.js @@ -0,0 +1,131 @@ +const Lockdrop = require("../build/contracts/Lockdrop.json"); +const utility = require('../helpers/lockdropWeb3Util'); +const rlp = require('rlp'); +const keccak = require('keccak'); +const { assert } = require('chai'); +const contract = require("@truffle/contract"); +const { account, describeWithEdgeware } = require('../helpers/utils'); + +describeWithEdgeware("Lockdrop test", async (context) => { + const SECONDS_IN_DAY = 86400; + const THREE_MONTHS = 0; + const SIX_MONTHS = 1; + const TWELVE_MONTHS = 2; + let LD; + let web3; + + before(async function() { + web3 = context.web3; + + LD = contract({ + abi: Lockdrop.abi, + unlinked_binary: Lockdrop.bytecode, + }); + LD.setProvider(web3.currentProvider); + }); + + it('should setup and pull constants', async function () { + let time = await utility.getCurrentTimestamp(web3); + let lockdrop = await LD.new(time, { from: account }); + const LOCK_DROP_PERIOD = (await lockdrop.LOCK_DROP_PERIOD.call({ from: account })).toNumber(); + const LOCK_START_TIME = (await lockdrop.LOCK_START_TIME.call({ from: account })).toNumber(); + time = await utility.getCurrentTimestamp(web3); + assert.equal(LOCK_DROP_PERIOD, SECONDS_IN_DAY * 92); + assert.ok(LOCK_START_TIME <= time && time <= LOCK_START_TIME + 1000); + }); + + it('ensure the contract address matches JS RLP script', async function () { + let time = await utility.getCurrentTimestamp(web3); + let lockdrop = await LD.new(time, { from: account }); + const sender = account; + const nonce = (await web3.eth.getTransactionCount(sender)); + const input = [ sender, nonce - 1 ]; + const rlpEncoded = rlp.encode(input); + const contractAddressLong = keccak('keccak256').update(rlpEncoded).digest('hex'); + const contractAddr = contractAddressLong.substring(24); + + time = await utility.getCurrentTimestamp(web3); + assert.equal(web3.utils.toBN(lockdrop.address).toString(), web3.utils.toBN(contractAddr).toString()); + }); + + // Events don't work + it('should lock funds and increment nonce', async function () { + let time = await utility.getCurrentTimestamp(web3); + let lockdrop = await LD.new(time, { from: account }); + + let startNonce = await web3.eth.getTransactionCount(lockdrop.address); + assert.equal(startNonce, '1', 'start nonce of deployed contract should be 1'); + + let senderBalance = new web3.utils.BN(await web3.eth.getBalance(account)); + + const bcontractAddr1 = getContractAddress(lockdrop.address, startNonce); + const bcontractAddr2 = getContractAddress(lockdrop.address, startNonce + 1) + const bcontractAddr3 = getContractAddress(lockdrop.address, startNonce + 2); + const bcontractAddr4 = getContractAddress(lockdrop.address, startNonce + 3); + + const value = web3.utils.toWei('10', 'ether'); + + await lockdrop.lock(THREE_MONTHS, account, true, { + from: account, + value: value, + gas: 1500000, + gasPrice: 1000, + }); + + let balLock1 = await web3.eth.getBalance(bcontractAddr1); + let balLock2 = await web3.eth.getBalance(bcontractAddr2); + let balLock3 = await web3.eth.getBalance(bcontractAddr3); + let balLock4 = await web3.eth.getBalance(bcontractAddr4); + + assert.equal(value.toString(), balLock1, 'balance of first lock does not match expected'); + assert.equal(0, balLock2, 'balance of future second lock does not match expected'); + assert.equal(0, balLock3, 'balance of future third lock does not match expected'); + assert.equal(0, balLock4, 'balance of future fourth lock does not match expected'); + + let senderBalanceAfter = new web3.utils.BN(await web3.eth.getBalance(account)); + let sentBalance = senderBalance.sub(senderBalanceAfter); + assert.isTrue(sentBalance.gt(new web3.utils.BN(value)), 'sent balance should be greater than lock value'); + + const nonce = (await web3.eth.getTransactionCount(lockdrop.address)); + const contractAddr = getContractAddress(lockdrop.address, nonce - 1); + assert.equal(nonce, '2', 'contract nonce of Lockdrop contract should be 2 after lock') + + const bal0 = await web3.eth.getBalance(contractAddr); + + assert.equal(bal0, value, 'Lock value at address should be 10 eth after lock'); + + const value2 = web3.utils.toWei('100', 'ether'); + + await lockdrop.lock(THREE_MONTHS, account, true, { + from: account, + value: value2, + gas: 1500000, + gasPrice: 1000000000, + }); + + const new_nonce = (await web3.eth.getTransactionCount(lockdrop.address)); + const new_contractAddr = getContractAddress(lockdrop.address, new_nonce - 1); + const bal2 = await web3.eth.getBalance(new_contractAddr); + + assert.equal(bal2, value2, '2nd lock value should be non zero after lock'); + assert.equal(new_nonce - 1, nonce, 'nonce should increment'); + + balLock1 = await web3.eth.getBalance(bcontractAddr1); + balLock2 = await web3.eth.getBalance(bcontractAddr2); + balLock3 = await web3.eth.getBalance(bcontractAddr3); + balLock4 = await web3.eth.getBalance(bcontractAddr4); + + assert.equal(value.toString(), balLock1, 'balance of first lock does not match expected'); + assert.equal(value2.toString(), balLock2, 'balance of second lock does not match expected'); + assert.equal(0, balLock3, 'balance of future third lock does not match expected'); + assert.equal(0, balLock4, 'balance of future fourth lock does not match expected'); + }); +}); + +function getContractAddress(address, nonce) { + const input = [address, nonce] + const rlpEncoded = rlp.encode(input); + const contractAddressLong = keccak('keccak256').update(rlpEncoded).digest('hex'); + const contractAddr = contractAddressLong.substring(24); + return contractAddr; +} \ No newline at end of file diff --git a/ts-tests/frontier-tester/tests/testOwner.js b/ts-tests/frontier-tester/tests/testOwner.js new file mode 100644 index 00000000..bc9bf314 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testOwner.js @@ -0,0 +1,39 @@ +const { assert } = require('chai'); +const OwnerContract = require('../build/contracts/OwnerContract.json'); +const contract = require("@truffle/contract"); +const { account, describeWithEdgeware } = require('../helpers/utils'); + +describeWithEdgeware("OwnerContract test", async (context) => { + let OC; + let web3; + + before(async function() { + web3 = context.web3; + + OCDeploy = contract({ + abi: OwnerContract.abi, + unlinked_binary: OwnerContract.bytecode, + }); + OCDeploy.setProvider(web3.currentProvider); + OC = await OCDeploy.new({ from: account }); + }); + + it("should have owner", async () => { + let result = await OC.makeCall({ + from: account, + }); + assert.isTrue(result); + }); + + it("should fail with wrong owner", async () => { + // NOTE: this will fail, because the error will be: + // { code: -32603, message: 'inner executing call failed' } + // rather than a revert! + try { + await OC.makeCall({ from: '0xF8cef78E923919054037a1D03662bBD884fF4edf' }); + assert.fail('should throw'); + } catch (e) { + + } + }); +}); diff --git a/ts-tests/frontier-tester/tests/testPrecompiles.js b/ts-tests/frontier-tester/tests/testPrecompiles.js new file mode 100644 index 00000000..020a98f5 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testPrecompiles.js @@ -0,0 +1,67 @@ +const { assert } = require('chai'); +const contract = require("@truffle/contract"); +const { account, describeWithEdgeware } = require('../helpers/utils'); + +describeWithEdgeware('Precompiles test', async (context) => { + let web3; + + before(async () => { + web3 = context.web3; + }); + + it('should perform identity directly', async () => { + const message = '0x1234567890' + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000004', + from: account, + data: message, + }); + assert.equal(callResult, message); + }); + + // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md + it('should perform modexp directly', async () => { + // 3**(2**256 - 2**32 - 978) % (2**256 - 2**32 - 977) = 1 + const message = '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '03' + + 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2e' + + 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'; + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000005', + from: account, + data: message, + }); + const localResult = '0x0000000000000000000000000000000000000000000000000000000000000001'; + assert.equal(callResult, localResult); + }); + + it('should perform ed25519verify directly', async () => { + // 'test' + //Alice pubkey + sig, generated via subkey + const message = '0x0000000000000000000000000000000000000000000000000000000074657374' + + '88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee' + + '6c92140653922643b059e25a8ea5007baecc4a84dd3baa0b2c3aa62d44aea0393d70d860f6a6d5266cdd62160a971917f257603de3d8d0218681753caadae204'; + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000006', + from: account, + data: message, + }); + const localResult = '0x00000000'; + assert.equal(callResult, localResult); + }); + + it('should perform invalid ed25519verify directly', async () => { + // invalid test + const message = '0x0000000000000000000000000000000000000000000000000000000074657375' + + '88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee' + + '003d4e3fca386deff58df1d86f8bb490d3204e14d14ef5e51af03e34b72f7abea34ec295d6a0c055388e521c91f60b25e5199ec5d4c2c1af433ac040a75d8f0a'; + const callResult = await web3.eth.call({ + to: '0000000000000000000000000000000000000006', + from: account, + data: message, + }); + const localResult = '0x00000001'; + assert.equal(callResult, localResult); + }) +}); diff --git a/ts-tests/frontier-tester/tests/testSubstrateBalances.ts b/ts-tests/frontier-tester/tests/testSubstrateBalances.ts new file mode 100644 index 00000000..f12227fc --- /dev/null +++ b/ts-tests/frontier-tester/tests/testSubstrateBalances.ts @@ -0,0 +1,174 @@ +import { ApiPromise, WsProvider, Keyring } from '@polkadot/api'; +import { KeyringPair } from '@polkadot/keyring/types'; +import Web3 from 'web3'; +import { assert } from 'chai'; +const { convertToEvmAddress, convertToSubstrateAddress, describeWithEdgeware } = require('../helpers/utils.js'); +import BN from 'bn.js'; +import { spec } from '@edgeware/node-types'; +import { TypeRegistry } from '@polkadot/types'; + +describeWithEdgeware('Substrate <> EVM balances test', async (context) => { + let web3: Web3; + let web3Url: string; + let api: ApiPromise; + let id: number; + let keyring: KeyringPair; + let address: string; + let evmAddress: string; + let substrateEvmAddress: string; + const FEE_ACCURACY = 10000; + + const value = new BN('10000000000000000000'); + + // returns the fee + let sendSubstrateBalance = async (v: BN, addr = substrateEvmAddress): Promise => { + return new Promise(async (resolve) => { + const tx = api.tx.balances.transfer(addr, v); + const { partialFee } = await tx.paymentInfo(keyring); + tx.signAndSend(keyring, (result) => { + if (result.isError) { + assert.fail('tx failure'); + } + if (result.isCompleted) { + resolve(partialFee); + } + }); + }) + } + + const fetchBalance = async (acct: string): Promise => { + const res = await api.query.system.account(acct); + return res.data.free; + } + + before(async () => { + // init web3 + web3Url = 'http://localhost:9933'; + web3 = new Web3(web3Url); + id = await web3.eth.net.getId(); + assert.equal(id, 2021); + + // init polkadot + const polkadotUrl = 'ws://localhost:9944'; + api = await ApiPromise.create({ + provider: new WsProvider(polkadotUrl), + ...spec, + }); + const { ss58Format } = await api.rpc.system.properties(); + const substrateId = +ss58Format.unwrap(); + + // init addresses + keyring = new Keyring({ ss58Format: substrateId, type: 'sr25519' }).addFromUri('//Alice'); + address = keyring.address; + evmAddress = convertToEvmAddress(address); + substrateEvmAddress = convertToSubstrateAddress(evmAddress); + }); + + after(async () => { + if (api) { + await api.disconnect(); + } + }); + + it('should fund account via transfer', async () => { + // query start balances + const web3StartBalance = await web3.eth.getBalance(evmAddress); + const polkadotStartBalance = await fetchBalance(address); + const evmSubstrateStartBalance = await fetchBalance(substrateEvmAddress); + + assert.isTrue(polkadotStartBalance.gt(value), 'sender account must have sufficient balance'); + assert.equal(web3StartBalance, evmSubstrateStartBalance.toString(), 'substrate balance does not match web3 balance'); + + let fees = await sendSubstrateBalance(value); + + // query final balances + const polkadotEndBalance = await fetchBalance(address); + const evmSubstrateEndBalance = await fetchBalance(substrateEvmAddress); + const web3EndBalance = await web3.eth.getBalance(evmAddress); + + assert.equal( + polkadotEndBalance.divn(FEE_ACCURACY).toString(), + polkadotStartBalance.sub(value).sub(fees).divn(FEE_ACCURACY).toString(), + 'incorrect sender account balance' + ); + assert.equal(web3EndBalance, evmSubstrateEndBalance.toString(), 'substrate balance does not match web3 balance'); + assert.equal(evmSubstrateEndBalance.toString(), evmSubstrateStartBalance.add(value).toString(), 'incorrect web3 account balance'); + }); + + it('should withdraw via evm pallet', async () => { + // ensure the evm account has balance + await sendSubstrateBalance(value.clone().muln(2)); + + // query start balances + const web3StartBalance = await web3.eth.getBalance(evmAddress); + const polkadotStartBalance = await fetchBalance(address); + const evmSubstrateStartBalance = await fetchBalance(substrateEvmAddress); + assert.isTrue(evmSubstrateStartBalance.gt(value), 'evm account must have sufficient balance'); + assert.equal(web3StartBalance, evmSubstrateStartBalance.toString(), 'substrate balance does not match web3 balance'); + + // execute withdraw + const fees: BN = await new Promise(async (resolve) => { + const tx = api.tx.evm.withdraw(evmAddress, value); + const { partialFee } = await tx.paymentInfo(keyring); + return tx.signAndSend(keyring, (result) => { + if (result.isError) { + assert.fail('tx failure'); + } + if (result.isCompleted) { + resolve(partialFee); + } + }); + }); + + // query end balances + const polkadotEndBalance = await fetchBalance(address); + const evmSubstrateEndBalance = await fetchBalance(substrateEvmAddress); + const web3EndBalance = await web3.eth.getBalance(evmAddress); + + assert.equal(polkadotEndBalance.toString(), polkadotStartBalance.add(value).sub(fees).toString(), 'incorrect sender account balance'); + assert.equal(web3EndBalance, evmSubstrateEndBalance.toString(), 'substrate balance does not match web3 balance'); + assert.equal(evmSubstrateEndBalance.toString(), evmSubstrateStartBalance.sub(value).toString(), 'incorrect web3 account balance'); + + }); + + it('should update substrate balances from web3 tx', async () => { + // start with an EVM account with a known private key + const privKey = '99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E343'; + const web3 = context.web3; + web3.eth.accounts.wallet.add(privKey); + web3.eth.defaultAccount = web3.eth.accounts.wallet[0].address; + const senderAddress = web3.eth.accounts.wallet[0].address; + const senderSubstrateAddress: string = convertToSubstrateAddress(senderAddress, id); + + // give the EVM account some balance to send back via web3 + await sendSubstrateBalance(value.clone().muln(2), senderSubstrateAddress); + + // query start balances + const web3StartBalance = await web3.eth.getBalance(evmAddress); + const senderWeb3StartBalance = await web3.eth.getBalance(senderAddress); + const senderEvmSubstrateStartBalance = await fetchBalance(senderSubstrateAddress); + assert.isTrue(web3.utils.toBN(senderWeb3StartBalance).gt(value), 'evm account must have sufficient balance'); + assert.equal(senderWeb3StartBalance, senderEvmSubstrateStartBalance.toString(), 'substrate balance does not match web3 balance'); + + // perform web3 call, send value back to the original substrate/alice account + const receipt = await web3.eth.sendTransaction({ + from: senderAddress, + to: evmAddress, + value: value.toString(), + gas: '1000000', + gasPrice: '1', + }); + // const gasUsed = web3.utils.toBN(web3.utils.toWei(`${receipt.gasUsed}`, 'gwei')); + const gasUsed = web3.utils.toBN(`${receipt.gasUsed}`); + + // verify end balances + const web3EndBalance = await web3.eth.getBalance(evmAddress); + const evmSubstrateEndBalance = await fetchBalance(substrateEvmAddress); + const senderWeb3EndBalance = await web3.eth.getBalance(senderAddress); + const senderEvmSubstrateEndBalance = await fetchBalance(senderSubstrateAddress); + assert.equal(senderWeb3EndBalance, senderEvmSubstrateEndBalance.toString(), 'sender substrate balance does not match web3 balance'); + assert.equal(senderWeb3EndBalance, (web3.utils.toBN(senderWeb3StartBalance).sub(value)).sub(gasUsed).toString(), 'incorrect web3 sender balance'); + assert.equal(web3EndBalance, web3.utils.toBN(web3StartBalance).add(value).toString(), 'incorrect web3 recipient balance'); + assert.equal(web3EndBalance, evmSubstrateEndBalance.toString(), 'recipient substrate balance does not match web3 balance') + }); +}); diff --git a/ts-tests/frontier-tester/tests/testSubstrateFeatures.ts b/ts-tests/frontier-tester/tests/testSubstrateFeatures.ts new file mode 100644 index 00000000..28f45e30 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testSubstrateFeatures.ts @@ -0,0 +1,209 @@ +import { ApiPromise, WsProvider } from '@polkadot/api'; +import { KeyringPair } from '@polkadot/keyring/types'; +import { createTestPairs, TestKeyringMap } from '@polkadot/keyring/testingPairs'; +import { u8aToString } from '@polkadot/util'; +import { assert } from 'chai'; +import { spec } from '@edgeware/node-types'; +import { TypeRegistry } from '@polkadot/types'; +import BN from 'bn.js'; +import { SubmittableExtrinsic } from '@polkadot/api/types'; +const { describeWithEdgeware } = require('../helpers/utils.js'); + +describeWithEdgeware('Upgrade Tests', async (context) => { + let api: ApiPromise; + let pairs: TestKeyringMap; + const FEE_ACCURACY = 10000; + + before(async () => { + const polkadotUrl = 'ws://localhost:9944'; + const provider = new WsProvider(polkadotUrl); + api = await ApiPromise.create({ + provider, + ...spec, + }); + pairs = createTestPairs(); + }); + + after(async () => { + if (api) { + await api.disconnect(); + } + }); + + const submitTxWithFee = async (tx: SubmittableExtrinsic<'promise'>, from: KeyringPair): Promise => { + return new Promise(async (resolve) => { + const { partialFee } = await tx.paymentInfo(from); + tx.signAndSend(from, (result) => { + if (result.isError) { + assert.fail('tx failure'); + } + if (result.isCompleted) { + resolve(partialFee); + } + }); + }) + } + + const fetchBalance = async (acct: string): Promise => { + const res = await api.query.system.account(acct); + return res.data.free; + } + + it('should transfer balances', async () => { + const charlie = pairs.charlie; + const dave = pairs.dave; + const charlieStartBal = await fetchBalance(charlie.address); + const daveStartBal = await fetchBalance(dave.address); + + // send funds from charlie to dave + const value = new BN('10000000000000000000'); + const tx = api.tx.balances.transfer(dave.address, value); + const fees = await submitTxWithFee(tx, charlie); + + // verify results + const charlieEndBal = await fetchBalance(charlie.address); + const daveEndBal = await fetchBalance(dave.address); + assert.equal(daveStartBal.add(value).toString(), daveEndBal.toString()); + assert.equal( + charlieStartBal.sub(value).sub(fees).divn(FEE_ACCURACY).toString(), + charlieEndBal.divn(FEE_ACCURACY).toString() + ); + }); + + it('should create and second democracy proposal', async () => { + const charlie = pairs.charlie; + const dave = pairs.dave; + const value = api.consts.democracy.minimumDeposit; + const propCount = await api.query.democracy.publicPropCount(); + + // generate an arbitrary tx to propose + const proposalFunc = api.tx.system.fillBlock(+propCount); + + // submit proposal and verify + const tx = api.tx.democracy.propose(proposalFunc.method.hash, value); + await submitTxWithFee(tx, charlie); + const proposals = await api.query.democracy.publicProps(); + const proposal = proposals.find(([idx, hash, submitter]) => +idx === +propCount + && hash.toString() === proposalFunc.method.hash.toString() + && submitter.toString() === charlie.address + ); + assert.isTrue(!!proposal); + + // submit associated preimage + const preimageTx = api.tx.democracy.notePreimage(proposalFunc.method.toHex()); + await submitTxWithFee(preimageTx, charlie); + const preimage = await api.query.democracy.preimages(proposalFunc.method.hash); + assert.isTrue(preimage.isSome); + assert.isTrue(preimage.unwrap().isAvailable); + assert.equal(preimage.unwrap().asAvailable.provider.toString(), charlie.address); + + // second it + const voters = await api.query.democracy.depositOf(+propCount); + const secondTx = api.tx.democracy.second(+propCount, voters.unwrap()[0].length); + await submitTxWithFee(secondTx, dave); + const newVoters = await api.query.democracy.depositOf(+propCount); + assert.isTrue(newVoters.isSome); + assert.isTrue(newVoters.unwrap()[0].map((c) => c.toString()).includes(charlie.address)); + assert.isTrue(newVoters.unwrap()[0].map((c) => c.toString()).includes(dave.address)); + }); + + it('should create treasury proposal', async () => { + // setup args + const bob = pairs.bob; + const startBal = await fetchBalance(bob.address); + const value = new BN('10000000000000000000'); + const beneficiary = pairs.alice.address; + const bondPermill = api.consts.treasury.proposalBond; + const bondMinimum = api.consts.treasury.proposalBondMinimum; + const bondFromPct = value.mul(bondPermill).divn(1_000_000); + const bond = BN.max(bondFromPct, bondMinimum); + + // make transaction + const tx = api.tx.treasury.proposeSpend(value, beneficiary); + const fee = await submitTxWithFee(tx, bob); + + // fetch result on success + const endBal = await fetchBalance(bob.address); + const proposalCount = await api.query.treasury.proposalCount(); + const proposal = await api.query.treasury.proposals(proposalCount.subn(1)); + + // verify results + assert.equal((startBal.sub(bond)).sub(fee).toString(), endBal.toString()); + assert.isTrue(proposal.isSome); + assert.equal(proposal.unwrap().beneficiary.toString(), beneficiary); + assert.equal(proposal.unwrap().value.toString(), value.toString()); + assert.equal(proposal.unwrap().proposer.toString(), bob.address); + assert.equal(proposal.unwrap().bond.toString(), bond.toString()); + }); + + it('should apply for council', async () => { + const bob = pairs.bob; + const candidates = await api.query.elections.candidates(); + const submitCandidacyTx = api.tx.elections.submitCandidacy(candidates.length); + await submitTxWithFee(submitCandidacyTx, bob); + const newCandidates = await api.query.elections.candidates(); + assert.isTrue(newCandidates.map((c) => c.toString()).includes(bob.address)); + }); + + it('should register an identity', async () => { + const bob = pairs.bob; + const name = 'i am bob'; + const identityInfo = api.createType('IdentityInfo', { + additional: [], + display: { raw: name }, + legal: { none: null }, + web: { none: null }, + riot: { none: null }, + email: { none: null }, + image: { none: null }, + twitter: { none: null }, + }); + const tx = api.tx.identity.setIdentity(identityInfo) + await submitTxWithFee(tx, bob); + const identity = await api.query.identity.identityOf(bob.address); + assert.isTrue(identity.isSome); + assert.equal(u8aToString(identity.unwrap().info.display.toU8a()).replace(/[^\x20-\x7E]/g, ''), name); + }); + +/* + it('should deploy WASM', async () => { + // deploy a contract + const eve = pairs.eve; + const json = fs.readFileSync(`${__dirname}/../helpers/flipper.json`, { encoding: 'utf8' }); + const wasm = fs.readFileSync(`${__dirname}/../helpers/flipper.wasm`); + + // create the contract blueprint + const code = new CodePromise(api, json, wasm); + const blueprint: BlueprintPromise = await new Promise((resolve) => { + code.createBlueprint().signAndSend(eve, (res) => { + if (res.isCompleted) { + resolve(res.blueprint); + } + }); + }); + assert.isTrue(!!blueprint); + + // deploy a contract + const value = new BN('1230000000000'); + const gasLimit = new BN('100000000000'); + const contract: ContractPromise = await new Promise((resolve, reject) => { + blueprint.createContract('new', value, gasLimit, true).signAndSend(eve, (res) => { + if (res.dispatchError) { + if (res.dispatchError.isModule) { + const details = api.registry.findMetaError(res.dispatchError.asModule.toU8a()); + console.error(`${details.section}::${details.name}: ${details.documentation[0]}`); + } + reject(res.dispatchError); + } else if (res.isCompleted) { + resolve(res.contract); + } + }) + }); + + // verify the contract flipped the value + const getResult = await contract.query.get(eve.address, value, gasLimit); + assert.isTrue(getResult.result.isOk); + assert.isTrue((getResult.result.value as bool).isFalse); + }); +*/ +}); diff --git a/ts-tests/frontier-tester/tests/testTime.js b/ts-tests/frontier-tester/tests/testTime.js new file mode 100644 index 00000000..7a39f856 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testTime.js @@ -0,0 +1,45 @@ +const { assert } = require("chai"); +const TimeContract = require("../build/contracts/TimeContract.json"); +const { account, describeWithEdgeware } = require('../helpers/utils'); +const contract = require("@truffle/contract"); + +const BLOCK_TIME_MS = 6000; + +function timeout(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +function blockTimeifyDate(n) { + return Math.floor(n / BLOCK_TIME_MS) * (BLOCK_TIME_MS / 1000); +} + +describeWithEdgeware("TimeContract test", async (context) => { + it("should be testable", async () => { + const web3 = context.web3; + let Time = contract({ + abi: TimeContract.abi, + unlinked_binary: TimeContract.bytecode, + }); + Time.setProvider(web3.currentProvider); + + let t = await Time.new({ from: account }); + await t.timeBeforeEnd({ from: account, gasPrice: 1000000000 }); + + // fetch initial values + let now = await t.viewNow.call({ from: account }); + let dNow = blockTimeifyDate(Date.now()).toString(); + assert.equal(dNow, now.toString()); + + // wait a block + await timeout(BLOCK_TIME_MS); + const now2 = await t.viewNow.call({ from: account }); + dNow = blockTimeifyDate(Date.now()).toString(); + assert.equal(dNow, now2.toString()); + + // wait a block + await timeout(BLOCK_TIME_MS); + const now3 = await t.viewNow.call({ from: account }); + dNow = blockTimeifyDate(Date.now()).toString(); + assert.equal(dNow, now3.toString()); + }); +}); diff --git a/ts-tests/frontier-tester/tests/testValue.js b/ts-tests/frontier-tester/tests/testValue.js new file mode 100644 index 00000000..9bb79845 --- /dev/null +++ b/ts-tests/frontier-tester/tests/testValue.js @@ -0,0 +1,64 @@ +const { assert } = require('chai'); +const ValueContract = require('../build/contracts/ValueContract.json'); +const { account, describeWithEdgeware } = require('../helpers/utils'); +const contract = require("@truffle/contract"); + +describeWithEdgeware("ValueContract test", async (context) => { + it("should have value", async () => { + const web3 = context.web3; + const gasPrice = web3.utils.toWei("1", 'gwei'); + let Value = contract({ + abi: ValueContract.abi, + unlinked_binary: ValueContract.bytecode, + }); + Value.setProvider(web3.currentProvider); + + const BN = web3.utils.BN; + let balance = await web3.eth.getBalance(account); + let c = await Value.new({ from: account, gasPrice }); + let createReceipt = await web3.eth.getTransactionReceipt(c.transactionHash); + let createGasUsed = web3.utils.toWei(`${createReceipt.gasUsed}`, 'gwei'); + let valueStored = await c.getValue.call({ from: account }); + + assert.equal(valueStored, '0'); + const valueToSend = web3.utils.toWei('1', 'ether'); + const tx = await c.sendValue({ value: valueToSend, from: account, gasPrice }); + const txGasUsed = web3.utils.toWei(`${tx.receipt.gasUsed}`, 'gwei'); + const updatedValue = await c.getValue.call({ from: account }); + const updatedBalance = await web3.eth.getBalance(account); + const totalSpent = (new BN(valueToSend)).add(new BN(createGasUsed)).add(new BN(txGasUsed)); + assert.equal(updatedValue.toString(), (new BN(valueStored)).add(new BN(valueToSend)).toString(), "contract value wrong"); + assert.equal(updatedBalance.toString(), (new BN(balance)).sub(totalSpent).toString(), "account balance wrong"); + }); + + + it("should setup ValueContract with non-zero value", async () => { + const web3 = context.web3; + const gasPrice = web3.utils.toWei("1", 'gwei'); + let Value = contract({ + abi: ValueContract.abi, + unlinked_binary: ValueContract.bytecode, + }); + Value.setProvider(web3.currentProvider); + + const BN = web3.utils.BN; + let balance = await web3.eth.getBalance(account); + + const initialSendValue = web3.utils.toWei('1', 'ether'); + let c = await Value.new({ from: account, value: initialSendValue, gasPrice }); + let createReceipt = await web3.eth.getTransactionReceipt(c.transactionHash); + let createGasUsed = web3.utils.toWei(`${createReceipt.gasUsed}`, 'gwei'); + let valueStored = await c.getValue.call({ from: account }); + + assert.equal(valueStored, web3.utils.toWei('1', 'ether')); + const valueToSend = web3.utils.toWei('1', 'ether'); + const tx = await c.sendValue({ value: valueToSend, from: account, gasPrice }); + const txGasUsed = web3.utils.toWei(`${tx.receipt.gasUsed}`, 'gwei'); + const updatedBalance = await web3.eth.getBalance(account); + const updatedValue = await c.getValue.call({ from: account }); + const totalValueSent = (new BN(initialSendValue)).add(new BN(valueToSend)); + const totalSpent = (new BN(createGasUsed)).add(new BN(txGasUsed)).add(totalValueSent); + assert.equal(updatedValue.toString(), (new BN(valueStored)).add(new BN(valueToSend)).toString(), "contract value wrong"); + assert.equal(updatedBalance.toString(), (new BN(balance)).sub(totalSpent).toString(), "account balance wrong"); + }); +}); diff --git a/ts-tests/frontier-tester/truffle-config.js b/ts-tests/frontier-tester/truffle-config.js new file mode 100644 index 00000000..991ecca2 --- /dev/null +++ b/ts-tests/frontier-tester/truffle-config.js @@ -0,0 +1,7 @@ +module.exports = { + compilers: { + solc: { + version: "=0.5.16" + } + }, +} diff --git a/ts-tests/frontier-tester/tsconfig.json b/ts-tests/frontier-tester/tsconfig.json new file mode 100644 index 00000000..5382b83c --- /dev/null +++ b/ts-tests/frontier-tester/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "resolveJsonModule": true + } +} \ No newline at end of file diff --git a/ts-tests/frontier-tester/yarn.lock b/ts-tests/frontier-tester/yarn.lock new file mode 100644 index 00000000..14df1e1c --- /dev/null +++ b/ts-tests/frontier-tester/yarn.lock @@ -0,0 +1,6044 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/helper-module-imports@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" + integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-plugin-utils@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" + integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== + +"@babel/helper-validator-identifier@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" + integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + +"@babel/plugin-transform-runtime@^7.5.5": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.11.0.tgz#e27f78eb36f19448636e05c33c90fd9ad9b8bccf" + integrity sha512-LFEsP+t3wkYBlis8w6/kmnd6Kb1dxTd+wGJ8MlxTGzQo//ehtqlVL4S9DNUa53+dtPSQobN2CXx4d81FqC58cw== + dependencies: + "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + resolve "^1.8.1" + semver "^5.5.1" + +"@babel/runtime@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.5.5": + version "7.11.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" + integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/types@^7.10.4": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" + integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@edgeware/node-types@^3.1.0-beta.14": + version "3.1.0-beta.14" + resolved "https://registry.yarnpkg.com/@edgeware/node-types/-/node-types-3.1.0-beta.14.tgz#d55b01c5bcc5e5201d74a4259258aece5f3fcc07" + integrity sha512-Iz7nzUnNbAw46aAfVwioceNsaT0DKTJUqrDsILY/7lXCZeclaibyXuHghBkCHRSDnztYxCG/8gfjyHH6+s16rQ== + +"@ethersproject/abi@5.0.0-beta.153": + version "5.0.0-beta.153" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" + integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== + dependencies: + "@ethersproject/address" ">=5.0.0-beta.128" + "@ethersproject/bignumber" ">=5.0.0-beta.130" + "@ethersproject/bytes" ">=5.0.0-beta.129" + "@ethersproject/constants" ">=5.0.0-beta.128" + "@ethersproject/hash" ">=5.0.0-beta.128" + "@ethersproject/keccak256" ">=5.0.0-beta.127" + "@ethersproject/logger" ">=5.0.0-beta.129" + "@ethersproject/properties" ">=5.0.0-beta.131" + "@ethersproject/strings" ">=5.0.0-beta.130" + +"@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.2.tgz#80d0ddfb7d4bd0d32657747fa4bdd2defef2e00a" + integrity sha512-+rz26RKj7ujGfQynys4V9VJRbR+wpC6eL8F22q3raWMH3152Ha31GwJPWzxE/bEA+43M/zTNVwY0R53gn53L2Q== + dependencies: + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/keccak256" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/rlp" "^5.0.0" + bn.js "^4.4.0" + +"@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.0": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.5.tgz#31bd7e75aad46ace345fae69b1f5bb120906af1b" + integrity sha512-24ln7PV0g8ZzjcVZiLW9Wod0i+XCmK6zKkAaxw5enraTIT1p7gVOcSXFSzNQ9WYAwtiFQPvvA+TIO2oEITZNJA== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + bn.js "^4.4.0" + +"@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.0": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.3.tgz#b3769963ae0188a35713d343890a903bda20af9c" + integrity sha512-AyPMAlY+Amaw4Zfp8OAivm1xYPI8mqiUYmEnSUk1CnS2NrQGHEMmFJFiOJdS3gDDpgSOFhWIjZwxKq2VZpqNTA== + dependencies: + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.2.tgz#f7ac0b320e2bbec1a5950da075015f8bc4e8fed1" + integrity sha512-nNoVlNP6bgpog7pQ2EyD1xjlaXcy1Cl4kK5v1KoskHj58EtB6TK8M8AFGi3GgHTdMldfT4eN3OsoQ/CdOTVNFA== + dependencies: + "@ethersproject/bignumber" "^5.0.0" + +"@ethersproject/hash@>=5.0.0-beta.128": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.2.tgz#6d69558786961836d530b8b4a8714eac5388aec7" + integrity sha512-dWGvNwmVRX2bxoQQ3ciMw46Vzl1nqfL+5R8+2ZxsRXD3Cjgw1dL2mdjJF7xMMWPvPdrlhKXWSK0gb8VLwHZ8Cw== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/keccak256" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/strings" "^5.0.0" + +"@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.2.tgz#7ed4a95bb45ee502cf4532223833740a83602797" + integrity sha512-MbroXutc0gPNYIrUjS4Aw0lDuXabdzI7+l7elRWr1G6G+W0v00e/3gbikWkCReGtt2Jnt4lQSgnflhDwQGcIhA== + dependencies: + "@ethersproject/bytes" "^5.0.0" + js-sha3 "0.5.7" + +"@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.0": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.4.tgz#09fa4765b5691233e3afb6617cb38a700f9dd2e4" + integrity sha512-alA2LiAy1LdQ/L1SA9ajUC7MvGAEQLsICEfKK4erX5qhkXE1LwLSPIzobtOWFsMHf2yrXGKBLnnpuVHprI3sAw== + +"@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.2.tgz#2facb62d2f2d968c7b3d0befa5bcc884cc565d3b" + integrity sha512-FxAisPGAOACQjMJzewl9OJG6lsGCPTm5vpUMtfeoxzAlAb2lv+kHzQPUh9h4jfAILzE8AR1jgXMzRmlhwyra1Q== + dependencies: + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/rlp@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.2.tgz#d6b550a2ac5e484f15f0f63337e522004d2e78cd" + integrity sha512-oE0M5jqQ67fi2SuMcrpoewOpEuoXaD8M9JeR9md1bXRMvDYgKXUtDHs22oevpEOdnO2DPIRabp6MVHa4aDuWmw== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/signing-key@^5.0.0": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.3.tgz#adb84360e147bfd336cb2fe114100120732dc10a" + integrity sha512-5QPZaBRGCLzfVMbFb3LcVjNR0UbTXnwDHASnQYfbzwUOnFYHKxHsrcbl/5ONGoppgi8yXgOocKqlPCFycJJVWQ== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + elliptic "6.5.3" + +"@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.2.tgz#1753408c3c889813fd0992abd76393e3e47a2619" + integrity sha512-oNa+xvSqsFU96ndzog0IBTtsRFGOqGpzrXJ7shXLBT7juVeSEyZA/sYs0DMZB5mJ9FEjHdZKxR/rTyBY91vuXg== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/transactions@^5.0.0-beta.135": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.2.tgz#590ede71fc87b45be7bd46002e18ae52246a2347" + integrity sha512-jZp0ZbbJlq4JLZY6qoMzNtp2HQsX6USQposi3ns0MPUdn3OdZJBDtrcO15r/2VS5t/K1e1GE5MI1HmMKlcTbbQ== + dependencies: + "@ethersproject/address" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/keccak256" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + "@ethersproject/rlp" "^5.0.0" + "@ethersproject/signing-key" "^5.0.0" + +"@openzeppelin/contracts@^2.5.0": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-2.5.1.tgz#c76e3fc57aa224da3718ec351812a4251289db31" + integrity sha512-qIy6tLx8rtybEsIOAlrM4J/85s2q2nPkDqj/Rx46VakBZ0LwtFhXIVub96LXHczQX0vaqmAueDqNPXtbSXSaYQ== + +"@polkadot/api-contract@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-3.2.4-3.tgz#44b16e6d3259d7e0c21c496044771302bb8d019c" + integrity sha512-Gi8yOjk+yIsrazPBZRFLHxAveIOiuETHmZ9QQoSDC6XpkK4jhhmVG3o5oRmEzn+78SEA/cYAW8gxKVf6aeoUQQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/api" "3.2.4-3" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + bn.js "^4.11.9" + +"@polkadot/api-derive@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-3.2.4-3.tgz#451ac9906ddf88e55cbc331ac264eddbeb1a757d" + integrity sha512-iNtbFetZsta1SMkGcJWxV1EDB3FrXreXC3w2JhEwZ9BdZV+P8WnLKWP2q96aERlHff2792QbtdNyXtHPLgWprA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/api" "3.2.4-3" + "@polkadot/rpc-core" "3.2.4-3" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + bn.js "^4.11.9" + +"@polkadot/api@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-3.2.4-3.tgz#947508eef3d19a9c527dbf268cde411a14e09118" + integrity sha512-FTtQYtRZ0JLIbvGMlL8U4QDOZI3LxNiKvqDHgao+LJg0d+ZwawWlF6ZOJpJ84mW96dEzRIhhuhY299jQvLpbXA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/api-derive" "3.2.4-3" + "@polkadot/keyring" "^5.2.2" + "@polkadot/metadata" "3.2.4-3" + "@polkadot/rpc-core" "3.2.4-3" + "@polkadot/rpc-provider" "3.2.4-3" + "@polkadot/types" "3.2.4-3" + "@polkadot/types-known" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + bn.js "^4.11.9" + eventemitter3 "^4.0.7" + +"@polkadot/keyring@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-5.2.2.tgz#1b011d9ad96ce142ee21183c2e76cbc0c7c5c39b" + integrity sha512-HZ+CABf0hC1P2ySHN/EP2ldiUa9jKo33Gg5lsOos4MjlsCrqhTB/LBg9dSYVO8Z215wpty7KBHvPYQv4XRXO7Q== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/util" "5.2.2" + "@polkadot/util-crypto" "5.2.2" + +"@polkadot/metadata@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-3.2.4-3.tgz#aeb975d0700ec26f46d27110e9e578fcafc0df0e" + integrity sha512-YgeO2cGNAMEvK+kKS5m9MYnhx7L/D71/fUO96FFJUgKentV3ofxsc6TdSE2B8bnl5jxI5zmlC6UvzMfB72tKjA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/types" "3.2.4-3" + "@polkadot/types-known" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + bn.js "^4.11.9" + +"@polkadot/networks@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-5.2.2.tgz#465fd0984f1a161803c4c605d6931f90ad0b966f" + integrity sha512-rffpQNldyajuGrqNzNsQiGyupFv7TDUZ4Pm1kGAToMipd9IfJQFRs9TxeCvP7qwsWmsAPBe3YN6GHRNtS9TdEg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/rpc-core@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-3.2.4-3.tgz#637175a6b18994788daf5ba62e206947a0e9b79d" + integrity sha512-cK9/ul/4IfzoYExVCONo3ua9YyGCbB3L3tUyDuFfEN6RZj0GtNc558fdMrU2zs1bpRkqElYPoRIY5y6OUsIAKQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/metadata" "3.2.4-3" + "@polkadot/rpc-provider" "3.2.4-3" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + +"@polkadot/rpc-provider@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-3.2.4-3.tgz#592e580d47b471d9f41cd0aa84d347f6ceeb4da7" + integrity sha512-92n/VGFlDK+vj++W9rxoJ0xSKRwBYCHta3hp/adUGYThXGBZWcpkOqtrvXdlKk8bxXWrj+ASUXSXS0QsYqHvlw== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-fetch" "^5.2.2" + "@polkadot/x-ws" "^5.2.2" + bn.js "^4.11.9" + eventemitter3 "^4.0.7" + +"@polkadot/types-known@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-3.2.4-3.tgz#21bcb0e22cdc5386bf80745120674f0bb04d9275" + integrity sha512-FaAmfgrNrRjibm2WfJ/KtO86U3JZLSSJUB52hq3U7HAL52BG0e10qOqXrik2nXM7GrzPXm8pVpiUWjCldJ95YQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + bn.js "^4.11.9" + +"@polkadot/types@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-3.2.4-3.tgz#58006660b9e8e4d2a0d43b4a125621d63999eaa0" + integrity sha512-izRz/Z3KCGl1wpKTJMBZRf/hdSZOX3zks1AUQT4uuuc/k96oQf/JTMZUT1FSxaKZ0r6kVQKHfOeduQfREdQ0zQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/metadata" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + "@types/bn.js" "^4.11.6" + bn.js "^4.11.9" + +"@polkadot/util-crypto@5.2.2", "@polkadot/util-crypto@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-5.2.2.tgz#103d6ccda64c72c2e971028b0ec7e74ffb4acd8c" + integrity sha512-U/QX5cwhFQgd448LVbJRP8IR9UeUNOH//Dv+ZhoCcqLXkVxMotF8BJjRUzkQVrORIlP0miWlwxygb4xzNsYhsw== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/networks" "5.2.2" + "@polkadot/util" "5.2.2" + "@polkadot/wasm-crypto" "^3.1.1" + "@polkadot/x-randomvalues" "5.2.2" + base-x "^3.0.8" + blakejs "^1.1.0" + bn.js "^4.11.9" + create-hash "^1.2.0" + elliptic "^6.5.3" + hash.js "^1.1.7" + js-sha3 "^0.8.0" + scryptsy "^2.1.0" + tweetnacl "^1.0.3" + xxhashjs "^0.2.2" + +"@polkadot/util@5.2.2", "@polkadot/util@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-5.2.2.tgz#c673a8b260fa29eadb4a95748cd675325b22e3b1" + integrity sha512-kUtQ3Jv+9xCMZOoXwFXVv7xHc5idPCIerbXN44406lvB3dF7G4sMUIG6fx2kCuarL+lF4RK8F4o14SpctK3wCA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/x-textdecoder" "5.2.2" + "@polkadot/x-textencoder" "5.2.2" + "@types/bn.js" "^4.11.6" + bn.js "^4.11.9" + camelcase "^5.3.1" + ip-regex "^4.2.0" + +"@polkadot/wasm-crypto-asmjs@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-3.1.1.tgz#391e1be6f7d65552b09c2e2486d108c379e46dc6" + integrity sha512-7Lt4B/6dwUhb5OAuSes0qMd83TpkngvEpiXTt2ccf/t2OvAXY9msfeJ9as3dI2jvjA9edD//jiejJ0BHJgpuXw== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/wasm-crypto-wasm@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-3.1.1.tgz#94638daa7642e6a9681cb854757d98401913f087" + integrity sha512-KaP1Ojf889ZeXHGPmyFTj0Qxr/jQ4yfpaGiEOCvYKXRYsDsbZKfxcb96PFil/x0yoZswWG3TX2S3hebnAzkmBg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/wasm-crypto@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-3.1.1.tgz#e9ec63204f508541dfda72f0b6b98be40e27de50" + integrity sha512-uApLRojJY9Q7Arji6w9/eOYEu8Pg8dm+zt+640QLzC4KVVCpbdMmrcFAXCZXeOIJwsKveZsNehGUCcG77ypVPg== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/wasm-crypto-asmjs" "^3.1.1" + "@polkadot/wasm-crypto-wasm" "^3.1.1" + +"@polkadot/x-fetch@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-5.2.2.tgz#8e2e39f3872b1ffcc18767282b3afb1786ff938f" + integrity sha512-u1fd8woiE8l6xn9QXpdFhhaYIarShtDJTBgGKH3PFuQVrPjrTT3iA+OIHB4jpM8FFZyPG6rCdk6N9EFp/3neFA== + dependencies: + "@babel/runtime" "^7.12.5" + "@types/node-fetch" "^2.5.7" + node-fetch "^2.6.1" + +"@polkadot/x-randomvalues@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-5.2.2.tgz#c44e5ea967eac347525604dd43500ae2fb6ec418" + integrity sha512-0aJmWUvOil6SC1At5YDHKFAMTUkvKw9IQC9Qxj0WhaDIY3KETgX+dNWNI8qEeoKsgCXMybPzewI5X9IXl7QItQ== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/x-rxjs@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/x-rxjs/-/x-rxjs-3.2.4-3.tgz#7779998f5d7190c77c8493a41701f5cc4c53edc5" + integrity sha512-EJlm1nyXXQCttvjrS3ss9Aq797HoN5jW+mB0yF6YbeH7nfERifiouykVvASa0PSsb6eITBAZDNvJHt6L0a62Ig== + dependencies: + "@babel/runtime" "^7.12.5" + rxjs "^6.6.3" + +"@polkadot/x-textdecoder@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-5.2.2.tgz#0b412c275107485c36c70dffe67f0cfee8f1e786" + integrity sha512-4ca8oJT/CAXh0XqtKykuHLEubZZP+7KINGOd2NUqxrNQRCgc6iClAiNq+HByPJz4WMTIOTyGcbH2CplzB/GHLg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/x-textencoder@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-5.2.2.tgz#2c58b9093e33ae3628a8feb1d0bcd25e0c25fcb7" + integrity sha512-HInuKv67Jac6aNFxeQtFaEM97mgLB6shqB7oR5Z8cCL2T+xrdbp+cr5/R392QDt/LY6csFp5hw2YkN+42Yrthg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/x-ws@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-5.2.2.tgz#71f992a6b7b6677451d37e064134ec42d6ac7268" + integrity sha512-UitnCF7THR/NFhZq26znBhUJUt9bynlX1G6s3gxvtJaibmTVdsAW2ZiBO8GuoR0DiWRPn037QYXBLigQEDaWCw== + dependencies: + "@babel/runtime" "^7.12.5" + "@types/websocket" "^1.0.1" + websocket "^1.0.33" + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@truffle/blockchain-utils@^0.0.25": + version "0.0.25" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.0.25.tgz#f4b320890113d282f25f1a1ecd65b94a8b763ac1" + integrity sha512-XA5m0BfAWtysy5ChHyiAf1fXbJxJXphKk+eZ9Rb9Twi6fn3Jg4gnHNwYXJacYFEydqT5vr2s4Ou812JHlautpw== + dependencies: + source-map-support "^0.5.19" + +"@truffle/codec@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.6.1.tgz#ed26bb4948d8a3d4b5884538ae41b1c7f9f900ba" + integrity sha512-HrInHX9yLVVRCGOsXG2mZNG5P724KHZH3Pez6tMn39yLPsiKm9CzHcAHF5uX7ExhponOTEtKViudQ4MAFfh9Jg== + dependencies: + big.js "^5.2.2" + bn.js "^4.11.8" + borc "^2.1.2" + debug "^4.1.0" + lodash.clonedeep "^4.5.0" + lodash.escaperegexp "^4.1.2" + lodash.partition "^4.6.0" + lodash.sum "^4.0.2" + semver "^6.3.0" + source-map-support "^0.5.19" + utf8 "^3.0.0" + web3-utils "1.2.1" + +"@truffle/contract-schema@^3.2.5": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.2.5.tgz#498bbadad955daefd2638af4b195607734b306b9" + integrity sha512-07lzyYJinGvpaKc/WUm1sigtE5qDjFfUb/wUfV5cNsUmRSd/Ji9vTZ+of/zYP4MztJQLT/ZtuG836oXhWgqntg== + dependencies: + ajv "^6.10.0" + crypto-js "^3.1.9-1" + debug "^4.1.0" + +"@truffle/contract@^4.2.22": + version "4.2.22" + resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.2.22.tgz#48219634ec7a1f970d2be4819d2d115cdb33d896" + integrity sha512-mkkuQucuZb+kHlnDwcEF5CXKa7c3hZRTN7y0NSVGlNKPMAd+VMoGi4RsJy3o0ALAumsxi714sGMHJagqoz/RmA== + dependencies: + "@truffle/blockchain-utils" "^0.0.25" + "@truffle/contract-schema" "^3.2.5" + "@truffle/debug-utils" "^4.2.8" + "@truffle/error" "^0.0.11" + "@truffle/interface-adapter" "^0.4.16" + bignumber.js "^7.2.1" + ethereum-ens "^0.8.0" + ethers "^4.0.0-beta.1" + source-map-support "^0.5.19" + web3 "1.2.1" + web3-core-helpers "1.2.1" + web3-core-promievent "1.2.1" + web3-eth-abi "1.2.1" + web3-utils "1.2.1" + +"@truffle/debug-utils@^4.2.8": + version "4.2.8" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-4.2.8.tgz#2e5f865b9fea26884344396aef29a332bc1a7a75" + integrity sha512-o1apbR4FpQDVNCtT7nnXDAmHKGHEOVGuXyz9QG/IhjRdqxwZEE0pzBAW13tdIwduNaj6TQQVTB/Fx8uz914qzg== + dependencies: + "@truffle/codec" "^0.6.1" + "@trufflesuite/chromafi" "^2.1.2" + chalk "^2.4.2" + debug "^4.1.0" + highlight.js "^9.15.8" + highlightjs-solidity "^1.0.18" + +"@truffle/error@^0.0.11": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.11.tgz#2789c0042d7e796dcbb840c7a9b5d2bcd8e0e2d8" + integrity sha512-ju6TucjlJkfYMmdraYY/IBJaFb+Sa+huhYtOoyOJ+G29KcgytUVnDzKGwC7Kgk6IsxQMm62Mc1E0GZzFbGGipw== + +"@truffle/hdwallet-provider@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@truffle/hdwallet-provider/-/hdwallet-provider-1.2.0.tgz#7d4cc2038e1a2ca5cf08877f72a6383d14aff491" + integrity sha512-EPatDbyRuGbB/MLt9ZBokmtjyLjaNpuHfUIWuv4mQMrH1Nu82H5AAZYLh4Z1BZliDZpqB03a0yUMmK/4R0BN9g== + dependencies: + "@trufflesuite/web3-provider-engine" "15.0.13-1" + "@types/web3" "^1.0.20" + any-promise "^1.3.0" + bindings "^1.5.0" + ethereum-cryptography "^0.1.3" + ethereum-protocol "^1.0.1" + ethereumjs-tx "^1.0.0" + ethereumjs-util "^6.1.0" + ethereumjs-wallet "^0.6.3" + source-map-support "^0.5.19" + +"@truffle/interface-adapter@^0.4.16": + version "0.4.16" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.4.16.tgz#6bd65d9d17b4a2a51f39d05dd8b467daa8855792" + integrity sha512-lsxk26Lz/h0n8fe37K1ZxowxokXj0AZeNR10QHltDvkHukuTIC4L6fXvrUi74mCwI9hShl4CSBas1Q8kAyJyOA== + dependencies: + bn.js "^4.11.8" + ethers "^4.0.32" + source-map-support "^0.5.19" + web3 "1.2.1" + +"@trufflesuite/chromafi@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-2.1.2.tgz#50715070093c5543a406a2cc85fa70fc8d1a36ab" + integrity sha512-KcfjcH3B8+lHfSTfugFPBpMZmppLNCnM6/PP8ByrQLSACyjh9UOMUWHAW3FDHKEt1cOCzIFXrx2f4AFFrQFxSg== + dependencies: + ansi-mark "^1.0.0" + ansi-regex "^3.0.0" + array-uniq "^1.0.3" + camelcase "^4.1.0" + chalk "^2.3.2" + cheerio "^1.0.0-rc.2" + detect-indent "^5.0.0" + he "^1.1.1" + highlight.js "^9.12.0" + husky "^0.14.3" + lodash.merge "^4.6.2" + min-indent "^1.0.0" + strip-ansi "^4.0.0" + strip-indent "^2.0.0" + super-split "^1.1.0" + +"@trufflesuite/eth-json-rpc-filters@^4.1.2-1": + version "4.1.2-1" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.2-1.tgz#61ab78c52e98a883e5cf086925b34a30297b1824" + integrity sha512-/MChvC5dw2ck9NU1cZmdovCz2VKbOeIyR4tcxDvA5sT+NaL0rA2/R5U0yI7zsbo1zD+pgqav77rQHTzpUdDNJQ== + dependencies: + "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-0" + await-semaphore "^0.1.3" + eth-query "^2.1.2" + json-rpc-engine "^5.1.3" + lodash.flatmap "^4.5.0" + safe-event-emitter "^1.0.1" + +"@trufflesuite/eth-json-rpc-infura@^4.0.3-0": + version "4.0.3-0" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-infura/-/eth-json-rpc-infura-4.0.3-0.tgz#6d22122937cf60ec9d21a02351c101fdc608c4fe" + integrity sha512-xaUanOmo0YLqRsL0SfXpFienhdw5bpQ1WEXxMTRi57az4lwpZBv4tFUDvcerdwJrxX9wQqNmgUgd1BrR01dumw== + dependencies: + "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-1" + cross-fetch "^2.1.1" + eth-json-rpc-errors "^1.0.1" + json-rpc-engine "^5.1.3" + +"@trufflesuite/eth-json-rpc-middleware@^4.4.2-0", "@trufflesuite/eth-json-rpc-middleware@^4.4.2-1": + version "4.4.2-1" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.2-1.tgz#8c3638ed8a7ed89a1e5e71407de068a65bef0df2" + integrity sha512-iEy9H8ja7/8aYES5HfrepGBKU9n/Y4OabBJEklVd/zIBlhCCBAWBqkIZgXt11nBXO/rYAeKwYuE3puH3ByYnLA== + dependencies: + "@trufflesuite/eth-sig-util" "^1.4.2" + btoa "^1.2.1" + clone "^2.1.1" + eth-json-rpc-errors "^1.0.1" + eth-query "^2.1.2" + ethereumjs-block "^1.6.0" + ethereumjs-tx "^1.3.7" + ethereumjs-util "^5.1.2" + ethereumjs-vm "^2.6.0" + fetch-ponyfill "^4.0.0" + json-rpc-engine "^5.1.3" + json-stable-stringify "^1.0.1" + pify "^3.0.0" + safe-event-emitter "^1.0.1" + +"@trufflesuite/eth-sig-util@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-sig-util/-/eth-sig-util-1.4.2.tgz#b529e2f38ac08e652116f48981132a26242a4f08" + integrity sha512-+GyfN6b0LNW77hbQlH3ufZ/1eCON7mMrGym6tdYf7xiNw9Vv3jBO72bmmos1EId2NgBvPMhmYYm6DSLQFTmzrA== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^5.1.1" + +"@trufflesuite/web3-provider-engine@15.0.13-1": + version "15.0.13-1" + resolved "https://registry.yarnpkg.com/@trufflesuite/web3-provider-engine/-/web3-provider-engine-15.0.13-1.tgz#f6a7f7131a2fdc4ab53976318ed13ce83e8e4bcb" + integrity sha512-6u3x/iIN5fyj8pib5QTUDmIOUiwAGhaqdSTXdqCu6v9zo2BEwdCqgEJd1uXDh3DBmPRDfiZ/ge8oUPy7LerpHg== + dependencies: + "@trufflesuite/eth-json-rpc-filters" "^4.1.2-1" + "@trufflesuite/eth-json-rpc-infura" "^4.0.3-0" + "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-1" + "@trufflesuite/eth-sig-util" "^1.4.2" + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^4.4.2" + eth-json-rpc-errors "^2.0.2" + ethereumjs-block "^1.2.2" + ethereumjs-tx "^1.2.0" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + +"@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== + dependencies: + "@types/node" "*" + +"@types/chai@^4.2.12": + version "4.2.12" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.12.tgz#6160ae454cd89dae05adc3bb97997f488b608201" + integrity sha512-aN5IAC8QNtSUdQzxu7lGBgYAOuU1tmRU4c9dIq5OKGf/SBVjXo+ffM2wEjudAWbgpOhy60nLoAGH1xm8fpCKFQ== + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + +"@types/json5@^0.0.29": + version "0.0.29" + 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.0.3" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.0.3.tgz#51b21b6acb6d1b923bbdc7725c38f9f455166402" + integrity sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg== + +"@types/node-fetch@^2.5.7": + version "2.5.7" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" + integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "14.6.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499" + integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA== + +"@types/node@^10.3.2": + version "10.17.34" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.34.tgz#8f5ee42d5e816d551450f5729022828d3f3c7293" + integrity sha512-DlT8xondSSUixRxkdXQ3+dIZmCWkM6PX8kqIx1Zqp+FA/GmHJwqPixMeF89OirKVCFBh7U1m1I1Oj4gSrUW5oQ== + +"@types/node@^12.12.6": + version "12.12.54" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.54.tgz#a4b58d8df3a4677b6c08bfbc94b7ad7a7a5f82d1" + integrity sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w== + +"@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/secp256k1@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz#fb3aa61a1848ad97d7425ff9dcba784549fca5a4" + integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== + dependencies: + "@types/node" "*" + +"@types/web3@^1.0.20": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/web3/-/web3-1.2.2.tgz#d95a101547ce625c5ebd0470baa5dbd4b9f3c015" + integrity sha512-eFiYJKggNrOl0nsD+9cMh2MLk4zVBfXfGnVeRFbpiZzBE20eet4KLA3fXcjSuHaBn0RnQzwLAGdgzgzdet4C0A== + dependencies: + web3 "*" + +"@types/websocket@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.1.tgz#039272c196c2c0e4868a0d8a1a27bbb86e9e9138" + integrity sha512-f5WLMpezwVxCLm1xQe/kdPpQIOmL0TXYx2O15VYfYzc7hTIdxiOoOvez+McSIw3b7z/1zGovew9YSL7+h4h7/Q== + dependencies: + "@types/node" "*" + +"@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== + +"@uniswap/lib@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@uniswap/lib/-/lib-1.1.1.tgz#0afd29601846c16e5d082866cbb24a9e0758e6bc" + integrity sha512-2yK7sLpKIT91TiS5sewHtOa7YuM8IuBXVl4GZv2jZFys4D2sY7K5vZh6MqD25TPA95Od+0YzCVq6cTF2IKrOmg== + +"@uniswap/v2-core@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@uniswap/v2-core/-/v2-core-1.0.0.tgz#e0fab91a7d53e8cafb5326ae4ca18351116b0844" + integrity sha512-BJiXrBGnN8mti7saW49MXwxDBRFiWemGetE58q8zgfnPPzQKq55ADltEILqOt6VFZ22kVeVKbF8gVd8aY3l7pA== + +"@uniswap/v2-core@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@uniswap/v2-core/-/v2-core-1.0.1.tgz#af8f508bf183204779938969e2e54043e147d425" + integrity sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q== + +"@uniswap/v2-periphery@^1.1.0-beta.0": + version "1.1.0-beta.0" + resolved "https://registry.yarnpkg.com/@uniswap/v2-periphery/-/v2-periphery-1.1.0-beta.0.tgz#20a4ccfca22f1a45402303aedb5717b6918ebe6d" + integrity sha512-6dkwAMKza8nzqYiXEr2D86dgW3TTavUvCR0w2Tu33bAbM8Ah43LKAzH7oKKPRT5VJQaMi1jtkGs1E8JPor1n5g== + dependencies: + "@uniswap/lib" "1.1.1" + "@uniswap/v2-core" "1.0.0" + +abstract-leveldown@~2.6.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" + integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + +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" + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + +aes-js@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + +ajv@^6.10.0: + version "6.12.5" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da" + integrity sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^6.12.3: + version "6.12.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" + integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-mark@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ansi-mark/-/ansi-mark-1.0.4.tgz#1cd4ba8d57f15f109d6aaf6ec9ca9786c8a4ee6c" + integrity sha1-HNS6jVfxXxCdaq9uycqXhsik7mw= + dependencies: + ansi-regex "^3.0.0" + array-uniq "^1.0.3" + chalk "^2.3.2" + strip-ansi "^4.0.0" + super-split "^1.1.0" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@^3.2.0, 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== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + +any-promise@1.3.0, any-promise@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + +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== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +app-module-path@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" + integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +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-uniq@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array.prototype.map@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.2.tgz#9a4159f416458a23e9483078de1106b2ef68f8ec" + integrity sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + es-array-method-boxes-properly "^1.0.0" + is-string "^1.0.4" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +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" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +async-eventemitter@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + +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@^1.4.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + +async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +await-semaphore@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/await-semaphore/-/await-semaphore-0.1.3.tgz#2b88018cc8c28e06167ae1cdff02504f1f9688d3" + integrity sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" + integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== + +backoff@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" + integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + dependencies: + precond "0.2" + +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= + +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== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + +bignumber.js@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" + integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== + +bignumber.js@debris/bignumber.js#master: + version "2.0.7" + resolved "https://codeload.github.com/debris/bignumber.js/tar.gz/c7a38de919ed75e6fb6ba38051986e294b328df9" + +binary-extensions@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" + integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bl@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" + integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + +bluebird@^3.4.7, 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.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.11.8: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +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.8, bn.js@^4.11.9, bn.js@^4.4.0: + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== + +bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" + integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== + +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" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +borc@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/borc/-/borc-2.1.2.tgz#6ce75e7da5ce711b963755117dd1b187f6f8cf19" + integrity sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w== + dependencies: + bignumber.js "^9.0.0" + buffer "^5.5.0" + commander "^2.15.0" + ieee754 "^1.1.13" + iso-url "~0.4.7" + json-text-sequence "~0.1.0" + readable-stream "^3.6.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-stdout@1.3.1: + version "1.3.1" + 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.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.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" + +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" + +btoa@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73" + integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g== + +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== + +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= + +buffer-from@^1.0.0, buffer-from@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +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.2.1, buffer@^5.5.0, buffer@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + +bufferutil@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.1.tgz#3a177e8e5819a1243fe16b63a199951a7ad8d4a7" + integrity sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA== + dependencies: + node-gyp-build "~3.7.0" + +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== + +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +camelcase@^5.0.0, 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== + +camelcase@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chai@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" + integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== + 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" + type-detect "^4.0.5" + +chalk@^2.3.2, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.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" + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + +checkpoint-store@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" + integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= + dependencies: + functional-red-black-tree "^1.0.1" + +cheerio@^1.0.0-rc.2: + version "1.0.0-rc.3" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6" + integrity sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA== + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.1" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash "^4.15.0" + parse5 "^3.0.1" + +chokidar@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" + integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.3.0" + optionalDependencies: + fsevents "~2.1.2" + +chokidar@3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" + integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.1.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@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== + +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== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +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== + +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" + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +clone@^2.0.0, clone@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.15.0, commander@^2.8.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +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== + +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== + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + 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" + +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== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + 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" + +cross-fetch@^2.1.0, cross-fetch@^2.1.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.3.tgz#e8a0b3c54598136e037f8650f8e823ccdfac198e" + integrity sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw== + dependencies: + node-fetch "2.1.2" + whatwg-fetch "2.0.4" + +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-js@^3.1.4, crypto-js@^3.1.9-1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" + integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug@2.6.9, debug@^2.2.0: + 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.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +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@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + 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" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +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= + dependencies: + mimic-response "^1.0.0" + +decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" + integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== + dependencies: + file-type "^5.2.0" + is-stream "^1.1.0" + tar-stream "^1.5.2" + +decompress-tarbz2@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" + integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== + dependencies: + decompress-tar "^4.1.0" + file-type "^6.1.0" + is-stream "^1.1.0" + seek-bzip "^1.0.5" + unbzip2-stream "^1.0.9" + +decompress-targz@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" + integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== + dependencies: + decompress-tar "^4.1.1" + file-type "^5.2.0" + is-stream "^1.1.0" + +decompress-unzip@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" + integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= + dependencies: + file-type "^3.8.0" + get-stream "^2.2.0" + pify "^2.3.0" + yauzl "^2.4.2" + +decompress@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" + integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== + dependencies: + decompress-tar "^4.0.0" + decompress-tarbz2 "^4.0.0" + decompress-targz "^4.0.0" + decompress-unzip "^4.0.1" + graceful-fs "^4.1.10" + make-dir "^1.0.0" + pify "^2.3.0" + strip-dirs "^2.0.0" + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + +deferred-leveldown@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" + integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== + dependencies: + abstract-leveldown "~2.6.0" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delimit-stream@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/delimit-stream/-/delimit-stream-0.1.0.tgz#9b8319477c0e5f8aeb3ce357ae305fc25ea1cd2b" + integrity sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +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@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= + +diff@4.0.2, 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== + +diff@^3.1.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +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" + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-serializer@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +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== + +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.2.tgz#f3b6e549201e46f588b59463dd77187131fe6971" + integrity sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA== + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + 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= + +elliptic@6.3.3: + version "6.3.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" + integrity sha1-VILZZG1UvLif19mU/J4ulWiHbj8= + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + inherits "^2.0.1" + +elliptic@6.5.3, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +encoding@^0.1.11: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" + integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== + +errno@~0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + dependencies: + prr "~1.0.1" + +es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: + version "1.17.6" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" + integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.0" + is-regex "^1.1.0" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + +es-get-iterator@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" + integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== + dependencies: + es-abstract "^1.17.4" + has-symbols "^1.0.1" + is-arguments "^1.0.4" + is-map "^2.0.1" + is-set "^2.0.1" + is-string "^1.0.5" + isarray "^2.0.5" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +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@1.0.5, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +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" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +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-block-tracker@^4.4.2: + version "4.4.3" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz#766a0a0eb4a52c867a28328e9ae21353812cf626" + integrity sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw== + dependencies: + "@babel/plugin-transform-runtime" "^7.5.5" + "@babel/runtime" "^7.5.5" + eth-query "^2.1.0" + json-rpc-random-id "^1.0.1" + pify "^3.0.0" + safe-event-emitter "^1.0.1" + +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.0: + 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-json-rpc-errors@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz#148377ef55155585981c21ff574a8937f9d6991f" + integrity sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg== + dependencies: + fast-safe-stringify "^2.0.6" + +eth-json-rpc-errors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz#c1965de0301fe941c058e928bebaba2e1285e3c4" + integrity sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA== + dependencies: + fast-safe-stringify "^2.0.6" + +eth-json-rpc-filters@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.1.tgz#15277c66790236d85f798f4d7dc6bab99a798cd2" + integrity sha512-GkXb2h6STznD+AmMzblwXgm1JMvjdK9PTIXG7BvIkTlXQ9g0QOxuU1iQRYHoslF9S30BYBSoLSisAYPdLggW+A== + dependencies: + await-semaphore "^0.1.3" + eth-json-rpc-middleware "^4.1.4" + eth-query "^2.1.2" + json-rpc-engine "^5.1.3" + lodash.flatmap "^4.5.0" + safe-event-emitter "^1.0.1" + +eth-json-rpc-infura@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-4.0.2.tgz#8af1a1a2e9a0a82aaa302bbc96fb1a4c15d69b83" + integrity sha512-dvgOrci9lZqpjpp0hoC3Zfedhg3aIpLFVDH0TdlKxRlkhR75hTrKTwxghDrQwE0bn3eKrC8RsN1m/JdnIWltpw== + dependencies: + cross-fetch "^2.1.1" + eth-json-rpc-errors "^1.0.1" + eth-json-rpc-middleware "^4.1.4" + json-rpc-engine "^5.1.3" + +eth-json-rpc-middleware@^4.1.4, eth-json-rpc-middleware@^4.1.5: + version "4.4.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.1.tgz#07d3dd0724c24a8d31e4a172ee96271da71b4228" + integrity sha512-yoSuRgEYYGFdVeZg3poWOwAlRI+MoBIltmOB86MtpoZjvLbou9EB/qWMOWSmH2ryCWLW97VYY6NWsmWm3OAA7A== + dependencies: + btoa "^1.2.1" + clone "^2.1.1" + eth-json-rpc-errors "^1.0.1" + eth-query "^2.1.2" + eth-sig-util "^1.4.2" + ethereumjs-block "^1.6.0" + ethereumjs-tx "^1.3.7" + ethereumjs-util "^5.1.2" + ethereumjs-vm "^2.6.0" + fetch-ponyfill "^4.0.0" + json-rpc-engine "^5.1.3" + json-stable-stringify "^1.0.1" + pify "^3.0.0" + safe-event-emitter "^1.0.1" + +eth-lib@0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" + integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +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" + +eth-query@^2.1.0, eth-query@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" + integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= + dependencies: + json-rpc-random-id "^1.0.0" + xtend "^4.0.1" + +eth-rpc-errors@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz#d7b22653c70dbf9defd4ef490fd08fe70608ca10" + integrity sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg== + dependencies: + fast-safe-stringify "^2.0.6" + +eth-sig-util@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" + integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= + dependencies: + ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" + ethereumjs-util "^5.1.1" + +ethereum-bloom-filters@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz#b7b80735e385dbb7f944ce6b4533e24511306060" + integrity sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ== + dependencies: + js-sha3 "^0.8.0" + +ethereum-common@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" + integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== + +ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" + integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= + +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" + +ethereum-ens@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/ethereum-ens/-/ethereum-ens-0.8.0.tgz#6d0f79acaa61fdbc87d2821779c4e550243d4c57" + integrity sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg== + dependencies: + bluebird "^3.4.7" + eth-ens-namehash "^2.0.0" + js-sha3 "^0.5.7" + pako "^1.0.4" + underscore "^1.8.3" + web3 "^1.0.0-beta.34" + +ethereum-protocol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz#b7d68142f4105e0ae7b5e178cf42f8d4dc4b93cf" + integrity sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg== + +ethereumjs-abi@^0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": + version "0.6.8" + resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b" + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-account@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" + integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== + dependencies: + ethereumjs-util "^5.0.0" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-block@^1.2.2, ethereumjs-block@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" + integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== + dependencies: + async "^2.0.1" + ethereum-common "0.2.0" + ethereumjs-tx "^1.2.2" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-block@~2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" + integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== + dependencies: + async "^2.0.1" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.1" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-common@^1.1.0, 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@^1.0.0, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" + integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== + dependencies: + ethereum-common "^0.0.18" + ethereumjs-util "^5.0.0" + +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@^5.0.0, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.5: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.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" + +ethereumjs-util@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.4.tgz#f4b2022a91416bf421b35b0d5b81c21e8abd8b7f" + integrity sha512-isldtbCn9fdnhBPxedMNbFkNWVZ8ZdQvKRDSrdflame/AycAPKMer+vEpndpBxYIB3qxN6bd3Gh1YCQW9LDkCQ== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.4" + +ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" + integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + ethereumjs-account "^2.0.3" + ethereumjs-block "~2.2.0" + ethereumjs-common "^1.1.0" + ethereumjs-util "^6.0.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + +ethereumjs-wallet@^0.6.3: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz#685e9091645cee230ad125c007658833991ed474" + integrity sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA== + dependencies: + aes-js "^3.1.1" + bs58check "^2.1.2" + ethereum-cryptography "^0.1.3" + ethereumjs-util "^6.0.0" + randombytes "^2.0.6" + safe-buffer "^5.1.2" + scryptsy "^1.2.1" + utf8 "^3.0.0" + uuid "^3.3.2" + +ethereumjs-wallet@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-1.0.0.tgz#d6e2d7eddadbbf3d171050c1324eaec5b2981ecb" + integrity sha512-2zE4pxEL/ssTmBpYpf9ZE63lQ19aC8ANpprxC4+R7+/Q5n/YvPlKLzJEkkofiaPL12fHKlmjrB3FOXqLl6I3Rw== + dependencies: + aes-js "^3.1.1" + bs58check "^2.1.2" + ethereum-cryptography "^0.1.3" + ethereumjs-util "^7.0.2" + randombytes "^2.0.6" + scrypt-js "^3.0.1" + utf8 "^3.0.0" + uuid "^3.3.2" + +ethers@4.0.0-beta.3: + version "4.0.0-beta.3" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.3.tgz#15bef14e57e94ecbeb7f9b39dd0a4bd435bc9066" + integrity sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog== + dependencies: + "@types/node" "^10.3.2" + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.3.3" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.3" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethers@^4.0.0-beta.1, ethers@^4.0.32: + version "4.0.48" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.48.tgz#330c65b8133e112b0613156e57e92d9009d8fbbe" + integrity sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g== + dependencies: + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.5.3" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +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, ethjs-util@^0.1.3: + 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@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + +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== + +events@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" + integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== + +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" + +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" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fake-merkle-patricia-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" + integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= + dependencies: + checkpoint-store "^1.1.0" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-safe-stringify@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" + integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + +fetch-ponyfill@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" + integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= + dependencies: + node-fetch "~1.7.1" + +file-type@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= + +file-type@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" + integrity sha1-LdvqfHP/42No365J3DOMBYwritY= + +file-type@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" + integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + 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-up@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +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== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +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-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +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-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.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +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" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +get-caller-file@^2.0.1: + 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== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +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" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.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@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global@~4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" + integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= + dependencies: + min-document "^2.19.0" + process "~0.5.1" + +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== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + 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.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +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.0, 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-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@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +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== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0, he@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +highlight.js@^9.12.0, highlight.js@^9.15.8: + version "9.18.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.3.tgz#a1a0a2028d5e3149e2380f8a865ee8516703d634" + integrity sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ== + +highlightjs-solidity@^1.0.18: + version "1.0.18" + resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-1.0.18.tgz#3deb0593689a26fbadf98e631bf2cd305a6417c9" + integrity sha512-k15h0br4oCRT0F0jTRuZbimerVt5V4n0k25h7oWi0kVqlBNeXPbSr5ddw02/2ukJmYfB8jauFDmxSauJjwM7Eg== + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hooked-web3-provider@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hooked-web3-provider/-/hooked-web3-provider-1.0.0.tgz#07c94db32d857b966e74d1111b5a54bfb8533a17" + integrity sha1-B8lNsy2Fe5ZudNERG1pUv7hTOhc= + dependencies: + web3 "0.15.1" + +htmlparser2@^3.9.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +http-cache-semantics@^4.0.0: + version "4.1.0" + 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-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +husky@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" + integrity sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA== + dependencies: + is-ci "^1.0.10" + normalize-path "^1.0.0" + strip-indent "^2.0.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" + integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +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, ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, 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= + +ip-regex@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.2.0.tgz#a03f5eb661d9a154e3973a03de8b23dd0ad6892e" + integrity sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A== + +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-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + +is-callable@^1.1.4, is-callable@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" + integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== + +is-ci@^1.0.10: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== + dependencies: + ci-info "^1.5.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== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +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-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" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + 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-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" + integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== + +is-natural-number@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" + integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" + integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= + +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= + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" + integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== + dependencies: + has-symbols "^1.0.1" + +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-set@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" + integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-string@^1.0.4, 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-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-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" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +iso-url@~0.4.7: + version "0.4.7" + resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-0.4.7.tgz#de7e48120dae46921079fe78f325ac9e9217a385" + integrity sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog== + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +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" + +iterate-iterator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.1.tgz#1693a768c1ddd79c969051459453f082fe82e9f6" + integrity sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw== + +iterate-value@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz#935115bd37d006a52046535ebc8d07e9c9337f57" + integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== + dependencies: + es-get-iterator "^1.0.2" + iterate-iterator "^1.0.1" + +js-sha256@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" + integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== + +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" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +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== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-rpc-engine@^5.1.3: + version "5.3.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-5.3.0.tgz#7dc7291766b28766ebda33eb6d3f4c6301c44ff4" + integrity sha512-+diJ9s8rxB+fbJhT7ZEf8r8spaLRignLd8jTgQ/h5JSGppAHGtNMZtCoabipCaleR1B3GTGxbXBOqhaJSGmPGQ== + dependencies: + eth-rpc-errors "^3.0.0" + safe-event-emitter "^1.0.1" + +json-rpc-random-id@^1.0.0, json-rpc-random-id@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" + integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json-text-sequence@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/json-text-sequence/-/json-text-sequence-0.1.1.tgz#a72f217dc4afc4629fff5feb304dc1bd51a2f3d2" + integrity sha1-py8hfcSvxGKf/1/rME3BvVGi89I= + dependencies: + delimit-stream "0.1.0" + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +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" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + +level-codec@~7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" + integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== + +level-errors@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" + integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== + dependencies: + errno "~0.1.1" + +level-errors@~1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" + integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== + dependencies: + errno "~0.1.1" + +level-iterator-stream@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" + integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= + dependencies: + inherits "^2.0.1" + level-errors "^1.0.3" + readable-stream "^1.0.33" + xtend "^4.0.0" + +level-ws@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" + integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= + dependencies: + readable-stream "~1.0.15" + xtend "~2.1.1" + +levelup@^1.2.1: + version "1.3.9" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" + integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== + dependencies: + deferred-leveldown "~1.2.1" + level-codec "~7.0.0" + level-errors "~1.0.3" + level-iterator-stream "~1.3.0" + prr "~1.0.1" + semver "~5.4.1" + xtend "~4.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.escaperegexp@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= + +lodash.flatmap@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz#ef8cbf408f6e48268663345305c6acc0b778702e" + integrity sha1-74y/QI9uSCaGYzRTBcaswLd4cC4= + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.partition@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.partition/-/lodash.partition-4.6.0.tgz#a38e46b73469e0420b0da1212e66d414be364ba4" + integrity sha1-o45GtzRp4EILDaEhLmbUFL42S6Q= + +lodash.sum@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lodash.sum/-/lodash.sum-4.0.2.tgz#ad90e397965d803d4f1ff7aa5b2d0197f3b4637b" + integrity sha1-rZDjl5ZdgD1PH/eqWy0Bl/O0Y3s= + +lodash@^4.15.0, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +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== + dependencies: + chalk "^4.0.0" + +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + 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= + +memdown@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + +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= + +merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" + integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== + dependencies: + async "^1.4.2" + ethereumjs-util "^5.0.0" + level-ws "0.0.0" + levelup "^1.2.1" + memdown "^1.0.0" + readable-stream "^2.0.0" + rlp "^2.0.0" + semaphore ">=1.0.1" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +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.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.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== + +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +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" + +min-indent@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== + +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" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + 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" + +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@*: + 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.1: + 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" + +mocha@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.0.1.tgz#fe01f0530362df271aa8f99510447bc38b88d8ed" + integrity sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.3.1" + debug "3.2.6" + diff "4.0.2" + escape-string-regexp "1.0.5" + find-up "4.1.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + ms "2.1.2" + object.assign "4.1.0" + promise.allsettled "1.0.2" + serialize-javascript "3.0.0" + strip-json-comments "3.0.1" + supports-color "7.1.0" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.0.0" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mocha@^8.2.1: + version "8.2.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39" + integrity sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w== + 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" + 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" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.2" + nanoid "3.1.12" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "7.2.0" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.0.2" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "2.0.0" + +mock-fs@^4.1.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.12.0.tgz#a5d50b12d2d75e5bec9dac3b67ffe3c41d31ade4" + integrity sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ== + +ms@2.0.0: + version "2.0.0" + 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, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +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" + +nan@^2.14.0: + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== + +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.12: + version "3.1.12" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" + integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== + +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== + +next-tick@~1.0.0: + version "1.0.0" + 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.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" + integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U= + +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-fetch@~1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +node-gyp-build@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.7.0.tgz#daa77a4f547b9aed3e2aac779eaf151afd60ec8d" + integrity sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w== + +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + integrity sha1-MtDkcvkf80VwHBWoMRAY07CpA3k= + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +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== + +nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +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" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +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= + +object-inspect@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" + integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== + +object-keys@^1.0.11, 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" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= + +object.assign@4.1.0, object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +oboe@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" + integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + dependencies: + http-https "^1.0.0" + +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" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +openzeppelin-solidity@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-3.1.0.tgz#bc43306bf59f90a3fa7d97c42209617360d51a74" + integrity sha512-+MatFtoqicq5Pc4zkICs8g8gUyULU5HvyBn+OJRoYBHr0Pm3F/9sav3ZgL9npWtRFAIxzM9ryjQ9kKLwt05Imw== + +original-require@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" + integrity sha1-DxMEcVhM0zURxew4yNWSE/msXiA= + +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" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +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@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" + integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + 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@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pako@^1.0.4: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +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== + +parse5@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" + integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== + dependencies: + "@types/node" "*" + +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== + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +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== + +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= + +pathval@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" + integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + +pbkdf2@^3.0.17, pbkdf2@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" + integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== + 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" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + +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.7, 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== + +pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +precond@0.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" + integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= + +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= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +process-nextick-args@~2.0.0: + version "2.0.1" + 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.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= + +promise-to-callback@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" + integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= + dependencies: + is-fn "^1.0.0" + set-immediate-shim "^1.0.1" + +promise.allsettled@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.2.tgz#d66f78fbb600e83e863d893e98b3d4376a9c47c9" + integrity sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== + dependencies: + array.prototype.map "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + iterate-value "^1.0.0" + +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +psl@^1.1.28: + version "1.8.0" + 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" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +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" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +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" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +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" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, 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" + +randomhex@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/randomhex/-/randomhex-0.1.5.tgz#baceef982329091400f2a2912c6cd02f1094f585" + integrity sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU= + +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" + +readable-stream@^1.0.33: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.5: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.1.1, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~1.0.15: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdirp@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" + integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== + dependencies: + picomatch "^2.0.7" + +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + +regenerator-runtime@^0.13.4: + version "0.13.7" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" + integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== + +request@^2.79.0, request@^2.85.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +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== + +resolve@^1.8.1: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +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== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4: + 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" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +rxjs@^6.6.3: + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== + dependencies: + tslib "^1.9.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-event-emitter@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" + integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== + dependencies: + events "^3.0.0" + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +scrypt-js@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" + integrity sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q= + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +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, 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== + +scryptsy@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" + integrity sha1-oyJfpLJST4AnAHYeKFW987LZIWM= + dependencies: + pbkdf2 "^3.0.3" + +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" + +seek-bzip@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" + integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== + dependencies: + commander "^2.8.1" + +semaphore@>=1.0.1, semaphore@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== + +semver@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== + +semver@^5.5.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@~5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== + +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@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.0.0.tgz#492e489a2d77b7b804ad391a5f5d97870952548e" + integrity sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== + +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + +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-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= + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + +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== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +simple-concat@^1.0.0: + version "1.0.1" + 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" + +source-map-support@^0.5.17, source-map-support@^0.5.19, source-map-support@^0.5.6: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.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= + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.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== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string.prototype.trimend@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimstart@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-dirs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" + integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== + dependencies: + is-natural-number "^4.0.1" + +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-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= + +strip-json-comments@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + +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" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +super-split@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/super-split/-/super-split-1.1.0.tgz#43b3ba719155f4d43891a32729d59b213d9155fc" + integrity sha512-I4bA5mgcb6Fw5UJ+EkpzqXfiuvVGS/7MuND+oBxNFmxu3ugLNrdIatzBLfhFRMVMLxgSsRy+TjIktgkF9RFSNQ== + +supports-color@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + +supports-color@7.2.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-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +swarm-js@0.1.39: + version "0.1.39" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.39.tgz#79becb07f291d4b2a178c50fee7aa6e10342c0e8" + integrity sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + decompress "^4.0.0" + 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-promise "^0.1.2" + +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" + +tar-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" + integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== + dependencies: + bl "^1.0.0" + buffer-alloc "^1.2.0" + end-of-stream "^1.0.0" + fs-constants "^1.0.0" + readable-stream "^2.3.0" + to-buffer "^1.1.1" + xtend "^4.0.0" + +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" + +through@^2.3.8: + version "2.3.8" + 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= + +to-buffer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.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@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +truffle-assertions@^0.9.2: + version "0.9.2" + resolved "https://registry.yarnpkg.com/truffle-assertions/-/truffle-assertions-0.9.2.tgz#0f8360f53ad92b6d8fdb8ceb5dce54c1fc392e23" + integrity sha512-9g2RhaxU2F8DeWhqoGQvL/bV8QVoSnQ6PY+ZPvYRP5eF7+/8LExb4mjLx/FeliLTjc3Tv1SABG05Gu5qQ/ErmA== + dependencies: + assertion-error "^1.1.0" + lodash.isequal "^4.5.0" + +truffle@^5.1.33: + version "5.1.41" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.41.tgz#662a0f2816c4e5a12bae25c0b68d908478ff4606" + integrity sha512-6vphA82Os7HvrzqkMy0o2kxP0SYsf7glHE8U8jk15lbUNOy76SrBLmTi7at7xFkIq6LMgv03YRf0EFEN/qwAxg== + dependencies: + app-module-path "^2.2.0" + mocha "8.0.1" + original-require "1.0.1" + +ts-mocha@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-7.0.0.tgz#f1549b48b46f53d7ae1dccbb26313c7879acb190" + integrity sha512-7WfkQw1W6JZXG5m4E1w2e945uWzBoZqmnOHvpMu0v+zvyKLdUQeTtRMfcQsVEKsUnYL6nTyH4okRt2PZucmFXQ== + dependencies: + ts-node "7.0.1" + optionalDependencies: + tsconfig-paths "^3.5.0" + +ts-node@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" + integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== + dependencies: + arrify "^1.0.0" + buffer-from "^1.1.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.6" + yn "^2.0.0" + +ts-node@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" + integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + +tsconfig-paths@^3.5.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.9.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +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.0.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" + integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typescript@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" + integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== + +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== + +unbzip2-stream@^1.0.9: + version "1.4.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + +underscore@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +underscore@^1.8.3: + version "1.11.0" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.11.0.tgz#dd7c23a195db34267186044649870ff1bab5929e" + integrity sha512-xY96SsN3NA461qIRKZ/+qox37YXPtSBswMGfiNptr+wrt6ds4HaMw23TP612fEyGekRE6LNRiLYr/aqbHXNedw== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +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= + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +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" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + 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= + +utf-8-validate@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.2.tgz#63cfbccd85dc1f2b66cf7a1d0eebc08ed056bfb3" + integrity sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw== + dependencies: + node-gyp-build "~3.7.0" + +utf8@3.0.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== + +utf8@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" + integrity sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY= + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +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@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= + +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== + +varint@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.0.tgz#d826b89f7490732fabc0c0ed693ed475dcb29ebf" + integrity sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8= + +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" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +web3-bzz@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.1.tgz#c3bd1e8f0c02a13cd6d4e3c3e9e1713f144f6f0d" + integrity sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw== + dependencies: + got "9.6.0" + swarm-js "0.1.39" + underscore "1.9.1" + +web3-bzz@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" + integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + +web3-bzz@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.0.tgz#83dfd77fa8a64bbb660462dffd0fee2a02ef1051" + integrity sha512-ibYAnKab+sgTo/UdfbrvYfWblXjjgSMgyy9/FHa6WXS14n/HVB+HfWqGz2EM3fok8Wy5XoKGMvdqvERQ/mzq1w== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + +web3-core-helpers@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz#f5f32d71c60a4a3bd14786118e633ce7ca6d5d0d" + integrity sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.1" + web3-utils "1.2.1" + +web3-core-helpers@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" + integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.11" + web3-utils "1.2.11" + +web3-core-helpers@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.0.tgz#697cc3246a7eaaaac64ea506828d861c981c3f31" + integrity sha512-+MFb1kZCrRctf7UYE7NCG4rGhSXaQJ/KF07di9GVK1pxy1K0+rFi61ZobuV1ky9uQp+uhhSPts4Zp55kRDB5sw== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.3.0" + web3-utils "1.3.0" + +web3-core-method@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.1.tgz#9df1bafa2cd8be9d9937e01c6a47fc768d15d90a" + integrity sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + web3-core-promievent "1.2.1" + web3-core-subscriptions "1.2.1" + web3-utils "1.2.1" + +web3-core-method@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" + integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-utils "1.2.11" + +web3-core-method@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.0.tgz#a71387af842aec7dbad5dbbd1130c14cc6c8beb3" + integrity sha512-h0yFDrYVzy5WkLxC/C3q+hiMnzxdWm9p1T1rslnuHgOp6nYfqzu/6mUIXrsS4h/OWiGJt+BZ0xVZmtC31HDWtg== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.3.0" + web3-core-promievent "1.3.0" + web3-core-subscriptions "1.3.0" + web3-utils "1.3.0" + +web3-core-promievent@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz#003e8a3eb82fb27b6164a6d5b9cad04acf733838" + integrity sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw== + dependencies: + any-promise "1.3.0" + eventemitter3 "3.1.2" + +web3-core-promievent@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" + integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== + dependencies: + eventemitter3 "4.0.4" + +web3-core-promievent@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.0.tgz#e0442dd0a8989b6bdce09293976cee6d9237a484" + integrity sha512-blv69wrXw447TP3iPvYJpllkhW6B18nfuEbrfcr3n2Y0v1Jx8VJacNZFDFsFIcgXcgUIVCtOpimU7w9v4+rtaw== + dependencies: + eventemitter3 "4.0.4" + +web3-core-requestmanager@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz#fa2e2206c3d738db38db7c8fe9c107006f5c6e3d" + integrity sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + web3-providers-http "1.2.1" + web3-providers-ipc "1.2.1" + web3-providers-ws "1.2.1" + +web3-core-requestmanager@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" + integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-providers-http "1.2.11" + web3-providers-ipc "1.2.11" + web3-providers-ws "1.2.11" + +web3-core-requestmanager@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.0.tgz#c5b9a0304504c0e6cce6c90bc1a3bff82732aa1f" + integrity sha512-3yMbuGcomtzlmvTVqNRydxsx7oPlw3ioRL6ReF9PeNYDkUsZaUib+6Dp5eBt7UXh5X+SIn/xa1smhDHz5/HpAw== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.3.0" + web3-providers-http "1.3.0" + web3-providers-ipc "1.3.0" + web3-providers-ws "1.3.0" + +web3-core-subscriptions@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz#8c2368a839d4eec1c01a4b5650bbeb82d0e4a099" + integrity sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.1" + +web3-core-subscriptions@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" + integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + +web3-core-subscriptions@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.0.tgz#c2622ccd2b84f4687475398ff966b579dba0847e" + integrity sha512-MUUQUAhJDb+Nz3S97ExVWveH4utoUnsbPWP+q1HJH437hEGb4vunIb9KvN3hFHLB+aHJfPeStM/4yYTz5PeuyQ== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.3.0" + +web3-core@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.1.tgz#7278b58fb6495065e73a77efbbce781a7fddf1a9" + integrity sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg== + dependencies: + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-requestmanager "1.2.1" + web3-utils "1.2.1" + +web3-core@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" + integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-requestmanager "1.2.11" + web3-utils "1.2.11" + +web3-core@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.0.tgz#b818903738461c1cca0163339e1d6d3fa51242cf" + integrity sha512-BwWvAaKJf4KFG9QsKRi3MNoNgzjI6szyUlgme1qNPxUdCkaS3Rdpa0VKYNHP7M/YTk82/59kNE66mH5vmoaXjA== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-core-requestmanager "1.3.0" + web3-utils "1.3.0" + +web3-eth-abi@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz#9b915b1c9ebf82f70cca631147035d5419064689" + integrity sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.1" + +web3-eth-abi@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" + integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.2.11" + +web3-eth-abi@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.0.tgz#387b7ea9b38be69ad8856bc7b4e9a6a69bb4d22b" + integrity sha512-1OrZ9+KGrBeBRd3lO8upkpNua9+7cBsQAgor9wbA25UrcUYSyL8teV66JNRu9gFxaTbkpdrGqM7J/LXpraXWrg== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.3.0" + +web3-eth-accounts@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz#2741a8ef337a7219d57959ac8bd118b9d68d63cf" + integrity sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ== + dependencies: + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "0.2.7" + scryptsy "2.1.0" + semver "6.2.0" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-utils "1.2.1" + +web3-eth-accounts@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" + integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== + 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.9.1" + uuid "3.3.2" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + +web3-eth-accounts@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.0.tgz#010acf389b2bee6d5e1aecb2fe78bfa5c8f26c7a" + integrity sha512-/Q7EVW4L2wWUbNRtOTwAIrYvJid/5UnKMw67x/JpvRMwYC+e+744P536Ja6SG4X3MnzFvd3E/jruV4qa6k+zIw== + 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.9.1" + uuid "3.3.2" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-utils "1.3.0" + +web3-eth-contract@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz#3542424f3d341386fd9ff65e78060b85ac0ea8c4" + integrity sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g== + dependencies: + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-promievent "1.2.1" + web3-core-subscriptions "1.2.1" + web3-eth-abi "1.2.1" + web3-utils "1.2.1" + +web3-eth-contract@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" + integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== + dependencies: + "@types/bn.js" "^4.11.5" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-utils "1.2.11" + +web3-eth-contract@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.0.tgz#c758340ac800788e29fa29edc8b0c0ac957b741c" + integrity sha512-3SCge4SRNCnzLxf0R+sXk6vyTOl05g80Z5+9/B5pERwtPpPWaQGw8w01vqYqsYBKC7zH+dxhMaUgVzU2Dgf7bQ== + dependencies: + "@types/bn.js" "^4.11.5" + underscore "1.9.1" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-core-promievent "1.3.0" + web3-core-subscriptions "1.3.0" + web3-eth-abi "1.3.0" + web3-utils "1.3.0" + +web3-eth-ens@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz#a0e52eee68c42a8b9865ceb04e5fb022c2d971d5" + integrity sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-promievent "1.2.1" + web3-eth-abi "1.2.1" + web3-eth-contract "1.2.1" + web3-utils "1.2.1" + +web3-eth-ens@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" + integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-contract "1.2.11" + web3-utils "1.2.11" + +web3-eth-ens@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.0.tgz#0887ba38473c104cf5fb8a715828b3b354fa02a2" + integrity sha512-WnOru+EcuM5dteiVYJcHXo/I7Wq+ei8RrlS2nir49M0QpYvUPGbCGgTbifcjJQTWamgORtWdljSA1s2Asdb74w== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-promievent "1.3.0" + web3-eth-abi "1.3.0" + web3-eth-contract "1.3.0" + web3-utils "1.3.0" + +web3-eth-iban@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz#2c3801718946bea24e9296993a975c80b5acf880" + integrity sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.1" + +web3-eth-iban@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" + integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== + dependencies: + bn.js "^4.11.9" + web3-utils "1.2.11" + +web3-eth-iban@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.0.tgz#15b782dfaf273ebc4e3f389f1367f4e88ddce4a5" + integrity sha512-v9mZWhR4fPF17/KhHLiWir4YHWLe09O3B/NTdhWqw3fdAMJNztzMHGzgHxA/4fU+rhrs/FhDzc4yt32zMEXBZw== + dependencies: + bn.js "^4.11.9" + web3-utils "1.3.0" + +web3-eth-personal@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz#244e9911b7b482dc17c02f23a061a627c6e47faf" + integrity sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg== + dependencies: + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-net "1.2.1" + web3-utils "1.2.1" + +web3-eth-personal@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" + integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + +web3-eth-personal@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.0.tgz#d376e03dc737d961ff1f8d1aca866efad8477135" + integrity sha512-2czUhElsJdLpuNfun9GeLiClo5O6Xw+bLSjl3f4bNG5X2V4wcIjX2ygep/nfstLLtkz8jSkgl/bV7esANJyeRA== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-net "1.3.0" + web3-utils "1.3.0" + +web3-eth@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0" + integrity sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA== + dependencies: + underscore "1.9.1" + web3-core "1.2.1" + web3-core-helpers "1.2.1" + web3-core-method "1.2.1" + web3-core-subscriptions "1.2.1" + web3-eth-abi "1.2.1" + web3-eth-accounts "1.2.1" + web3-eth-contract "1.2.1" + web3-eth-ens "1.2.1" + web3-eth-iban "1.2.1" + web3-eth-personal "1.2.1" + web3-net "1.2.1" + web3-utils "1.2.1" + +web3-eth@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" + integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== + dependencies: + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-accounts "1.2.11" + web3-eth-contract "1.2.11" + web3-eth-ens "1.2.11" + web3-eth-iban "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + +web3-eth@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.0.tgz#898e5f5a8827f9bc6844e267a52eb388916a6771" + integrity sha512-/bzJcxXPM9EM18JM5kO2JjZ3nEqVo3HxqU93aWAEgJNqaP/Lltmufl2GpvIB2Hvj+FXAjAXquxUdQ2/xP7BzHQ== + dependencies: + underscore "1.9.1" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-core-subscriptions "1.3.0" + web3-eth-abi "1.3.0" + web3-eth-accounts "1.3.0" + web3-eth-contract "1.3.0" + web3-eth-ens "1.3.0" + web3-eth-iban "1.3.0" + web3-eth-personal "1.3.0" + web3-net "1.3.0" + web3-utils "1.3.0" + +web3-net@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.1.tgz#edd249503315dd5ab4fa00220f6509d95bb7ab10" + integrity sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw== + dependencies: + web3-core "1.2.1" + web3-core-method "1.2.1" + web3-utils "1.2.1" + +web3-net@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" + integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + +web3-net@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.0.tgz#b69068cccffab58911c2f08ca4abfbefb0f948c6" + integrity sha512-Xz02KylOyrB2YZzCkysEDrY7RbKxb7LADzx3Zlovfvuby7HBwtXVexXKtoGqksa+ns1lvjQLLQGb+OeLi7Sr7w== + dependencies: + web3-core "1.3.0" + web3-core-method "1.3.0" + web3-utils "1.3.0" + +"web3-provider-engine@https://github.com/MetaMask/web3-provider-engine.git": + version "15.0.12" + resolved "https://github.com/MetaMask/web3-provider-engine.git#15bc747a62b94509c7c9fc3211be7874382d4bc8" + dependencies: + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^4.4.2" + eth-json-rpc-errors "^2.0.2" + eth-json-rpc-filters "^4.1.1" + eth-json-rpc-infura "^4.0.1" + eth-json-rpc-middleware "^4.1.5" + eth-sig-util "^1.4.2" + ethereumjs-block "^1.2.2" + ethereumjs-tx "^1.2.0" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + +web3-providers-http@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.1.tgz#c93ea003a42e7b894556f7e19dd3540f947f5013" + integrity sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ== + dependencies: + web3-core-helpers "1.2.1" + xhr2-cookies "1.1.0" + +web3-providers-http@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" + integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== + dependencies: + web3-core-helpers "1.2.11" + xhr2-cookies "1.1.0" + +web3-providers-http@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.0.tgz#88227f64c88b32abed4359383c2663616e0dc531" + integrity sha512-cMKhUI6PqlY/EC+ZDacAxajySBu8AzW8jOjt1Pe/mbRQgS0rcZyvLePGTTuoyaA8C21F8UW+EE5jj7YsNgOuqA== + dependencies: + web3-core-helpers "1.3.0" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz#017bfc687a8fc5398df2241eb98f135e3edd672c" + integrity sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.1" + +web3-providers-ipc@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" + integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + +web3-providers-ipc@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.0.tgz#d7c2b203733b46f7b4e7b15633d891648cf9a293" + integrity sha512-0CrLuRofR+1J38nEj4WsId/oolwQEM6Yl1sOt41S/6bNI7htdkwgVhSloFIMJMDFHtRw229QIJ6wIaKQz0X1Og== + dependencies: + oboe "2.1.5" + underscore "1.9.1" + web3-core-helpers "1.3.0" + +web3-providers-ws@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz#2d941eaf3d5a8caa3214eff8dc16d96252b842cb" + integrity sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.1" + websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" + +web3-providers-ws@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" + integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + websocket "^1.0.31" + +web3-providers-ws@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.0.tgz#84adeff65acd4624d7f5bb43c5b2b22d8f0f63a4" + integrity sha512-Im5MthhJnJst8nSoq0TgbyOdaiFQFa5r6sHPOVllhgIgViDqzbnlAFW9sNzQ0Q8VXPNfPIQKi9cOrHlSRNPjRw== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.3.0" + websocket "^1.0.32" + +web3-shh@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.1.tgz#4460e3c1e07faf73ddec24ccd00da46f89152b0c" + integrity sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA== + dependencies: + web3-core "1.2.1" + web3-core-method "1.2.1" + web3-core-subscriptions "1.2.1" + web3-net "1.2.1" + +web3-shh@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" + integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-net "1.2.11" + +web3-shh@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.0.tgz#62d15297da8fb5f733dd1b98f9ade300590f4d49" + integrity sha512-IZTojA4VCwVq+7eEIHuL1tJXtU+LJDhO8Y2QmuwetEWW1iBgWCGPHZasipWP+7kDpSm/5lo5GRxL72FF/Os/tA== + dependencies: + web3-core "1.3.0" + web3-core-method "1.3.0" + web3-core-subscriptions "1.3.0" + web3-net "1.3.0" + +web3-utils@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.1.tgz#21466e38291551de0ab34558de21512ac4274534" + integrity sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randomhex "0.1.5" + underscore "1.9.1" + utf8 "3.0.0" + +web3-utils@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" + integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== + 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.9.1" + utf8 "3.0.0" + +web3-utils@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.0.tgz#5bac16e5e0ec9fe7bdcfadb621655e8aa3cf14e1" + integrity sha512-2mS5axFCbkhicmoDRuJeuo0TVGQDgC2sPi/5dblfVC+PMtX0efrb8Xlttv/eGkq7X4E83Pds34FH98TP2WOUZA== + 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.9.1" + utf8 "3.0.0" + +web3@*, web3@^1.0.0-beta.34: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" + integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== + dependencies: + web3-bzz "1.2.11" + web3-core "1.2.11" + web3-eth "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-shh "1.2.11" + web3-utils "1.2.11" + +web3@0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/web3/-/web3-0.15.1.tgz#65b17fd3be991de4983c3558cc1f0b9aab3a0a10" + integrity sha1-ZbF/076ZHeSYPDVYzB8Lmqs6ChA= + dependencies: + bignumber.js debris/bignumber.js#master + crypto-js "^3.1.4" + utf8 "^2.1.1" + xmlhttprequest "*" + +web3@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.1.tgz#5d8158bcca47838ab8c2b784a2dee4c3ceb4179b" + integrity sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw== + dependencies: + web3-bzz "1.2.1" + web3-core "1.2.1" + web3-eth "1.2.1" + web3-eth-personal "1.2.1" + web3-net "1.2.1" + web3-shh "1.2.1" + web3-utils "1.2.1" + +web3@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.0.tgz#8fe4cd6e2a21c91904f343ba75717ee4c76bb349" + integrity sha512-4q9dna0RecnrlgD/bD1C5S+81Untbd6Z/TBD7rb+D5Bvvc0Wxjr4OP70x+LlnwuRDjDtzBwJbNUblh2grlVArw== + dependencies: + web3-bzz "1.3.0" + web3-core "1.3.0" + web3-eth "1.3.0" + web3-eth-personal "1.3.0" + web3-net "1.3.0" + web3-shh "1.3.0" + web3-utils "1.3.0" + +websocket@^1.0.31: + version "1.0.31" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" + integrity sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ== + dependencies: + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" + +websocket@^1.0.32: + version "1.0.32" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" + integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +websocket@^1.0.33: + version "1.0.33" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.33.tgz#407f763fc58e74a3fa41ca3ae5d78d3f5e3b82a5" + integrity sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +"websocket@github:web3-js/WebSocket-Node#polyfill/globalThis": + version "1.0.29" + resolved "https://codeload.github.com/web3-js/WebSocket-Node/tar.gz/ef5ea2f41daf4a2113b80c9223df884b4d56c400" + dependencies: + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" + +whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== + +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@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +workerpool@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58" + integrity sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== + +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" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +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@^5.1.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== + dependencies: + async-limiter "~1.0.0" + +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.2.0, xhr@^2.3.3: + version "2.5.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" + integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== + dependencies: + global "~4.3.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +xmlhttprequest@*, xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + dependencies: + object-keys "~0.4.0" + +xxhashjs@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== + dependencies: + cuint "^0.2.2" + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + +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== + +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-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@13.3.2, yargs@^13.3.0: + 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" + +yauzl@^2.4.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= diff --git a/ts-tests/upgrade-tester/.eslintrc.json b/ts-tests/upgrade-tester/.eslintrc.json new file mode 100644 index 00000000..9371b47c --- /dev/null +++ b/ts-tests/upgrade-tester/.eslintrc.json @@ -0,0 +1,59 @@ +{ + "extends": ["airbnb-base"], + "plugins": ["@typescript-eslint"], + "parser": "@typescript-eslint/parser", + "settings": { + "import/extensions": [".js", ".ts"], + "import/resolver": { + "node": { } + } + }, + "rules": { + "import/extensions": "off", + "import/no-unresolved": "off", + "import/no-cycle": "off", + "no-underscore-dangle": 0, + "no-param-reassign": 0, + "no-console": 0, + "camelcase": 0, + "no-else-return": 0, + "no-unused-vars": 0, + "class-methods-use-this": 0, + "import/newline-after-import": 0, + "import/no-named-default": 0, + "prefer-destructuring": 0, + "comma-dangle": 0, + "array-bracket-spacing": 0, + "no-plusplus": 0, + "consistent-return": 0, + "object-curly-newline": 0, + "nonblock-statement-body-position": 0, + "no-extraneous-dependencies": 0, + "curly": 0, + "no-nested-ternary": 0, + "import/first": 0, + "import/no-extraneous-dependencies": 0, + "arrow-body-style": 0, + "key-spacing": 0, + "quote-props": 0, + "no-alert": 0, + "no-undef": 0, + "no-confusing-arrow": 0, + "one-var-declaration-per-line": 0, + "one-var": 0, + "lines-between-class-members": 0, + "max-classes-per-file": ["error", 5], + "max-len": ["error", {"code": 120, "tabWidth": 2}], + "no-constant-condition": ["error", {"checkLoops": false}], + "no-restricted-syntax": 0, + "no-trailing-spaces": ["error"], + "no-useless-constructor": 0, + "no-empty-function": 0, + "import/prefer-default-export": 0, + "dot-notation": 0, + "no-lonely-if": 0, + "no-multi-spaces": 0, + "new-cap": 0, + "no-await-in-loop": 0 + } +} diff --git a/ts-tests/upgrade-tester/README.md b/ts-tests/upgrade-tester/README.md new file mode 100644 index 00000000..c47035ab --- /dev/null +++ b/ts-tests/upgrade-tester/README.md @@ -0,0 +1,8 @@ +# edgeware-state-tester +State testing for verifying Edgeware migrations. + +## Usage + +Ensure a built edgeware binary for an older version is in the adjacent path to this edgeware-node repo, as well as a built binary within this repo itself. + +Then use `yarn start` to run with default parameters. \ No newline at end of file diff --git a/ts-tests/upgrade-tester/package.json b/ts-tests/upgrade-tester/package.json new file mode 100644 index 00000000..ceac8940 --- /dev/null +++ b/ts-tests/upgrade-tester/package.json @@ -0,0 +1,40 @@ +{ + "name": "@edgeware/state-tester", + "version": "0.0.1", + "description": "State testing for verifying Edgeware migrations.", + "author": "jake@commonwealth.im", + "license": "GPL-3.0", + "main": "index.js", + "homepage": "https://github.com/hicommonwealth/edgeware-state-tester#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/hicommonwealth/edgeware-state-tester.git" + }, + "scripts": { + "start": "ts-node src/index.ts", + "democracy-upgrade": "ts-node src/scripts/democracyUpgrade.ts", + "generate-chainspec": "ts-node src/scripts/forker.ts" + }, + "dependencies": { + "@edgeware/node-types": "^3.1.0-beta.14", + "@polkadot/api": "3.2.4-3", + "@polkadot/keyring": "^5.2.2", + "@polkadot/util": "^5.2.2", + "@polkadot/util-crypto": "^5.2.2", + "@types/chai": "^4.2.11", + "@types/rimraf": "^3.0.0", + "@types/underscore": "^1.10.24", + "@typescript-eslint/eslint-plugin": "^3.6.1", + "@typescript-eslint/parser": "^3.6.1", + "bn.js": "^5.1.3", + "chai": "^4.2.0", + "eslint": "^7.4.0", + "eslint-config-airbnb-base": "^14.2.0", + "eslint-plugin-import": "^2.22.0", + "rimraf": "^3.0.2", + "ts-node": "^9.0.0", + "typescript": "^4.0.3", + "typescript-logging": "^1.0.0", + "underscore": "^1.12.0" + } +} diff --git a/ts-tests/upgrade-tester/src/index.ts b/ts-tests/upgrade-tester/src/index.ts new file mode 100644 index 00000000..cdeda433 --- /dev/null +++ b/ts-tests/upgrade-tester/src/index.ts @@ -0,0 +1,65 @@ +import path from 'path'; +import TestRunner from './testRunner'; +import StateTest from './stateTest'; + +import { factory, formatFilename } from './logging'; +const log = factory.getLogger(formatFilename(__filename)); + +const CHAINSPEC = `${__dirname}/scripts/forker-data/fork.json`; +// const BINARY_PATH = '../../../edgeware-node-3.1.0/target/release/edgeware'; +const BINARY_PATH = '../../target/release/edgeware'; +const CHAIN_BASE_PATH = `${__dirname}/../db`; +const ACCOUNTS = [ '//Alice' ]; +const SS58_PREFIX = 7; // edgeware ss58 + +const UPGRADE_BINARY = '../../target/release/edgeware'; +const UPGRADE_CODE = '../../edgeware_runtime.wasm'; +const SUDO_SEED = '//Alice'; +const UPGRADE_ON_NEW_NODE = false; +const POST_UPGRADE_COMMAND = { + env: { BASE_PATH: CHAIN_BASE_PATH, CHAIN_PATH: CHAINSPEC, }, + cmd: `cd ${__dirname}/../../frontier-tester && yarn init-eth-balance && yarn test-ci`, +}; + +async function main() { + // construct some migration tests + // TODO: make this a part of the arg initialization + const tests: StateTest[] = []; + tests.push( + new ((await import('./tests/staking')).default)(), + new ((await import('./tests/identity')).default)(), + new ((await import('./tests/democracy')).default)(), + new ((await import('./tests/council')).default)(), + new ((await import('./tests/treasury')).default)(), + new ((await import('./tests/storage')).default)(), + ); + + // construct tester + const tester = new TestRunner(tests, { + chainspec: CHAINSPEC, + binaryPath: BINARY_PATH, + chainBasePath: CHAIN_BASE_PATH, + accountSeeds: ACCOUNTS, + ss58Prefix: SS58_PREFIX, + chainLogPath: path.join(CHAIN_BASE_PATH, 'out.log'), + // upgrade: null, + upgrade: { + codePath: UPGRADE_CODE, + binaryPath: UPGRADE_BINARY, + sudoSeed: SUDO_SEED, + upgradeOnNewNode: UPGRADE_ON_NEW_NODE, + postUpgradeCommand: POST_UPGRADE_COMMAND, + }, + }); + + try { + await tester.run(); + process.exit(0); + } catch (e) { + log.error(`TESTER FAILURE: ${e.message}`); + process.exit(1); + } +} + +// kick off test script +main(); diff --git a/ts-tests/upgrade-tester/src/logging.ts b/ts-tests/upgrade-tester/src/logging.ts new file mode 100644 index 00000000..047b69eb --- /dev/null +++ b/ts-tests/upgrade-tester/src/logging.ts @@ -0,0 +1,24 @@ +import { + LoggerFactory, + LoggerFactoryOptions, + LFService, + LogGroupRule, + LogLevel, + getLogControl, + LogGroupControlSettings, +} from 'typescript-logging'; + +const options = new LoggerFactoryOptions() + .addLogGroupRule(new LogGroupRule(new RegExp('.+'), LogLevel.Debug)); + +export const formatFilename = (name) => { + const t = name.split('/'); + return t[t.length - 1]; +}; + +export const factory = LFService.createNamedLoggerFactory('StateTester', options); + +const control = getLogControl(); + +// Factories are numbered, use listFactories() to find out +export const factoryControl = control.getLoggerFactoryControl(0); diff --git a/ts-tests/upgrade-tester/src/scripts/democracyUpgrade.ts b/ts-tests/upgrade-tester/src/scripts/democracyUpgrade.ts new file mode 100644 index 00000000..1dadd787 --- /dev/null +++ b/ts-tests/upgrade-tester/src/scripts/democracyUpgrade.ts @@ -0,0 +1,110 @@ +import fs from 'fs'; +import { ApiPromise } from '@polkadot/api'; +import { ReferendumIndex } from '@polkadot/types/interfaces'; +import { Codec } from '@polkadot/types/types'; +import { spec } from '@edgeware/node-types'; +import { createTestPairs, TestKeyringMap } from '@polkadot/keyring/testingPairs'; +import { compactAddLength } from '@polkadot/util'; +import { makeTx } from '../util'; + +import { factory, formatFilename } from '../logging'; +import { UnsubscribePromise } from '@polkadot/api/types'; +const log = factory.getLogger(formatFilename(__filename)); + +// submits the upgrade as a democracy proposal + its associated preimage +async function submitUpgrade(api: ApiPromise, pairs: TestKeyringMap, codePath: string): Promise { + log.info('Submitting upgrade proposal.'); + const wasmFileData = fs.readFileSync(codePath); + const data = new Uint8Array(wasmFileData); + const codecData = compactAddLength(data); + + // construct upgrade call that sudo will run + const upgrade = api.tx.system.setCode(codecData); + + // propose the upgrade + const propose = api.tx.democracy.propose(upgrade.method.hash, api.consts.democracy.minimumDeposit); + await makeTx(api, propose, pairs.alice); + + // note the preimage + const preimage = api.tx.democracy.notePreimage(upgrade.method.toHex()); + await makeTx(api, preimage, pairs.alice); +} + +// waits for the proposal to get tabled and the referendum to start +async function waitForReferendum(api: ApiPromise): Promise { + log.info('Waiting for upgrade proposal to table.'); + // check if proposal already began and return immediately if so + const refCount = await api.query.democracy.referendumCount(); + if (+refCount > 0) { + return +refCount - 1; + } + + // otherwise, listen to events until it starts + let unsubscribe: UnsubscribePromise; + const refIdx = await new Promise((resolve) => { + unsubscribe = api.query.system.events((events) => { + events.forEach((record) => { + const { event } = record; + if (event.method !== 'TreasuryMinting' && event.method !== 'ExtrinsicSuccess') { + log.debug(`\t${event.section}:${event.method}`); + } + if (event.section === 'democracy' && event.method === 'Started') { + const [ referendumIndex ] = event.data as unknown as [ ReferendumIndex ] & Codec; + resolve(+referendumIndex); + } + }); + }); + }); + if (unsubscribe) { + await unsubscribe; + } + return refIdx; +} + +// votes on the upgrade so it passes, then waits for the referendum to execute +async function passUpgrade(api: ApiPromise, pairs: TestKeyringMap, refIdx: number): Promise { + log.info('Voting for upgrade referendum.'); + const { data: { free } } = await api.query.system.account(pairs.bob.address); + const voteOptions = { + Standard: { + vote: { + aye: true, + conviction: 1, + }, + // save some balance for the voting fees/deposit + balance: free.divn(2).toString(), + } + }; + const vote = api.tx.democracy.vote(refIdx, voteOptions); + await makeTx(api, vote, pairs.bob); + + const referendum = await api.query.democracy.referendumInfoOf(refIdx); + log.debug(`Got referendum: ${JSON.stringify(referendum.toHuman())}`); + + log.info('Waiting for referendum to pass and execute.'); + return new Promise((resolve) => { + api.query.system.events((events) => { + events.forEach((record) => { + const { event } = record; + if (event.method !== 'TreasuryMinting' && event.method !== 'ExtrinsicSuccess') { + log.debug(`\t${event.section}:${event.method}`); + } + if (event.section === 'democracy' && event.method === 'Executed') { + resolve(); + } + }); + }); + }); +} + +async function main() { + const api = await ApiPromise.create({ ...spec }); + const pairs = createTestPairs(); + await submitUpgrade(api, pairs, `${__dirname}/../../../../edgeware_runtime.wasm`); + const refIdx = await waitForReferendum(api); + await passUpgrade(api, pairs, refIdx); + log.info('Upgrade completed. Goodbye.'); + process.exit(0); +} + +main(); diff --git a/ts-tests/upgrade-tester/src/scripts/forker.ts b/ts-tests/upgrade-tester/src/scripts/forker.ts new file mode 100644 index 00000000..d5f5b4a5 --- /dev/null +++ b/ts-tests/upgrade-tester/src/scripts/forker.ts @@ -0,0 +1,122 @@ +/* eslint-disable prefer-template */ +import { spec } from '@edgeware/node-types'; +import { ApiPromise } from '@polkadot/api'; +import { HttpProvider } from '@polkadot/rpc-provider'; +import { xxhashAsHex } from '@polkadot/util-crypto'; +import fs from 'fs'; +import path from 'path'; +import chalk from 'chalk'; +import { execFileSync, execSync } from 'child_process'; + +// input paths +const binaryPath = '../../target/release/edgeware'; +const wasmPath = '../../../edgeware-node-3.1.0/edgeware_runtime.wasm'; + +// output paths +const outputDir = path.join(__dirname, 'forker-data'); +const hexPath = path.join(outputDir, 'runtime.hex'); +const originalSpecPath = path.join(outputDir, 'genesis.json'); +const forkedSpecPath = path.join(outputDir, 'fork.json'); +const storagePath = path.join(outputDir, 'storage.json'); + +// Using http endpoint since substrate's Ws endpoint has a size limit. +const provider = new HttpProvider(process.env.HTTP_RPC_ENDPOINT || 'http://beresheet2.edgewa.re:9933'); + +/** + * All module prefixes except those mentioned in the skippedModulesPrefix will be added to this by the script. + * If you want to add any past module or part of a skipped module, add the prefix here manually. + * + * Any storage value’s hex can be logged via console.log(api.query...key([...opt params])), + * e.g. console.log(api.query.timestamp.now.key()). + * + * If you want a map/doublemap key prefix, you can do it via .keyPrefix(), + * e.g. console.log(api.query.system.account.keyPrefix()). + * + * For module hashing, do it via xxhashAsHex, + * e.g. console.log(xxhashAsHex('System', 128)). + */ +const prefixes = [ + // '0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9' /* System.Account */ +]; +const skippedModulesPrefix = ['System', 'Session', 'Aura', 'Grandpa', 'GrandpaFinality', 'FinalityTracker']; + +async function main() { + if (!fs.existsSync(binaryPath)) { + console.log(chalk.red('Binary missing.')); + process.exit(1); + } + execFileSync('chmod', ['+x', binaryPath]); + + if (!fs.existsSync(wasmPath)) { + console.log(chalk.red('WASM missing.')); + process.exit(1); + } + + // create data folder if needed + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir); + } + + execSync('cat ' + wasmPath + ' | hexdump -ve \'/1 "%02x"\' > ' + hexPath); + + console.log(chalk.green('We are intentionally using the HTTP endpoint. ' + + 'If you see any warnings about that, please ignore them.')); + const api = await ApiPromise.create({ provider, ...spec }); + + // Download state of original chain + console.log(chalk.green('Fetching current state of the live chain. ' + + 'Please wait, it can take a while depending on the size of your chain.')); + const pairs = await provider.send('state_getPairs', ['0x']); + fs.writeFileSync(storagePath, JSON.stringify(pairs)); + + const metadata: any = await api.rpc.state.getMetadata(); + // Populate the prefixes array + const modules = JSON.parse(metadata.asLatest.modules); + modules.forEach((m) => { + if (m.storage) { + if (!skippedModulesPrefix.includes(m.storage.prefix)) { + prefixes.push(xxhashAsHex(m.storage.prefix, 128)); + } + } + }); + + // Generate chain spec for original and forked chains + execSync(`${binaryPath} build-spec --raw --chain=beresheet > ${originalSpecPath}`); + execSync(`${binaryPath} build-spec --dev --raw > ${forkedSpecPath}`); + + const storage = JSON.parse(fs.readFileSync(storagePath, 'utf8')); + const originalSpec = JSON.parse(fs.readFileSync(originalSpecPath, 'utf8')); + const forkedSpec = JSON.parse(fs.readFileSync(forkedSpecPath, 'utf8')); + + // Modify chain name and id + forkedSpec.name = originalSpec.name + '-fork'; + forkedSpec.id = originalSpec.id + '-fork'; + forkedSpec.protocolId = originalSpec.protocolId; + + // Grab the items to be moved, then iterate through and insert into storage + storage + .filter((i) => prefixes.some((prefix) => i[0].startsWith(prefix))) + .forEach(([key, value]) => { + forkedSpec.genesis.raw.top[key] = value; + }); + + // Delete System.LastRuntimeUpgrade to ensure that the on_runtime_upgrade event is triggered + delete forkedSpec.genesis.raw.top['0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8']; + + // Set the code to the current runtime code + forkedSpec.genesis.raw.top['0x3a636f6465'] = '0x' + fs.readFileSync(hexPath, 'utf8').trim(); + + // To prevent the validator set from changing mid-test, set Staking.ForceEra to ForceNone ('0x02') + forkedSpec.genesis.raw.top['0x5f3e4907f716ac89b6347d15ececedcaf7dad0317324aecae8744b87fc95f2f3'] = '0x02'; + + // To make testing easier, set Sudo.Key to //Alice + const sudoKeyHash = xxhashAsHex('Sudo', 128) + xxhashAsHex('Key', 128).slice(2); + forkedSpec.genesis.raw.top[sudoKeyHash] = '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d'; + + fs.writeFileSync(forkedSpecPath, JSON.stringify(forkedSpec, null, 4)); + + console.log(`Forked genesis generated successfully. Find it at ${outputDir}/fork.json`); + process.exit(); +} + +main(); diff --git a/ts-tests/upgrade-tester/src/stateTest.ts b/ts-tests/upgrade-tester/src/stateTest.ts new file mode 100644 index 00000000..6a28a996 --- /dev/null +++ b/ts-tests/upgrade-tester/src/stateTest.ts @@ -0,0 +1,32 @@ +import { ApiPromise } from '@polkadot/api'; +import { createTestPairs, TestKeyringMap } from '@polkadot/keyring/testingPairs'; + +// A specific test case +abstract class StateTest { + protected started = false; + protected completed = false; + protected accounts: TestKeyringMap; + + // runDelay: # of blocks after upgrade to run the test + constructor( + // the publicly-displayable name of the test (usually set in the `super` call) + public readonly name: string, + ) { + this.accounts = createTestPairs(); + } + + // checks if the test has completed + public isComplete(): boolean { + return this.completed; + } + + public async before(api: ApiPromise): Promise { + this.started = true; + } + + public async after(api: ApiPromise): Promise { + this.completed = true; + } +} + +export default StateTest; diff --git a/ts-tests/upgrade-tester/src/testRunner.ts b/ts-tests/upgrade-tester/src/testRunner.ts new file mode 100644 index 00000000..e83caf57 --- /dev/null +++ b/ts-tests/upgrade-tester/src/testRunner.ts @@ -0,0 +1,393 @@ +import child_process from 'child_process'; +import fs from 'fs'; +import rimraf from 'rimraf'; +import BN from 'bn.js'; + +import { ApiPromise, WsProvider, Keyring } from '@polkadot/api'; +import { UnsubscribePromise } from '@polkadot/api/types'; +import { compactAddLength } from '@polkadot/util'; +import { spec } from '@edgeware/node-types'; +import StateTest from './stateTest'; + +import { makeTx } from './util'; +import { factory, formatFilename } from './logging'; +const log = factory.getLogger(formatFilename(__filename)); + +// configuration options for test runner +export interface ITestOptions { + // spec of chain to run, should be 'dev' for test chains + chainspec: string; + + // path to the `edgeware` binary + binaryPath: string; + + // path to a directory to initialize the chain database + chainBasePath: string; + + // list of account seeds to pass into tests + accountSeeds: string[]; + + // prefix used in SS58 address generation, 0 on test chains + ss58Prefix: number; + + // websocket url exposed by a running chain, used to initialize the polkadot API + // defaults to 'ws://localhost:9944' + wsUrl?: string; + + // path or stream specifier to pipe chain stdout/stderr into. + // leave undefined to ignore chain output + chainLogPath?: string | 'stdout' | 'stderr'; + + // upgrade-specific configuration: + upgrade?: { + // path to a file containing the WASM hex string used in `setCode` + codePath: string, + + // seed of sudo account, which can execute `setCode` + sudoSeed: string; + + // path to the binary file containing the upgraded chain executable + // leave blank to upgrade without requiring a chain restart/change in chain binary + binaryPath?: string; + + // run upgrade on new node with older runtime as specified in binaryPath + // if false or unset, will run upgrade on old node then switch to new node + upgradeOnNewNode?: boolean; + + // command to run after all tests, will not exit chain until complete + postUpgradeCommand?: { cmd: string, env: NodeJS.Dict }; + } +} + +// Testing fixture for automating chain and API startup and upgrades +// such that general tests can run against it, maintaining state across +// API sessions and upgrades. +class TestRunner { + private _api: ApiPromise; + private _chainOutfile: fs.WriteStream; + private _chainOutstream: NodeJS.WritableStream; + private _chainProcess: child_process.ChildProcess; + + constructor( + private tests: StateTest[], + private options: ITestOptions, + ) { + // verify options args + if (!options.chainspec) { + throw new Error('missing chainspec!'); + } + if (!options.binaryPath || !fs.existsSync(options.binaryPath)) { + throw new Error('cannot find chain executable!'); + } + + // set defaults + if (typeof options.ss58Prefix !== 'number') { + log.info('No SS58 prefix found, defaulting to 0.'); + options.ss58Prefix = 0; + } + if (options.upgrade) { + if (!options.upgrade.codePath || !fs.existsSync(options.upgrade.codePath)) { + throw new Error('cannot find upgrade codepath!'); + } + if (!options.upgrade.sudoSeed) { + throw new Error('invalid sudo seed!'); + } + } else { + log.info('Will not perform upgrade during testing.'); + } + if (!options.wsUrl) { + log.info('No websocket URL found, defaulting to ws://localhost:9944.'); + options.wsUrl = 'ws://localhost:9944'; + } + } + + // Starts a chain and configures its output to write to a given location, as + // specified in the options object. + // 'clearBasePath' is set to true to remove the chain database at startup, + // for a clean start, whereas post-upgrade it should be false. + private _startChain(clearBasePath: boolean) { + // pass through SIGINT to chain process + process.on('SIGINT', () => { + this._stopChain().then(() => process.exit(1)); + }); + + if (clearBasePath) { + // clear base path and replace with an empty directory + if (fs.existsSync(this.options.chainBasePath)) { + // we use rimraf because fs.remove doesn't support recursive removal + log.info(`rimraf ${this.options.chainBasePath}`); + rimraf.sync(this.options.chainBasePath); + } + fs.mkdirSync(this.options.chainBasePath); + } + + // open log files if necessary to configure the chain output stream + if (this.options.chainLogPath) { + // we set the 'a' flag to avoid overwriting the file when we re-init this + // file stream on upgrade + this._chainOutfile = fs.createWriteStream(this.options.chainLogPath, { flags: 'a' }); + this._chainOutstream = this._chainOutfile; + } else { + this._chainOutstream = process.stdout; + } + + // start the chain with specified spec and basepath + const args = [ + '--chain', this.options.chainspec, + '--base-path', this.options.chainBasePath, + '--wasm-execution', 'Compiled', + '--alice', // TODO: abstract this into accounts somehow + '--force-authoring', + '--no-telemetry', + '--no-prometheus', + ]; + log.info(`Executing ${this.options.binaryPath} with args ${JSON.stringify(args)}`); + this._chainProcess = child_process.spawn( + this.options.binaryPath, + args, + // (error) => { + // // callback on exit + // if (error) log.info(`Received chain process error: ${error.message}.`); + // log.info('Chain exited.'); + // } + ); + + // pipe edgeware output to file in temp dir/process output if set + if (this._chainOutstream) { + this._chainProcess.stdout.pipe(this._chainOutstream); + this._chainProcess.stderr.pipe(this._chainOutstream); + } + } + + // Stops an active chain and closes any file used to store its output. + private async _stopChain() { + // if (this._chainOutstream) { + // this._chainOutstream = undefined; + // } + // if (this._chainOutfile) { + // this._chainOutfile.close(); + // this._chainOutfile = undefined; + // } + if (this._api) { + await this._api.disconnect(); + } + delete this._api; + + if (this._chainProcess) { + await new Promise((resolve) => { + this._chainProcess.on('close', (code) => { + log.info(`Edgeware exited with code ${code}.`); + resolve(); + }); + log.info('Sending kill signal to Edgeware.'); + this._chainProcess.kill(9); + this._chainProcess = undefined; + }); + } + + // wait 5s for port to reopen + log.info('Waiting 5s for chain to exit...'); + await new Promise((resolve) => setTimeout(() => resolve(), 5000)); + } + + // With a valid chain running, construct a polkadot-js API and + // initialize a connection to the chain. Returns the spec version. + private async _startApi(): Promise { + log.info(`Connecting to chain at ${this.options.wsUrl}...`); + + // initialize provider separately from the API: the API throws an error + // if the chain is not available immediately + const provider = new WsProvider(this.options.wsUrl, 5000); // 5s reconnect time + + // this promise waits for the provider to connect to the chain, and then + // removes the listener for 'connected' events. + let unsubscribe: () => void; + await new Promise((resolve) => { + unsubscribe = provider.on('connected', () => resolve()); + }); + unsubscribe(); + + // initialize the API itself + this._api = await ApiPromise.create({ provider, ...spec }); + + // fetch and print chain information + const chainInfo = await this._api.rpc.state.getRuntimeVersion(); + log.info(`API connected to chain ${chainInfo.specName.toString()}:${+chainInfo.specVersion}!`); + return +chainInfo.specVersion; + } + + // Performs an upgrade via a `sudo(setCode())` API call. + // 'useCodeChecks' specifies whether to perform API-level checks on the WASM blob, + // and should be set to false for the current edgeware upgrade. + private async _doUpgrade(useCodeChecks: boolean = true): Promise { + if (!this.options.upgrade) { + log.info('No upgrade to perform!'); + return; + } + + log.info('Performing upgrade...'); + const { sudoSeed, codePath } = this.options.upgrade; + + // construct sudo-er keyring + const sudoKey = (new Keyring({ ss58Format: this.options.ss58Prefix, type: 'sr25519' })) + .addFromUri(sudoSeed); + + // read WASM blob into memory + const wasmFileData = fs.readFileSync(codePath); + const data = new Uint8Array(wasmFileData); + const codecData = compactAddLength(data); + + // construct upgrade call that sudo will run + const upgradeCall = useCodeChecks + ? this._api.tx.system.setCode(codecData) + : this._api.tx.system.setCodeWithoutChecks(codecData); + + // construct and submit sudo call using the sudo seed and weight 1 + const sudoCall = this._api.tx.sudo.sudoUncheckedWeight(upgradeCall, 1); + let txUnsubscribe: () => void; + /* eslint-disable-next-line no-async-promise-executor */ + await new Promise(async (resolve) => { + txUnsubscribe = await sudoCall.signAndSend(sudoKey, (result) => { + if (result.status.isInBlock) { + log.info('Upgrade TX in block!'); + resolve(); + } + }); + }); + if (txUnsubscribe) txUnsubscribe(); + } + + // with a valid chain and API connection, init tests + private async _runTests(preUpgrade: boolean): Promise { + if (!this._api) throw new Error('API not initialized!'); + + // TODO: move this set-balance into a test case + if (this.options.upgrade.sudoSeed && preUpgrade) { + const sudoKeyring = (new Keyring({ ss58Format: this.options.ss58Prefix, type: 'sr25519' })) + .addFromUri(this.options.upgrade.sudoSeed); + const newBalance = new BN('1000000000000000000000000'); + const setBalanceTx = this._api.tx.sudo.sudo( + this._api.tx.balances.setBalance(sudoKeyring.address, newBalance, 0) + ); + await makeTx(this._api, setBalanceTx, sudoKeyring); + } + + let rpcSubscription: UnsubscribePromise; + + // run all tests, then perform upgrade if needed + let needsUpgrade = false; + if (preUpgrade) { + for (const t of this.tests) { + try { + await t.before(this._api); + log.info(`Test '${t.name}' action 'before' succeeded.`); + } catch (e) { + log.error(`Test '${t.name}' action 'before' failed: ${e.message}.`); + } + } + + // set flag to run upgrade + if (this.options.upgrade) { + needsUpgrade = true; + } + } else { + for (const t of this.tests) { + try { + await t.after(this._api); + log.info(`Test '${t.name}' action 'after' succeeded.`); + } catch (e) { + log.error(`Test '${t.name}' action 'after' failed: ${e.message}.`); + } + } + log.info('All tests complete!'); + } + + // once all tests complete, kill the chain subscription + if (rpcSubscription) (await rpcSubscription)(); + return needsUpgrade; + } + + // main function to begin the testing process + public async run() { + // 1. Prepare chain directories and chain output file (if used), + // then start the chain. + this._startChain(true); + + // 3. Construct API via websockets + const startVersion = await this._startApi(); + + // [3.5.] If upgradeOnNewNode is set, restart chain immediately on new node + if (this.options.upgrade.binaryPath && this.options.upgrade.upgradeOnNewNode) { + await this._stopChain(); + this.options.binaryPath = this.options.upgrade.binaryPath; + this._startChain(false); + const version = await this._startApi(); + if (version !== startVersion) { + await this._stopChain(); + throw new Error('Version should not change on node switch!'); + } + } + + // 4. Run tests via API + const needsUpgrade = await this._runTests(true); + + // end run if no upgrade needed + if (!needsUpgrade) { + await this._stopChain(); + return; + } + + // [5.] Upgrade chain via API + await this._doUpgrade(); + + // [6.] Restart chain with upgraded binary (if needed) + if (this.options.upgrade.binaryPath + && this.options.binaryPath !== this.options.upgrade.binaryPath + && !this.options.upgrade.upgradeOnNewNode) { + await this._stopChain(); + this.options.binaryPath = this.options.upgrade.binaryPath; + this._startChain(false); + } + + // [7.] Reconstruct API + const newVersion = await this._startApi(); + if (startVersion >= newVersion) { + await this._stopChain(); + throw new Error('Upgrade failed! Version did not change.'); + } + + // [8.] Run additional tests post-upgrade + await this._runTests(false); + + // Cleanup and exit + await this._stopChain(); + + // [9.] Run post-upgrade command if present + if (this.options.upgrade.postUpgradeCommand) { + log.info(`Running post-upgrade command:\n\t${this.options.upgrade.postUpgradeCommand.cmd}` + + `\n\t\t(env: ${JSON.stringify(this.options.upgrade.postUpgradeCommand.env)})` + + '\n\t\t...(may take some time)...'); + await new Promise((resolve, reject) => { + child_process.exec( + this.options.upgrade.postUpgradeCommand.cmd, + { env: this.options.upgrade.postUpgradeCommand.env }, + (error, stdout, stderr) => { + if (error) { + log.error(`error: ${error.message}`); + reject(new Error('post-upgrade command failed')); + } + if (stderr) { + log.error(`stderr: ${stderr}`); + } + log.info(`stdout: ${stdout}`); + resolve(); + } + ); + }); + } + + process.exit(0); + } +} + +export default TestRunner; diff --git a/ts-tests/upgrade-tester/src/tests/council.ts b/ts-tests/upgrade-tester/src/tests/council.ts new file mode 100644 index 00000000..3511f89f --- /dev/null +++ b/ts-tests/upgrade-tester/src/tests/council.ts @@ -0,0 +1,52 @@ +import { ApiPromise } from '@polkadot/api'; +import { BalanceOf, AccountId } from '@polkadot/types/interfaces'; +import { Vec } from '@polkadot/types'; +import { ITuple } from '@polkadot/types/types'; +import { assert } from 'chai'; +import StateTest from '../stateTest'; +import { makeTx } from '../util'; + +export default class extends StateTest { + private _candidates: string[]; + private _council: string[]; + private _charlieVotes: ITuple<[BalanceOf, Vec]>; + + constructor() { + super('council test'); + } + + public async before(api: ApiPromise) { + // have charlie run for council + const startCandidates = await api.query.elections.candidates(); + await makeTx(api, api.tx.elections.submitCandidacy(startCandidates.length), this.accounts.charlie); + this._candidates = (await api.query.elections.candidates()).map((c) => c.toString()); + + // have dave vote for charlie + await makeTx( + api, + api.tx.elections.vote([ this.accounts.charlie.address ], api.consts.elections.candidacyBond), + this.accounts.dave + ); + this._charlieVotes = await api.query.elections.voting(this.accounts.charlie.address); + + // save council status + this._council = (await api.query.council.members()).map((c) => c.toString()); + await super.before(api); + } + + public async after(api: ApiPromise) { + // confirm candidates unchanged + const candidates = (await api.query.elections.candidates()).map((c) => c.toString()); + assert.sameMembers(candidates, this._candidates); + + // confirm vote unchanged + const charlieVotes = await api.query.elections.voting(this.accounts.charlie.address); + assert.equal(+charlieVotes[0], +this._charlieVotes[0]); + assert.sameMembers(charlieVotes[1].map((c) => c.toString()), this._charlieVotes[1].map((c) => c.toString())); + + // confirm council unchanged + const council = (await api.query.council.members()).map((c) => c.toString()); + assert.sameMembers(council, this._council); + await super.after(api); + } +} diff --git a/ts-tests/upgrade-tester/src/tests/democracy.ts b/ts-tests/upgrade-tester/src/tests/democracy.ts new file mode 100644 index 00000000..34534a5a --- /dev/null +++ b/ts-tests/upgrade-tester/src/tests/democracy.ts @@ -0,0 +1,89 @@ +import { ApiPromise } from '@polkadot/api'; +import { ITuple } from '@polkadot/types/types'; +import { PropIndex, Hash, AccountId, PreimageStatusAvailable } from '@polkadot/types/interfaces'; +import { assert } from 'chai'; +import StateTest from '../stateTest'; +import { makeTx } from '../util'; + +export default class extends StateTest { + private _proposal: ITuple<[PropIndex, Hash, AccountId]>; + private _preimage: PreimageStatusAvailable; + + constructor() { + super('democracy test'); + } + + public async before(api: ApiPromise) { + // create a democracy proposal + const nProposals = await api.query.democracy.publicPropCount(); + const call = api.tx.system.fillBlock(1); + await makeTx(api, api.tx.democracy.propose(call.hash, api.consts.democracy.minimumDeposit), this.accounts.alice); + + const proposals = await api.query.democracy.publicProps(); + assert.isAbove(proposals.length, 0, 'publicProps array should have proposals'); + this._proposal = proposals.find(([ idx ]) => +idx === +nProposals); + assert.exists(this._proposal, 'proposal must exist'); + + // submit the preimage + await makeTx(api, api.tx.democracy.notePreimage(call.toHex()), this.accounts.alice); + const preimage = await api.query.democracy.preimages(call.hash); + if (!preimage.isSome || !preimage.unwrap().isAvailable) { + throw new Error('preimage not found'); + } + + this._preimage = preimage.unwrap().asAvailable; + await super.before(api); + } + + public async after(api: ApiPromise) { + if (!this._proposal) { + throw new Error('saved proposal not found'); + } + if (!this._preimage) { + throw new Error('saved preimage not found'); + } + + // check the proposal + const nProposals = await api.query.democracy.publicPropCount(); + const proposals = await api.query.democracy.publicProps(); + assert.isAbove(proposals.length, 0, 'proposals should still exist'); + const proposal = proposals.find(([ idx ]) => +idx === (+nProposals - 1)); + assert.exists(proposal, 'proposal must exist'); + assert.deepEqual( + proposal.toHuman(), + this._proposal.toHuman(), + 'democracy proposal should be identical', + ); + const proposalId = proposal[0]; + const deposits = await api.query.democracy.depositOf(proposalId); + assert.isTrue(deposits.isSome); + const [ voters, balance ] = deposits.unwrap(); + + // check the preimage + const call = api.tx.system.fillBlock(1); + const preimage = await api.query.democracy.preimages(call.hash); + if (!preimage.isSome || !preimage.unwrap().isAvailable) { + throw new Error('preimage not found'); + } + + assert.deepEqual( + preimage.unwrap().asAvailable.toHuman(), + this._preimage.toHuman(), + 'preimage should be identical', + ); + + // attempt to second the proposal and verify it works + await makeTx(api, api.tx.democracy.second(proposalId, 5), this.accounts.bob); + const updatedDeposits = await api.query.democracy.depositOf(proposalId); + assert.isTrue(updatedDeposits.isSome, 'should find deposits for proposal'); + const [ updatedVoters, updatedBalance ] = updatedDeposits.unwrap(); + assert.equal(+balance, +updatedBalance, 'proposal deposit should not change'); + assert.sameMembers( + updatedVoters.map((v) => v.toString()), + [ ...voters.map((v) => v.toString()), this.accounts.bob.address ], + 'proposal seconders should match' + ); + + await super.after(api); + } +} diff --git a/ts-tests/upgrade-tester/src/tests/identity.ts b/ts-tests/upgrade-tester/src/tests/identity.ts new file mode 100644 index 00000000..0bf59409 --- /dev/null +++ b/ts-tests/upgrade-tester/src/tests/identity.ts @@ -0,0 +1,55 @@ +import { ApiPromise } from '@polkadot/api'; +import { IdentityInfo } from '@polkadot/types/interfaces'; +import { assert } from 'chai'; +import StateTest from '../stateTest'; +import { makeTx } from '../util'; + +export default class extends StateTest { + private _identity: IdentityInfo; + + constructor() { + super('identity test'); + } + + public async before(api: ApiPromise) { + // register an identity + const identityInfo = api.createType('IdentityInfo', { + additional: [], + display: { raw: 'i am test' }, + legal: { none: null }, + web: { none: null }, + riot: { none: null }, + email: { none: null }, + image: { none: null }, + twitter: { none: null }, + }); + + await makeTx(api, api.tx.identity.setIdentity(identityInfo), this.accounts.alice); + const registration = await api.query.identity.identityOf(this.accounts.alice.address); + if (!registration.isSome) { + throw new Error('identity registration not found'); + } + + this._identity = registration.unwrap().info; + await super.before(api); + } + + public async after(api: ApiPromise) { + if (!this._identity) { + throw new Error('stored identity not found'); + } + + // query the identity + const registration = await api.query.identity.identityOf(this.accounts.alice.address); + if (!registration.isSome) { + throw new Error('identity registration not found'); + } + + assert.deepEqual( + registration.unwrap().info.toHuman(), + this._identity.toHuman(), + 'identity should not change', + ); + await super.after(api); + } +} diff --git a/ts-tests/upgrade-tester/src/tests/staking.ts b/ts-tests/upgrade-tester/src/tests/staking.ts new file mode 100644 index 00000000..c302c728 --- /dev/null +++ b/ts-tests/upgrade-tester/src/tests/staking.ts @@ -0,0 +1,65 @@ +import { ApiPromise } from '@polkadot/api'; +import { AccountData, Exposure } from '@polkadot/types/interfaces'; +import { assert } from 'chai'; +import StateTest from '../stateTest'; +import { makeTx } from '../util'; + +export default class extends StateTest { + private _stashBal: AccountData; + private _controllerBal: AccountData; + private _validator: string; + private _exposure: Exposure; + + constructor() { + super('staking test'); + } + + public async before(api: ApiPromise) { + // bob should have a balance to start with + const startingStashBal = await api.query.system.account(this.accounts.bob_stash.address); + assert.isTrue(startingStashBal.data.free.gtn(0), 'bob stash should have balance'); + const startingFree = startingStashBal.data.free; + + // bob should bond half using its stash + await makeTx(api, api.tx.staking.bond( + this.accounts.bob.address, + startingFree.divn(2), + { Staked: true } // reinvest returns + ), this.accounts.bob_stash); + + // nominate all validators from controller (should only be alice) + const validators = await api.query.session.validators(); + this._validator = validators[0].toString(); + await makeTx(api, api.tx.staking.nominate(validators), this.accounts.bob); + + // save balances and staking configurations to test against after upgrade + const stashBal = await api.query.system.account(this.accounts.bob_stash.address); + const controllerBal = await api.query.system.account(this.accounts.bob.address); + this._stashBal = stashBal.data; + this._controllerBal = controllerBal.data; + + const era = await api.query.staking.currentEra(); + this._exposure = await api.query.staking.erasStakers(era.unwrap(), this._validator); + + await super.before(api); + } + + public async after(api: ApiPromise) { + // fetch bonding state and balances after upgrade + const controllerAddress = await api.query.staking.bonded(this.accounts.bob_stash.address); + assert.equal(controllerAddress.toString(), this.accounts.bob.address); + const stashBal = await api.query.system.account(this.accounts.bob_stash.address); + const controllerBal = await api.query.system.account(this.accounts.bob.address); + assert.deepEqual(stashBal.data.toHuman(), this._stashBal.toHuman()); + assert.deepEqual(controllerBal.data.toHuman(), this._controllerBal.toHuman()); + + // fetch validators and exposure + const validators = await api.query.session.validators(); + assert.sameMembers(validators.map((v) => v.toString()), [ this._validator ]); + const era = await api.query.staking.currentEra(); + const exposure = await api.query.staking.erasStakers(era.unwrap(), this._validator); + assert.deepEqual(exposure.toHuman(), this._exposure.toHuman()); + + await super.after(api); + } +} diff --git a/ts-tests/upgrade-tester/src/tests/storage.ts b/ts-tests/upgrade-tester/src/tests/storage.ts new file mode 100644 index 00000000..b243a5aa --- /dev/null +++ b/ts-tests/upgrade-tester/src/tests/storage.ts @@ -0,0 +1,137 @@ +// TODO: +// 1. Check storage items before/after upgrade to see if any have changed +// 2. Check module numbering to ensure none have changed + +import { ApiPromise } from '@polkadot/api'; +import { HttpProvider } from '@polkadot/rpc-provider'; +import { xxhashAsHex } from '@polkadot/util-crypto'; +import { assert } from 'chai'; +import _ from 'underscore'; +import StateTest from '../stateTest'; + +type StoragePrefixMap = { [sec: string]: { name: string, mods: { [mod: string ]: string } } }; + +export default class extends StateTest { + private _pairs: { [k: string]: string }; + private _storageKeys: StoragePrefixMap; + private _modules: { [name: string]: number }; + + constructor() { + super('storage test'); + } + + private async _fetchPairs(): Promise<{ [k: string]: string }> { + // Using http endpoint since substrate's Ws endpoint has a size limit. + // note that this is a "hack" that will only work locally + const provider = new HttpProvider('http://localhost:9933'); + + // fetch storage items and module numbers + const pairs: [string, string][] = await provider.send('state_getPairs', ['0x']); + await provider.disconnect(); + const pairsObj = _.object(pairs); + + // remove manually modified changes (see: forker.ts) + // runtime code + delete pairsObj['0x3a636f6465']; + // Staking.ForceEra + delete pairsObj['0x5f3e4907f716ac89b6347d15ececedcaf7dad0317324aecae8744b87fc95f2f3']; + // System.LastRuntimeUpgrade + delete pairsObj['0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8']; + const sudoKeyHash = xxhashAsHex('Sudo', 128) + xxhashAsHex('Key', 128).slice(2); + delete pairsObj[sudoKeyHash]; + const randomMaterialHash = xxhashAsHex('RandomnessCollectiveFlip', 128) + + xxhashAsHex('RandomMaterial', 128).slice(2); + delete pairsObj[randomMaterialHash]; + return pairsObj; + } + + private async _genStorageKeys(api: ApiPromise): Promise { + const metadata = await api.rpc.state.getMetadata(); + const modules = metadata.asLatest.modules; + const keys = {}; + for (const m of modules) { + if (m.storage.isSome) { + const storage = m.storage.unwrap(); + const prefix = storage.prefix; + const prefixKey = xxhashAsHex(prefix.toString(), 128); + keys[prefixKey] = { name: prefix, mods: { } }; + for (const { name } of storage.items) { + const hash = xxhashAsHex(name.toString(), 128).slice(2); + keys[prefixKey].mods[hash] = name.toString(); + } + } + } + return keys; + } + + private _lookupStorageName(storageMap: StoragePrefixMap, key: string): string { + if (key.length < 66) return key; + // e.g. 0xf68f425cf5645aacb2ae59b51baed90420d49a14a763e1cbc887acd097f92014 + const prefixKey = key.slice(0, 34); + const modKey = key.slice(34, 66); + const suffix = key.slice(66); + const res = storageMap[prefixKey]; + if (!res) return key; + const { name, mods } = res; + const modRes = mods[modKey]; + if (!modRes) return `${name}.${modKey}${suffix ? '.' : ''}${suffix}`; + else return `${name}.${modRes}${suffix ? '.' : ''}${suffix}`; + } + + private async _fetchModules(api: ApiPromise): Promise<{ [name: string]: number }> { + const metadata = await api.rpc.state.getMetadata(); + const modules = {}; + for (const m of metadata.asLatest.modules) { + modules[m.name.toString()] = +m.index; + } + return modules; + } + + public async before(api: ApiPromise) { + this._pairs = await this._fetchPairs(); + this._modules = await this._fetchModules(api); + this._storageKeys = await this._genStorageKeys(api); + await super.before(api); + } + + public async after(api: ApiPromise) { + // most pairs should not change before/after upgrade unless a migration was performed + const newPairs = await this._fetchPairs(); + for (const k of Object.keys(this._pairs)) { + if (!newPairs[k]) { + const name = this._lookupStorageName(this._storageKeys, k); + console.log(`Item removed from storage: ${name} = ${this._pairs[k]}`); + } + } + + const newStorageKeys = await this._genStorageKeys(api); + for (const k of Object.keys(newPairs)) { + const name = this._lookupStorageName(newStorageKeys, k); + if (!this._pairs[k]) { + console.log(`New item in storage: ${name} = ${newPairs[k]}`); + } else if (this._pairs[k] !== newPairs[k]) { + console.log(`Changed item in storage: ${name}`); + console.log(`\tOld: ${this._pairs[k]}`); + console.log(`\tNew: ${newPairs[k]}`); + } + } + + // all common keys of new modules should be the same + const newModules = await this._fetchModules(api); + for (const key of Object.keys(this._modules)) { + if (newModules[key] === undefined) { + console.log(`Module removed: ${key}:${this._modules[key]}.`); + } + } + for (const key of Object.keys(newModules)) { + if (this._modules[key] !== undefined) { + assert.equal(newModules[key], this._modules[key]); + } else { + console.log(`Module added: ${key}:${newModules[key]}.`); + } + } + + // compare updated storage items and module numbers to verify they're the same + await super.after(api); + } +} diff --git a/ts-tests/upgrade-tester/src/tests/treasury.ts b/ts-tests/upgrade-tester/src/tests/treasury.ts new file mode 100644 index 00000000..148722ea --- /dev/null +++ b/ts-tests/upgrade-tester/src/tests/treasury.ts @@ -0,0 +1,42 @@ +import { ApiPromise } from '@polkadot/api'; +import { TreasuryProposal } from '@polkadot/types/interfaces'; +import { assert } from 'chai'; +import StateTest from '../stateTest'; +import { makeTx } from '../util'; + +export default class extends StateTest { + private _proposal: TreasuryProposal; + + constructor() { + super('treasury test'); + } + + public async before(api: ApiPromise) { + // create a treasury proposal + await makeTx(api, api.tx.treasury.proposeSpend('1000000000000', this.accounts.bob.address), this.accounts.alice); + const proposalCount = await api.query.treasury.proposalCount(); + const p = await api.query.treasury.proposals(+proposalCount - 1); + if (!p.isSome) { + throw new Error('treasury proposal not found'); + } + + this._proposal = p.unwrap(); + await super.before(api); + } + + public async after(api: ApiPromise) { + if (!this._proposal) { + throw new Error('saved proposal not found'); + } + + // query the proposal + const proposalCount = await api.query.treasury.proposalCount(); + const p = await api.query.treasury.proposals(+proposalCount - 1); + assert.deepEqual( + this._proposal.toHuman(), + p.toHuman(), + 'treasury proposal should not change', + ); + await super.after(api); + } +} diff --git a/ts-tests/upgrade-tester/src/util.ts b/ts-tests/upgrade-tester/src/util.ts new file mode 100644 index 00000000..0b499589 --- /dev/null +++ b/ts-tests/upgrade-tester/src/util.ts @@ -0,0 +1,41 @@ +import { ApiPromise } from '@polkadot/api'; +import { SubmittableExtrinsic } from '@polkadot/api/types'; +import { DispatchError } from '@polkadot/types/interfaces'; +import { KeyringPair } from '@polkadot/keyring/types'; + +import { factory, formatFilename } from './logging'; +const log = factory.getLogger(formatFilename(__filename)); + +export function makeTx(api: ApiPromise, tx: SubmittableExtrinsic<'promise'>, signer: KeyringPair): Promise { + log.info(`Making tx: ${tx.method.section}::${tx.method.method}`); + return new Promise((resolve, reject) => { + tx.signAndSend(signer, async (status) => { + if (status.isFinalized) { + for (const e of status.events) { + const { data, method, section } = e.event; + if (section === 'system') { + if (method === 'ExtrinsicSuccess') { + resolve(); + } else if (method === 'ExtrinsicFailed') { + const errorData = data[0] as DispatchError; + let errorInfo: string; + if (errorData.isModule) { + const details = api.registry.findMetaError(errorData.asModule.toU8a()); + errorInfo = `${details.section}::${details.name}: ${details.documentation[0]}`; + } else if (errorData.isBadOrigin) { + errorInfo = 'TX Error: invalid sender origin'; + } else if (errorData.isCannotLookup) { + errorInfo = 'TX Error: cannot lookup call'; + } else { + errorInfo = 'TX Error: unknown'; + } + reject(new Error(errorInfo)); + } + } + } + } else if (status.isError) { + reject(new Error(`Failed to submit tx '${tx.method.method}'`)); + } + }); + }); +} diff --git a/ts-tests/upgrade-tester/tsconfig.json b/ts-tests/upgrade-tester/tsconfig.json new file mode 100644 index 00000000..c170bf02 --- /dev/null +++ b/ts-tests/upgrade-tester/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "esnext", + "sourceMap": true, + "moduleResolution": "node", + "module": "commonjs", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "outDir": "./dist/" + }, + "include": [ + "./src" + ], + "exclude": [ + "**/*.spec.ts", + "./node_modules" + ] +} diff --git a/ts-tests/upgrade-tester/yarn.lock b/ts-tests/upgrade-tester/yarn.lock new file mode 100644 index 00000000..759f4687 --- /dev/null +++ b/ts-tests/upgrade-tester/yarn.lock @@ -0,0 +1,2023 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" + integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/helper-validator-identifier@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" + integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + +"@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/runtime@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== + dependencies: + regenerator-runtime "^0.13.4" + +"@edgeware/node-types@^3.1.0-beta.14": + version "3.1.0-beta.14" + resolved "https://registry.yarnpkg.com/@edgeware/node-types/-/node-types-3.1.0-beta.14.tgz#d55b01c5bcc5e5201d74a4259258aece5f3fcc07" + integrity sha512-Iz7nzUnNbAw46aAfVwioceNsaT0DKTJUqrDsILY/7lXCZeclaibyXuHghBkCHRSDnztYxCG/8gfjyHH6+s16rQ== + +"@polkadot/api-derive@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-3.2.4-3.tgz#451ac9906ddf88e55cbc331ac264eddbeb1a757d" + integrity sha512-iNtbFetZsta1SMkGcJWxV1EDB3FrXreXC3w2JhEwZ9BdZV+P8WnLKWP2q96aERlHff2792QbtdNyXtHPLgWprA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/api" "3.2.4-3" + "@polkadot/rpc-core" "3.2.4-3" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + bn.js "^4.11.9" + +"@polkadot/api@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-3.2.4-3.tgz#947508eef3d19a9c527dbf268cde411a14e09118" + integrity sha512-FTtQYtRZ0JLIbvGMlL8U4QDOZI3LxNiKvqDHgao+LJg0d+ZwawWlF6ZOJpJ84mW96dEzRIhhuhY299jQvLpbXA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/api-derive" "3.2.4-3" + "@polkadot/keyring" "^5.2.2" + "@polkadot/metadata" "3.2.4-3" + "@polkadot/rpc-core" "3.2.4-3" + "@polkadot/rpc-provider" "3.2.4-3" + "@polkadot/types" "3.2.4-3" + "@polkadot/types-known" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + bn.js "^4.11.9" + eventemitter3 "^4.0.7" + +"@polkadot/keyring@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-5.2.2.tgz#1b011d9ad96ce142ee21183c2e76cbc0c7c5c39b" + integrity sha512-HZ+CABf0hC1P2ySHN/EP2ldiUa9jKo33Gg5lsOos4MjlsCrqhTB/LBg9dSYVO8Z215wpty7KBHvPYQv4XRXO7Q== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/util" "5.2.2" + "@polkadot/util-crypto" "5.2.2" + +"@polkadot/metadata@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-3.2.4-3.tgz#aeb975d0700ec26f46d27110e9e578fcafc0df0e" + integrity sha512-YgeO2cGNAMEvK+kKS5m9MYnhx7L/D71/fUO96FFJUgKentV3ofxsc6TdSE2B8bnl5jxI5zmlC6UvzMfB72tKjA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/types" "3.2.4-3" + "@polkadot/types-known" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + bn.js "^4.11.9" + +"@polkadot/networks@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-5.2.2.tgz#465fd0984f1a161803c4c605d6931f90ad0b966f" + integrity sha512-rffpQNldyajuGrqNzNsQiGyupFv7TDUZ4Pm1kGAToMipd9IfJQFRs9TxeCvP7qwsWmsAPBe3YN6GHRNtS9TdEg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/rpc-core@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-3.2.4-3.tgz#637175a6b18994788daf5ba62e206947a0e9b79d" + integrity sha512-cK9/ul/4IfzoYExVCONo3ua9YyGCbB3L3tUyDuFfEN6RZj0GtNc558fdMrU2zs1bpRkqElYPoRIY5y6OUsIAKQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/metadata" "3.2.4-3" + "@polkadot/rpc-provider" "3.2.4-3" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + +"@polkadot/rpc-provider@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-3.2.4-3.tgz#592e580d47b471d9f41cd0aa84d347f6ceeb4da7" + integrity sha512-92n/VGFlDK+vj++W9rxoJ0xSKRwBYCHta3hp/adUGYThXGBZWcpkOqtrvXdlKk8bxXWrj+ASUXSXS0QsYqHvlw== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-fetch" "^5.2.2" + "@polkadot/x-ws" "^5.2.2" + bn.js "^4.11.9" + eventemitter3 "^4.0.7" + +"@polkadot/types-known@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-3.2.4-3.tgz#21bcb0e22cdc5386bf80745120674f0bb04d9275" + integrity sha512-FaAmfgrNrRjibm2WfJ/KtO86U3JZLSSJUB52hq3U7HAL52BG0e10qOqXrik2nXM7GrzPXm8pVpiUWjCldJ95YQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/types" "3.2.4-3" + "@polkadot/util" "^5.2.2" + bn.js "^4.11.9" + +"@polkadot/types@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-3.2.4-3.tgz#58006660b9e8e4d2a0d43b4a125621d63999eaa0" + integrity sha512-izRz/Z3KCGl1wpKTJMBZRf/hdSZOX3zks1AUQT4uuuc/k96oQf/JTMZUT1FSxaKZ0r6kVQKHfOeduQfREdQ0zQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/metadata" "3.2.4-3" + "@polkadot/util" "^5.2.2" + "@polkadot/util-crypto" "^5.2.2" + "@polkadot/x-rxjs" "3.2.4-3" + "@types/bn.js" "^4.11.6" + bn.js "^4.11.9" + +"@polkadot/util-crypto@5.2.2", "@polkadot/util-crypto@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-5.2.2.tgz#103d6ccda64c72c2e971028b0ec7e74ffb4acd8c" + integrity sha512-U/QX5cwhFQgd448LVbJRP8IR9UeUNOH//Dv+ZhoCcqLXkVxMotF8BJjRUzkQVrORIlP0miWlwxygb4xzNsYhsw== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/networks" "5.2.2" + "@polkadot/util" "5.2.2" + "@polkadot/wasm-crypto" "^3.1.1" + "@polkadot/x-randomvalues" "5.2.2" + base-x "^3.0.8" + blakejs "^1.1.0" + bn.js "^4.11.9" + create-hash "^1.2.0" + elliptic "^6.5.3" + hash.js "^1.1.7" + js-sha3 "^0.8.0" + scryptsy "^2.1.0" + tweetnacl "^1.0.3" + xxhashjs "^0.2.2" + +"@polkadot/util@5.2.2", "@polkadot/util@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-5.2.2.tgz#c673a8b260fa29eadb4a95748cd675325b22e3b1" + integrity sha512-kUtQ3Jv+9xCMZOoXwFXVv7xHc5idPCIerbXN44406lvB3dF7G4sMUIG6fx2kCuarL+lF4RK8F4o14SpctK3wCA== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/x-textdecoder" "5.2.2" + "@polkadot/x-textencoder" "5.2.2" + "@types/bn.js" "^4.11.6" + bn.js "^4.11.9" + camelcase "^5.3.1" + ip-regex "^4.2.0" + +"@polkadot/wasm-crypto-asmjs@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-3.1.1.tgz#391e1be6f7d65552b09c2e2486d108c379e46dc6" + integrity sha512-7Lt4B/6dwUhb5OAuSes0qMd83TpkngvEpiXTt2ccf/t2OvAXY9msfeJ9as3dI2jvjA9edD//jiejJ0BHJgpuXw== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/wasm-crypto-wasm@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-3.1.1.tgz#94638daa7642e6a9681cb854757d98401913f087" + integrity sha512-KaP1Ojf889ZeXHGPmyFTj0Qxr/jQ4yfpaGiEOCvYKXRYsDsbZKfxcb96PFil/x0yoZswWG3TX2S3hebnAzkmBg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/wasm-crypto@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-3.1.1.tgz#e9ec63204f508541dfda72f0b6b98be40e27de50" + integrity sha512-uApLRojJY9Q7Arji6w9/eOYEu8Pg8dm+zt+640QLzC4KVVCpbdMmrcFAXCZXeOIJwsKveZsNehGUCcG77ypVPg== + dependencies: + "@babel/runtime" "^7.12.5" + "@polkadot/wasm-crypto-asmjs" "^3.1.1" + "@polkadot/wasm-crypto-wasm" "^3.1.1" + +"@polkadot/x-fetch@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-5.2.2.tgz#8e2e39f3872b1ffcc18767282b3afb1786ff938f" + integrity sha512-u1fd8woiE8l6xn9QXpdFhhaYIarShtDJTBgGKH3PFuQVrPjrTT3iA+OIHB4jpM8FFZyPG6rCdk6N9EFp/3neFA== + dependencies: + "@babel/runtime" "^7.12.5" + "@types/node-fetch" "^2.5.7" + node-fetch "^2.6.1" + +"@polkadot/x-randomvalues@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-5.2.2.tgz#c44e5ea967eac347525604dd43500ae2fb6ec418" + integrity sha512-0aJmWUvOil6SC1At5YDHKFAMTUkvKw9IQC9Qxj0WhaDIY3KETgX+dNWNI8qEeoKsgCXMybPzewI5X9IXl7QItQ== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/x-rxjs@3.2.4-3": + version "3.2.4-3" + resolved "https://registry.yarnpkg.com/@polkadot/x-rxjs/-/x-rxjs-3.2.4-3.tgz#7779998f5d7190c77c8493a41701f5cc4c53edc5" + integrity sha512-EJlm1nyXXQCttvjrS3ss9Aq797HoN5jW+mB0yF6YbeH7nfERifiouykVvASa0PSsb6eITBAZDNvJHt6L0a62Ig== + dependencies: + "@babel/runtime" "^7.12.5" + rxjs "^6.6.3" + +"@polkadot/x-textdecoder@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-5.2.2.tgz#0b412c275107485c36c70dffe67f0cfee8f1e786" + integrity sha512-4ca8oJT/CAXh0XqtKykuHLEubZZP+7KINGOd2NUqxrNQRCgc6iClAiNq+HByPJz4WMTIOTyGcbH2CplzB/GHLg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/x-textencoder@5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-5.2.2.tgz#2c58b9093e33ae3628a8feb1d0bcd25e0c25fcb7" + integrity sha512-HInuKv67Jac6aNFxeQtFaEM97mgLB6shqB7oR5Z8cCL2T+xrdbp+cr5/R392QDt/LY6csFp5hw2YkN+42Yrthg== + dependencies: + "@babel/runtime" "^7.12.5" + +"@polkadot/x-ws@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-5.2.2.tgz#71f992a6b7b6677451d37e064134ec42d6ac7268" + integrity sha512-UitnCF7THR/NFhZq26znBhUJUt9bynlX1G6s3gxvtJaibmTVdsAW2ZiBO8GuoR0DiWRPn037QYXBLigQEDaWCw== + dependencies: + "@babel/runtime" "^7.12.5" + "@types/websocket" "^1.0.1" + websocket "^1.0.33" + +"@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== + dependencies: + "@types/node" "*" + +"@types/chai@^4.2.11": + version "4.2.11" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.11.tgz#d3614d6c5f500142358e6ed24e1bf16657536c50" + integrity sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw== + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + +"@types/eslint-visitor-keys@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" + integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== + +"@types/glob@*": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" + integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/json-schema@^7.0.3": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" + integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node-fetch@^2.5.7": + version "2.5.7" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" + integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "14.0.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806" + integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw== + +"@types/rimraf@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.0.tgz#b9d03f090ece263671898d57bb7bb007023ac19f" + integrity sha512-7WhJ0MdpFgYQPXlF4Dx+DhgvlPCfz/x5mHaeDQAKhcenvQP1KCpLQ18JklAqeGMYSAT2PxLpzd0g2/HE7fj7hQ== + dependencies: + "@types/glob" "*" + "@types/node" "*" + +"@types/underscore@^1.10.24": + version "1.10.24" + resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.10.24.tgz#dede004deed3b3f99c4db0bdb9ee21cae25befdd" + integrity sha512-T3NQD8hXNW2sRsSbLNjF/aBo18MyJlbw0lSpQHB/eZZtScPdexN4HSa8cByYwTw9Wy7KuOFr81mlDQcQQaZ79w== + +"@types/websocket@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.1.tgz#039272c196c2c0e4868a0d8a1a27bbb86e9e9138" + integrity sha512-f5WLMpezwVxCLm1xQe/kdPpQIOmL0TXYx2O15VYfYzc7hTIdxiOoOvez+McSIw3b7z/1zGovew9YSL7+h4h7/Q== + dependencies: + "@types/node" "*" + +"@typescript-eslint/eslint-plugin@^3.6.1": + version "3.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.6.1.tgz#5ced8fd2087fbb83a76973dea4a0d39d9cb4a642" + integrity sha512-06lfjo76naNeOMDl+mWG9Fh/a0UHKLGhin+mGaIw72FUMbMGBkdi/FEJmgEDzh4eE73KIYzHWvOCYJ0ak7nrJQ== + dependencies: + "@typescript-eslint/experimental-utils" "3.6.1" + debug "^4.1.1" + functional-red-black-tree "^1.0.1" + regexpp "^3.0.0" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/experimental-utils@3.6.1": + version "3.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.6.1.tgz#b5a2738ebbceb3fa90c5b07d50bb1225403c4a54" + integrity sha512-oS+hihzQE5M84ewXrTlVx7eTgc52eu+sVmG7ayLfOhyZmJ8Unvf3osyFQNADHP26yoThFfbxcibbO0d2FjnYhg== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/types" "3.6.1" + "@typescript-eslint/typescript-estree" "3.6.1" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/parser@^3.6.1": + version "3.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.6.1.tgz#216e8adf4ee9c629f77c985476a2ea07fb80e1dc" + integrity sha512-SLihQU8RMe77YJ/jGTqOt0lMq7k3hlPVfp7v/cxMnXA9T0bQYoMDfTsNgHXpwSJM1Iq2aAJ8WqekxUwGv5F67Q== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "3.6.1" + "@typescript-eslint/types" "3.6.1" + "@typescript-eslint/typescript-estree" "3.6.1" + eslint-visitor-keys "^1.1.0" + +"@typescript-eslint/types@3.6.1": + version "3.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.6.1.tgz#87600fe79a1874235d3cc1cf5c7e1a12eea69eee" + integrity sha512-NPxd5yXG63gx57WDTW1rp0cF3XlNuuFFB5G+Kc48zZ+51ZnQn9yjDEsjTPQ+aWM+V+Z0I4kuTFKjKvgcT1F7xQ== + +"@typescript-eslint/typescript-estree@3.6.1": + version "3.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.6.1.tgz#a5c91fcc5497cce7922ff86bc37d5e5891dcdefa" + integrity sha512-G4XRe/ZbCZkL1fy09DPN3U0mR6SayIv1zSeBNquRFRk7CnVLgkC2ZPj8llEMJg5Y8dJ3T76SvTGtceytniaztQ== + dependencies: + "@typescript-eslint/types" "3.6.1" + "@typescript-eslint/visitor-keys" "3.6.1" + debug "^4.1.1" + glob "^7.1.6" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/visitor-keys@3.6.1": + version "3.6.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.6.1.tgz#5c57a7772f4dd623cfeacc219303e7d46f963b37" + integrity sha512-qC8Olwz5ZyMTZrh4Wl3K4U6tfms0R/mzU4/5W3XeUZptVraGVmbptJbn6h2Ey6Rb3hOs3zWoAUebZk8t47KGiQ== + dependencies: + eslint-visitor-keys "^1.1.0" + +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== + +acorn@^7.2.0: + version "7.3.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd" + integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== + +ajv@^6.10.0, ajv@^6.10.2: + version "6.12.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.3.tgz#18c5af38a111ddeb4f2697bd78d68abc1cabd706" + integrity sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + 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: + 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== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +array-includes@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" + integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0" + is-string "^1.0.5" + +array.prototype.flat@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +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= + +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== + dependencies: + safe-buffer "^5.0.1" + +blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + +bn.js@^4.11.9, bn.js@^4.4.0: + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== + +bn.js@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" + integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +bufferutil@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.2.tgz#79f68631910f6b993d870fc77dc0a2894eb96cd5" + integrity sha512-AtnG3W6M8B2n4xDQ5R+70EXvOpnXsFYg/AK2yTZd+HQ/oxAdz+GI+DvjmhBw3L0ole+LJ0ngqY4JMbDzkfNzhA== + dependencies: + node-gyp-build "^4.2.0" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +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== + +chai@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" + integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== + 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" + type-detect "^4.0.5" + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.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" + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + +cipher-base@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +confusing-browser-globals@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" + integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + +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== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +debug@^2.2.0, 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.0.1, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +deep-is@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +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== + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +elliptic@^6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +error-stack-parser@^1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292" + integrity sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI= + dependencies: + stackframe "^0.3.1" + +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: + version "1.17.6" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" + integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.0" + is-regex "^1.1.0" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +eslint-config-airbnb-base@^14.2.0: + version "14.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.0.tgz#fe89c24b3f9dc8008c9c0d0d88c28f95ed65e9c4" + integrity sha512-Snswd5oC6nJaevs3nZoLSTvGJBvzTfnBqOIArkf3cbyTyq9UD79wOk8s+RiL6bhca0p/eRO6veczhf6A/7Jy8Q== + dependencies: + confusing-browser-globals "^1.0.9" + object.assign "^4.1.0" + object.entries "^1.1.2" + +eslint-import-resolver-node@^0.3.3: + version "0.3.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" + integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-import@^2.22.0: + version "2.22.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz#92f7736fe1fde3e2de77623c838dd992ff5ffb7e" + integrity sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg== + dependencies: + array-includes "^3.1.1" + array.prototype.flat "^1.2.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.3" + eslint-module-utils "^2.6.0" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.1" + read-pkg-up "^2.0.0" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + +eslint-scope@^5.0.0, eslint-scope@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5" + integrity sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.4.0.tgz#4e35a2697e6c1972f9d6ef2b690ad319f80f206f" + integrity sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + eslint-scope "^5.1.0" + eslint-utils "^2.0.0" + eslint-visitor-keys "^1.2.0" + espree "^7.1.0" + esquery "^1.2.0" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash "^4.17.14" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.1.0.tgz#a9c7f18a752056735bf1ba14cb1b70adc3a5ce1c" + integrity sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw== + dependencies: + acorn "^7.2.0" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.2.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.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== + +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + +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== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + +glob-parent@^5.0.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@^7.1.3, glob@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + +graceful-fs@^4.1.2: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.0, 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@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +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== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + 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== + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +import-fresh@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ip-regex@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.2.0.tgz#a03f5eb661d9a154e3973a03de8b23dd0ad6892e" + integrity sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-callable@^1.1.4, is-callable@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" + integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== + +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== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^4.0.0, is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.0.tgz#ece38e389e490df0dc21caea2bd596f987f767ff" + integrity sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw== + dependencies: + has-symbols "^1.0.1" + +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-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-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +isarray@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + 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== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash@^4.17.14, lodash@^4.17.15: + version "4.17.19" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + +mime-types@^2.1.12: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.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" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +mkdirp@^0.5.1: + 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" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +object-inspect@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" + integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== + +object-keys@^1.0.11, 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" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.entries@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.2.tgz#bc73f00acb6b6bb16c203434b10f9a7e797d3add" + integrity sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + has "^1.0.3" + +object.values@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + 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== + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +pathval@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" + integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + +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== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rxjs@^6.6.3: + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@^5.0.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== + +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== + +"semver@2 || 3 || 4 || 5": + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^7.2.1, semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + +sha.js@^2.4.0: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +source-map-support@^0.5.17: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +stack-generator@^1.0.7: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-1.1.0.tgz#36f6a920751a6c10f499a13c32cbb5f51a0b8b25" + integrity sha1-NvapIHUabBD0maE8Msu19RoLiyU= + dependencies: + stackframe "^1.0.2" + +stackframe@^0.3.1, stackframe@~0.3: + version "0.3.1" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4" + integrity sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ= + +stackframe@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.0.tgz#52429492d63c62eb989804c11552e3d22e779303" + integrity sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA== + +stacktrace-gps@^2.4.3: + version "2.4.4" + resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-2.4.4.tgz#69c827e9d6d6f41cf438d7f195e2e3cbfcf28c44" + integrity sha1-acgn6dbW9Bz0ONfxleLjy/zyjEQ= + dependencies: + source-map "0.5.6" + stackframe "~0.3" + +stacktrace-js@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-1.3.1.tgz#67cab2589af5c417b962f7369940277bb3b6a18b" + integrity sha1-Z8qyWJr1xBe5Yvc2mUAne7O2oYs= + dependencies: + error-stack-parser "^1.3.6" + stack-generator "^1.0.7" + stacktrace-gps "^2.4.3" + +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== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string.prototype.trimend@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimstart@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~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== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-json-comments@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +ts-node@^9.0.0: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== + dependencies: + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.8.1, tslib@^1.9.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + +tsutils@^3.17.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" + integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + dependencies: + tslib "^1.8.1" + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + 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.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +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.0.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" + integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typescript-logging@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typescript-logging/-/typescript-logging-1.0.0.tgz#efc42ae828de4a35e1a941234a94e119322b5ad1" + integrity sha512-qeHtadCVKOt6ju4Ts20FgWRdlISditeTuplRlNTA+gFy7ENVK3czZ7YCET7yOZSZVnU00R+hGwls4dZv3+IBSg== + dependencies: + stacktrace-js "1.3.1" + +typescript@^4.0.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== + +underscore@^1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.0.tgz#4814940551fc80587cef7840d1ebb0f16453be97" + integrity sha512-21rQzss/XPMjolTiIezSu3JAjgagXKROtNrYFEOWK109qY1Uv2tVjPTZ1ci2HgvQDA16gHYSthQIJfB+XId/rQ== + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +utf-8-validate@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.3.tgz#3b64e418ad2ff829809025fdfef595eab2f03a27" + integrity sha512-jtJM6fpGv8C1SoH4PtG22pGto6x+Y8uPprW0tw3//gGFhDDTiuksgradgFN6yRayDP4SyZZa6ZMGHLIa17+M8A== + dependencies: + node-gyp-build "^4.2.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +v8-compile-cache@^2.0.3: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" + integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +websocket@^1.0.33: + version "1.0.33" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.33.tgz#407f763fc58e74a3fa41ca3ae5d78d3f5e3b82a5" + integrity sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +xxhashjs@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== + dependencies: + cuint "^0.2.2" + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==