Skip to content

Commit 9431c30

Browse files
committed
Merge branch 'dev' into feat/slack-notifications
2 parents 20123cb + 3beb758 commit 9431c30

File tree

105 files changed

+2645
-1198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+2645
-1198
lines changed

.env.example

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,22 @@ HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public
5858
############### PROCESSING #################
5959
############################################
6060

61-
RPC_URLS=["https://optimism.llamarpc.com","https://rpc.ankr.com/optimism","https://optimism.gateway.tenderly.co","https://optimism.blockpi.network/v1/rpc/public","https://mainnet.optimism.io","https://opt-mainnet.g.alchemy.com/v2/demo"]
62-
CHAIN_ID=10
63-
64-
FETCH_LIMIT=1000
65-
FETCH_DELAY_MS=3000
61+
CHAINS=[{"id":10,"name":"optimism","rpcUrls":["https://optimism.llamarpc.com","https://rpc.ankr.com/optimism","https://optimism.gateway.tenderly.co","https://optimism.blockpi.network/v1/rpc/public","https://mainnet.optimism.io","https://opt-mainnet.g.alchemy.com/v2/demo"],"fetchLimit":5000,"fetchDelayMs":1000}]
6662

6763
DATABASE_URL=postgresql://postgres:testing@datalayer-postgres-db:5432/datalayer-postgres-db
68-
DATABASE_SCHEMA=chain_data_schema_1
64+
DATABASE_SCHEMA=public
6965

70-
INDEXER_GRAPHQL_URL=http://indexer-graphql-api:8080/v1/graphql
66+
INDEXER_GRAPHQL_URL= http://indexer-graphql-api:8080/v1/graphql
7167
INDEXER_ADMIN_SECRET=testing
7268

73-
IPFS_GATEWAYS_URL=["https://ipfs.io","https://gateway.pinata.cloud","https://dweb.link", "https://ipfs.eth.aragon.network"]
69+
METADATA_SOURCE=public-gateway
70+
PUBLIC_GATEWAY_URLS=["https://ipfs.io","https://dweb.link","https://cloudflare-ipfs.com","https://gateway.pinata.cloud","https://ipfs.infura.io","https://ipfs.fleek.co","https://ipfs.eth.aragon.network","https://ipfs.jes.xxx","https://ipfs.lol","https://ipfs.mle.party"]
71+
72+
RETRY_MAX_ATTEMPTS=100000
73+
RETRY_BASE_DELAY_MS=200
74+
RETRY_MAX_DELAY_MS=1000
75+
RETRY_FACTOR=1.5
7476

75-
COINGECKO_API_KEY={{YOUR_KEY}}
76-
COINGECKO_API_TYPE=demo
77+
PRICING_SOURCE=coingecko
78+
COINGECKO_API_KEY={{YOUR_PRO_KEY}}
79+
COINGECKO_API_TYPE=pro

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
# Based on example:
21
FROM node:20-slim AS base
32
ENV PNPM_HOME="/pnpm"
43
ENV PATH="$PNPM_HOME:$PATH"
4+
RUN npm install -g corepack@latest
55
RUN corepack enable
66

77
FROM base AS build
88
COPY . /usr/src/app
99
WORKDIR /usr/src/app
1010
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
1111
RUN pnpm run -r build
12-
RUN pnpm deploy --filter=./apps/processing --prod /prod/processing
12+
RUN pnpm deploy --filter=./apps/processing /prod/processing
13+
RUN pnpm deploy --filter=./scripts/hasura /prod/hasura-config
1314

1415
FROM base AS processing
1516
COPY --from=build /prod/processing /prod/processing
1617
WORKDIR /prod/processing
17-
CMD [ "pnpm", "start" ]
18+
CMD ["node", "dist/index.js"]
19+

README.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ Ensure you have the following installed on your machine:
4343

4444
### Setup
4545

46+
1. Install dependencies and build depedencies:
47+
48+
```
49+
pnpm i && pnpm build
50+
```
51+
4652
1. Copy the Example Environment File and edit the `.env` file
4753

4854
```
@@ -55,26 +61,47 @@ cp .env.example .env
5561
docker-compose up -d --build
5662
```
5763

58-
3. Copy the Example Environment File on `scripts/migrations` and edit the `.env` file
64+
3. Copy the Example Environment File on `scripts/bootstrap` and edit the `.env` file
65+
66+
```
67+
cp scripts/bootstrap/.env.example scripts/bootstrap/.env
68+
```
69+
70+
4. Copy the Example Environment File on `scripts/migrations` and edit the `.env` file
5971

6072
```
6173
cp scripts/migrations/.env.example scripts/migrations/.env
6274
```
6375

64-
4. After starting Docker Compose, run the following command to apply the database migrations:
76+
5. Copy the Example Environment File on `scripts/hasura-config` and edit the `.env` file
6577

6678
```
67-
pnpm db:migrate
79+
cp scripts/hasura-config/.env.example scripts/hasura-config/.env
80+
```
81+
82+
6. Apply cache migrations:
83+
84+
```
85+
pnpm db:cache:migrate
86+
```
87+
88+
7. Bootstrap DB with IPFS metadata and Pricing(optional):
89+
90+
```
91+
pnpm bootstrap:metadata
92+
pnpm bootstrap:pricing
6893
```
6994

70-
5. Copy the Example Environment File on `apps/processing` and edit the `.env` file
95+
8. Apply migrations:
7196

72-
cp apps/processing/.env.example apps/processing/.env
97+
```
98+
pnpm db:migrate
99+
```
73100

74-
6. Start the Processing service with:
101+
9. For automatic hasura API configuration run:
75102

76103
```
77-
pnpm dev
104+
pnpm api:configure
78105
```
79106

80107
Once the setup is completed you can access Hasura by navigating to:

apps/indexer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM node:20-slim AS base
22
ENV PNPM_HOME="/pnpm"
33
ENV PATH="$PNPM_HOME:$PATH"
4+
RUN npm install -g corepack
45
RUN corepack enable
56
COPY . /app
67
WORKDIR /app

apps/indexer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"chai": "4.3.10",
16-
"envio": "2.8.2",
16+
"envio": "2.12.4",
1717
"ethers": "6.8.0",
1818
"yaml": "2.5.1"
1919
},

0 commit comments

Comments
 (0)