From 24398981fc8f520ed3ff2b42f5eeea865541b0ec Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Tue, 6 Aug 2024 12:30:02 +0530 Subject: [PATCH 01/17] add TEC token (#627) --- src/config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/config.ts b/src/config.ts index 861f862e..709b218e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -210,6 +210,15 @@ const CHAINS: Chain[] = [ address: "0x4200000000000000000000000000000000000042", }, }, + { + code: "TEC", + address: "0x8fc7c1109c08904160d6ae36482b79814d45eb78", + decimals: 18, + priceSource: { + chainId: 10, + address: "0x8fc7c1109c08904160d6ae36482b79814d45eb78", + }, + }, ], subscriptions: [ { From 8dc4bcc81a00f94577405fac38cd4c1860e0733e Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Tue, 6 Aug 2024 13:25:20 +0530 Subject: [PATCH 02/17] feat: add pm2 config (#628) --- ecosystem.config.cjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ecosystem.config.cjs diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs new file mode 100644 index 00000000..27dc3cd8 --- /dev/null +++ b/ecosystem.config.cjs @@ -0,0 +1,14 @@ +module.exports = { + apps: [ + { + name: "web", + script: "npm", + args: "start -- --http --http-wait-for-sync=false", + }, + { + name: "indexer", + script: "npm", + args: "start -- --indexer --http", + }, + ], +}; From c44acb64bc7288490abeebbfa5cec0873d3b2836 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Tue, 6 Aug 2024 12:02:35 +0300 Subject: [PATCH 03/17] feat: implemented deployment workflows for digital ocean (#629) --- .github/workflows/deploy-do-indexer.yml | 38 +++++++++++++++++++++++++ .github/workflows/deploy-do-web.yml | 34 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/deploy-do-indexer.yml create mode 100644 .github/workflows/deploy-do-web.yml diff --git a/.github/workflows/deploy-do-indexer.yml b/.github/workflows/deploy-do-indexer.yml new file mode 100644 index 00000000..3e05e03f --- /dev/null +++ b/.github/workflows/deploy-do-indexer.yml @@ -0,0 +1,38 @@ +name: Deploy DO Indexer + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install dependencies + run: npm ci + - name: Test build + run: npm run build + deploy-indexer: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Deploy to production + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.DO_INDEXER_IP }} + username: ${{ secrets.DO_USER }} + key: ${{ secrets.DO_SSH_KEY }} + script: | + export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" + cd grants-stack-indexer + git fetch origin main + git reset --hard origin/main + npm install && npm run build + pm2 reload indexer diff --git a/.github/workflows/deploy-do-web.yml b/.github/workflows/deploy-do-web.yml new file mode 100644 index 00000000..e5c0f51b --- /dev/null +++ b/.github/workflows/deploy-do-web.yml @@ -0,0 +1,34 @@ +name: Deploy DO Web + +on: workflow_dispatch + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install dependencies + run: npm ci + - name: Test build + run: npm run build + deploy-indexer: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Deploy to production + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.DO_WEB_IP }} + username: ${{ secrets.DO_USER }} + key: ${{ secrets.DO_SSH_KEY }} + script: | + export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" + cd grants-stack-indexer + git fetch origin main + git reset --hard origin/main + npm install && npm run build + pm2 reload web From 0d91af27c0ceff71dbfa80d8cd8b2172d98f6ec2 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Tue, 6 Aug 2024 12:39:57 +0300 Subject: [PATCH 04/17] test: do deployment through debug log (#631) --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 0be278aa..806e6c83 100644 --- a/src/index.ts +++ b/src/index.ts @@ -480,7 +480,7 @@ async function catchupAndWatchChain( return (await res.json()) as T; }; - chainLogger.info("catching up with blockchain events"); + chainLogger.info("DEBUG: catching up with blockchain events"); const indexerLogger = chainLogger.child({ subsystem: "DataUpdater" }); From 3af501ee0abd5b0f510092276432c57b48194588 Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 8 Aug 2024 09:04:05 +0200 Subject: [PATCH 05/17] Update Allo contract address (#633) * update contract address * bump chain data version --- src/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 709b218e..656b3537 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "75"; +const CHAIN_DATA_VERSION = "76"; export type Token = { code: string; @@ -1757,7 +1757,7 @@ const CHAINS: Chain[] = [ }, { contractName: "AlloV2/Allo/V1", - address: "0xB087535DB0df98fC4327136e897A5985E5Cfbd66", + address: "0x1133eA7Af70876e64665ecD07C0A0476d09465a1", fromBlock: 17860000, }, ], From 8a8516791013ba031e326fcd36445f889e17fa14 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Thu, 8 Aug 2024 12:08:21 +0300 Subject: [PATCH 06/17] feat: kubernetes web server (#634) * feat: implemented kubernetes solution for web server * fix: update indexer-compose to use its own db * chore: updated kb-service.yml for https * chore: removed web app from pm2 config file * chore: updated web server deployment workflow --- .github/workflows/deploy-do-web.yml | 40 +++++------- Dockerfile.index | 24 +++++++ Dockerfile.web | 24 +++++++ READ_DOCKER_KB.md | 70 +++++++++++++++++++++ ecosystem.config.cjs | 5 -- indexer-compose.yml | 98 +++++++++++++++++++++++++++++ kb-deployment.yaml | 22 +++++++ kb-service.yaml | 17 +++++ 8 files changed, 270 insertions(+), 30 deletions(-) create mode 100644 Dockerfile.index create mode 100644 Dockerfile.web create mode 100644 READ_DOCKER_KB.md create mode 100644 indexer-compose.yml create mode 100644 kb-deployment.yaml create mode 100644 kb-service.yaml diff --git a/.github/workflows/deploy-do-web.yml b/.github/workflows/deploy-do-web.yml index e5c0f51b..8735046a 100644 --- a/.github/workflows/deploy-do-web.yml +++ b/.github/workflows/deploy-do-web.yml @@ -2,33 +2,23 @@ name: Deploy DO Web on: workflow_dispatch +env: + FILENAME: Dockerfile.web + IMAGE_NAME: gitcoinco/indexer-web + IMAGE_TAG: ${{ github.sha }} + jobs: build: runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Install dependencies - run: npm ci - - name: Test build - run: npm run build - deploy-indexer: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Deploy to production - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.DO_WEB_IP }} - username: ${{ secrets.DO_USER }} - key: ${{ secrets.DO_SSH_KEY }} - script: | - export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" - cd grants-stack-indexer - git fetch origin main - git reset --hard origin/main - npm install && npm run build - pm2 reload web + + - name: Build the Docker image + run: docker build -f "$FILENAME" -t "$IMAGE_NAME:$IMAGE_TAG" . # build the Docker image using envs defined above + + # login to dockerhub then push the image to the dockerhub repo + - name: Push Docker image + run: |- + echo ${{secrets.DOCKERHUB_PASS}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin + docker push "$IMAGE_NAME:$IMAGE_TAG" diff --git a/Dockerfile.index b/Dockerfile.index new file mode 100644 index 00000000..efa55b59 --- /dev/null +++ b/Dockerfile.index @@ -0,0 +1,24 @@ +FROM node:20-alpine + +WORKDIR /app + +# Bundle app source +COPY src src +COPY tsconfig.json ./ +COPY vite.config.ts ./ +COPY .eslintrc.cjs ./ +COPY .prettierrc.json ./ +COPY package*.json ./ + +RUN npm ci +RUN npm run lint + +RUN npm run build + +RUN npm run test + + +EXPOSE 8080 + + +CMD [ "npm", "start", "--", "--indexer", "--http" ] diff --git a/Dockerfile.web b/Dockerfile.web new file mode 100644 index 00000000..c008dd83 --- /dev/null +++ b/Dockerfile.web @@ -0,0 +1,24 @@ +FROM node:20-alpine + +WORKDIR /app + +# Bundle app source +COPY src src +COPY tsconfig.json ./ +COPY vite.config.ts ./ +COPY .eslintrc.cjs ./ +COPY .prettierrc.json ./ +COPY package*.json ./ + +RUN npm ci +RUN npm run lint + +RUN npm run build + +RUN npm run test + + +EXPOSE 8080 + + +CMD [ "npm", "start", "--", "--http", "--http-wait-for-sync=false" ] diff --git a/READ_DOCKER_KB.md b/READ_DOCKER_KB.md new file mode 100644 index 00000000..2d0e1484 --- /dev/null +++ b/READ_DOCKER_KB.md @@ -0,0 +1,70 @@ +We followed this tutorial: https://www.digitalocean.com/community/tutorials/deploying-an-express-application-on-a-kubernetes-cluster + +- To build the docker images: + + ``` + docker build -f Dockerfile.index -t indexer/index . + docker build -f Dockerfile.web -t indexer/web . + ``` + +- To push the images to docker hub: + + ``` + docker tag indexer/index:latest gitcoinco/indexer-index:latest + docker push gitcoinco/indexer-index:latest + + docker tag indexer/web:latest gitcoinco/indexer-web:latest + docker push gitcoinco/indexer-web:latest + ``` + +### SOLUTION FOR ENVIRONMENT VARIABLES (kubernetes doesn't support .env file): + +- Created a config map: + + ``` + kubectl create configmap indexer-web-config --from-env-file=.env + ``` + +- Reference the config map in kb-deployment.yml with: + + ``` + envFrom: + - configMapRef: + name: indexer-web-config + ``` + +- NOT DONE - For sensitive data we could have creaded a secret with: + + ``` + kubectl create secret generic indexer-web-secrets --from-env-file=.env + ``` + +- NOT DONE - And referenced the secret in kb-deployment.yml with: + + ``` + envFrom: + - secretRef: + name: indexer-web-secrets + ``` + +### Logs + +Get the current instances of server: + +``` +kubectl get pods +``` + +Possible response: + +``` +NAME READY STATUS RESTARTS AGE +indexer-web-554574455d-lg98l 1/1 Running 0 41m +indexer-web-554574455d-t4tgj 1/1 Running 0 41m +``` + +Then to see the logs of the first instance: + +``` +kubectl logs indexer-web-554574455d-lg98l +``` diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index 27dc3cd8..94321dab 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -1,10 +1,5 @@ module.exports = { apps: [ - { - name: "web", - script: "npm", - args: "start -- --http --http-wait-for-sync=false", - }, { name: "indexer", script: "npm", diff --git a/indexer-compose.yml b/indexer-compose.yml new file mode 100644 index 00000000..d2cf9758 --- /dev/null +++ b/indexer-compose.yml @@ -0,0 +1,98 @@ +version: "3.8" + +services: + web: + build: + context: . + dockerfile: Dockerfile.web + ports: + - "8081:8080" # Map the port your web server uses + depends_on: + - db + environment: + INDEXED_CHAINS: ${INDEXED_CHAINS} + PASSPORT_SCORER_ID: ${PASSPORT_SCORER_ID} + STORAGE_DIR: ${STORAGE_DIR} + DEPLOYMENT_ENVIRONMENT: ${DEPLOYMENT_ENVIRONMENT} + PORT: ${PORT} + LOG_LEVEL: ${LOG_LEVEL} + BUILD_TAG: ${BUILD_TAG} + ENABLE_RESOURCE_MONITOR: ${ENABLE_RESOURCE_MONITOR} + ESTIMATES_LINEARQF_WORKER_POOL_SIZE: ${ESTIMATES_LINEARQF_WORKER_POOL_SIZE} + PINO_PRETTY: ${PINO_PRETTY} + IPFS_GATEWAY: ${IPFS_GATEWAY} + COINGECKO_API_KEY: ${COINGECKO_API_KEY} + GRAPHILE_LICENSE: ${GRAPHILE_LICENSE} + SEPOLIA_RPC_URL: ${SEPOLIA_RPC_URL} + POLYGON_MUMBAI_RPC_URL: ${POLYGON_MUMBAI_RPC_URL} + AVALANCHE_RPC_URL: ${AVALANCHE_RPC_URL} + OPTIMISM_RPC_URL: ${OPTIMISM_RPC_URL} + SENTRY_DSN: ${SENTRY_DSN} + PGN_TESTNET_RPC_URL: ${PGN_TESTNET_RPC_URL} + ARBITRUM_GOERLI_RPC_URL: ${ARBITRUM_GOERLI_RPC_URL} + FANTOM_RPC_URL: ${FANTOM_RPC_URL} + BASE_RPC_URL: ${BASE_RPC_URL} + PGN_RPC_URL: ${PGN_RPC_URL} + GOERLI_RPC_URL: ${GOERLI_RPC_URL} + AVALANCHE_FUJI_RPC_URL: ${AVALANCHE_FUJI_RPC_URL} + ARBITRUM_RPC_URL: ${ARBITRUM_RPC_URL} + SEI_MAINNET_RPC_URL: ${SEI_MAINNET_RPC_URL} + MAINNET_RPC_URL: ${MAINNET_RPC_URL} + POLYGON_RPC_URL: ${POLYGON_RPC_URL} + METIS_ANDROMEDA_RPC_URL: ${METIS_ANDROMEDA_RPC_URL} + SCROLL_SEPOLIA_RPC_URL: ${SCROLL_SEPOLIA_RPC_URL} + DATABASE_URL: "postgresql://postgres:postgres@db:5432/grants_stack_indexer" + + index: + build: + context: . + dockerfile: Dockerfile.index + ports: + - "8080:8080" # Map the port your web server uses + depends_on: + - db + environment: + INDEXED_CHAINS: ${INDEXED_CHAINS} + PASSPORT_SCORER_ID: ${PASSPORT_SCORER_ID} + STORAGE_DIR: ${STORAGE_DIR} + DEPLOYMENT_ENVIRONMENT: ${DEPLOYMENT_ENVIRONMENT} + PORT: ${PORT} + LOG_LEVEL: ${LOG_LEVEL} + BUILD_TAG: ${BUILD_TAG} + ENABLE_RESOURCE_MONITOR: ${ENABLE_RESOURCE_MONITOR} + ESTIMATES_LINEARQF_WORKER_POOL_SIZE: ${ESTIMATES_LINEARQF_WORKER_POOL_SIZE} + PINO_PRETTY: ${PINO_PRETTY} + IPFS_GATEWAY: ${IPFS_GATEWAY} + COINGECKO_API_KEY: ${COINGECKO_API_KEY} + GRAPHILE_LICENSE: ${GRAPHILE_LICENSE} + SEPOLIA_RPC_URL: ${SEPOLIA_RPC_URL} + POLYGON_MUMBAI_RPC_URL: ${POLYGON_MUMBAI_RPC_URL} + AVALANCHE_RPC_URL: ${AVALANCHE_RPC_URL} + OPTIMISM_RPC_URL: ${OPTIMISM_RPC_URL} + SENTRY_DSN: ${SENTRY_DSN} + PGN_TESTNET_RPC_URL: ${PGN_TESTNET_RPC_URL} + ARBITRUM_GOERLI_RPC_URL: ${ARBITRUM_GOERLI_RPC_URL} + FANTOM_RPC_URL: ${FANTOM_RPC_URL} + BASE_RPC_URL: ${BASE_RPC_URL} + PGN_RPC_URL: ${PGN_RPC_URL} + GOERLI_RPC_URL: ${GOERLI_RPC_URL} + AVALANCHE_FUJI_RPC_URL: ${AVALANCHE_FUJI_RPC_URL} + ARBITRUM_RPC_URL: ${ARBITRUM_RPC_URL} + SEI_MAINNET_RPC_URL: ${SEI_MAINNET_RPC_URL} + MAINNET_RPC_URL: ${MAINNET_RPC_URL} + POLYGON_RPC_URL: ${POLYGON_RPC_URL} + METIS_ANDROMEDA_RPC_URL: ${METIS_ANDROMEDA_RPC_URL} + SCROLL_SEPOLIA_RPC_URL: ${SCROLL_SEPOLIA_RPC_URL} + DATABASE_URL: "postgresql://postgres:postgres@db:5432/grants_stack_indexer" + + db: + image: postgres:15 # Use the version of PostgreSQL you need + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: grants_stack_indexer + volumes: + - db_data:/var/lib/postgresql/data + +volumes: + db_data: diff --git a/kb-deployment.yaml b/kb-deployment.yaml new file mode 100644 index 00000000..997b4423 --- /dev/null +++ b/kb-deployment.yaml @@ -0,0 +1,22 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: indexer-web +spec: + replicas: 2 + selector: + matchLabels: + app: indexer-web + template: + metadata: + labels: + app: indexer-web + spec: + containers: + - name: indexer-web + image: "gitcoinco/indexer-web:latest" + ports: + - containerPort: 80 + envFrom: + - configMapRef: + name: indexer-web-config diff --git a/kb-service.yaml b/kb-service.yaml new file mode 100644 index 00000000..6cde5a7c --- /dev/null +++ b/kb-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: load-balancer + labels: + app: indexer-web +spec: + type: LoadBalancer + ports: + - name: http + port: 80 + targetPort: 8080 + - name: https + port: 443 + targetPort: 8080 + selector: + app: indexer-web From eb1706f96c2a60cdac1b11cc5a6a89e9e952e358 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Thu, 8 Aug 2024 15:45:59 +0530 Subject: [PATCH 07/17] Update config.ts (#636) --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 656b3537..74e7b96c 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "76"; +const CHAIN_DATA_VERSION = "75"; export type Token = { code: string; From 3ca4462099ecba3a3eeb9ee5558f3d5bc5464099 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Thu, 8 Aug 2024 13:29:17 +0300 Subject: [PATCH 08/17] feat: added dataversion to logging (#637) we added it to pino config as prefix and an endpoint /version --- src/config.ts | 5 ++++- src/http/app.ts | 5 +++++ src/index.ts | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 74e7b96c..6b57054e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1826,6 +1826,7 @@ export type Config = { sentryDsn: string | null; databaseUrl: string; readOnlyDatabaseUrl: string; + dataVersion: string; databaseSchemaName: string; hostname: string; pinoPretty: boolean; @@ -1979,7 +1980,8 @@ export function getConfig(): Config { .default(databaseUrl) .parse(process.env.READ_ONLY_DATABASE_URL); - const databaseSchemaName = `chain_data_${CHAIN_DATA_VERSION}`; + const dataVersion = CHAIN_DATA_VERSION; + const databaseSchemaName = `chain_data_${dataVersion}`; const dropDb = z.boolean().default(false).parse(args["drop-db"]); @@ -2028,6 +2030,7 @@ export function getConfig(): Config { databaseUrl, readOnlyDatabaseUrl, dropDb, + dataVersion, databaseSchemaName, httpServerWaitForSync, httpServerEnabled, diff --git a/src/http/app.ts b/src/http/app.ts index ed9eca7a..d5ef33ea 100644 --- a/src/http/app.ts +++ b/src/http/app.ts @@ -27,6 +27,7 @@ export interface HttpApiConfig { priceProvider: PriceProvider; db: Database; dataProvider: DataProvider; + dataVersion?: string; passportProvider: PassportProvider; graphqlHandler?: AsyncRequestHandler; hostname: string; @@ -95,6 +96,10 @@ export const createHttpApi = (config: HttpApiConfig): HttpApi => { app.get("/data/*", staticJsonDataHandler(config.dataProvider)); + app.get("/version", (_req, res) => { + res.send(config.dataVersion); + }); + app.use("/api/v1", api); if (config.graphqlHandler !== undefined) { diff --git a/src/index.ts b/src/index.ts index 806e6c83..fd31a989 100644 --- a/src/index.ts +++ b/src/index.ts @@ -71,7 +71,6 @@ function createPgPool(args: { url: string; logger: Logger }): pg.Pool { return pool; } - async function main(): Promise { const config = getConfig(); @@ -99,6 +98,7 @@ async function main(): Promise { : {}; const baseLogger = pino({ + msgPrefix: `[${config.dataVersion}] `, level: config.logLevel, formatters: { level(level) { @@ -366,6 +366,7 @@ async function main(): Promise { db, priceProvider, passportProvider: passportProvider, + dataVersion: config.dataVersion, dataProvider: new CachedDataProvider({ dataProvider: new DatabaseDataProvider(db), cache: new TTLCache({ From fdd2ab85ca6eb4461ef41f41a22f997b46c7197c Mon Sep 17 00:00:00 2001 From: gnomadic Date: Mon, 12 Aug 2024 03:47:29 -0400 Subject: [PATCH 09/17] chore: removing TEC (#638) * chore: removing TEC * chore: removing TEC --- src/config.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/config.ts b/src/config.ts index 6b57054e..f207e1e2 100644 --- a/src/config.ts +++ b/src/config.ts @@ -210,15 +210,6 @@ const CHAINS: Chain[] = [ address: "0x4200000000000000000000000000000000000042", }, }, - { - code: "TEC", - address: "0x8fc7c1109c08904160d6ae36482b79814d45eb78", - decimals: 18, - priceSource: { - chainId: 10, - address: "0x8fc7c1109c08904160d6ae36482b79814d45eb78", - }, - }, ], subscriptions: [ { From 7ba8d41f129f1c34a8f22031594ed163d7b2f828 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Mon, 12 Aug 2024 14:08:16 +0530 Subject: [PATCH 10/17] bump to 77 to handle sei reindex (#640) Update config.ts Co-authored-by: Huss Martinez --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index f207e1e2..81bb9654 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "75"; +const CHAIN_DATA_VERSION = "77"; export type Token = { code: string; From d06a0dbaf4a269d275f1b7ca87883ba87dfb73a4 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Mon, 12 Aug 2024 17:49:04 +0530 Subject: [PATCH 11/17] Revert "bump to 77 to handle sei reindex (#640)" This reverts commit 7ba8d41f129f1c34a8f22031594ed163d7b2f828. --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 81bb9654..f207e1e2 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "77"; +const CHAIN_DATA_VERSION = "75"; export type Token = { code: string; From 56d5c4a145cd8ec77ec35a9d863f03797e930f95 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Tue, 13 Aug 2024 19:50:30 +0300 Subject: [PATCH 12/17] chore: bump version to 79 (#643) --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index f207e1e2..f7133b44 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "75"; +const CHAIN_DATA_VERSION = "79"; export type Token = { code: string; From bdf3ff79995fa0f75ba87f008501a8e18f2fb64d Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Tue, 13 Aug 2024 20:42:50 +0300 Subject: [PATCH 13/17] Revert "chore: bump version to 79 (#643)" (#644) This reverts commit 56d5c4a145cd8ec77ec35a9d863f03797e930f95. --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index f7133b44..f207e1e2 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "79"; +const CHAIN_DATA_VERSION = "75"; export type Token = { code: string; From acfc7797ddd9890e22ca676685df5ef94356bf00 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Wed, 14 Aug 2024 10:49:08 +0300 Subject: [PATCH 14/17] chore: removed on push for digital ocean (#645) --- .github/workflows/deploy-do-indexer.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy-do-indexer.yml b/.github/workflows/deploy-do-indexer.yml index 3e05e03f..79702fdb 100644 --- a/.github/workflows/deploy-do-indexer.yml +++ b/.github/workflows/deploy-do-indexer.yml @@ -1,9 +1,6 @@ name: Deploy DO Indexer on: - push: - branches: - - main workflow_dispatch: jobs: From 1325e23f997e5205074ce8aaf996bef8eeb66576 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Wed, 14 Aug 2024 11:42:59 +0300 Subject: [PATCH 15/17] chore: set maxGetLogsRange for scroll mainnet (#646) --- src/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.ts b/src/config.ts index f207e1e2..78488dd5 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1342,6 +1342,7 @@ const CHAINS: Chain[] = [ .default("https://rpc.scroll.io") .parse(process.env.SCROLL_RPC_URL), pricesFromTimestamp: Date.UTC(2024, 0, 1, 0, 0, 0), + maxGetLogsRange: 9000, tokens: [ { code: "ETH", From b9ee1cab26a9879c26932dff647d749999522924 Mon Sep 17 00:00:00 2001 From: Huss Martinez Date: Wed, 14 Aug 2024 11:46:23 +0300 Subject: [PATCH 16/17] chore: bump version to 79 (#647) --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 78488dd5..1f3d9a15 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "75"; +const CHAIN_DATA_VERSION = "79"; export type Token = { code: string; From b3d96e1d4c86f07aa26d0c57823bd5806e3c6c94 Mon Sep 17 00:00:00 2001 From: gnomadic Date: Wed, 28 Aug 2024 14:06:15 -0400 Subject: [PATCH 17/17] adding eBTC (#649) --- src/config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/config.ts b/src/config.ts index 1f3d9a15..d8b379ac 100644 --- a/src/config.ts +++ b/src/config.ts @@ -94,6 +94,15 @@ const CHAINS: Chain[] = [ address: "0x0000000000000000000000000000000000000000", }, }, + { + code: "eBTC", + address: "0x661c70333aa1850ccdbae82776bb436a0fcfeefb", + decimals: 18, + priceSource: { + chainId: 1, + address: "0x661c70333aa1850ccdbae82776bb436a0fcfeefb", + }, + }, ], subscriptions: [ {