From 3f3f2a09a7d27cef4bf5b27550eb527e946469c6 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 12 May 2021 18:10:30 +0300 Subject: [PATCH] adding a new command for quickly starting on barge (#114) * adding a new command for quickly starting on barge * Updating readme with new quickstart:barge command --- README.md | 14 +++++++++----- package.json | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3920cf1..6201123 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ You now have a local graph-node running and can start deploying your changes to ## 🦑 Development on Barge -Clone [barge](https://github.com/oceanprotocol/barge) and run it in another terminal: +1. Clone [barge](https://github.com/oceanprotocol/barge) and run it in another terminal: ```bash git clone https://github.com/oceanprotocol/barge.git @@ -118,7 +118,7 @@ cd barge If you have cloned Barge previously, make sure you are using the latest version by running `git pull`. -Switch back to your main terminal and clone the repo and install dependencies: +2. Switch back to your main terminal and clone the repo and install dependencies: ```bash git clone https://github.com/oceanprotocol/ocean-subgraph/ @@ -126,25 +126,29 @@ cd ocean-subgraph npm i ``` -Let the components know where to pickup the smartcontract addresses: +3. Let the components know where to pickup the smart contract addresses: ``` export ADDRESS_FILE="${HOME}/.ocean/ocean-contracts/artifacts/address.json" ``` -Generate the subgraph +4. Generate the subgraph ```bash npm run bargesetup ``` -To deploy a subgraph connected to Barge, use: +5. To deploy a subgraph connected to Barge, use: ```bash npm run create:local-barge npm run deploy:local-barge ``` +- Alternatively, if you want to get the sub-graph quickly running on barge, you can run `npm run quickstart:barge` which combines steps 3-5 above. + You now have a local graph-node running on http://localhost:9000 + + ## 🧪 Testing - Please note: the `npm run test` command is currently not working due to [this issue](https://github.com/graphprotocol/graph-ts/issues/113). diff --git a/package.json b/package.json index fbd9226..941c285 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.1.1", "scripts": { "start": "", + "quickstart:barge": "export ADDRESS_FILE=\"${HOME}/.ocean/ocean-contracts/artifacts/address.json\" && npm run codegen && npm run bargesetup && npm run create:local-barge && npm run deploy:local-barge", "bargesetup": "node ./scripts/generatebargesubgraph.js", "create": "graph create oceanprotocol/ocean-subgraph --node https://api.thegraph.com/deploy/", "create:local": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",