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 daemonAfter 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-nodeNote: 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 buildNavigate to firehose-fuel folder and run the following command in the terminal:
./devel/fuelfire/start.shNavigate 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-indexerNavigate to fuel-graph-tooling folder and run:
pnpm install
pnpm buildTo 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_subFor 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.