diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ffc6989 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "aleph-node"] + path = aleph-node + url = git@github.com:bright/aleph-node.git diff --git a/README.md b/README.md index c90e2f7..01d654f 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,15 @@ This project is a dApp for raising and solving the disputes on the Substrate-bas ## Prerequisites 1. `cargo-contract 3.0.1` 2. `ink-wrapper 0.5.0` -2. `rustc-1.69` +3. `rustc-1.69` ## Build (manually) +Before building a smart contract we need to download submodules: +``` +git submodule update --init --recursive +``` + +### Building smart contract To build a smart contract locally we can run: ``` cargo contract build --release --manifest-path contract/Cargo.toml @@ -19,6 +25,9 @@ contract/target/ink/bright_disputes.contract ``` and they can be deployed on the node. +### Building CLI +Follow the instructions from the [README](https://github.com/bright/bright-disputes/blob/main/cli/README.md). file. + ## Build (docker) Smart contract can be build with the Docker: ``` @@ -29,7 +38,7 @@ This will export *bright_disputes.json*, *bright_disputes.wasm*, *bright_dispute ## Build (script) The last way to build and run Bright Disputes is to use a script. We simplify the whole process, by providing a `scripts/deploy.sh` script. It will starts aleph node, building and deploying smart contract on it. Script will also pre-fund [accounts](https://github.com/bright/bright-disputes/blob/main/doc/accounts), which can be used to play/test with the smart contract. More details can be found in the [showcase](https://github.com/bright/bright-disputes/blob/main/doc/README.md). Script is using three docker images: * disputes-node - is an image of the aleph node, where our smart contract is going to be deployed -* disputes-cliain - is an image of `cliain` tool, which is a wrapper over `substrate-api-client` library. It simplify calls over Substrate chain extrinsic. +* disputes-cliain - is a image of `cliain` tool, which is a wrapper over `substrate-api-client` library. It simplify calls over Substrate chain extrinsic. * disputes-ink-dev - this image contains environment for building a smart contract To run a script just type: diff --git a/aleph-node b/aleph-node new file mode 160000 index 0000000..3cbc486 --- /dev/null +++ b/aleph-node @@ -0,0 +1 @@ +Subproject commit 3cbc4869b2df3a45f1fbfe85a5ca5a4e7ce0347e diff --git a/cli/Cargo.lock b/cli/Cargo.lock new file mode 100644 index 0000000..43dd3bd --- /dev/null +++ b/cli/Cargo.lock @@ -0,0 +1,4323 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + +[[package]] +name = "aleph_client" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d2d807a96c85cdcdf03fb61888f7d023504a719538b54fe05790ee29fca917" +dependencies = [ + "anyhow", + "async-trait", + "contract-transcode", + "futures", + "hex", + "ink_metadata", + "log", + "pallet-contracts-primitives", + "parity-scale-codec", + "serde", + "serde_json", + "subxt", + "thiserror", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" + +[[package]] +name = "ark-bls12-381" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65be532f9dd1e98ad0150b037276cde464c6f371059e6dd02c0222395761f6aa" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-crypto-primitives" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff773c0ef8c655c98071d3026a63950798a66b2f45baef22d8334c1756f1bd18" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-nonnative-field", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "blake2 0.9.2", + "derivative", + "digest 0.9.0", + "tracing", +] + +[[package]] +name = "ark-ec" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea978406c4b1ca13c2db2373b05cc55429c3575b8b21f1b9ee859aa5b03dd42" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b7ada17db3854f5994e74e60b18e10e818594935ee7e1d329800c117b32970" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-r1cs-std", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-gm17" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94713045868e99a606a89825ff5a901667ba707ad1966a32c7f3a4d4dbcc0e9a" +dependencies = [ + "ark-crypto-primitives", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-relations", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-groth16" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f8fff7468e947130b5caf9bdd27de8b913cf30e15104b4f0cd301726b3d897" +dependencies = [ + "ark-crypto-primitives", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-relations", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-marlin" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa8510faa8e64f0a6841ee4b58efe2d56f7a80d86fa0ce9891bbb3aa20166d9" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-poly-commit", + "ark-relations", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.9.0", + "rand_chacha 0.3.1", +] + +[[package]] +name = "ark-nonnative-field" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440ad4569974910adbeb84422b7e622b79e08d27142afd113785b7fcfb446186" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-std", + "derivative", + "num-bigint", + "num-integer", + "num-traits", + "tracing", +] + +[[package]] +name = "ark-poly" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0f78f47537c2f15706db7e98fe64cc1711dbf9def81218194e17239e53e5aa" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.11.2", +] + +[[package]] +name = "ark-poly-commit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a71ddfa72bad1446cab7bbecb6018dbbdc9abcbc3a0065483ae5186ad2a64dcd" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-nonnative-field", + "ark-poly", + "ark-relations", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.9.0", + "tracing", +] + +[[package]] +name = "ark-r1cs-std" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e8fdacb1931f238a0d866ced1e916a49d36de832fd8b83dc916b718ae72893" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-relations", + "ark-std", + "derivative", + "num-bigint", + "num-traits", + "tracing", +] + +[[package]] +name = "ark-relations" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cba4c1c99792a6834bd97f7fd76578ec2cd58d2afc5139a17e1d1bec65b38f6" +dependencies = [ + "ark-ff", + "ark-std", + "tracing", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd4e5f0bf8285d5ed538d27fab7411f3e297908fd93c62195de8bee3f199e82" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-snark" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc3dff1a5f67a9c0b34df32b079752d8dd17f1e9d06253da0453db6c1b7cc8a" +dependencies = [ + "ark-ff", + "ark-relations", + "ark-std", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "async-lock" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "bright_disputes_cli" +version = "0.1.0" +dependencies = [ + "aleph_client", + "anyhow", + "clap", + "ink-wrapper-types", + "ink_primitives", + "inquire", + "liminal-ark-relations", + "parity-scale-codec", + "proc-macro2", + "serde", + "serde_json", + "tokio", + "tracing", + "tracing-subscriber 0.3.17", +] + +[[package]] +name = "brownstone" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030ea61398f34f1395ccbeb046fb68c87b631d1f34567fed0f0f11fa35d18d8d" +dependencies = [ + "arrayvec 0.7.4", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "winapi", +] + +[[package]] +name = "clap" +version = "4.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "contract-metadata" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6aa9a99669a8f4eba55782175659dbb20459698c5a65a9f3efe7b9330dd667b" +dependencies = [ + "anyhow", + "impl-serde", + "semver 1.0.17", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "contract-transcode" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e3806efabf4c29f2aeff708e076cac60609ee6c5897299f163355b1cec242c" +dependencies = [ + "anyhow", + "base58", + "blake2 0.10.6", + "contract-metadata", + "escape8259", + "hex", + "indexmap 1.9.3", + "ink_env", + "ink_metadata", + "itertools", + "nom", + "nom-supreme", + "parity-scale-codec", + "primitive-types", + "scale-info", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +dependencies = [ + "libc", +] + +[[package]] +name = "crossterm" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +dependencies = [ + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dyn-clone" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" + +[[package]] +name = "ed25519-zebra" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "escape8259" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba4f4911e3666fcd7826997b4745c8224295a6f3072f1418c3067b97a67557ee" +dependencies = [ + "rustversion", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "frame-metadata" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "h2" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[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" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.1", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array 0.14.7", + "hmac 0.8.1", +] + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +dependencies = [ + "http", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "webpki-roots", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indent_write" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "ink-wrapper-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1066bf287565fb7a80da556ca2021c2cd082acd9e47cc32a198f2ad53accd9e0" +dependencies = [ + "aleph_client", + "anyhow", + "async-trait", + "ink_primitives", + "pallet-contracts-primitives", + "parity-scale-codec", + "subxt", +] + +[[package]] +name = "ink_allocator" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cb3178f207f6a37c3512142c8c6c2561a2aac61d60baa934d08d1e55a67d4a8" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_engine" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9abc50b932893113e782761ac719c46214ecd10c423a3f626dce30a0c61b45" +dependencies = [ + "blake2 0.10.6", + "derive_more", + "ink_primitives", + "parity-scale-codec", + "secp256k1 0.27.0", + "sha2 0.10.7", + "sha3", +] + +[[package]] +name = "ink_env" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef653137381ff5f37ce2ff9130d11dd1b25f6e9734d97d687c3b953dee4d14f" +dependencies = [ + "arrayref", + "blake2 0.10.6", + "cfg-if", + "derive_more", + "ink_allocator", + "ink_engine", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "num-traits", + "parity-scale-codec", + "paste", + "rlibc", + "scale-decode 0.5.0", + "scale-encode", + "scale-info", + "secp256k1 0.27.0", + "sha2 0.10.7", + "sha3", + "static_assertions", +] + +[[package]] +name = "ink_metadata" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fb2b5ad83f725a6d0c8886ca737964d0013a193ca2d21c7e514fd427672416" +dependencies = [ + "derive_more", + "impl-serde", + "ink_prelude", + "ink_primitives", + "scale-info", + "serde", +] + +[[package]] +name = "ink_prelude" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6f174d742ff929abe66716ad8159f324441b4ff5161a3b0e282f416afbbac1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_primitives" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b4e4772e1b9384233103c1f488df9854d24b3c16168bcf23613b7d98fb363f" +dependencies = [ + "derive_more", + "ink_prelude", + "parity-scale-codec", + "scale-decode 0.5.0", + "scale-encode", + "scale-info", + "xxhash-rust", +] + +[[package]] +name = "ink_storage_traits" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4179f00b052e5955ab7535c1a69042a468771217e9db6a12de2cdbfcb03c861" +dependencies = [ + "ink_metadata", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "inquire" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33e7c1ddeb15c9abcbfef6029d8e29f69b52b6d6c891031b88ed91b5065803b" +dependencies = [ + "bitflags 1.3.2", + "crossterm", + "dyn-clone", + "lazy_static", + "newline-converter", + "thiserror", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" + +[[package]] +name = "joinery" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72167d68f5fce3b8655487b8038691a3c9984ee769590f93f2a631f4ad64e4f5" + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpsee" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-types", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +dependencies = [ + "futures-util", + "http", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "webpki-roots", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" +dependencies = [ + "anyhow", + "async-lock", + "async-trait", + "beef", + "futures-channel", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "libm" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + +[[package]] +name = "libsecp256k1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +dependencies = [ + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "liminal-ark-pnbr-poseidon-parameters" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8723da56ab98f2182cbd27b9c510ca3c7f7bd616a56ca0e6b8f1b4bbc2c5f2ee" +dependencies = [ + "anyhow", + "ark-ff", + "num-integer", +] + +[[package]] +name = "liminal-ark-pnbr-poseidon-permutation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0419b780a13b09a1ed2db09c6c61752f24e5f341f77a93719cd8bc963b72d3" +dependencies = [ + "ark-ff", + "ark-std", + "liminal-ark-pnbr-poseidon-parameters", +] + +[[package]] +name = "liminal-ark-pnbr-sponge" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6c178b0470950ac7fb73646df0f6ef60452d7b0fb0819e41dbe66674abc622f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-nonnative-field", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.9.0", + "rand_chacha 0.3.1", + "tracing", +] + +[[package]] +name = "liminal-ark-poseidon" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ff555fb3914d246c1d478b66d248d4e59daac3784f05c24a707a55d9a6bd2b" +dependencies = [ + "ark-bls12-381", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "liminal-ark-pnbr-poseidon-parameters", + "liminal-ark-pnbr-poseidon-permutation", + "liminal-ark-pnbr-sponge", + "paste", +] + +[[package]] +name = "liminal-ark-relation-macro" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fffc8341caed7e6993016cce8f08cb47a13117cc54b1bf0df6c739536d690f4" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "liminal-ark-relations" +version = "0.4.0" +dependencies = [ + "ark-bls12-381", + "ark-crypto-primitives", + "ark-ec", + "ark-ed-on-bls12-381", + "ark-ff", + "ark-gm17", + "ark-groth16", + "ark-marlin", + "ark-poly", + "ark-poly-commit", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "blake2 0.9.2", + "liminal-ark-poseidon", + "liminal-ark-relation-macro", + "paste", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "lru" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memory-db" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" +dependencies = [ + "hash-db", + "hashbrown 0.12.3", + "parity-util-mem", +] + +[[package]] +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "newline-converter" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f71d09d5c87634207f894c6b31b6a2b2c64ea3bdcf71bd5599fdbbe1600c00f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nom-supreme" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f909b25a8371ad5c054abc2c48205d677231e6a2dcbf83704ed57bb147f30e0" +dependencies = [ + "brownstone", + "indent_write", + "joinery", + "memchr", + "nom", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec 0.7.4", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pallet-contracts-primitives" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fd2f159dc7cc71def8ac684fa4938b2a66ef158436d3c7ab4aa6b69390d562" +dependencies = [ + "bitflags 1.3.2", + "parity-scale-codec", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "756d439303e94fae44f288ba881ad29670c65b0c4b0e05674ca81061bb65f2c5" +dependencies = [ + "arrayvec 0.7.4", + "bitvec", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d884d78fcf214d70b1e239fcd1c6e5e95aa3be1881918da2e488cc946c7a476" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parity-util-mem" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" +dependencies = [ + "cfg-if", + "hashbrown 0.12.3", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "parking_lot", + "primitive-types", + "winapi", +] + +[[package]] +name = "parity-util-mem-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" +dependencies = [ + "proc-macro2", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" + +[[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]] +name = "pbkdf2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +dependencies = [ + "crypto-mac 0.11.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pest" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primitive-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.10", +] + +[[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", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "ref-cast" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1641819477c319ef452a075ac34a4be92eb9ba09f6841f62d594d50fdcf0bf6b" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68bf53dad9b6086826722cdc99140793afd9f62faa14a1ad07eb4f955e7a7216" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "regex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.3.2", + "regex-syntax 0.7.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "rlibc" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustls" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +dependencies = [ + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustversion" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" + +[[package]] +name = "ryu" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" + +[[package]] +name = "scale-bits" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "scale-decode" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233" +dependencies = [ + "parity-scale-codec", + "scale-bits", + "scale-info", + "thiserror", +] + +[[package]] +name = "scale-decode" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e5527e4b3bf079d4c0b2f253418598c380722ba37ef20fac9088081407f2b6" +dependencies = [ + "parity-scale-codec", + "scale-bits", + "scale-decode-derive", + "scale-info", + "thiserror", +] + +[[package]] +name = "scale-decode-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38741b2f78e4391b94eac6b102af0f6ea2b0f7fe65adb55d7f4004f507854db" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-encode" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15546e5efbb45f0fc2291f7e202dee8623274c5d8bbfdf9c6886cc8b44a7ced3" +dependencies = [ + "parity-scale-codec", + "scale-encode-derive", + "scale-info", + "thiserror", +] + +[[package]] +name = "scale-encode-derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd983cf0a9effd76138554ead18a6de542d1af175ac12fd5e91836c5c0268082" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-info" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-value" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4" +dependencies = [ + "either", + "frame-metadata", + "parity-scale-codec", + "scale-bits", + "scale-decode 0.4.0", + "scale-info", + "serde", + "thiserror", + "yap", +] + +[[package]] +name = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secp256k1" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +dependencies = [ + "secp256k1-sys 0.6.1", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "serde_json" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b824b6e687aff278cdbf3b36f07aa52d4bd4099699324d5da86a2ebce3aa00b3" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes", + "futures", + "httparse", + "log", + "rand 0.8.5", + "sha-1", +] + +[[package]] +name = "sp-application-crypto" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a70f8245ad75c773c43e46d16e81adb62290d37cd07efcde6cef06d93235e5" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-std", +] + +[[package]] +name = "sp-arithmetic" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3856b3e912f0a7a1332f1642b5fd3c2e76476e894c656538d32c004698690157" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-debug-derive", + "sp-std", + "static_assertions", +] + +[[package]] +name = "sp-core" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88c78530907dbf7949af928d0ce88b485067389201b6d9b468074b1924f209f0" +dependencies = [ + "array-bytes", + "base58", + "bitflags 1.3.2", + "blake2 0.10.6", + "byteorder", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "num-traits", + "parity-scale-codec", + "parking_lot", + "primitive-types", + "rand 0.7.3", + "regex", + "scale-info", + "schnorrkel", + "secp256k1 0.24.3", + "secrecy", + "serde", + "sp-core-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-core-hashing" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b9d1daa6aebfc144729b630885e91df92ff00560490ec065a56cb538e8895a" +dependencies = [ + "blake2 0.10.6", + "byteorder", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "sp-std", + "twox-hash", +] + +[[package]] +name = "sp-debug-derive" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9ba7352773b96a4aa57e903447f841c6bc26e8c798377db6e7eb332346454" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp-externalities" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef739442230f49d88ece41259e5d886d6b8bc0f4197ef7f1585c39c762ce7ef2" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-io" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6280bd3643354f7ff0b2abd36c687745455779231a7a86d90945608f0d4924c4" +dependencies = [ + "bytes", + "futures", + "hash-db", + "libsecp256k1", + "log", + "parity-scale-codec", + "parking_lot", + "secp256k1 0.24.3", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-wasm-interface", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keystore" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44bec4f0d036b6993c14bbee4216781f21275e5c201e43e45fed4a434bf0e5a" +dependencies = [ + "async-trait", + "futures", + "merlin", + "parity-scale-codec", + "parking_lot", + "schnorrkel", + "sp-core", + "sp-externalities", + "thiserror", +] + +[[package]] +name = "sp-panic-handler" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97549ec99cb289db2a9f5c656b6880f7c90097135e1ca6c6ae4fe5694232e526" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + +[[package]] +name = "sp-runtime" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edfc5c54c2b31d2f0cf904d472a0bff7125c0c2a2e2330507842e56f9a27444" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "parity-util-mem", + "paste", + "rand 0.7.3", + "scale-info", + "serde", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-weights", +] + +[[package]] +name = "sp-runtime-interface" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b886a5d34400b0e0c12d389e3bb48b7a93d651cddf7e248124b81fe64c339251" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a157f1ce0108b9b87f87e826726049d9b6253318b74410c814be7fc2af416b51" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp-state-machine" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5c2d97ad69011d34ca257f0383532b80096d53f889f5894ae2b24a211bec66f" +dependencies = [ + "hash-db", + "log", + "num-traits", + "parity-scale-codec", + "parking_lot", + "rand 0.7.3", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", + "thiserror", + "tracing", + "trie-root", +] + +[[package]] +name = "sp-std" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3fd4c1d304be101e6ebbafd3d4be9a37b320c970ef4e8df188b16873981c93" + +[[package]] +name = "sp-storage" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb987ed2e4d7d870170a225083ea962f2a359d75cdf76935d5ed8d91bee912d9" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-tracing" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e761df87dc940d87720939de8f976d1fc0657e523886ae0d7bf3f7e2e2f0abb6" +dependencies = [ + "parity-scale-codec", + "sp-std", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "sp-trie" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4f48c887e90050537e399d2d8b6ee82787ebec0fe46e4880b42cab0c2d5ba6" +dependencies = [ + "ahash", + "hash-db", + "hashbrown 0.12.3", + "lazy_static", + "lru", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot", + "scale-info", + "sp-core", + "sp-std", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-wasm-interface" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f43c40afab6ecac20505907631c929957ed636b7af8795984649bbaa6ff38c3" +dependencies = [ + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std", + "wasmi", +] + +[[package]] +name = "sp-weights" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c671673133b30e6ab6d88139b06adcdaec5aa06548abe0e155a0c830b592793b" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "ss58-registry" +version = "1.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "substrate-bip39" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "schnorrkel", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "subxt" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3cbc78fd36035a24883eada29e0205b9b1416172530a7d00a60c07d0337db0c" +dependencies = [ + "bitvec", + "derivative", + "frame-metadata", + "futures", + "getrandom 0.2.10", + "hex", + "jsonrpsee", + "parity-scale-codec", + "parking_lot", + "scale-decode 0.4.0", + "scale-info", + "scale-value", + "serde", + "serde_json", + "sp-core", + "sp-runtime", + "subxt-macro", + "subxt-metadata", + "thiserror", + "tracing", +] + +[[package]] +name = "subxt-codegen" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7722c31febf55eb300c73d977da5d65cfd6fb443419b1185b9abcdd9925fd7be" +dependencies = [ + "darling", + "frame-metadata", + "heck", + "hex", + "jsonrpsee", + "parity-scale-codec", + "proc-macro-error", + "proc-macro2", + "quote", + "scale-info", + "subxt-metadata", + "syn 1.0.109", + "tokio", +] + +[[package]] +name = "subxt-macro" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f64826f2c4ba20e3b2a86ec81a6ae8655ca6b6a4c2a6ccc888b6615efc2df14" +dependencies = [ + "darling", + "proc-macro-error", + "subxt-codegen", + "syn 1.0.109", +] + +[[package]] +name = "subxt-metadata" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "869af75e23513538ad0af046af4a97b8d684e8d202e35ff4127ee061c1110813" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-core", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "thiserror" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +dependencies = [ + "autocfg", + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers 0.0.1", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +dependencies = [ + "matchers 0.1.0", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "trie-db" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +dependencies = [ + "hash-db", + "hashbrown 0.12.3", + "log", + "rustc-hex", + "smallvec", +] + +[[package]] +name = "trie-root" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +dependencies = [ + "hash-db", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "digest 0.10.7", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.25", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wasmi" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +dependencies = [ + "parity-wasm", + "wasmi-validation", + "wasmi_core", +] + +[[package]] +name = "wasmi-validation" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "wasmi_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +dependencies = [ + "downcast-rs", + "libm", + "memory_units", + "num-rational", + "num-traits", +] + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "xxhash-rust" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "735a71d46c4d68d71d4b24d03fdc2b98e38cea81730595801db779c04fe80d70" + +[[package]] +name = "yap" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] diff --git a/cli/Cargo.toml b/cli/Cargo.toml new file mode 100755 index 0000000..6232f4b --- /dev/null +++ b/cli/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "bright_disputes_cli" +version = "0.1.0" +authors = ["Michal Gralinski michal.gralinski@brightinventions.pl"] +edition = "2021" +license = "MIT" +publish = false + +[lib] +name = "bright_disputes" +path = "src/lib.rs" + +[dependencies] +anyhow = "1.0" +inquire = "0.6.2" +clap = { version = "4.0", features = ["derive"] } +scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } +serde = { version = "1.0.171", features = ["derive"] } +serde_json = "1.0.103" +tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] } +tracing = "0.1.37" +tracing-subscriber = { version = "0.3.16", features = ["fmt", "json", "env-filter"] } + +aleph_client = "3.0.0" +ink-wrapper-types = "0.5.0" +ink_primitives = "4.0.1" +liminal-ark-relations = { version = "0.4.0", path = "../aleph-node/relations/ark" } +proc-macro2 = "1.0.66" diff --git a/cli/README.md b/cli/README.md new file mode 100644 index 0000000..1cdefd4 --- /dev/null +++ b/cli/README.md @@ -0,0 +1,49 @@ +# Bright Disputes - CLI +A command line tool for interacting with the Bright Disputes smart contract. + +## Build +Please note, in case of changing Bright Disputes smart contract, it is necessary to generate a safe code: +``` +ink-wrapper -m ../contract/target/ink/bright_disputes.json | rustfmt --edition 2021 > src/bright_disputes_ink.rs +``` + +To build a CLI we need to run: +``` +cargo +nightly-2023-04-19 build --release +``` +we need to use `nightly` version, because `liminal-ark-relations v0.4.0` requires it. + +## Run +By running: +``` +./cli/target/release/bright_disputes_cli +``` +we will get all possible commands: +``` +Usage: bright_disputes_cli [OPTIONS] + +Commands: + set-node Set node address + set-contract Set smart contract address + create-dispute Create new dispute + confirm-defendant Confirms defendant + get-dispute Get dispute + get-dispute-full Get dispute + update-owner-description Update owner description of the dispute + update-defendant-description Update defendant description of the dispute + vote Make a vote (call by juror) + register-as-an-active-juror Register as an active juror in bright disputes + unregister-as-an-active-juror Unregister from being an active juror in bright disputes + confirm-juror-participation Confirms juror participation in the dispute + confirm-judge-participation Confirms judge participation in the dispute + process-dispute-round Process dispute round + distribute-deposit Distribute dispute deposit + help Print this message or the help of the given subcommand(s) + +Options: + --config-path [default: .bright_disputes_config.json] + --node-address [default: ws://127.0.0.1:9944] + --contract-address + -h, --help Print help +``` +More details of how to use a CLI, can be found in the [showcase](https://github.com/bright/bright-disputes/blob/main/doc/README_CLI.md). diff --git a/cli/src/application.rs b/cli/src/application.rs new file mode 100644 index 0000000..b624f59 --- /dev/null +++ b/cli/src/application.rs @@ -0,0 +1,51 @@ +use std::{fs, fs::File, path::PathBuf, str}; + +use anyhow::{anyhow, Result}; +use serde::{Deserialize, Serialize}; + +/// Application state +#[derive(Deserialize, Serialize)] +pub struct Application { + pub config_path: PathBuf, + pub metadata_path: PathBuf, + pub node_address: String, + pub contract_address: Option, +} + +impl Default for Application { + fn default() -> Self { + Self { + config_path: ".bright_disputes_config.json".into(), + metadata_path: "../contract/target/ink/bright_disputes.json".into(), + node_address: "ws://127.0.0.1:9944".into(), + contract_address: None, + } + } +} + +impl Application { + /// Load or create the application state from 'path' + pub fn load_or_create(path: &PathBuf) -> Result { + if path.exists() { + let content = fs::read(path).map_err(|e| anyhow!("Failed to load file: {e}"))?; + + serde_json::from_slice::(&content) + .map_err(|e| anyhow!("Failed to deserialize: {e}")) + } else { + let app = Application::default(); + Self::save(path, &app)?; + Ok(app) + } + } + + /// Store the application state at 'path' + pub fn save(path: &PathBuf, app: &Application) -> Result<()> { + let content = + serde_json::to_string_pretty(app).map_err(|e| anyhow!("Failed to serialize: {e}"))?; + + if !path.exists() { + File::create(path).map_err(|e| anyhow!("Failed to create {path:?}: {e}"))?; + } + fs::write(path, content).map_err(|e| anyhow!("Failed to save application config: {e}")) + } +} diff --git a/cli/src/bright_disputes.rs b/cli/src/bright_disputes.rs new file mode 100644 index 0000000..76cc752 --- /dev/null +++ b/cli/src/bright_disputes.rs @@ -0,0 +1,257 @@ +use std::fmt::{Display, Formatter}; +use std::path::Path; + +use aleph_client::{contract::ContractInstance, AccountId, SignedConnection}; +use anyhow::{anyhow, Result}; +use ink_wrapper_types::{Connection as _, SignedConnection as _}; + +use crate::{ + bright_disputes_ink::{Dispute, Instance}, + helpers::{account_id_to_string, to_ink_account_id}, +}; + +impl From<&ContractInstance> for Instance { + fn from(contract: &ContractInstance) -> Self { + let account_id = contract.address(); + let ink_account_id = to_ink_account_id(account_id); + ink_account_id.into() + } +} + +impl Display for Dispute { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + let judge = { + if self.judge.is_none() { + "".to_string() + } else { + account_id_to_string(&self.judge.unwrap()) + } + }; + write!( + f, + "{{ \n Dispute: {} \n Owner: {} \n Defendant: {} \n Judge: {} \n Jurors: {:?} \n}}", + self.id, + account_id_to_string(&self.owner), + account_id_to_string(&self.defendant), + judge, + self.juries + .iter() + .map(account_id_to_string) + .collect::>() + ) + } +} + +/// Wraps the bright disputes contract and allows to call it messages. +pub struct BrightDisputes { + contract: ContractInstance, +} + +impl BrightDisputes { + pub fn new(address: &AccountId, metadata_path: &Path) -> Result { + Ok(Self { + contract: ContractInstance::new(address.clone(), metadata_path.to_str().unwrap())?, + }) + } + + /// Calls 'get_dispute' of the contract and returns dispute. + pub async fn get_dispute( + &self, + connection: &SignedConnection, + dispute_id: u32, + ) -> Result { + let ink_contract: Instance = (&self.contract).into(); + + let res = connection + .read(ink_contract.get_dispute(dispute_id)) + .await??; + + match res { + Ok(dispute) => Ok(dispute), + _ => Err(anyhow!("Unable to get dispute!")), + } + } + + /// Calls 'create_dispute' of the contract. If success, return dispute id of newly created dispute. + pub async fn create_dispute( + &self, + connection: &SignedConnection, + owner_link: String, + defendant_id: ink_primitives::AccountId, + escrow: u128, + ) -> Result { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec( + ink_contract + .create_dispute(owner_link, defendant_id, escrow) + .with_value(escrow), + ) + .await?; + + let res = connection + .read(ink_contract.get_last_dispute_id()) + .await??; + Ok(res) + } + + /// Calls 'confirm_defendant' of the contract. + pub async fn confirm_defendant( + &self, + connection: &SignedConnection, + dispute_id: u32, + defendant_link: String, + escrow: u128, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec( + ink_contract + .confirm_defendant(dispute_id, defendant_link) + .with_value(escrow), + ) + .await?; + + Ok(()) + } + + /// Calls 'update_owner_description' of the contract. + pub async fn update_owner_description( + &self, + connection: &SignedConnection, + dispute_id: u32, + owner_link: String, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec(ink_contract.update_owner_description(dispute_id, owner_link)) + .await?; + + Ok(()) + } + + /// Calls 'update_defendant_description' of the contract. + pub async fn update_defendant_description( + &self, + connection: &SignedConnection, + dispute_id: u32, + defendant_link: String, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec(ink_contract.update_defendant_description(dispute_id, defendant_link)) + .await?; + + Ok(()) + } + + /// Calls 'vote' of the contract. + pub async fn vote( + &self, + connection: &SignedConnection, + dispute_id: u32, + vote: u8, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection.exec(ink_contract.vote(dispute_id, vote)).await?; + + Ok(()) + } + + /// Calls 'register_as_an_active_juror' of the contract. + pub async fn register_as_an_active_juror(&self, connection: &SignedConnection) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec(ink_contract.register_as_an_active_juror()) + .await?; + + Ok(()) + } + + /// Calls 'unregister_as_an_active_juror' of the contract. + pub async fn unregister_as_an_active_juror(&self, connection: &SignedConnection) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec(ink_contract.unregister_as_an_active_juror()) + .await?; + + Ok(()) + } + + /// Calls 'confirm_juror_participation_in_dispute' of the contract. + pub async fn confirm_juror_participation_in_dispute( + &self, + connection: &SignedConnection, + dispute_id: u32, + escrow: u128, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec( + ink_contract + .confirm_juror_participation_in_dispute(dispute_id) + .with_value(escrow), + ) + .await?; + + Ok(()) + } + + /// Calls 'confirm_judge_participation_in_dispute' of the contract. + pub async fn confirm_judge_participation_in_dispute( + &self, + connection: &SignedConnection, + dispute_id: u32, + escrow: u128, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec( + ink_contract + .confirm_judge_participation_in_dispute(dispute_id) + .with_value(escrow), + ) + .await?; + + Ok(()) + } + + /// Calls 'process_dispute_round' of the contract. + pub async fn process_dispute_round( + &self, + connection: &SignedConnection, + dispute_id: u32, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec(ink_contract.process_dispute_round(dispute_id)) + .await?; + + Ok(()) + } + + /// Calls 'distribute_deposit' of the contract. + pub async fn distribute_deposit( + &self, + connection: &SignedConnection, + dispute_id: u32, + ) -> Result<()> { + let ink_contract: Instance = (&self.contract).into(); + + connection + .exec(ink_contract.distribute_deposit(dispute_id)) + .await?; + + Ok(()) + } +} diff --git a/cli/src/bright_disputes_ink.rs b/cli/src/bright_disputes_ink.rs new file mode 100644 index 0000000..32f5f8a --- /dev/null +++ b/cli/src/bright_disputes_ink.rs @@ -0,0 +1,353 @@ +use scale::Encode as _; + +// This file was auto-generated with ink-wrapper (https://crates.io/crates/ink-wrapper). + +#[allow(dead_code)] +pub const CODE_HASH: [u8; 32] = [ + 63, 230, 117, 175, 231, 131, 179, 199, 172, 28, 123, 137, 34, 122, 220, 202, 41, 180, 72, 87, + 122, 91, 90, 194, 202, 106, 198, 171, 24, 170, 237, 183, +]; + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub struct Vote { + pub juror: ink_primitives::AccountId, + pub vote: u8, +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub struct Dispute { + pub id: u32, + pub state: DisputeState, + pub owner: ink_primitives::AccountId, + pub owner_link: String, + pub escrow: u128, + pub deposit: u128, + pub defendant: ink_primitives::AccountId, + pub defendant_link: Option, + pub dispute_result: Option, + pub dispute_round: Option, + pub dispute_round_counter: u8, + pub judge: Option, + pub juries: Vec, + pub banned: Vec, + pub votes: Vec, +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub enum DisputeState { + Created(), + Running(), + Ended(), + Closed(), +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub enum DisputeResult { + Owner(), + Defendant(), +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub struct DisputeRound { + pub state: RoundState, + pub number_of_juries: u8, + pub state_deadline: u64, +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub enum RoundState { + AssignJuriesAndJudge(), + PickingJuriesAndJudge(), + Voting(), + CountingTheVotes(), +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub enum BrightDisputesError { + DisputeNotExist(), + NotAuthorized(), + InvalidDisputeState(), + InvalidAction(), + InvalidEscrowAmount(), + JurorAlreadyVoted(), + JurorAlreadyAdded(), + JurorAlreadyRegistered(), + JurorAlreadyAssignedToDispute(), + JurorIsNotAssignedToDispute(), + JurorAlreadyConfirmedDispute(), + JurorInvalidState(), + JurorNotExist(), + JuriesPoolIsToSmall(), + JuriesNotVoted(Vec), + JudgeAlreadyAssignedToDispute(), + DisputeRoundDeadlineReached(), + DisputeRoundLimitReached(), + DisputeRoundNotStarted(), + WrongDisputeRoundState(), + CanNotSwitchDisputeRound(), + MajorityOfVotesNotReached(), + NotRegisteredAsJuror(), + InkError(), + ChainExtension(BabyLiminalError), +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub enum BabyLiminalError { + IdentifierAlreadyInUse(), + VerificationKeyTooLong(), + StoreKeyErrorUnknown(), + UnknownVerificationKeyIdentifier(), + DeserializingProofFailed(), + DeserializingPublicInputFailed(), + DeserializingVerificationKeyFailed(), + VerificationFailed(), + IncorrectProof(), + VerifyErrorUnknown(), +} + +#[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] +pub struct Extension(); + +pub mod event { + #[allow(dead_code, clippy::large_enum_variant)] + #[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] + pub enum Event { + DisputeRaised { + id: u32, + owner_id: ink_primitives::AccountId, + defendant_id: ink_primitives::AccountId, + }, + + DisputeClosed { + id: u32, + }, + + DefendantConfirmDispute { + id: u32, + defendant_id: ink_primitives::AccountId, + }, + + DisputeResultEvent { + id: u32, + result: super::DisputeResult, + }, + } +} + +#[derive(Debug, Clone, Copy)] +pub struct Instance { + account_id: ink_primitives::AccountId, +} + +impl From for Instance { + fn from(account_id: ink_primitives::AccountId) -> Self { + Self { account_id } + } +} + +impl From for ink_primitives::AccountId { + fn from(instance: Instance) -> Self { + instance.account_id + } +} + +impl ink_wrapper_types::EventSource for Instance { + type Event = event::Event; +} + +impl Instance { + /// Constructor + #[allow(dead_code, clippy::too_many_arguments)] + pub fn new() -> ink_wrapper_types::InstantiateCall { + let data = vec![155, 174, 157, 94]; + ink_wrapper_types::InstantiateCall::new(CODE_HASH, data) + } + + /// Get last dispute id + #[allow(dead_code, clippy::too_many_arguments)] + pub fn get_last_dispute_id( + &self, + ) -> ink_wrapper_types::ReadCall> { + let data = vec![241, 53, 223, 85]; + ink_wrapper_types::ReadCall::new(self.account_id, data) + } + + /// Get single dispute by id + #[allow(dead_code, clippy::too_many_arguments)] + pub fn get_dispute( + &self, + dispute_id: u32, + ) -> ink_wrapper_types::ReadCall< + Result, ink_wrapper_types::InkLangError>, + > { + let data = { + let mut data = vec![76, 253, 140, 199]; + dispute_id.encode_to(&mut data); + data + }; + ink_wrapper_types::ReadCall::new(self.account_id, data) + } + + /// Get all disputes + #[allow(dead_code, clippy::too_many_arguments)] + pub fn get_all_disputes( + &self, + ) -> ink_wrapper_types::ReadCall, ink_wrapper_types::InkLangError>> { + let data = vec![29, 12, 242, 122]; + ink_wrapper_types::ReadCall::new(self.account_id, data) + } + + /// Get single dispute by id + #[allow(dead_code, clippy::too_many_arguments)] + pub fn remove_dispute(&self, dispute_id: u32) -> ink_wrapper_types::ExecCall { + let data = { + let mut data = vec![187, 47, 61, 10]; + dispute_id.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } + + /// Create new dispute + #[allow(dead_code, clippy::too_many_arguments)] + pub fn create_dispute( + &self, + owner_link: String, + defendant_id: ink_primitives::AccountId, + escrow: u128, + ) -> ink_wrapper_types::ExecCallNeedsValue { + let data = { + let mut data = vec![30, 25, 167, 107]; + owner_link.encode_to(&mut data); + defendant_id.encode_to(&mut data); + escrow.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCallNeedsValue::new(self.account_id, data) + } + + /// Defendant confirms his participation in dispute. + #[allow(dead_code, clippy::too_many_arguments)] + pub fn confirm_defendant( + &self, + dispute_id: u32, + defendant_link: String, + ) -> ink_wrapper_types::ExecCallNeedsValue { + let data = { + let mut data = vec![164, 183, 46, 125]; + dispute_id.encode_to(&mut data); + defendant_link.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCallNeedsValue::new(self.account_id, data) + } + + /// Update owner link description + #[allow(dead_code, clippy::too_many_arguments)] + pub fn update_owner_description( + &self, + dispute_id: u32, + owner_link: String, + ) -> ink_wrapper_types::ExecCall { + let data = { + let mut data = vec![68, 73, 200, 222]; + dispute_id.encode_to(&mut data); + owner_link.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } + + /// Update defendant link description + #[allow(dead_code, clippy::too_many_arguments)] + pub fn update_defendant_description( + &self, + dispute_id: u32, + defendant_link: String, + ) -> ink_wrapper_types::ExecCall { + let data = { + let mut data = vec![208, 24, 65, 84]; + dispute_id.encode_to(&mut data); + defendant_link.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } + + /// Voting, only juror can do it. + #[allow(dead_code, clippy::too_many_arguments)] + pub fn vote(&self, dispute_id: u32, vote: u8) -> ink_wrapper_types::ExecCall { + let data = { + let mut data = vec![8, 59, 226, 96]; + dispute_id.encode_to(&mut data); + vote.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } + + /// Register as an active juror. Juries are picked + /// from this pool to participate in disputes. + #[allow(dead_code, clippy::too_many_arguments)] + pub fn register_as_an_active_juror(&self) -> ink_wrapper_types::ExecCall { + let data = vec![80, 47, 210, 239]; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } + + /// Unregister juror from the active juries pool. + #[allow(dead_code, clippy::too_many_arguments)] + pub fn unregister_as_an_active_juror(&self) -> ink_wrapper_types::ExecCall { + let data = vec![217, 7, 103, 12]; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } + + /// Assigned juror can confirm his participation in dispute + #[allow(dead_code, clippy::too_many_arguments)] + pub fn confirm_juror_participation_in_dispute( + &self, + dispute_id: u32, + ) -> ink_wrapper_types::ExecCallNeedsValue { + let data = { + let mut data = vec![141, 200, 7, 55]; + dispute_id.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCallNeedsValue::new(self.account_id, data) + } + + /// Judge can confirm his participation in dispute + #[allow(dead_code, clippy::too_many_arguments)] + pub fn confirm_judge_participation_in_dispute( + &self, + dispute_id: u32, + ) -> ink_wrapper_types::ExecCallNeedsValue { + let data = { + let mut data = vec![178, 215, 24, 15]; + dispute_id.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCallNeedsValue::new(self.account_id, data) + } + + /// Unregister juror from the active juries pool. + #[allow(dead_code, clippy::too_many_arguments)] + pub fn process_dispute_round(&self, dispute_id: u32) -> ink_wrapper_types::ExecCall { + let data = { + let mut data = vec![14, 13, 134, 23]; + dispute_id.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } + + /// Judge can confirm his participation in dispute + #[allow(dead_code, clippy::too_many_arguments)] + pub fn distribute_deposit(&self, dispute_id: u32) -> ink_wrapper_types::ExecCall { + let data = { + let mut data = vec![117, 233, 246, 239]; + dispute_id.encode_to(&mut data); + data + }; + ink_wrapper_types::ExecCall::new(self.account_id, data) + } +} diff --git a/cli/src/config.rs b/cli/src/config.rs new file mode 100644 index 0000000..eb7b9d2 --- /dev/null +++ b/cli/src/config.rs @@ -0,0 +1,98 @@ +use std::path::PathBuf; + +use clap::{Parser, Subcommand}; + +#[derive(Parser)] +pub struct Config { + #[clap(long, default_value = ".bright_disputes_config.json")] + pub config_path: PathBuf, + + #[clap(long, default_value = "ws://127.0.0.1:9944")] + pub node_address: String, + + #[clap(long)] + pub contract_address: Option, + + #[clap(subcommand)] + pub command: Command, +} + +#[derive(Clone, Subcommand)] +pub enum Command { + /// Set node address + SetNode { node_address: String }, + /// Set smart contract address + SetContract { contract_address: String }, + /// Contract command + #[clap(flatten)] + Contract(ContractCmd), +} + +#[derive(Clone, Subcommand)] +pub enum ContractCmd { + /// Create new dispute + CreateDispute { + caller_account: String, + defendant_seed: String, + owner_link: String, + escrow: u128, + }, + /// Confirms defendant + ConfirmDefendant { + caller_account: String, + dispute_id: u32, + defendant_link: String, + }, + /// Get dispute + GetDispute { + caller_account: String, + dispute_id: u32, + }, + /// Get dispute + GetDisputeFull{ + caller_account: String, + dispute_id: u32, + }, + /// Update owner description of the dispute + UpdateOwnerDescription { + caller_account: String, + dispute_id: u32, + owner_link: String, + }, + /// Update defendant description of the dispute + UpdateDefendantDescription { + caller_account: String, + dispute_id: u32, + defendant_link: String, + }, + /// Make a vote (call by juror) + Vote { + caller_account: String, + dispute_id: u32, + vote: u8, + }, + /// Register as an active juror in bright disputes + RegisterAsAnActiveJuror { caller_account: String }, + /// Unregister from being an active juror in bright disputes + UnregisterAsAnActiveJuror { caller_account: String }, + /// Confirms juror participation in the dispute + ConfirmJurorParticipation { + caller_account: String, + dispute_id: u32, + }, + /// Confirms judge participation in the dispute + ConfirmJudgeParticipation { + caller_account: String, + dispute_id: u32, + }, + /// Process dispute round + ProcessDisputeRound { + caller_account: String, + dispute_id: u32, + }, + /// Distribute dispute deposit + DistributeDeposit { + caller_account: String, + dispute_id: u32, + }, +} diff --git a/cli/src/helpers.rs b/cli/src/helpers.rs new file mode 100644 index 0000000..5918aa2 --- /dev/null +++ b/cli/src/helpers.rs @@ -0,0 +1,13 @@ +use aleph_client::{sp_core::crypto::AccountId32, AccountId}; + +pub fn to_ink_account_id(account_id: &AccountId) -> ink_primitives::AccountId { + let inner: [u8; 32] = *account_id.as_ref(); + inner.into() +} + +#[allow(dead_code)] +pub fn account_id_to_string(account_id: &ink_primitives::AccountId) -> String { + let inner: [u8; 32] = *account_id.as_ref(); + let account: AccountId32 = inner.into(); + account.to_string() +} diff --git a/cli/src/lib.rs b/cli/src/lib.rs new file mode 100644 index 0000000..d9f0a9e --- /dev/null +++ b/cli/src/lib.rs @@ -0,0 +1,4 @@ +pub mod application; +pub mod bright_disputes; +pub mod bright_disputes_ink; +pub mod helpers; diff --git a/cli/src/main.rs b/cli/src/main.rs new file mode 100644 index 0000000..269501b --- /dev/null +++ b/cli/src/main.rs @@ -0,0 +1,309 @@ +use aleph_client::{ + account_from_keypair, keypair_from_string, AccountId, Connection, SignedConnection, +}; +use anyhow::{anyhow, Result}; +use bright_disputes::{application::Application, bright_disputes::BrightDisputes}; +use clap::Parser; +use std::str::FromStr; +use std::{env, io}; +extern crate bright_disputes; +use inquire::Text; +use tracing::info; +use tracing_subscriber::EnvFilter; + +use crate::config::{Command::SetNode, ContractCmd}; + +mod config; +mod helpers; +use crate::{ + config::{ + Command, Config, + ContractCmd::{ + ConfirmDefendant, ConfirmJudgeParticipation, ConfirmJurorParticipation, CreateDispute, + DistributeDeposit, GetDispute, GetDisputeFull, ProcessDisputeRound, + RegisterAsAnActiveJuror, UnregisterAsAnActiveJuror, UpdateDefendantDescription, + UpdateOwnerDescription, Vote, + }, + }, + helpers::to_ink_account_id, + Command::{Contract, SetContract}, +}; + +async fn handle_contract_command( + app: &mut Application, + cmd: ContractCmd, +) -> Result<(), Box> { + let contract_address = match app.contract_address.clone() { + Some(contract_address) => contract_address, + None => { + let address = Text::new("Contract address:").prompt()?; + app.contract_address = Some(address.clone()); + address + } + }; + + let connection = Connection::new(&app.node_address).await; + + let contract_address = match AccountId::from_str(&contract_address) { + Ok(address) => address, + _ => return Err("Invalid contract address!".into()), + }; + + let bright_dispute = BrightDisputes::new(&contract_address, &app.metadata_path)?; + + match cmd { + CreateDispute { + caller_account, + defendant_seed, + owner_link, + escrow, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + let defendant_key = keypair_from_string(&defendant_seed); + let defendant_account = account_from_keypair(defendant_key.signer()); + + let dispute_id = bright_dispute + .create_dispute( + &signed_connection, + owner_link, + to_ink_account_id(&defendant_account), + escrow, + ) + .await?; + info!("New dispute created, id: {dispute_id}"); + } + ConfirmDefendant { + caller_account, + dispute_id, + defendant_link, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + let dispute = bright_dispute + .get_dispute(&signed_connection, dispute_id) + .await?; + + bright_dispute + .confirm_defendant( + &signed_connection, + dispute_id, + defendant_link, + dispute.escrow, + ) + .await?; + info!( + "Defendant confirmed his participation in the dispute: {}!", + dispute_id + ); + } + GetDispute { + caller_account, + dispute_id, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + let dispute = bright_dispute + .get_dispute(&signed_connection, dispute_id) + .await?; + info!("{}", dispute); + } + GetDisputeFull { + caller_account, + dispute_id, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + let dispute = bright_dispute + .get_dispute(&signed_connection, dispute_id) + .await?; + info!(?dispute); + } + UpdateOwnerDescription { + caller_account, + dispute_id, + owner_link, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + bright_dispute + .update_owner_description(&signed_connection, dispute_id, owner_link) + .await?; + info!("Updated Owner description link!"); + } + UpdateDefendantDescription { + caller_account, + dispute_id, + defendant_link, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + bright_dispute + .update_defendant_description(&signed_connection, dispute_id, defendant_link) + .await?; + info!("Updated Defendant description link!"); + } + Vote { + caller_account, + dispute_id, + vote, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + bright_dispute + .vote(&signed_connection, dispute_id, vote) + .await?; + info!("Voting succeed!"); + } + RegisterAsAnActiveJuror { caller_account } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + bright_dispute + .register_as_an_active_juror(&signed_connection) + .await?; + info!( + "\"{}\" [{}] has registered for the Active Jurors Pool!", + caller_account, + account.account_id() + ); + } + UnregisterAsAnActiveJuror { caller_account } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + bright_dispute + .unregister_as_an_active_juror(&signed_connection) + .await?; + info!( + "\"{}\" has unregistered from the Active Jurors Pool!", + caller_account + ); + } + ConfirmJurorParticipation { + caller_account, + dispute_id, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + let dispute = bright_dispute + .get_dispute(&signed_connection, dispute_id) + .await?; + + bright_dispute + .confirm_juror_participation_in_dispute( + &signed_connection, + dispute_id, + dispute.escrow, + ) + .await?; + info!( + "Juror \"{}\", has confirmed his participation in the dispute: {}!", + caller_account, dispute_id + ); + } + ConfirmJudgeParticipation { + caller_account, + dispute_id, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + let dispute = bright_dispute + .get_dispute(&signed_connection, dispute_id) + .await?; + + bright_dispute + .confirm_judge_participation_in_dispute( + &signed_connection, + dispute_id, + dispute.escrow, + ) + .await?; + info!( + "Judge \"{}\", has confirmed his participation in the dispute: {}!", + caller_account, dispute_id + ); + } + ProcessDisputeRound { + caller_account, + dispute_id, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + bright_dispute + .process_dispute_round(&signed_connection, dispute_id) + .await?; + + let dispute = bright_dispute + .get_dispute(&signed_connection, dispute_id) + .await?; + let dispute_state = dispute.dispute_round.unwrap().state; + info!( + "Successfully switched to the next dispute state: {:?}", + dispute_state + ); + } + DistributeDeposit { + caller_account, + dispute_id, + } => { + let account = keypair_from_string(&caller_account); + let signed_connection = SignedConnection::from_connection(connection, account.clone()); + + bright_dispute + .distribute_deposit(&signed_connection, dispute_id) + .await?; + info!("Deposit distributed successfully!"); + } + } + Ok(()) +} + +fn setup_logging() -> Result<()> { + let filter = EnvFilter::new( + env::var("RUST_LOG") + .as_deref() + .unwrap_or("warn,bright_disputes_cli=info"), + ); + + let subscriber = tracing_subscriber::fmt() + .with_writer(io::stdout) + .with_target(false) + .with_env_filter(filter); + subscriber.try_init().map_err(|err| anyhow!(err)) +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + setup_logging()?; + + let config = Config::parse(); + let mut app = Application::load_or_create(&config.config_path)?; + + match config.command.clone() { + SetNode { node_address } => { + app.node_address = node_address.clone(); + info!("Node address set to: {:?}", node_address); + } + SetContract { contract_address } => { + app.contract_address = Some(contract_address.clone()); + info!("Contract address set to: {:?}", contract_address); + } + Contract(cmd) => { + handle_contract_command(&mut app, cmd).await?; + } + } + + Application::save(&config.config_path, &app)?; + Ok(()) +} diff --git a/doc/README.md b/doc/README.md index 7072622..9ecc0f4 100644 --- a/doc/README.md +++ b/doc/README.md @@ -111,7 +111,7 @@ Now is the judge role to count the votes. In our case judge, who is `Juror4`, wi -We can check if the dispute result was set: +Finally we can check the result of the dispute
@@ -125,7 +125,7 @@ The last stage of the dispute process is to split the dispute deposit, by callin * defendant * judge * juries - who where in the majority of the votes -For all juries and judges who haven't fullfil their duties, their escrow will be lost and split to others. The same rule stands for the juries who were in the minority of the votes. +For all juries and judges who have not fulfil their duties, their escrow will be lost and split to others. The same rule stands for the juries who were in the minority of the votes.
diff --git a/doc/README_CLI.md b/doc/README_CLI.md new file mode 100644 index 0000000..c7a4b96 --- /dev/null +++ b/doc/README_CLI.md @@ -0,0 +1,87 @@ +# Bright Disputes - showcase (cli) + +To build and deploy Bright Disputes smart contract we need to run: +``` +bash ../scripts/deploy.sh +``` +This script will do few things: +* run aleph-node +* pre-found accounts: `Owner`, `Defendant`, `Juror1`, `Juror2`, `Juror3`, `Juror4`, `Juror5`, `Juror6`, `Juror7` +* build and deploy `Bright Disputes` smart contract to aleph-node +* build cli + +When the `deploy.sh` script succeed our smart contract will be deployed on the aleph-node. In the output we can find address of where we can find our smart contract: +``` +[2023-08-03 13:21:42] [INFO] Contract address: 5F3bNYZMgeDvqVCnS4sMdWavuyWDwht6yuK8sL2gxc3PP2xg +``` +or we can find it in the file `scripts/addresses.json`. + +Cli allows us to set smart contract address by calling: +``` +../cli/target/release/bright_disputes_cli set-contract 5F3bNYZMgeDvqVCnS4sMdWavuyWDwht6yuK8sL2gxc3PP2xg +``` + +We will start from creating a new dispute, and we are going to use accounts from our script: +``` +../cli/target/release/bright_disputes_cli create-dispute //Owner //Defendant "https://brightinventions.pl/" 100 +``` +The next step is to confirm dispute by the defendant. In our case defendant account is `//Defendant`, so we can call: +``` +../cli/target/release/bright_disputes_cli confirm-defendant //Defendant 1 "https://brightinventions.pl/" +``` +Before we start our dispute, we will need first to register some jurors. Some of them are going to be assigned to our dispute: +``` +../cli/target/release/bright_disputes_cli register-as-an-active-juror //Juror1 +../cli/target/release/bright_disputes_cli register-as-an-active-juror //Juror2 +../cli/target/release/bright_disputes_cli register-as-an-active-juror //Juror3 +../cli/target/release/bright_disputes_cli register-as-an-active-juror //Juror4 +../cli/target/release/bright_disputes_cli register-as-an-active-juror //Juror5 +../cli/target/release/bright_disputes_cli register-as-an-active-juror //Juror6 +../cli/target/release/bright_disputes_cli register-as-an-active-juror //Juror7 +``` +Now we can process with the dispute. As an owner of the dispute we need to call: +``` +../cli/target/release/bright_disputes_cli process-dispute-round //Owner 1 +``` +This call will start a dispute round, which will assign Jurors and the Judge to the dispute. Now they need to confirm their participation in the dispute. We can check which Judge and Jurors were assigned, by calling: +``` +../cli/target/release/bright_disputes_cli get-dispute //Owner 1 +``` +based on the output: +``` +Dispute: 1 +Owner: 5FTyuyEQQZs8tCcPTUFqotkm2SYfDnpefn9FitRgmTHnFDBD +Defendant: 5HpJbr84AqocNWyq4WNAQLNLSNNoXVmqAhvrk8Tq7YX23j6p +Judge: 5GvG1edSDSrAG5HZ21N1BVGEgygpSujAAjuruyfyuCgsgEFr +Jurors: ["5H4SHcV6XVFiGF3QGdKFLES3xwUmN9jFdt5KVNapJtfWPPtT", "5G492oT3GwqTpz4ebV15JHERucL96zEp54TZZSm3ZQHGe9AE","5GjNM6gLeYxeB9aQoPxVVa7H494ijFsHTXTNo9dkNuTyDCeD"] +``` +we can find out which Jurors where picked from the active pool. In our case it was: //Juror4, //Juror5, //Juror6, and //Juror1 as a Judge. Now they need to confirm their participation in the dispute, we can do it by calling: +``` +../cli/target/release/bright_disputes_cli confirm-juror-participation //Juror4 1 +../cli/target/release/bright_disputes_cli confirm-juror-participation //Juror5 1 +../cli/target/release/bright_disputes_cli confirm-juror-participation //Juror6 1 +../cli/target/release/bright_disputes_cli confirm-judge-participation //Juror1 1 +``` +When all Jurors and Judge confirms participation in the dispute, we can proceed with the dispute round: +``` +../cli/target/release/bright_disputes_cli process-dispute-round //Owner 1 +``` +and start a `Voting` phase, where Jurors can vote against one of the parties: +``` +../cli/target/release/bright_disputes_cli vote //Juror4 1 1 +../cli/target/release/bright_disputes_cli vote //Juror5 1 1 +../cli/target/release/bright_disputes_cli vote //Juror6 1 1 +``` +Once again we need to proceed with the dispute round: +``` +../cli/target/release/bright_disputes_cli process-dispute-round //Owner 1 +``` +which moves us to the next phase which is `Counting the Votes`. Now the role of Judge came in, and he need to count the votes: +``` +../cli/target/release/bright_disputes_cli process-dispute-round //Juror1 1 +``` +finally we can finish the dispute and distribute the deposit: +``` +../cli/target/release/bright_disputes_cli distribute-deposit //Owner 1 +``` + diff --git a/docker/Dockerfile b/docker/Dockerfile index 728485a..7237dd5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,15 +22,21 @@ COPY . /bright_dispute/ # RUN rustup update stable RUN rustup install 1.69 RUN rustup default 1.69 +RUN rustup install nightly-2023-04-19 RUN rustup component add rust-src --toolchain 1.69 RUN rustup target add wasm32-unknown-unknown --toolchain 1.69 +RUN cargo +nightly-2023-04-19 install ink-wrapper --locked --force --version 0.5.0 RUN cargo install --force --locked cargo-contract --version 3.0.1 WORKDIR /bright_dispute/contract RUN cargo contract build --release +WORKDIR /bright_dispute/cli +RUN ink-wrapper -m ../contract/target/ink/bright_disputes.json | rustfmt --edition 2021 > src/bright_disputes_ink.rs +RUN cargo +nightly-2023-04-19 build --release + FROM scratch AS export-stage COPY --from=build /bright_dispute/contract/target/ink/bright_disputes.json . COPY --from=build /bright_dispute/contract/target/ink/bright_disputes.wasm . COPY --from=build /bright_dispute/contract/target/ink/bright_disputes.contract . - +COPY --from=build /bright_dispute/cli/target/release/bright_disputes_cli . diff --git a/docker/Dockerfile.ink b/docker/Dockerfile.ink new file mode 100644 index 0000000..40a6de9 --- /dev/null +++ b/docker/Dockerfile.ink @@ -0,0 +1,25 @@ +FROM ubuntu:jammy-20220531 AS build + +RUN apt update && apt install build-essential -y && apt install pkg-config -y +RUN apt install clang curl libssl-dev protobuf-compiler -y +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +RUN apt -y install binaryen + +ENV PATH="/root/.cargo/bin:${PATH}" + +# Setup toolchain +RUN rustup toolchain install 1.69 +RUN rustup target add wasm32-unknown-unknown --toolchain 1.69 +RUN rustup component add rust-src clippy rustfmt --toolchain 1.69 +RUN rustup default 1.69 + +RUN rustup toolchain install nightly-2023-04-16 --target wasm32-unknown-unknown \ + --profile minimal --component rustfmt clippy miri rust-src rustc-dev llvm-tools-preview + +# Install crates +RUN cargo +nightly-2023-04-16 install ink-wrapper --locked --force --version 0.5.0 +RUN cargo install --force --locked cargo-contract --version 3.0.1 + +WORKDIR /code + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 3179c85..73ff962 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -19,15 +19,25 @@ MICHAL=//2 MICHAL_PUBKEY=5H8rhTXiLiXAe9yhnnQrCuz6bvbwrcTddMJa9KfsX9mi26sj ADMIN=//Alice ADMIN_PUBKEY=5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY -OWNER_PUBKEY=5ChhBGUJJLxPk2EJzDN6aeuA7yx7bBBGxgZx5iSr9rMhegrM -DEFENDAT_PUBKEY=5Fhhzf8ZNH2mkP5YddoJ6kj6PfsnB49BxReRopc6CRvqVNrQ -JUROR_1_PUBKEY=5CFysjxm4tWyePnpELf4xG2o3ZvQV5WVdfvcETn552rYA8h9 -JUROR_2_PUBKEY=5DfNSomECQZkpJJPi8CnBt3aFSAcbDJHy48xaqBkkAc5vVYJ -JUROR_3_PUBKEY=5CS8L2eS3sbYUcR6b5cvH93DZWiwCGXH4WJzSwTcHmAZekUj -JUROR_4_PUBKEY=5CSdvQ1mG1j6tsyMib46kFHpwdUqizvWs1NTHGLzQWpNRbrK -JUROR_5_PUBKEY=5CSvSo9vt1eu4d93EobfA6au8bheGLbkTdvATLb9RPVKgu9b -JUROR_6_PUBKEY=5CS1o2oMdptJ2owGABQd8Q2TJXSYnLiQjKMWRGnRnSw36RwP -JUDGE_PUBKEY=5CSdKZuEYAbaH1nB8rbxqJU5PDtgTtCB5pj4abqQAhimdLU1 + +OWNER=//Owner +OWNER_PUBKEY=5FTyuyEQQZs8tCcPTUFqotkm2SYfDnpefn9FitRgmTHnFDBD +DEFENDANT=//Defendant +DEFENDANT_PUBKEY=5HpJbr84AqocNWyq4WNAQLNLSNNoXVmqAhvrk8Tq7YX23j6p +JUROR_1=//Juror1 +JUROR_1_PUBKEY=5GvG1edSDSrAG5HZ21N1BVGEgygpSujAAjuruyfyuCgsgEFr +JUROR_2=//Juror2 +JUROR_2_PUBKEY=5DZyhVcMqnfg78WK8EsUyu3tpLb2peARqVEoieEunsgH2iQb +JUROR_3=//Juror3 +JUROR_3_PUBKEY=5FjEKpjdvNe8SbZjgUaF8qQD3mL9T5k8oCtGozMYkHi2aVCi +JUROR_4=//Juror4 +JUROR_4_PUBKEY=5H4SHcV6XVFiGF3QGdKFLES3xwUmN9jFdt5KVNapJtfWPPtT +JUROR_5=//Juror5 +JUROR_5_PUBKEY=5G492oT3GwqTpz4ebV15JHERucL96zEp54TZZSm3ZQHGe9AE +JUROR_6=//Juror6 +JUROR_6_PUBKEY=5GjNM6gLeYxeB9aQoPxVVa7H494ijFsHTXTNo9dkNuTyDCeD +JUROR_7=//Juror7 +JUROR_7_PUBKEY=5F71WWxPWDKRJt5x4LudQ3k94GCC8WATnRm86FWmvdEYJpnB # tokenomics TOKEN_PER_PERSON=1000 @@ -116,6 +126,17 @@ build() { log_progress "✅ Contract was built" } +build_cli() { + cd "${SCRIPT_DIR}"/.. + docker_ink_dev "cargo +nightly-2023-04-16 build --release --manifest-path cli/Cargo.toml 1>/dev/null" + log_progress "✅ CLI was built" + + cd "${SCRIPT_DIR}"/../cli/ + docker_ink_dev "./target/release/bright_disputes_cli set-contract ${CONTRACT_ADDRESS} 1>/dev/null" + + log_progress "✅ Shielder CLI was set up" +} + random_salt() { hexdump -vn16 -e'4/4 "%08X" 1 "\n"' /dev/urandom } @@ -150,12 +171,18 @@ transfer() { } prefund_users() { - for recipient in "${DAMIAN_PUBKEY}" "${HANS_PUBKEY}" "${MICHAL_PUBKEY}" "${OWNER_PUBKEY}" "${DEFENDAT_PUBKEY}" "${JUROR_1_PUBKEY}" \ - "${JUROR_2_PUBKEY}" "${JUROR_3_PUBKEY}" "${JUROR_4_PUBKEY}" "${JUROR_5_PUBKEY}" "${JUROR_6_PUBKEY}" "${JUDGE_PUBKEY}"; do + for recipient in "${DAMIAN_PUBKEY}" "${HANS_PUBKEY}" "${MICHAL_PUBKEY}" "${OWNER_PUBKEY}" "${DEFENDANT_PUBKEY}" "${JUROR_1_PUBKEY}" \ + "${JUROR_2_PUBKEY}" "${JUROR_3_PUBKEY}" "${JUROR_4_PUBKEY}" "${JUROR_5_PUBKEY}" "${JUROR_6_PUBKEY}" "${JUROR_7_PUBKEY}"; do transfer ${recipient} done } +generate_ink_types() { + docker_ink_dev "ink-wrapper -m contract/target/ink/bright_disputes.json | rustfmt +nightly-2023-04-16 --edition 2021 > cli/src/bright_disputes_ink.rs" + + log_progress "✅ Ink types were generated" +} + # ------------------------------------------------------------------------------------------------------ deploy() { @@ -173,12 +200,18 @@ deploy() { # build contracts build + # generate ink-wrapper types + generate_ink_types + # deploy deploy_contract # store data store_contract_addres + # build cli + build_cli + log_progress "🙌 Deployment successful" } diff --git a/tests/README.md b/tests/README.md index 2042fbe..a91d15e 100644 --- a/tests/README.md +++ b/tests/README.md @@ -8,7 +8,7 @@ cargo install --force --locked cargo-contract --version 3.0.1 Install ink-wrapper ``` -cargo install ink-wrapper --locked --force --version 0.5.0 +cargo +nightly-2023-04-19 install ink-wrapper --locked --force --version 0.5.0 ``` # Build diff --git a/tests/bright_disputes.rs b/tests/bright_disputes.rs index 913d1cd..4a5deef 100644 --- a/tests/bright_disputes.rs +++ b/tests/bright_disputes.rs @@ -4,13 +4,13 @@ use scale::Encode as _; #[allow(dead_code)] pub const CODE_HASH: [u8; 32] = [ - 74, 171, 47, 183, 197, 181, 13, 124, 128, 35, 80, 186, 0, 132, 168, 172, 26, 237, 209, 124, - 143, 150, 217, 23, 239, 111, 34, 83, 70, 21, 47, 9, + 63, 230, 117, 175, 231, 131, 179, 199, 172, 28, 123, 137, 34, 122, 220, 202, 41, 180, 72, 87, + 122, 91, 90, 194, 202, 106, 198, 171, 24, 170, 237, 183, ]; #[derive(Debug, Clone, PartialEq, Eq, scale::Encode, scale::Decode)] pub struct Vote { - pub jure: ink_primitives::AccountId, + pub juror: ink_primitives::AccountId, pub vote: u8, } @@ -69,14 +69,14 @@ pub enum BrightDisputesError { InvalidDisputeState(), InvalidAction(), InvalidEscrowAmount(), - JureAlreadyVoted(), - JureAlreadyAdded(), - JureAlreadyRegistered(), - JureAlreadyAssignedToDispute(), - JureIsNotAssignedToDispute(), - JureAlreadyConfirmedDispute(), - JureInvalidState(), - JureNotExist(), + JurorAlreadyVoted(), + JurorAlreadyAdded(), + JurorAlreadyRegistered(), + JurorAlreadyAssignedToDispute(), + JurorIsNotAssignedToDispute(), + JurorAlreadyConfirmedDispute(), + JurorInvalidState(), + JurorNotExist(), JuriesPoolIsToSmall(), JuriesNotVoted(Vec), JudgeAlreadyAssignedToDispute(), @@ -86,7 +86,7 @@ pub enum BrightDisputesError { WrongDisputeRoundState(), CanNotSwitchDisputeRound(), MajorityOfVotesNotReached(), - NotRegisteredAsJure(), + NotRegisteredAsJuror(), InkError(), ChainExtension(BabyLiminalError), } @@ -280,7 +280,7 @@ impl Instance { ink_wrapper_types::ExecCall::new(self.account_id, data) } - /// Voting, only jure can do it. + /// Voting, only juror can do it. #[allow(dead_code, clippy::too_many_arguments)] pub fn vote(&self, dispute_id: u32, vote: u8) -> ink_wrapper_types::ExecCall { let data = { @@ -292,29 +292,29 @@ impl Instance { ink_wrapper_types::ExecCall::new(self.account_id, data) } - /// Register as an active jure. Juries are picked + /// Register as an active juror. Juries are picked /// from this pool to participate in disputes. #[allow(dead_code, clippy::too_many_arguments)] - pub fn register_as_an_active_jure(&self) -> ink_wrapper_types::ExecCall { - let data = vec![121, 6, 115, 245]; + pub fn register_as_an_active_juror(&self) -> ink_wrapper_types::ExecCall { + let data = vec![80, 47, 210, 239]; ink_wrapper_types::ExecCall::new(self.account_id, data) } - /// Unregister jure from the active juries pool. + /// Unregister juror from the active juries pool. #[allow(dead_code, clippy::too_many_arguments)] - pub fn unregister_as_an_active_jure(&self) -> ink_wrapper_types::ExecCall { - let data = vec![121, 53, 33, 150]; + pub fn unregister_as_an_active_juror(&self) -> ink_wrapper_types::ExecCall { + let data = vec![217, 7, 103, 12]; ink_wrapper_types::ExecCall::new(self.account_id, data) } - /// Assigned jure can confirm his participation in dispute + /// Assigned juror can confirm his participation in dispute #[allow(dead_code, clippy::too_many_arguments)] - pub fn confirm_jure_participation_in_dispute( + pub fn confirm_juror_participation_in_dispute( &self, dispute_id: u32, ) -> ink_wrapper_types::ExecCallNeedsValue { let data = { - let mut data = vec![149, 58, 196, 227]; + let mut data = vec![141, 200, 7, 55]; dispute_id.encode_to(&mut data); data }; @@ -335,7 +335,7 @@ impl Instance { ink_wrapper_types::ExecCallNeedsValue::new(self.account_id, data) } - /// Unregister jure from the active juries pool. + /// Unregister juror from the active juries pool. #[allow(dead_code, clippy::too_many_arguments)] pub fn process_dispute_round(&self, dispute_id: u32) -> ink_wrapper_types::ExecCall { let data = {