Skip to content

Commit

Permalink
Merge pull request #183 from utxostack/revert-179-develop
Browse files Browse the repository at this point in the history
Revert "Merge develop into main branch (20240923)"
  • Loading branch information
JaydenXu-BTC authored Sep 23, 2024
2 parents 7a12c64 + 9329b83 commit fbfbe85
Show file tree
Hide file tree
Showing 71 changed files with 8,891 additions and 11,892 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG NODE_VERSION=20

FROM node:${NODE_VERSION} AS base
FROM node:${NODE_VERSION}-slim AS base
ARG GIT_BRANCH

ENV PNPM_HOME="/pnpm"
Expand All @@ -15,7 +15,7 @@ FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile --ignore-scripts
RUN pnpm run --filter backend postinstall

FROM base AS build
FROM base as build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run --filter backend build

Expand Down
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"dependencies": {
"@apollo/server": "^4.11.0",
"@applifting-io/nestjs-dataloader": "^1.1.5",
"@as-integrations/fastify": "^2.1.1",
"@cell-studio/mempool.js": "^2.5.3",
"@ckb-lumos/bi": "^0.23.0",
Expand Down
35 changes: 0 additions & 35 deletions backend/prisma/migrations/20240916084317_transaction/migration.sql

This file was deleted.

34 changes: 32 additions & 2 deletions backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ model Block {
number Int
timestamp DateTime
transactionsCount Int
size Int
totalFee BigInt
minFee BigInt
maxFee BigInt
difficulty BigInt
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
Expand All @@ -53,11 +58,13 @@ model Transaction {
id Int @id @default(autoincrement())
chainId Int
hash String
index Int
index String
blockNumber Int
timestamp DateTime
fee BigInt
size Int
isCellbase Boolean @default(false)
isRgbpp Boolean @default(false)
btcTxid String?
leapDirection LeapDirection?
inputCount Int
outputCount Int
Expand All @@ -66,10 +73,33 @@ model Transaction {
chain Chain @relation(fields: [chainId], references: [id])
block Block @relation(fields: [chainId, blockNumber], references: [chainId, number])
outputs Output[]
@@unique([chainId, hash])
}

model Output {
id Int @id @default(autoincrement())
chainId Int
txHash String
index String
consumedByTxHash String?
consumedByIndex String?
capacity BigInt
lockScriptHash String @db.Char(66)
typeScriptHash String? @db.Char(66)
isLive Boolean @default(true)
rgbppBound Boolean @default(false)
boundBtcTxId String?
boundBtcTxIndex Int?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
transaction Transaction @relation(fields: [chainId, txHash], references: [chainId, hash])
@@unique([chainId, txHash, index])
}

model LockScript {
id Int @id @default(autoincrement())
chainId Int
Expand Down
2 changes: 1 addition & 1 deletion backend/src/bootstrap.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class BootstrapService {
for (const chain of chains) {
this.logger.log(`Indexing assets for chain ${chain.name}`);
const indexerService = await this.IndexerServiceFactory.getService(chain.id);
await indexerService.start();
await indexerService.startAssetsIndexing();
}
}
}
118 changes: 0 additions & 118 deletions backend/src/common/dataloader.ts

This file was deleted.

4 changes: 4 additions & 0 deletions backend/src/common/type/dataloader.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { NestDataLoader } from '@applifting-io/nestjs-dataloader';

export type DataLoaderResponse<T extends NestDataLoader<unknown, unknown>> =
Awaited<ReturnType<ReturnType<T['getBatchFunction']>>> extends (infer E)[] ? E : never;
Loading

1 comment on commit fbfbe85

@vercel
Copy link

@vercel vercel bot commented on fbfbe85 Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.