Skip to content

Commit fbe9b88

Browse files
docs: run the project
1 parent bd4a24f commit fbe9b88

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,45 @@ SubQuery allows every Substrate/Polkadot team to process and query their data. T
77

88
SubQuery aims to support all Substrate-compatible networks.
99

10+
11+
### Run project
12+
The first, you need to create sample project with command: `subql init sample`
13+
14+
Then go to sample project directory and run `yarn install` to install all dependencies
15+
16+
After installation, change your project.yaml file, here is an example:
17+
18+
```yaml
19+
specVersion: 0.2.0
20+
name: sample
21+
version: 0.0.4
22+
description: Cuong
23+
repository: https://github.com/subquery/subql-starter
24+
schema:
25+
file: /Users/trancuong/Sotatek/SubQuery/sample/schema.graphql
26+
network:
27+
endpoint: wss://polkadot.api.onfinality.io/public-ws
28+
genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'
29+
dataSources:
30+
- kind: solana/Runtime
31+
startBlock: 97497290
32+
mapping:
33+
file: ./dist/index.js
34+
handlers:
35+
- handler: handleBlock
36+
kind: solana/BlockHandler
37+
```
38+
39+
After that, you can run `yarn codegen && yarn build` to build the sample project
40+
41+
Then go to `subql` project, in root path of the project, run the following command:
42+
```shell
43+
yarn install
44+
cd packages/types-solana && yarn build
45+
cd ../common-solana && yarn build
46+
cd ../node-solana && yarn build
47+
```
48+
1049
## Get Started
1150
#### Installation
1251
```shell

0 commit comments

Comments
 (0)