diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..79c1882 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.mov filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md index 2995b60..c230265 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ This project is a dApp for raising and solving the disputes on the Substrate-bas 1. `cargo-contract 3.0.1` 2. `ink-wrapper 0.5.0` 3. `rustc-1.69` +4. `jq` ## Build (manually) Before building a smart contract we need to download submodules: @@ -31,7 +32,7 @@ Follow the instructions from the [README](https://github.com/bright/bright-dispu ## Build (docker) Smart contract can be build with the Docker: ``` -DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile --output artifacts . +DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile --platform=linux/amd64,linux/arm64 --output artifacts . ``` This will export *bright_disputes.json*, *bright_disputes.wasm*, *bright_disputes.contract*, to the *artifacts* directory. diff --git a/doc/README_CLI.md b/doc/README_CLI.md index bd5c353..40e5ae0 100644 --- a/doc/README_CLI.md +++ b/doc/README_CLI.md @@ -16,9 +16,13 @@ When the `deploy.sh` script succeed our smart contract will be deployed on the a ``` or we can find it in the file `scripts/addresses.json`. -Cli allows us to set smart contract address by calling: +CLI allows us to set smart contract address by calling: ``` -../cli/target/release/bright_disputes_cli set-contract 5F3bNYZMgeDvqVCnS4sMdWavuyWDwht6yuK8sL2gxc3PP2xg +../cli/target/release/bright_disputes_cli set-contract 5D9yNgyQMjJ98K3mW3BKY5Rt57eWxyFBwD8jTtCviWTGeyWj +``` +Please note, if you are not on the linux platform you can use `cli.sh` script to run commands as follow: +``` +bash ../scripts/cli.sh "cli/target/release/bright_disputes_cli set-contract 5D9yNgyQMjJ98K3mW3BKY5Rt57eWxyFBwD8jTtCviWTGeyWj" ``` We will start from creating a new dispute, and we are going to use accounts from our script: diff --git a/doc/showcase_cli.mov b/doc/showcase_cli.mov new file mode 100644 index 0000000..447e570 --- /dev/null +++ b/doc/showcase_cli.mov @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4f0243dd540b0d2ec34fc1301a6f740974885cb47f821fb115d9636d9ba48b4 +size 271765651 diff --git a/scripts/cli.sh b/scripts/cli.sh new file mode 100644 index 0000000..18e17b5 --- /dev/null +++ b/scripts/cli.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +export SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) +export INK_DEV_IMAGE="brightinventions/disputes-ink-dev" +docker run --rm \ + -v "${SCRIPT_DIR}/../":/code \ + --network host \ + --entrypoint /bin/sh \ + "${INK_DEV_IMAGE}" \ + -c "cd /code/cli && ${1}"