Giter Site home page Giter Site logo

arc72_indexer's Introduction

ARC-72 NFT Indexer Prototype for the AVM (Algorand Virtual Machine)

NOTICE

This application is provided without guarantee or warranty. This is an ALPHA prototype of an ARC-72 NFT Indexer for AVM based networks based on the ARC-74 specification found here:

https://arc.algorand.foundation/ARCs/arc-0074

Includes:

  • Block follower to extract token information and transfers from the blockchain and write the applicable data to a SQLite3 database
  • API front end to accept and respond to requests
  • API Documentation using SwaggerUI

Production Links

Production services below are deployed for the VoiNet network. This includes a block follower and indexer API.

API Endpoints:

Additional Links:

Initialize Database

NOTE: SQLite3 is required to initialize the database. To install SQLite3 with APT package manager:

sudo apt-get install sqlite3

To initialize the database in the db folder:

npm run init-db

Self Deployment Instructions

To operate the block-follower and populate the SQLite database:

npm i
npm run backend

To launch the API web service:

npm i
npm run api

The API server will launch by default on port 3000, i.e. http://localhost:3000. To use an alternate port for the API server, pass the -p argument, such as:

npm run api -- -p 5101

or use the environment variable API_SERVER_PORT, i.e.

API_SERVER_PORT=5101 npm run api

Docker Deployment

docker-compose -f docker-compose-backend.yml up -d
docker-compose -f docker-compose-api.yml up -d

Utilizing alternate Indexer and Node

By default the indexer utilizes the public Voi Indexer and Algod endpoints. This can be modified using the following environment variables:

  • ALGOD_HOST - AVM Node URL
  • ALGOD_TOKEN - AVM Node access Token
  • INDEXER_HOST - AVM Indexer URL
  • INDEXER_TOKEN - AVM Indexer Token

These environment variables may be added to the Backend container compose file (docker-compose-backend.yml) to scrape data from an alternative indexer and node, or can be pointed to a different chain altogether.

NOTE: If changing the chain, make sure to delete or rename /db/db.sqlite and re-initialize the database!

Things To Do

  • Replace database backend (PostreSQL?)
  • Improve API server logging
  • Use a follower node instead of the public node

Resources

arc72_indexer's People

Contributors

xarmian avatar

Stargazers

Nicholas Shellabarger avatar Andrew King avatar Rich Granata avatar

Watchers

 avatar

arc72_indexer's Issues

Add approvals to /tokens endpoint (query) and token object

development

  • add approved column to tokens table
  • add approved property to token object output by /tokens endpoint
  • add approved property to firstToken object output by /collections endpoint
  • update swagger.js (query and token object)
  • add retrieval of approved value to refresh.js script

deployment

  • update db schema to add approved column
  • pull repo
  • run refresh script

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.