Skip to content

Commit

Permalink
Merge pull request #129 from ArseniiPetrovich/readme
Browse files Browse the repository at this point in the history
Update documentation: clarify the way of using the commands listed at readme for docker-based installations
  • Loading branch information
akolotov committed Dec 28, 2018
2 parents e945538 + 8a9b3f4 commit e4fb533
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ There are two options to run the nodejs oracle:

- While running the bridge containers for the first time use `VALIDATOR_ADDRESS=<validator address> VALIDATOR_ADDRESS_PRIVATE_KEY=<validator address private key> docker-compose up -d --build`
- For further launches use `VALIDATOR_ADDRESS=<validator address> VALIDATOR_ADDRESS_PRIVATE_KEY=<validator address private key> docker-compose up --detach`
- If you want to use any command from this document, prefix it with `docker-compose exec bridge_affirmation`, if not already prefixed, to execute command inside on of the running docker containers. Make sure bridge service is started before using the commands.

### NPM

Expand All @@ -170,12 +171,11 @@ Execute this command in the bridge root directory:
```shell
bash ./reset-lastBlock.sh <watcher> <block num>
```
or
for NPM installation or
```shell
docker-compose exec bridge_affirmation bash ./reset-lastBlock.sh <watcher> <block num>
```

where the _watcher_ could be one of:
for docker installation respectively, where the _watcher_ could be one of:

- `signature-request`
- `collected-signatures`
Expand Down Expand Up @@ -244,13 +244,15 @@ npm test

See the [E2E README](/e2e) for instructions.

*Notice*: for docker-based installations do not forget to add `docker-compose exec bridge_affirmation` before the test commands listed below.

### Native-to-ERC20 Mode Testing

When running the processes, the following commands can be used to test functionality.

- To send deposits to a home contract run `node scripts/native_to_erc20/sendHome.js <tx num>` (or `docker-compose exec bridge_affirmation node scripts/native_to_erc20/sendHome.js <tx num>`), where `<tx num>` is how many tx will be sent out to deposit.
- To send deposits to a home contract run `node scripts/native_to_erc20/sendHome.js <tx num>`, where `<tx num>` is how many tx will be sent out to deposit.

- To send withdrawals to a foreign contract run `node scripts/native_to_erc20/sendForeign.js <tx num>` (or `docker-compose exec bridge_affirmation node scripts/native_to_erc20/sendForeign.js <tx num>`), where `<tx num>` is how many tx will be sent out to withdraw.
- To send withdrawals to a foreign contract run `node scripts/native_to_erc20/sendForeign.js <tx num>`, where `<tx num>` is how many tx will be sent out to withdraw.

### ERC20-to-ERC20 Mode Testing

Expand All @@ -264,7 +266,6 @@ When running the processes, the following commands can be used to test functiona

- To make withdrawal to Home from a Foreign contract run `node scripts/erc20_to_native/sendHome.js <tx num>`.


### Configuration parameters for testing

| Variable | Description |
Expand Down

0 comments on commit e4fb533

Please sign in to comment.