Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 1.53 KB

README.md

File metadata and controls

76 lines (53 loc) · 1.53 KB

fuel-nft-indexer

Indexer on fuel to index all nft contracts

Prerequisites

  • Install fuel toolchain from here
  • Install app dependencies here

Execution

  • Get the fuel indexer binary
# clone the repo
git clone https://github.com/FuelLabs/fuel-indexer

# build the indexer
cd fuel-indexer
cargo build --release

# copy the binary in the project dir bin folder
cp target/release/fuel-indexer <path_to_curre_project>/bin/
  • Extra steps for Apple M1
brew install llvm
export AR=/opt/homebrew/opt/llvm/bin/llvm-ar
export CC=/opt/homebrew/opt/llvm/bin/clang
  • Build the indexer
cargo build --release
  • Snip the erant symbols (required for this version)
./scripts/wasm_snip.sh
  • Execute the indexer
./bin/fuel-indexer --manifest manifest.yaml
  • To run any of the scripts
# run from project root
./scripts/<script_name>.sh <arg0> <arg1> ...
  • To query the data
curl --location --request POST 'http://127.0.0.1:29987/api/graph/fuel_nft_indexer' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": "query { transfer { id from_user to_user } }",
    "params": ""
}'

Testing

Testing with realtime data, use this NFT contract to interact and deploy.

Repo