The is in active development and will change rapidly.
This app aims to index all events relevant to the Loot ecosystem running on StarkNet. http://starknet.events/redoc
The Stack
- Apollo server
- typescript
- prisma
- postgres
How it works
- Poll StarkNet for specific events.
- Pipe events into postgres
- Exposes a graphql endpoint for the client to consume
Requirements
- A recent version of Node.js - prisma cliGetting Setup
yarn
// start postgres docker. You will have to terminate a local postgres if it is running.
sudo service postgresql stop
docker-compose up
// run first time then after schema change
npx prisma migrate dev
// init test DB data. You will need to install ts-node
ts-node app/db/mockDB.ts
// start server
yarn start
Visit http://localhost:3333/graphql in your web browser.
Adding New Models
- Add schema to prisma/schema.prisma
- Add new resolver
- Add entitie & types
- Run migration
Contributing
We encourage pull requests.
- Create an issue to describe the improvement you're making. Provide as much detail as possible in the beginning so the team understands your improvement.
- Fork the repo so you can make and test changes in your local repository. Test your changes.
- Create a pull request and describe the changes you made.
- Include a reference to the Issue you created. Monitor and respond to comments made by the team around code standards and suggestions. Most pull requests will have some back and forth.
- If you have further questions, visit #builders-chat in our discord and make sure to reference your issue number.
Thank you for taking the time to make our project better!
Tasks
- Add schema to prisma/schema.prisma
- Add new resolver
- Add entitie & types
- Run migration
Utils
http://starknet.events/docs#/events/get_events_api_v1_get_events_get https://www.prisma.io/docs/concepts/components/prisma-client/crud
Content | Repository | Description |
---|---|---|
contracts | realms-contracts | StarkNet/Cairo and Ethereum/solidity contracts. |
ui, atlas | realms-react | All user-facing react code (website, Atlas, ui library). |
indexer | starknet-indexer | A graphql endpoint for the Lootverse on StarkNet. |
bot | squire | A Twitter/Discord bot for the Lootverse. |
subgraph | loot-subgraph | A subgraph (TheGraph) for the Lootverse on Eth Mainnet. |