The game of life indexer is responsible for indexing blocks, retrieving and parsing events emmited by the contract.
To apply migrations run:
$ yarn migration:run
Build:
$ yarn build
Start:
$ yarn start
DB_HOST
- DB host urlDB_PORT
- DB port numberDB_USER
- DB usernameDB_PASS
- DB passwordDB_NAME
- DB table namePROCESS_SINCE
- Number of block to start indexing fromCONTRACT_ADDRESS
- Address of contract to indexUSE_MAINNET
- Boolean indicating mainnet usageAPP_TYPE
- Application type, one of indexer | viewRefresher
Parsed events are accessible via materialized views. Materialized views have to be refreshed periodically to reflect newest events.
transactionHash: string
transactionType: string
transactionOwner: string
gameId: number
gameGeneration: number
gameState: number
createdAt: string
gameOver: boolean
transactionHash: string
transactionType: string
transactionOwner: string
revivedCellIndex: number
gameGeneration: number
gameState: number
createdAt: string
gameExtinct: boolean
userId: string
balance: number
updatedAt: number
createdAt: number
$ yarn dev:indexer|viewRefresher