Skip to content

Commit 5229dc9

Browse files
committed
wip super oeth otoken2 processing, yield forwarding tracking, performance
1 parent f7856b4 commit 5229dc9

13 files changed

+341
-81
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/lib
33
/builds
44
/dump
5+
/data
56

67
/**Versions.json
78

db/migrations/1741720109548-Data.js renamed to db/migrations/1741896005366-Data.js

+12-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev.env

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
NODE_ENV=development
12
TS_NODE_BASEURL=./lib
23
DB_NAME=squid
34
DB_PORT=23798

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema.graphql

+11
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,17 @@ type OTokenWithdrawalRequest @entity {
649649
txHash: String! @index
650650
}
651651

652+
type OTokenYieldForwarded @entity {
653+
id: ID!
654+
chainId: Int! @index
655+
blockNumber: Int! @index
656+
timestamp: DateTime! @index
657+
otoken: String! @index
658+
from: String!
659+
to: String!
660+
amount: BigInt!
661+
}
662+
652663
enum RebasingOption {
653664
OptIn
654665
OptOut

src/base/super-oeth-b.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import { base } from 'viem/chains'
33

44
import * as erc20Abi from '@abi/erc20'
55
import { getPositions } from '@templates/aerodrome/lp'
6-
import { createOTokenLegacyProcessor } from '@templates/otoken'
76
import { createOTokenActivityProcessor } from '@templates/otoken/activity-processor/activity-processor'
7+
import { createOTokenProcessor2 } from '@templates/otoken/otoken-2'
88
import { createOTokenWithdrawalsProcessor } from '@templates/withdrawals'
99
import { aerodromePools, baseAddresses } from '@utils/addresses-base'
1010
import { tokensByChain } from '@utils/tokensByChain'
1111

1212
import { baseCurveAMO } from './strategies'
1313

14-
const otokenProcessor = createOTokenLegacyProcessor({
14+
const otokenProcessor = createOTokenProcessor2({
1515
name: 'Super OETHb',
1616
symbol: 'superOETHb',
1717
from: 17819702,
1818
vaultFrom: 17819702,
19-
// fee: 20n,
19+
fee: 20n,
2020
otokenAddress: baseAddresses.tokens.superOETHb,
2121
wotoken: {
2222
address: baseAddresses.tokens.wsuperOETHb,

src/model/generated/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export * from "./oTokenDripperState.model"
5555
export * from "./oTokenHarvesterYieldSent.model"
5656
export * from "./oTokenRewardTokenCollected.model"
5757
export * from "./oTokenWithdrawalRequest.model"
58+
export * from "./oTokenYieldForwarded.model"
5859
export * from "./arm.model"
5960
export * from "./armState.model"
6061
export * from "./armDailyStat.model"
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_, DateTimeColumn as DateTimeColumn_, StringColumn as StringColumn_, BigIntColumn as BigIntColumn_} from "@subsquid/typeorm-store"
2+
3+
@Entity_()
4+
export class OTokenYieldForwarded {
5+
constructor(props?: Partial<OTokenYieldForwarded>) {
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+
@IntColumn_({nullable: false})
18+
blockNumber!: number
19+
20+
@Index_()
21+
@DateTimeColumn_({nullable: false})
22+
timestamp!: Date
23+
24+
@Index_()
25+
@StringColumn_({nullable: false})
26+
otoken!: string
27+
28+
@StringColumn_({nullable: false})
29+
from!: string
30+
31+
@StringColumn_({nullable: false})
32+
to!: string
33+
34+
@BigIntColumn_({nullable: false})
35+
amount!: bigint
36+
}

0 commit comments

Comments
 (0)