Skip to content

Commit

Permalink
Add genesis files and balances (#21)
Browse files Browse the repository at this point in the history
1. Added functionality to index genesis file.
2. Added functionality to track balance of accounts by denom without
needing to perform an aggregate.
  • Loading branch information
Alann27 authored Oct 3, 2024
1 parent b986d44 commit 058dcbf
Show file tree
Hide file tree
Showing 13 changed files with 1,919 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ docs

.yarn/cache
*/**/.yarn/cache

kubernetes
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ SUBQUERY_GRAPHQL_EXTRA_PARAMS=
# Subquery Graphql Engine
SUBQUERY_GRAPHQL_ENGINE_VERSION=latest
SUBQUERY_GRAPHQL_ENGINE_PORT=3000

# Genesis filename located at /genesis folder
GENESIS_FILENAME=testnet.json
1 change: 1 addition & 0 deletions docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ services:
CHAIN_ID: ${CHAIN_ID}
volumes:
# Replaced ./:/app with individual tracked files to avoid the generated code go outside the container
- ./genesis/${GENESIS_FILENAME:-testnet.json}:/app/genesis.json
- ./schema.graphql:/app/schema.graphql
- ./project.ts:/app/project.ts
- ./proto:/app/proto
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ services:
context: .
dockerfile: ./docker/node.dockerfile
args:
GENESIS_FILENAME: ${GENESIS_FILENAME:-testnet.json}
NODE_ENV: ${ENV}
CHAIN_ID: ${CHAIN_ID}
ENDPOINT: ${ENDPOINT}
Expand All @@ -66,6 +67,8 @@ services:
START_BLOCK: ${START_BLOCK}
ENDPOINT: ${ENDPOINT}
CHAIN_ID: ${CHAIN_ID}
volumes:
- ./genesis/${GENESIS_FILENAME:-testnet.json}:/app/genesis.json
command:
- ${SUBQUERY_NODE_EXTRA_PARAMS:-}
healthcheck:
Expand Down
2 changes: 2 additions & 0 deletions docker/node.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM node:22.5-slim AS builder

ARG GENESIS_FILENAME=testnet.json
ARG NODE_ENV=production
ARG ENDPOINT
ARG CHAIN_ID=poktroll
Expand Down Expand Up @@ -33,6 +34,7 @@ RUN yarn install
COPY ./project.ts ./schema.graphql ./tsconfig.json ./.eslintrc.js ./.eslintignore /app/
COPY src /app/src
COPY proto /app/proto
COPY genesis/${GENESIS_FILENAME} /app/genesis.json

# Run codegen and Build pocketdex
RUN yarn run build
Expand Down
743 changes: 743 additions & 0 deletions genesis/localnet.json

Large diffs are not rendered by default.

Loading

0 comments on commit 058dcbf

Please sign in to comment.