Giter Site home page Giter Site logo

pickaxe's Introduction

pickaxe

Indexer of the Starknet AMM pools written in Golang - to be used in Fibrous

pickaxe girl

sister of Shovel NFT Indexer

Go Report Card


The app:

  • follows the Starknet blocks and emits events for the new blocks
  • when new blocks are emitted, it fetches the recorded pools' sync events in order to update the pool reserves
  • updates recorded tokens' prices and total pool values periodically
  • will also track the new pools and tokens when the amm contracts become more mature

(1) Preperation to build

// Prepare the docker network
make docker-network

// Creates Docker container for Postgres
make postgres

// Creates database in the container
make createdb

// Creates Rabbitmq container in Docker
make rabbitmq

(2) Build or install the apps: pickaxe & psocket (optional, changes by the running preferences)

// Build the apps: psocket & pickaxe
make build

// Install the apps: psocket & pickaxe
make install

Run the app directly

// Run the socket block finder (basic version - after step-1)
make psocket

// Run the app (basic version - after step-1)
make pickaxe

// Run the app (if the app has been installed - after `install` in step-2)
pickaxe

// Run the socket (if the app has been installed - after `install` step-2)
psocket

// Run the app (if the code has been built - after `build` in step-2)
./bin/pickaxe

// Run the socket (if the code has been built - after `build` in step-2)
./bin/psocket

Custom app running preferences

// For testnet envs - run with testnet flag, example:
pickaxe -t
pickaxe --testnet

Run the app in docker network (after step-1)

// Build the app containers
make docker-build-psocket
make docker-build-pickaxe

// Create & run the app containers
make docker-container-psocket
make docker-container-pickaxe

Run the app with docker-compose (Recommended to run the app - run directly)

// Create the docker compose network
make docker-compose

Notes:

  • You should prepare a initial amms - tokens - pools list for the initial run. The indexer will accept this point as a synced point. Example ones belo for the mainnet configurations:

Used Major Requirements & Tools


Check the database tables in DBDocs.

database tables

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.