GithubHelp home page GithubHelp logo

jimyacton / fuel-subgraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fuellabs/fuel-subgraph

0.0 0.0 0.0 2.93 MB

License: Apache License 2.0

Shell 0.38% JavaScript 0.27% Go 0.17% Rust 81.20% TypeScript 14.95% CSS 0.65% Makefile 0.02% HTML 0.12% PLpgSQL 2.03% Batchfile 0.01% Dockerfile 0.08% Solidity 0.11%

fuel-subgraph's Introduction

Fuel-Subgraph Setup Documentation

Prerequisites

To build and run this project you need to have the following installed on your system:

1. Run IPFS

Open the terminal and run the following commands:

ipfs init
ipfs daemon

2. Configure PostgreSQL

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

3. Build Firehose-Extract

Navigate to firehose-extract folder and run the following command in the terminal:

cargo build

4. Start Fuel-Firehose

Navigate to firehose-fuel folder and run the following command in the terminal:

./devel/fuelfire/start.sh

5. Run Fuel-Graph-Node

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

Working with Fuel-Subgraphs

1. Install and Build Fuel-Graph-Tooling

Navigate to fuel-graph-tooling folder and run:

pnpm install
pnpm build

2. Building and Deploying Fuel-Subgraphs

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.

For additional information, refer to the following documentation:

License

The primary license for this repo is Apache 2.0, see LICENSE.

fuel-subgraph's People

Contributors

salka1988 avatar dentosal avatar luizstacio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.