To build and run this project you need to have the following installed on your system:
- Rust (latest stable) – How to install Rust
- Note that
rustfmt
, which is part of the default Rust installation, is a build-time requirement.
- Note that
- PostgreSQL – PostgreSQL Downloads
- IPFS – Installing IPFS
- Profobuf Compiler - Installing Protobuf
Open the terminal and run the following commands:
ipfs init
ipfs daemon
After installing PostgreSQL run the following commands in the terminal:
initdb -D .postgres -E UTF8 --locale=C
pg_ctl -D .postgres -l logfile start
createdb graph-node
Note:
In case of issues, restart the database by deleting it and then starting it again
Navigate to firehose-extract
folder and run the following command in the terminal:
cargo build
Navigate to firehose-fuel
folder and run the following command in the terminal:
./devel/fuelfire/start.sh
Navigate to fuel-graph-node
folder and run the following command in the terminal:
cargo run --bin graph-node -- --config fuel_config.toml --ipfs http://127.0.0.1:5001 --node-id fuel-node-indexer
Navigate to fuel-graph-tooling
folder and run:
pnpm install
pnpm build
To initialize a new Fuel Subgraph, use the provided Subgraph Manifest file subgraph.yaml. Navigate to the Subgraph folder and execute the following commands:
./../fuel-graph-tooling/packages/cli/bin/run codegen
./../fuel-graph-tooling/packages/cli/bin/run build
./../fuel-graph-tooling/packages/cli/bin/run create my/new_sub --node http://localhost:8020/
./../fuel-graph-tooling/packages/cli/bin/run deploy -l v0.1.0 --node http://localhost:8020/ --ipfs http://localhost:5001 my/new_sub deploy -l v0.1.0 --node http://localhost:8020/ --ipfs http://localhost:5001 my/new_sub
For more information on initializing a subgraph, you can refer to The Graph documentation.
The primary license for this repo is Apache 2.0
, see LICENSE
.