Skip to content

Commit

Permalink
Merge pull request #293 from metaDAOproject/staging
Browse files Browse the repository at this point in the history
Staging merge
  • Loading branch information
R-K-H authored Oct 12, 2024
2 parents 485702e + 8c7c82b commit 3bf7054
Show file tree
Hide file tree
Showing 10 changed files with 4,927 additions and 3,340 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: themetadao/indexer
images: metadaoproject/indexer

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: packages/indexer/Dockerfile
push: true
tags: themetadao/indexer:staging
tags: metadaoproject/indexer:staging
labels: ${{ steps.meta.outputs.labels }}

redeploy_app:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: themetadao/indexer
images: metadaoproject/indexer

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: packages/indexer/Dockerfile
push: true
tags: themetadao/indexer:main
tags: metadaoproject/indexer:main
labels: ${{ steps.meta.outputs.labels }}

redeploy_app:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ select_permissions:
- prices_type
- price
- created_at
- created_by
filter: {}
comment: ""
2 changes: 1 addition & 1 deletion packages/indexer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apk add --no-cache --force-overwrite glibc-2.28-r0.apk
RUN apk add --no-cache git

EXPOSE 8080
RUN corepack prepare pnpm@8.15.5 --activate
RUN corepack prepare pnpm@9.12.1 --activate
RUN corepack enable
ENV REPO_DIR /home/indexer/futarchy-indexer
RUN mkdir -p $REPO_DIR
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@coral-xyz/anchor": "^0.29.0",
"@debridge-finance/solana-transaction-parser": "^2.0.1",
"@lukasdeco/prom-client": "^15.1.4",
"@metadaoproject/futarchy": "^0.4.0-alpha.1",
"@metadaoproject/futarchy": "^0.4.0-alpha.21",
"@metadaoproject/futarchy-sdk": "4.0.0-alpha.31",
"@metadaoproject/indexer-db": "workspace:*",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer/src/indexers/amm-market/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BN } from "@coral-xyz/anchor";
import { BN_0, enrichTokenMetadata } from "@metadaoproject/futarchy-sdk";
import { PriceMath } from "@metadaoproject/futarchy/v0.3";
import { PriceMath } from "@metadaoproject/futarchy/v0.4";
import { schema, usingDb, eq } from "@metadaoproject/indexer-db";
import { PricesType } from "@metadaoproject/indexer-db/lib/schema";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { BN } from "@coral-xyz/anchor";
import { gte } from "drizzle-orm";
import { desc } from "drizzle-orm/sql";
import { logger } from "../../logger";
import { PriceMath } from "@metadaoproject/futarchy/v0.3";
import { PriceMath } from "@metadaoproject/futarchy/v0.4";
import { UserPerformance, UserPerformanceTotals } from "../../types";
import { alias } from "drizzle-orm/pg-core";

Expand Down
9 changes: 8 additions & 1 deletion packages/indexer/src/transaction/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,14 @@ function getIxWithDisplay(
return null;
}
const coder = new BorshInstructionCoder(idl);
const decodedIx = coder.decode(Buffer.from(instruction.data));
let decodedIx: AnchorInstruction | null = null;
try {
decodedIx = coder.decode(Buffer.from(instruction.data));
} catch (e) {
logger.error("error with coder decoding of instruction:", e);
return null;
}

if (!decodedIx) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer/src/usecases/math.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test, describe } from "bun:test";
import { getHumanPrice } from "./math";
import { PriceMath } from "@metadaoproject/futarchy/v0.3";
import { PriceMath } from "@metadaoproject/futarchy/v0.4";
import { BN } from "@coral-xyz/anchor";

describe("getHumanPrice", () => {
Expand Down
Loading

0 comments on commit 3bf7054

Please sign in to comment.