Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions schema-oeth.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,14 @@ type OETHDailyStat @entity {
amoSupply: BigInt!
dripperWETH: BigInt!
wrappedSupply: BigInt!
tradingVolumeUSD: Float!

yieldETH: BigInt!
yieldETH7Day: BigInt!
yieldETHAllTime: BigInt!

yieldUSD: BigInt!
yieldUSD7Day: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
Expand All @@ -200,9 +204,8 @@ type OETHDailyStat @entity {
feesUSDAllTime: BigInt!

pegPrice: BigInt!
"""
Price of OETH in ETH
"""
marketCapUSD: Float!
holdersOverThreshold: Int!
strategies: [OETHStrategyDailyStat] @derivedFrom(field: "dailyStatId")
collateral: [OETHCollateralDailyStat] @derivedFrom(field: "dailyStatId")
}
Expand Down
14 changes: 14 additions & 0 deletions schema-ogv.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,17 @@ type OGVProposalVote @entity {
txHash: String!
timestamp: DateTime!
}

type OGVDailyStat @entity {
id: ID!
blockNumber: Int! @index
timestamp: DateTime! @index

totalSupply: BigInt!
totalSupplyUSD: Float!
totalStaked: BigInt!
tradingVolumeUSD: Float!
marketCapUSD: Float!
priceUSD: Float!
holdersOverThreshold: Int!
}
6 changes: 6 additions & 0 deletions schema-ousd.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,14 @@ type OUSDDailyStat @entity {
amoSupply: BigInt!
dripperWETH: BigInt!
wrappedSupply: BigInt!
tradingVolumeUSD: Float!

yieldETH: BigInt!
yieldETH7Day: BigInt!
yieldETHAllTime: BigInt!

yieldUSD: BigInt!
yieldUSD7Day: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
Expand All @@ -233,6 +237,8 @@ type OUSDDailyStat @entity {
feesUSDAllTime: BigInt!

pegPrice: BigInt!
marketCapUSD: Float!
holdersOverThreshold: Int!
strategies: [OUSDStrategyDailyStat] @derivedFrom(field: "dailyStatId")
collateral: [OUSDCollateralDailyStat] @derivedFrom(field: "dailyStatId")
}
Expand Down
30 changes: 26 additions & 4 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,14 @@ type OETHDailyStat @entity {
amoSupply: BigInt!
dripperWETH: BigInt!
wrappedSupply: BigInt!
tradingVolumeUSD: Float!

yieldETH: BigInt!
yieldETH7Day: BigInt!
yieldETHAllTime: BigInt!

yieldUSD: BigInt!
yieldUSD7Day: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
Expand All @@ -369,9 +373,8 @@ type OETHDailyStat @entity {
feesUSDAllTime: BigInt!

pegPrice: BigInt!
"""
Price of OETH in ETH
"""
marketCapUSD: Float!
holdersOverThreshold: Int!
strategies: [OETHStrategyDailyStat] @derivedFrom(field: "dailyStatId")
collateral: [OETHCollateralDailyStat] @derivedFrom(field: "dailyStatId")
}
Expand Down Expand Up @@ -563,7 +566,20 @@ type OGVProposalVote @entity {
txHash: String!
timestamp: DateTime!
}
"""

type OGVDailyStat @entity {
id: ID!
blockNumber: Int! @index
timestamp: DateTime! @index

totalSupply: BigInt!
totalSupplyUSD: Float!
totalStaked: BigInt!
tradingVolumeUSD: Float!
marketCapUSD: Float!
priceUSD: Float!
holdersOverThreshold: Int!
}"""
The OUSD entity tracks the change in total supply of OUSD over time.
"""
type OUSD @entity {
Expand Down Expand Up @@ -783,10 +799,14 @@ type OUSDDailyStat @entity {
amoSupply: BigInt!
dripperWETH: BigInt!
wrappedSupply: BigInt!
tradingVolumeUSD: Float!

yieldETH: BigInt!
yieldETH7Day: BigInt!
yieldETHAllTime: BigInt!

yieldUSD: BigInt!
yieldUSD7Day: BigInt!
yieldUSDAllTime: BigInt!

feesETH: BigInt!
Expand All @@ -798,6 +818,8 @@ type OUSDDailyStat @entity {
feesUSDAllTime: BigInt!

pegPrice: BigInt!
marketCapUSD: Float!
holdersOverThreshold: Int!
strategies: [OUSDStrategyDailyStat] @derivedFrom(field: "dailyStatId")
collateral: [OUSDCollateralDailyStat] @derivedFrom(field: "dailyStatId")
}
Expand Down
3 changes: 2 additions & 1 deletion src/main-ogv.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as dailyStats from './ogv/post-processors/daily-stats'
import * as governance from './ogv/post-processors/governance'
import * as ogv from './ogv/processors/ogv'
import * as ogvSupply from './ogv/processors/ogv-supply'
Expand All @@ -6,7 +7,7 @@ import { run } from './processor'
export const processor = {
stateSchema: 'ogv-processor',
processors: [ogvSupply, ogv],
postProcessors: [governance],
postProcessors: [governance, dailyStats],
validators: [],
}
export default processor
Expand Down
1 change: 1 addition & 0 deletions src/model/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export * from "./ogvProposal.model"
export * from "./_ogvProposalState"
export * from "./ogvProposalVote.model"
export * from "./_ogvVoteType"
export * from "./ogvDailyStat.model"
export * from "./ousd.model"
export * from "./ousdAsset.model"
export * from "./ousdAddress.model"
Expand Down
18 changes: 15 additions & 3 deletions src/model/generated/oethDailyStat.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,24 @@ export class OETHDailyStat {
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
wrappedSupply!: bigint

@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
tradingVolumeUSD!: number

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldETH!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldETH7Day!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldETHAllTime!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldUSD!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldUSD7Day!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldUSDAllTime!: bigint

Expand All @@ -98,9 +107,12 @@ export class OETHDailyStat {
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
pegPrice!: bigint

/**
* Price of OETH in ETH
*/
@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
marketCapUSD!: number

@Column_("int4", {nullable: false})
holdersOverThreshold!: number

@OneToMany_(() => OETHStrategyDailyStat, e => e.dailyStatId)
strategies!: OETHStrategyDailyStat[]

Expand Down
41 changes: 41 additions & 0 deletions src/model/generated/ogvDailyStat.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, Index as Index_} from "typeorm"
import * as marshal from "./marshal"

@Entity_()
export class OGVDailyStat {
constructor(props?: Partial<OGVDailyStat>) {
Object.assign(this, props)
}

@PrimaryColumn_()
id!: string

@Index_()
@Column_("int4", {nullable: false})
blockNumber!: number

@Index_()
@Column_("timestamp with time zone", {nullable: false})
timestamp!: Date

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
totalSupply!: bigint

@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
totalSupplyUSD!: number

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
totalStaked!: bigint

@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
tradingVolumeUSD!: number

@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
marketCapUSD!: number

@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
priceUSD!: number

@Column_("int4", {nullable: false})
holdersOverThreshold!: number
}
15 changes: 15 additions & 0 deletions src/model/generated/ousdDailyStat.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,24 @@ export class OUSDDailyStat {
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
wrappedSupply!: bigint

@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
tradingVolumeUSD!: number

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldETH!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldETH7Day!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldETHAllTime!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldUSD!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldUSD7Day!: bigint

@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
yieldUSDAllTime!: bigint

Expand All @@ -89,6 +98,12 @@ export class OUSDDailyStat {
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false})
pegPrice!: bigint

@Column_("numeric", {transformer: marshal.floatTransformer, nullable: false})
marketCapUSD!: number

@Column_("int4", {nullable: false})
holdersOverThreshold!: number

@OneToMany_(() => OUSDStrategyDailyStat, e => e.dailyStatId)
strategies!: OUSDStrategyDailyStat[]

Expand Down
Loading