Git Product home page Git Product logo

sygma-explorer-indexer's Introduction

Sygma Explorer Indexer

Table of Contents

Stack

Install

yarn install

Usage

Stub server

You can run stub server that will follow swagger API definition inside swagger.yml by:

yarn start:stub

Stub server will be exposed on localhost:8080. This will also expose Swagger documentation on localhost:80/swagger.

Env definition

This are the env variables that are required:

DATABASE_URL="mongodb://<HOST>:<PORT>/<DATABASE_NAME>?replicaSet=<REPLICA_NAME>&authSource=admin&retryWrites=true&w=majority"
STAGE=""
CHAIN_ANALYSIS_API_KEY=""
CHAIN_ANALYSIS_URL=""
ENVIRONMENT="" # testnet || devnet
RPC_URL_CONFIG="[ { "id": DOMAIN_ID, "endpoint": DOMAIN_ENDPOINT } ]"
COINMARKETCAP_API_KEY=""
COINMARKETCAP_API_URL=""
SNS_REGION=
TOPIC_ARN=
CRON_TIME="* */10 * * * *"
INCIDENT_TIME_MINUTES=45
WARNING_TIME_MINUTES=15
INCIDENT_TEMPLATE_PATH="incidentTemplate.ejs"
WARNING_TEMPLATE_PATH="warningTemplate.ejs"
CACHE_TTL_IN_MINS=5

Running locally

docker compose up

Build

For production build use the command:

yarn build

Testing

For testing use the command:

yarn test

Rerunning price calculations

For running a script that reruns $ price calculations using the CoinMarketCap service use the command:

yarn run fix:price-calculations

Removing duplicates and fix timestamp

This scripts is created for fixing production database entries For removing duplicates and move timestamp from transfer cllection to deposit/execution schema, in .env file define DATABASE_URL env variable, and run the script with command:

yarn run fix:remove-duplicates

sygma-explorer-indexer's People

Contributors

dependabot[bot] avatar eedygreen avatar enemycnt avatar makmuftic avatar mj52951 avatar mpetrun5 avatar mschirbel avatar p1sar avatar tcar121293 avatar wainola avatar

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.