1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

document usage with barge and Spree

This commit is contained in:
Matthias Kretschmann 2019-07-22 13:32:26 +02:00
parent 036305c315
commit 30917f890f
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 32 additions and 20 deletions

1
.gitignore vendored
View File

@ -26,3 +26,4 @@ yarn-error.log*
cypress/screenshots cypress/screenshots
cypress/videos cypress/videos
cypress/fixtures/did.txt cypress/fixtures/did.txt
artifacts

View File

@ -22,21 +22,21 @@
If you're a developer and want to contribute to, or want to utilize this marketplace's code in your projects, then keep on reading. If you're a developer and want to contribute to, or want to utilize this marketplace's code in your projects, then keep on reading.
- [🏄 Get Started](#-Get-Started) - [🏄 Get Started](#-get-started)
- [🏖 Remote Ocean: Pacific](#-Remote-Ocean-Pacific) - [🏖 Remote Ocean: Pacific](#-remote-ocean-pacific)
- [🐳 Use with Barge](#-Use-with-Barge) - [🐳 Use with Barge](#-use-with-barge)
- [⛵️ Environment Variables](#-Environment-Variables) - [⛵️ Environment Variables](#-environment-variables)
- [Client](#Client) - [Client](#client)
- [Server](#Server) - [Server](#server)
- [👩‍🔬 Testing](#-Testing) - [👩‍🔬 Testing](#-testing)
- [Unit Tests](#Unit-Tests) - [Unit Tests](#unit-tests)
- [End-to-End Integration Tests](#End-to-End-Integration-Tests) - [End-to-End Integration Tests](#end-to-end-integration-tests)
- [✨ Code Style](#-Code-Style) - [✨ Code Style](#-code-style)
- [🛳 Production](#-Production) - [🛳 Production](#-production)
- [⬆️ Releases](#-Releases) - [⬆️ Releases](#-releases)
- [📜 Changelog](#-Changelog) - [📜 Changelog](#-changelog)
- [🎁 Contributing](#-Contributing) - [🎁 Contributing](#-contributing)
- [🏛 License](#-License) - [🏛 License](#-license)
## 🏄 Get Started ## 🏄 Get Started
@ -68,16 +68,25 @@ By default, the client uses a burner wallet connected to the correct network aut
### 🐳 Use with Barge ### 🐳 Use with Barge
If you prefer to connect to locally running components instead of remote connections to Ocean's Nile network, you can spin up [`barge`](https://github.com/oceanprotocol/barge) and use a local network: If you prefer to connect to locally running components instead of remote connections to Ocean's Nile network, you can spin up [`barge`](https://github.com/oceanprotocol/barge) and use a local Spree network:
```bash ```bash
git clone git@github.com:oceanprotocol/barge.git git clone git@github.com:oceanprotocol/barge.git
cd barge cd barge
./start_ocean.sh --latest --no-pleuston --local-spree-node # startup with local Spree node
./start_ocean.sh --latest --no-pleuston
``` ```
Modify `./client/src/config.ts` or set environment variables to use those local connections. Then set [environment variables](#-environment-variables) to use those local connections.
Finally, you need to copy the generated contract artifacts out of the Docker container. To do this, execute this script in another terminal:
```bash
./scripts/keeper.sh
```
The script will wait for all contracts to be generated in the `keeper-contracts` Docker container, then will copy the artifacts in place.
### ⛵️ Environment Variables ### ⛵️ Environment Variables

View File

@ -5,7 +5,7 @@
RETRY_COUNT=0 RETRY_COUNT=0
COMMAND_STATUS=1 COMMAND_STATUS=1
printf '\n\e[33mWaiting for contracts to be generated...\e[0m\n' printf '\n\e[33mWaiting for contracts to be generated...\e[0m\n'
mkdir -p artifacts mkdir -p artifacts
@ -17,7 +17,7 @@ until [ $COMMAND_STATUS -eq 0 ] || [ $RETRY_COUNT -eq 120 ]; do
(( RETRY_COUNT=RETRY_COUNT+1 )) (( RETRY_COUNT=RETRY_COUNT+1 ))
done done
printf '\e[32mFound new contract artifacts.\e[0m\n' printf '\e[32mFound new contract artifacts.\e[0m\n'
rm -rf ./artifacts/ rm -rf ./artifacts/
@ -27,3 +27,5 @@ if [ $COMMAND_STATUS -ne 0 ]; then
fi fi
docker cp "${keeper_contracts_docker_id}":/keeper-contracts/artifacts/. ./client/node_modules/@oceanprotocol/keeper-contracts/artifacts/ docker cp "${keeper_contracts_docker_id}":/keeper-contracts/artifacts/. ./client/node_modules/@oceanprotocol/keeper-contracts/artifacts/
printf '\e[32m✔ Copied new contract artifacts.\e[0m\n'