Skip to content

Commit 3f3f2a0

Browse files
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
1 parent 8aebc1f commit 3f3f2a0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ You now have a local graph-node running and can start deploying your changes to
108108
## 🦑 Development on Barge
109109

110110

111-
Clone [barge](https://github.com/oceanprotocol/barge) and run it in another terminal:
111+
1. Clone [barge](https://github.com/oceanprotocol/barge) and run it in another terminal:
112112

113113
```bash
114114
git clone https://github.com/oceanprotocol/barge.git
@@ -118,33 +118,37 @@ cd barge
118118

119119
If you have cloned Barge previously, make sure you are using the latest version by running `git pull`.
120120

121-
Switch back to your main terminal and clone the repo and install dependencies:
121+
2. Switch back to your main terminal and clone the repo and install dependencies:
122122

123123
```bash
124124
git clone https://github.com/oceanprotocol/ocean-subgraph/
125125
cd ocean-subgraph
126126
npm i
127127
```
128128

129-
Let the components know where to pickup the smartcontract addresses:
129+
3. Let the components know where to pickup the smart contract addresses:
130130
```
131131
export ADDRESS_FILE="${HOME}/.ocean/ocean-contracts/artifacts/address.json"
132132
```
133133

134-
Generate the subgraph
134+
4. Generate the subgraph
135135
```bash
136136
npm run bargesetup
137137
```
138138

139-
To deploy a subgraph connected to Barge, use:
139+
5. To deploy a subgraph connected to Barge, use:
140140

141141
```bash
142142
npm run create:local-barge
143143
npm run deploy:local-barge
144144
```
145145

146+
- 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.
147+
146148
You now have a local graph-node running on http://localhost:9000
147149

150+
151+
148152
## 🧪 Testing
149153

150154
- Please note: the `npm run test` command is currently not working due to [this issue](https://github.com/graphprotocol/graph-ts/issues/113).

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.1.1",
44
"scripts": {
55
"start": "",
6+
"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",
67
"bargesetup": "node ./scripts/generatebargesubgraph.js",
78
"create": "graph create oceanprotocol/ocean-subgraph --node https://api.thegraph.com/deploy/",
89
"create:local": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020",

0 commit comments

Comments
 (0)