Skip to content

dmc12-xyz/fuel-nft-indexer

Repository files navigation

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

About

Indexer on fuel to index nft contract

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published