Skip to content

Commit 0b84a7b

Browse files
committed
pool booster wip
1 parent 0da7cb7 commit 0b84a7b

File tree

5 files changed

+65
-7
lines changed

5 files changed

+65
-7
lines changed

db/migrations/1739243789291-Data.js renamed to db/migrations/1739244714499-Data.js

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema.graphql

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,23 @@ type PoolBoosterCampaign @entity {
344344
chainId: Int! @index
345345
address: String! @index
346346
gauge: String! @index
347+
campaignId: BigInt
347348
rewardToken: String!
348349
maxRewardPerVote: BigInt!
349350
totalRewardAmount: BigInt!
350-
campaignId: BigInt!
351351
closed: Boolean!
352352
}
353+
354+
type PoolBoosterFeeCollected @entity {
355+
id: ID! @index
356+
chainId: Int! @index
357+
address: String! @index
358+
timestamp: DateTime! @index
359+
blockNumber: Int! @index
360+
feeCollector: String!
361+
feeAmount: BigInt!
362+
txHash: String!
363+
}
353364
type OToken @entity {
354365
id: ID! @index
355366
chainId: Int! @index

src/model/generated/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export * from "./bridgeTransfer.model"
3131
export * from "./bridgeTransferState.model"
3232
export * from "./transactionDetails.model"
3333
export * from "./poolBoosterCampaign.model"
34+
export * from "./poolBoosterFeeCollected.model"
3435
export * from "./oToken.model"
3536
export * from "./woToken.model"
3637
export * from "./oTokenAsset.model"

src/model/generated/poolBoosterCampaign.model.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export class PoolBoosterCampaign {
2121
@StringColumn_({nullable: false})
2222
gauge!: string
2323

24+
@BigIntColumn_({nullable: true})
25+
campaignId!: bigint | undefined | null
26+
2427
@StringColumn_({nullable: false})
2528
rewardToken!: string
2629

@@ -30,9 +33,6 @@ export class PoolBoosterCampaign {
3033
@BigIntColumn_({nullable: false})
3134
totalRewardAmount!: bigint
3235

33-
@BigIntColumn_({nullable: false})
34-
campaignId!: bigint
35-
3636
@BooleanColumn_({nullable: false})
3737
closed!: boolean
3838
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, IntColumn as IntColumn_, Index as Index_, StringColumn as StringColumn_, DateTimeColumn as DateTimeColumn_, BigIntColumn as BigIntColumn_} from "@subsquid/typeorm-store"
2+
3+
@Entity_()
4+
export class PoolBoosterFeeCollected {
5+
constructor(props?: Partial<PoolBoosterFeeCollected>) {
6+
Object.assign(this, props)
7+
}
8+
9+
@PrimaryColumn_()
10+
id!: string
11+
12+
@Index_()
13+
@IntColumn_({nullable: false})
14+
chainId!: number
15+
16+
@Index_()
17+
@StringColumn_({nullable: false})
18+
address!: string
19+
20+
@Index_()
21+
@DateTimeColumn_({nullable: false})
22+
timestamp!: Date
23+
24+
@Index_()
25+
@IntColumn_({nullable: false})
26+
blockNumber!: number
27+
28+
@StringColumn_({nullable: false})
29+
feeCollector!: string
30+
31+
@BigIntColumn_({nullable: false})
32+
feeAmount!: bigint
33+
34+
@StringColumn_({nullable: false})
35+
txHash!: string
36+
}

0 commit comments

Comments
 (0)