Indexer on fuel to index all nft contracts
- 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 with realtime data, use this NFT contract to interact and deploy.