MetricsDAO / xyz

MetricsDAO XYZ Website
https://metricsdao.xyz
Apache License 2.0
12 stars 8 forks source link

Development

First time setup

# install deps
yarn install
yarn build
# start up services (e.g. database)
yarn docker
# seed the database
yarn tsx prisma/seed.ts

Otherwise

# start indexer and app
yarn dev

Open up http://localhost:3000 and you should be ready to go!

Tracer and indexing

# create a tracer called "mdao-development" using dev contract configuration (-d)
yarn pine create-tracer mdao-development 1.6.1 -d
# start tracer
yarn pine start-tracer mdao-development 1.6.1
# view tracers
yarn pine list-tracers

Developers can switch between using development and production contracts by changing the ENVIRONMENT env var. ENVIRONMENT="development" and ENVIRONMENT="production".

You can then also use the PINE_SUBSCRIBER_OVERRIDE env var to create ephemeral Mongo databases when you want to "reindex". For example, PINE_SUBSCRIBER_OVERRIDE="dev-computer-1".

Issues