Skip to content

Commit

Permalink
Adding CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
mgralinski-bright committed Oct 5, 2023
1 parent ffe68a4 commit c8e1a6b
Show file tree
Hide file tree
Showing 20 changed files with 5,689 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "aleph-node"]
path = aleph-node
url = git@github.com:bright/aleph-node.git
13 changes: 11 additions & 2 deletions README.md
Expand Up @@ -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
Expand All @@ -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:
```
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions aleph-node
Submodule aleph-node added at 3cbc48

0 comments on commit c8e1a6b

Please sign in to comment.