Positron Explorer Backend

Setup

  • See .env.example for the env file needed
  • Set ranges and numbers fields in syncConfig.json file. Leave as empty array if not needed
  • Both fromBlock and toBlock are inclusive in range
  • All numbers must be integers, not strings

run

without sync

  • npm startTestnet
  • npm startMainnet

with sync

  • npm startTestnet -- --sync
  • npm startMainnet -- --sync

db

  • npm run showAll -- --network mainnet

example queries

Migrate db

  • Set apropriate DATABASE_URL in the .env file
  • run npx prisma migrate dev