From cfe601c61ce860ad2f5283589640dd70353a14a9 Mon Sep 17 00:00:00 2001 From: toniocodo Date: Mon, 1 Sep 2025 14:10:52 +0200 Subject: [PATCH 1/5] feat: add rateNative prop in otoken and arm daily stats --- schema.graphql | 1267 +++++++++--------- scripts/generate-validations.ts | 2 + src/model/generated/armDailyStat.model.ts | 3 + src/model/generated/index.ts | 108 +- src/model/generated/oTokenDailyStat.model.ts | 3 + src/templates/origin-arm/origin-arm.graphql | 1 + src/templates/origin-arm/origin-arm.ts | 4 +- src/templates/otoken/otoken-daily-stats.ts | 9 +- src/templates/otoken/otoken.graphql | 1 + 9 files changed, 708 insertions(+), 690 deletions(-) diff --git a/schema.graphql b/schema.graphql index 22b75b3a..334edd4c 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1,72 +1,26 @@ # GENERATED, DO NOT MODIFY -type UtilCache @entity { - id: ID! @index - data: JSON! -} -""" -Any entity which has a price associated with it should have that price go in here. -Prices can change very frequently and we don't want those changes on the same track -as values which change less frequently. -""" -type ExchangeRate @entity { - """ - Format: 'chainId:blockNumber:pair' ex '1:123456789:ETH_USD' - """ +type OGNDailyStat @entity { id: ID! - chainId: Int! @index - timestamp: DateTime! @index blockNumber: Int! @index - pair: String! - base: String! - quote: String! - rate: BigInt! - decimals: Int! -} -type NativeBalance @entity { - """ - Format: 'account:blockNumber' - """ - id: ID! timestamp: DateTime! @index - blockNumber: Int! @index - account: String! - balance: BigInt! -} -type LegacyStaker @entity { - id: ID! @index - inputAmount: BigInt! - outputAmount: BigInt! - balance: BigInt! - rewardAmount: BigInt! -} -type CurvePool @entity { - id: ID! - address: String! @index - name: String! - tokenCount: Int! - token0: String! - token1: String! - token2: String -} -type CurvePoolBalance @entity { - id: ID! - timestamp: DateTime! @index - blockNumber: Int! @index - address: String! - balance0: BigInt! - balance1: BigInt! - balance2: BigInt! + totalSupply: BigInt! + totalSupplyUSD: Float! + totalStaked: BigInt! + tradingVolumeUSD: Float! + marketCapUSD: Float! + priceUSD: Float! + holdersOverThreshold: Int! } - -type CurvePoolRate @entity { +type CoinGeckoCoinData @entity { id: ID! - timestamp: DateTime! @index - blockNumber: Int! @index - address: String! - name: String! - rate: BigInt! + product: String! @index + date: String! @index + vsCurrency: String! + price: Float! + marketCap: Float! + tradingVolume: Float! } type ProtocolDailyStat @entity { id: ID! @@ -133,14 +87,40 @@ type ExecutionRewardsCollected @entity { strategy: String! @index amount: BigInt! } -type CoinGeckoCoinData @entity { +type WalletLabels @entity { + id: ID! @index + address: String! + description: String! + labels: [String!]! + lastUpdated: DateTime! +} +type CurvePool @entity { id: ID! - product: String! @index - date: String! @index - vsCurrency: String! - price: Float! - marketCap: Float! - tradingVolume: Float! + address: String! @index + name: String! + tokenCount: Int! + token0: String! + token1: String! + token2: String +} + +type CurvePoolBalance @entity { + id: ID! + timestamp: DateTime! @index + blockNumber: Int! @index + address: String! + balance0: BigInt! + balance1: BigInt! + balance2: BigInt! +} + +type CurvePoolRate @entity { + id: ID! + timestamp: DateTime! @index + blockNumber: Int! @index + address: String! + name: String! + rate: BigInt! } type OGNBuyback @entity { id: ID! @@ -153,267 +133,96 @@ type OGNBuyback @entity { ognBoughtUSD: Float! txHash: String! } -type WalletLabels @entity { - id: ID! @index - address: String! - description: String! - labels: [String!]! - lastUpdated: DateTime! -} -type OGNDailyStat @entity { +type NativeBalance @entity { + """ + Format: 'account:blockNumber' + """ id: ID! + timestamp: DateTime! @index blockNumber: Int! @index + account: String! + balance: BigInt! +} +type LegacyStaker @entity { + id: ID! @index + inputAmount: BigInt! + outputAmount: BigInt! + balance: BigInt! + rewardAmount: BigInt! +} +type OToken @entity { + id: ID! @index + chainId: Int! @index + otoken: String! @index timestamp: DateTime! @index - + blockNumber: Int! @index + unallocatedSupply: BigInt! totalSupply: BigInt! - totalSupplyUSD: Float! - totalStaked: BigInt! - tradingVolumeUSD: Float! - marketCapUSD: Float! - priceUSD: Float! - holdersOverThreshold: Int! + rebasingSupply: BigInt! + nonRebasingSupply: BigInt! + creditsPerToken: BigInt! + holderCount: Int! } -type OGV @entity { - id: ID! + +type OTokenRawData @entity { + id: ID! @index + chainId: Int! @index + otoken: String! @index timestamp: DateTime! @index blockNumber: Int! @index - circulating: BigInt! - staked: BigInt! - total: BigInt! + type: String! + data: JSON! } -type OGVAddress @entity { +type WOToken @entity { id: ID! @index - balance: BigInt! - staked: BigInt! - veogvBalance: BigInt! - votingPower: BigInt! - delegatee: OGVAddress - lastUpdated: DateTime! + chainId: Int! @index + otoken: String! @index + timestamp: DateTime! @index + blockNumber: Int! @index + totalAssets: BigInt! + totalSupply: BigInt! + assetsPerShare: BigInt! } -enum OGVLockupEventType { - Staked - Unstaked - Extended +type OTokenAsset @entity { + id: ID! @index + chainId: Int! @index + otoken: String! @index + address: String! @index + symbol: String! } -type OGVLockupTxLog @entity { - id: ID! - hash: String! - event: OGVLockupEventType! - timestamp: DateTime! +type OTokenAddress @entity { + id: ID! @index + chainId: Int! @index + otoken: String! @index + address: String! @index + isContract: Boolean! + rebasingOption: RebasingOption! + credits: BigInt! + creditsPerToken: BigInt! + balance: BigInt! + earned: BigInt! + yieldTo: String # For delegation source + yieldFrom: String # For delegation target blockNumber: Int! - totalSupply: BigInt! - ogvLockup: OGVLockup! + lastUpdated: DateTime! + since: DateTime + history: [OTokenHistory!]! @derivedFrom(field: "address") } -type OGVLockup @entity { +type OTokenHistory @entity { id: ID! - lockupId: String! @index - address: OGVAddress! @index - logs: [OGVLockupTxLog]! @derivedFrom(field: "ogvLockup") - amount: BigInt! - end: DateTime! - veogv: BigInt! # Amount of veOGV received + chainId: Int! @index + otoken: String! @index + address: OTokenAddress! @index + value: BigInt! + balance: BigInt! timestamp: DateTime! - # active: Boolean -} - -enum OGVProposalState { - Pending - Active - Canceled - Defeated - Succeeded - Queued - Expired - Executed -} - -enum OGVProposalEvent { - Created - Queued - Canceled - Extended - Executed -} - -enum OGVVoteType { - Against - For - Abstain -} - -type OGVProposalTxLog @entity { - id: ID! - hash: String! - event: OGVProposalEvent! - timestamp: DateTime! - proposal: OGVProposal! @index -} - -type OGVProposal @entity { - id: ID! @index - description: String - proposer: OGVAddress! - timestamp: DateTime! - startBlock: BigInt! - endBlock: BigInt! - lastUpdated: DateTime! - status: OGVProposalState! - logs: [OGVProposalTxLog]! @derivedFrom(field: "proposal") - quorum: BigInt! - choices: [String]! - scores: [String]! -} - -type OGVProposalVote @entity { - id: ID! - proposal: OGVProposal! @index - voter: OGVAddress! @index - weight: BigInt! - type: OGVVoteType! - 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! -} -type TransactionDetails @entity { - id: ID! - chainId: Int! @index - txHash: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - from: String! @index - to: String! @index - gasUsed: BigInt! - effectiveGasPrice: BigInt! - transactionFee: BigInt! -} -type Pool @entity { - id: ID! - chainId: Int! @index - address: String! @index - exchange: String! @index - name: String - symbol: String - tokens: [String!]! - symbols: [String!]! - decimals: [Int!]! - type: String! - createdAtBlock: Int! - createdAt: DateTime! -} -# Pool Booster Events -type PoolBooster @entity { - id: ID! @index # chainId-address - chainId: Int! @index - timestamp: DateTime! @index - blockNumber: Int! @index - address: String! @index - registryAddress: String! @index - ammPoolAddress: String! @index - factoryAddress: String! @index - poolBoosterType: Int! - active: Boolean! -} - -type PoolBoosterBribeExecuted @entity { - id: ID! @index # chainId-address-txHash - chainId: Int! @index - address: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - txHash: String! - amount: BigInt! - fee: BigInt! -} -type OToken @entity { - id: ID! @index - chainId: Int! @index - otoken: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - unallocatedSupply: BigInt! - totalSupply: BigInt! - rebasingSupply: BigInt! - nonRebasingSupply: BigInt! - creditsPerToken: BigInt! - holderCount: Int! -} - -type OTokenRawData @entity { - id: ID! @index - chainId: Int! @index - otoken: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - type: String! - data: JSON! -} - -type WOToken @entity { - id: ID! @index - chainId: Int! @index - otoken: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - totalAssets: BigInt! - totalSupply: BigInt! - assetsPerShare: BigInt! -} - -type OTokenAsset @entity { - id: ID! @index - chainId: Int! @index - otoken: String! @index - address: String! @index - symbol: String! -} - -type OTokenAddress @entity { - id: ID! @index - chainId: Int! @index - otoken: String! @index - address: String! @index - isContract: Boolean! - rebasingOption: RebasingOption! - credits: BigInt! - creditsPerToken: BigInt! - balance: BigInt! - earned: BigInt! - yieldTo: String # For delegation source - yieldFrom: String # For delegation target - blockNumber: Int! - lastUpdated: DateTime! - since: DateTime - history: [OTokenHistory!]! @derivedFrom(field: "address") -} - -type OTokenHistory @entity { - id: ID! - chainId: Int! @index - otoken: String! @index - address: OTokenAddress! @index - value: BigInt! - balance: BigInt! - timestamp: DateTime! - blockNumber: Int! @index - txHash: String! @index - type: HistoryType! + blockNumber: Int! @index + txHash: String! @index + type: HistoryType! } type OTokenRebase @entity { @@ -520,6 +329,7 @@ type OTokenDailyStat @entity { rateUSD: BigInt! rateETH: BigInt! + rateNative: BigInt! totalSupply: BigInt! rebasingSupply: BigInt! @@ -617,6 +427,82 @@ enum HistoryType { Received Yield } +# Pool Booster Events +type PoolBooster @entity { + id: ID! @index # chainId-address + chainId: Int! @index + timestamp: DateTime! @index + blockNumber: Int! @index + address: String! @index + registryAddress: String! @index + ammPoolAddress: String! @index + factoryAddress: String! @index + poolBoosterType: Int! + active: Boolean! +} + +type PoolBoosterBribeExecuted @entity { + id: ID! @index # chainId-address-txHash + chainId: Int! @index + address: String! @index + timestamp: DateTime! @index + blockNumber: Int! @index + txHash: String! + amount: BigInt! + fee: BigInt! +} +type TransactionDetails @entity { + id: ID! + chainId: Int! @index + txHash: String! @index + timestamp: DateTime! @index + blockNumber: Int! @index + from: String! @index + to: String! @index + gasUsed: BigInt! + effectiveGasPrice: BigInt! + transactionFee: BigInt! +} +type StrategyBalance @entity { + id: ID! + chainId: Int! @index + timestamp: DateTime! @index + blockNumber: Int! @index + otoken: String! @index + strategy: String! @index + asset: String! + symbol: String! + balance: BigInt! + balanceETH: BigInt! +} + +type StrategyYield @entity { + id: ID! + timestamp: DateTime! @index + blockNumber: Int! @index + otoken: String! @index + strategy: String! @index + asset: String! + balance: BigInt! + balanceWeight: Float! + earnings: BigInt! + earningsChange: BigInt! +} + +type StrategyDailyYield @entity { + id: ID! + timestamp: DateTime! @index + blockNumber: Int! @index + otoken: String! @index + strategy: String! @index + asset: String! + balance: BigInt! + balanceWeight: Float! + earnings: BigInt! + earningsChange: BigInt! + apr: Float! + apy: Float! +} # - P1: For UI # - stETH ARM TVL # - stETH ARM APY 30 day trailing @@ -691,6 +577,7 @@ type ArmDailyStat @entity { cumulativeFees: BigInt! rateUSD: Float! rateETH: Float! + rateNative: Float! } type ArmWithdrawalRequest @entity { @@ -730,133 +617,248 @@ type TraderateChanged @entity { traderate0: BigInt! traderate1: BigInt! } -type ERC20 @entity { - id: ID! - chainId: Int! @index - address: String! @index - name: String! - decimals: Int! - symbol: String! -} +enum GovernanceProposalState { + Pending + Active + Canceled + Defeated + Succeeded + Queued + Expired + Executed +} -type ERC20Holder @entity { +enum GovernanceProposalEventType { + Created + Queued + Canceled + Extended + Executed +} + +enum GovernanceVoteType { + Against + For + Abstain +} + +type GovernanceProposalEvent @entity { id: ID! + txHash: String! @index + event: GovernanceProposalEventType! + timestamp: DateTime! + proposal: GovernanceProposal! @index +} + +type GovernanceProposal @entity { + id: ID! @index chainId: Int! @index address: String! @index - account: String! @index - since: DateTime! @index - balance: BigInt! + proposalId: BigInt! + description: String + proposer: String! + timestamp: DateTime! + txHash: String! @index + startBlock: BigInt! + endBlock: BigInt! + targets: [String]! + values: [String]! + signatures: [String]! + calldatas: [String]! + lastUpdated: DateTime! + status: GovernanceProposalState! + events: [GovernanceProposalEvent]! @derivedFrom(field: "proposal") + quorum: BigInt! + choices: [String]! + scores: [String]! } -type ERC20State @entity { +type GovernanceProposalVote @entity { + id: ID! + chainId: Int! + address: String! + proposal: GovernanceProposal! @index + voter: String! @index + weight: BigInt! + type: GovernanceVoteType! + txHash: String! + timestamp: DateTime! +}# State + +type ESToken @entity { id: ID! - chainId: Int! @index timestamp: DateTime! @index blockNumber: Int! @index - address: String! @index - totalSupply: BigInt! - holderCount: Int! + circulating: BigInt! + staked: BigInt! + total: BigInt! } -type ERC20StateByDay @entity { - id: ID! +type ESAccount @entity { + id: ID! # `chainId:address:account` chainId: Int! @index - timestamp: DateTime! @index - blockNumber: Int! @index - date: String! @index address: String! @index - totalSupply: BigInt! - holderCount: Int! + account: String! @index + assetBalance: BigInt! + stakedBalance: BigInt! + balance: BigInt! + votingPower: BigInt! + delegateTo: ESAccount + delegatesFrom: [ESAccount]! @derivedFrom(field: "delegateTo") } -type ERC20Balance @entity { +type ESYield @entity { id: ID! chainId: Int! @index + address: String! @index timestamp: DateTime! @index blockNumber: Int! @index + assetBalance: BigInt! + rewardsPerSecond: BigInt! + apr: Float! + apy: Float! +} + +type ESLockup @entity { + id: ID! # `chainId:address:account:lockupId` or `lockupId` + chainId: Int! @index address: String! @index account: String! @index - balance: BigInt! + lockupId: BigInt! @index + timestamp: DateTime! + txHash: String! @index + lastUpdated: DateTime! + amount: BigInt! + end: DateTime! + points: BigInt! + withdrawAmount: BigInt! + penalty: BigInt! + state: ESLockupState + events: [ESLockupEvent]! @derivedFrom(field: "lockup") } -type ERC20Transfer @entity { +enum ESLockupState { + Open + Closed +} + +enum ESLockupEventType { + Staked + Unstaked + Extended +} + +type ESLockupEvent @entity { id: ID! chainId: Int! @index - txHash: String! - blockNumber: Int! - timestamp: DateTime! address: String! @index - from: String! @index - fromBalance: BigInt! - to: String! @index - toBalance: BigInt! - value: BigInt! -} -type ProcessingStatus @entity { - id: ID! - timestamp: DateTime! - blockNumber: Int! - startTimestamp: DateTime! # when we started processing - headTimestamp: DateTime # when we first hit head block + timestamp: DateTime! @index + blockNumber: Int! @index + txHash: String! @index + event: ESLockupEventType! + lockup: ESLockup! } -type AeroCLGaugeNotifyReward @entity { - id: ID! + +# Events +type ESDelegateChanged @entity { + id: ID! # `chainId:logId` chainId: Int! @index + address: String! @index + timestamp: DateTime! @index blockNumber: Int! @index + txHash: String! @index + delegator: String! @index + fromDelegate: String! + toDelegate: String! +} + +type ESDelegateVotesChanged @entity { + id: ID! # `chainId:logId` + chainId: Int! @index + address: String! @index timestamp: DateTime! @index + blockNumber: Int! @index + txHash: String! @index + delegate: String! @index + previousBalance: BigInt! + newBalance: BigInt! +} + +type ESPenalty @entity { + id: ID! # `chainId:logId` + chainId: Int! @index address: String! @index - from: String! @index + timestamp: DateTime! @index + blockNumber: Int! @index + txHash: String! @index + account: String! @index amount: BigInt! } -type AeroGaugeNotifyReward @entity { - id: ID! +type ESReward @entity { + id: ID! # `chainId:logId` chainId: Int! @index - blockNumber: Int! @index - timestamp: DateTime! @index address: String! @index - from: String! @index + timestamp: DateTime! @index + blockNumber: Int! @index + txHash: String! @index + account: String! @index amount: BigInt! } -type AeroPoolCreated @entity { - id: ID! +type ESStake @entity { + id: ID! # `chainId:logId` chainId: Int! @index - blockNumber: Int! @index - timestamp: DateTime! @index address: String! @index - pool: String! - token0: String! - token1: String! - stable: Boolean! + timestamp: DateTime! @index + blockNumber: Int! @index + txHash: String! @index + account: String! @index + lockupId: BigInt! @index + amount: BigInt! + end: BigInt! + points: BigInt! } -type AeroCLPoolCreated @entity { - id: ID! +type ESUnstake @entity { + id: ID! # `chainId:logId` chainId: Int! @index + address: String! @index + timestamp: DateTime! @index blockNumber: Int! @index + txHash: String! @index + account: String! @index + lockupId: BigInt! @index + amount: BigInt! + end: BigInt! + points: BigInt! +} +type BridgeTransfer @entity { + id: ID! # chain + log id timestamp: DateTime! @index - address: String! @index - pool: String! - token0: String! - token1: String! - tickSpacing: Int! + blockNumber: Int! @index + txHashIn: String! + txHashOut: String # Initially null + messageId: String! @index + bridge: String! @index + transactor: String! @index + sender: String! @index + receiver: String! @index + chainIn: Int! @index + chainOut: Int! + tokenIn: String! + tokenOut: String! + amountIn: BigInt! + amountOut: BigInt! + state: Int! } -type AeroVoterGaugeCreated @entity { +type BridgeTransferState @entity { id: ID! - chainId: Int! @index - blockNumber: Int! @index timestamp: DateTime! @index - address: String! @index - poolFactory: String! @index - votingRewardsFactory: String! @index - gaugeFactory: String! @index - pool: String! - bribeVotingReward: String! - feeVotingReward: String! - gauge: String! - creator: String! + blockNumber: Int! @index + txHash: String! @index + state: Int! } type AeroPoolState @entity { id: ID! # chainId:poolAddress:blockNumber @@ -973,325 +975,184 @@ type AeroLPPosition @entity { sqrtRatioLower: BigInt! sqrtRatioUpper: BigInt! } -enum GovernanceProposalState { - Pending - Active - Canceled - Defeated - Succeeded - Queued - Expired - Executed -} - -enum GovernanceProposalEventType { - Created - Queued - Canceled - Extended - Executed -} - -enum GovernanceVoteType { - Against - For - Abstain -} - -type GovernanceProposalEvent @entity { +type AeroCLGaugeNotifyReward @entity { id: ID! - txHash: String! @index - event: GovernanceProposalEventType! - timestamp: DateTime! - proposal: GovernanceProposal! @index -} - -type GovernanceProposal @entity { - id: ID! @index chainId: Int! @index - address: String! @index - proposalId: BigInt! - description: String - proposer: String! - timestamp: DateTime! - txHash: String! @index - startBlock: BigInt! - endBlock: BigInt! - targets: [String]! - values: [String]! - signatures: [String]! - calldatas: [String]! - lastUpdated: DateTime! - status: GovernanceProposalState! - events: [GovernanceProposalEvent]! @derivedFrom(field: "proposal") - quorum: BigInt! - choices: [String]! - scores: [String]! -} - -type GovernanceProposalVote @entity { - id: ID! - chainId: Int! - address: String! - proposal: GovernanceProposal! @index - voter: String! @index - weight: BigInt! - type: GovernanceVoteType! - txHash: String! - timestamp: DateTime! -}type BridgeTransfer @entity { - id: ID! # chain + log id - timestamp: DateTime! @index blockNumber: Int! @index - txHashIn: String! - txHashOut: String # Initially null - messageId: String! @index - bridge: String! @index - transactor: String! @index - sender: String! @index - receiver: String! @index - chainIn: Int! @index - chainOut: Int! - tokenIn: String! - tokenOut: String! - amountIn: BigInt! - amountOut: BigInt! - state: Int! -} - -type BridgeTransferState @entity { - id: ID! timestamp: DateTime! @index - blockNumber: Int! @index - txHash: String! @index - state: Int! -} -type FRRSRewardCollected @entity { - id: ID! - chainId: Int! @index address: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - txHash: String! @index - amountCollected: BigInt! + from: String! @index + amount: BigInt! } -type FRRSRewardsPerSecondChanged @entity { + +type AeroGaugeNotifyReward @entity { id: ID! chainId: Int! @index - address: String! @index - timestamp: DateTime! @index blockNumber: Int! @index - txHash: String! @index - newRPS: BigInt! - oldRPS: BigInt! -} -type FRRSRewardsTargetChange @entity { - id: ID! - chainId: Int! @index - address: String! @index timestamp: DateTime! @index - blockNumber: Int! @index - txHash: String! @index - target: String! - previousTarget: String! + address: String! @index + from: String! @index + amount: BigInt! } -type FRRSStrategistUpdated @entity { + +type AeroPoolCreated @entity { id: ID! chainId: Int! @index - address: String! @index - timestamp: DateTime! @index blockNumber: Int! @index - txHash: String! @index - strategistAddress: String! -}# State - -type ESToken @entity { - id: ID! timestamp: DateTime! @index - blockNumber: Int! @index - circulating: BigInt! - staked: BigInt! - total: BigInt! -} - -type ESAccount @entity { - id: ID! # `chainId:address:account` - chainId: Int! @index address: String! @index - account: String! @index - assetBalance: BigInt! - stakedBalance: BigInt! - balance: BigInt! - votingPower: BigInt! - delegateTo: ESAccount - delegatesFrom: [ESAccount]! @derivedFrom(field: "delegateTo") + pool: String! + token0: String! + token1: String! + stable: Boolean! } -type ESYield @entity { +type AeroCLPoolCreated @entity { id: ID! chainId: Int! @index - address: String! @index - timestamp: DateTime! @index blockNumber: Int! @index - assetBalance: BigInt! - rewardsPerSecond: BigInt! - apr: Float! - apy: Float! -} - -type ESLockup @entity { - id: ID! # `chainId:address:account:lockupId` or `lockupId` - chainId: Int! @index + timestamp: DateTime! @index address: String! @index - account: String! @index - lockupId: BigInt! @index - timestamp: DateTime! - txHash: String! @index - lastUpdated: DateTime! - amount: BigInt! - end: DateTime! - points: BigInt! - withdrawAmount: BigInt! - penalty: BigInt! - state: ESLockupState - events: [ESLockupEvent]! @derivedFrom(field: "lockup") -} - -enum ESLockupState { - Open - Closed -} - -enum ESLockupEventType { - Staked - Unstaked - Extended + pool: String! + token0: String! + token1: String! + tickSpacing: Int! } -type ESLockupEvent @entity { +type AeroVoterGaugeCreated @entity { id: ID! chainId: Int! @index - address: String! @index - timestamp: DateTime! @index blockNumber: Int! @index - txHash: String! @index - event: ESLockupEventType! - lockup: ESLockup! + timestamp: DateTime! @index + address: String! @index + poolFactory: String! @index + votingRewardsFactory: String! @index + gaugeFactory: String! @index + pool: String! + bribeVotingReward: String! + feeVotingReward: String! + gauge: String! + creator: String! } - -# Events -type ESDelegateChanged @entity { - id: ID! # `chainId:logId` +type FRRSRewardCollected @entity { + id: ID! chainId: Int! @index address: String! @index timestamp: DateTime! @index blockNumber: Int! @index txHash: String! @index - delegator: String! @index - fromDelegate: String! - toDelegate: String! + amountCollected: BigInt! } - -type ESDelegateVotesChanged @entity { - id: ID! # `chainId:logId` +type FRRSRewardsPerSecondChanged @entity { + id: ID! chainId: Int! @index address: String! @index timestamp: DateTime! @index blockNumber: Int! @index txHash: String! @index - delegate: String! @index - previousBalance: BigInt! - newBalance: BigInt! -} - -type ESPenalty @entity { - id: ID! # `chainId:logId` + newRPS: BigInt! + oldRPS: BigInt! +} +type FRRSRewardsTargetChange @entity { + id: ID! chainId: Int! @index address: String! @index timestamp: DateTime! @index blockNumber: Int! @index txHash: String! @index - account: String! @index - amount: BigInt! + target: String! + previousTarget: String! } - -type ESReward @entity { - id: ID! # `chainId:logId` +type FRRSStrategistUpdated @entity { + id: ID! chainId: Int! @index address: String! @index timestamp: DateTime! @index blockNumber: Int! @index txHash: String! @index - account: String! @index - amount: BigInt! + strategistAddress: String! +}type ProcessingStatus @entity { + id: ID! + timestamp: DateTime! + blockNumber: Int! + startTimestamp: DateTime! # when we started processing + headTimestamp: DateTime # when we first hit head block } - -type ESStake @entity { - id: ID! # `chainId:logId` +type ERC20 @entity { + id: ID! chainId: Int! @index address: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - txHash: String! @index - account: String! @index - lockupId: BigInt! @index - amount: BigInt! - end: BigInt! - points: BigInt! + name: String! + decimals: Int! + symbol: String! } -type ESUnstake @entity { - id: ID! # `chainId:logId` +type ERC20Holder @entity { + id: ID! chainId: Int! @index address: String! @index - timestamp: DateTime! @index - blockNumber: Int! @index - txHash: String! @index account: String! @index - lockupId: BigInt! @index - amount: BigInt! - end: BigInt! - points: BigInt! + since: DateTime! @index + balance: BigInt! } -type StrategyBalance @entity { + +type ERC20State @entity { id: ID! chainId: Int! @index timestamp: DateTime! @index blockNumber: Int! @index - otoken: String! @index - strategy: String! @index - asset: String! - symbol: String! - balance: BigInt! - balanceETH: BigInt! + address: String! @index + totalSupply: BigInt! + holderCount: Int! } -type StrategyYield @entity { +type ERC20StateByDay @entity { id: ID! + chainId: Int! @index timestamp: DateTime! @index blockNumber: Int! @index - otoken: String! @index - strategy: String! @index - asset: String! - balance: BigInt! - balanceWeight: Float! - earnings: BigInt! - earningsChange: BigInt! + date: String! @index + address: String! @index + totalSupply: BigInt! + holderCount: Int! } -type StrategyDailyYield @entity { +type ERC20Balance @entity { id: ID! + chainId: Int! @index timestamp: DateTime! @index blockNumber: Int! @index - otoken: String! @index - strategy: String! @index - asset: String! + address: String! @index + account: String! @index balance: BigInt! - balanceWeight: Float! - earnings: BigInt! - earningsChange: BigInt! - apr: Float! - apy: Float! +} + +type ERC20Transfer @entity { + id: ID! + chainId: Int! @index + txHash: String! + blockNumber: Int! + timestamp: DateTime! + address: String! @index + from: String! @index + fromBalance: BigInt! + to: String! @index + toBalance: BigInt! + value: BigInt! +} +type Pool @entity { + id: ID! + chainId: Int! @index + address: String! @index + exchange: String! @index + name: String + symbol: String + tokens: [String!]! + symbols: [String!]! + decimals: [Int!]! + type: String! + createdAtBlock: Int! + createdAt: DateTime! } type SFCWithdrawal @entity { id: ID! @@ -1327,4 +1188,144 @@ type EventWOETHPriceUpdated @entity { address: String! @index oldValue: BigInt! newValue: BigInt! -} \ No newline at end of file +}type UtilCache @entity { + id: ID! @index + data: JSON! +} +""" +Any entity which has a price associated with it should have that price go in here. +Prices can change very frequently and we don't want those changes on the same track +as values which change less frequently. +""" +type ExchangeRate @entity { + """ + Format: 'chainId:blockNumber:pair' ex '1:123456789:ETH_USD' + """ + id: ID! + chainId: Int! @index + timestamp: DateTime! @index + blockNumber: Int! @index + pair: String! + base: String! + quote: String! + rate: BigInt! + decimals: Int! +} +type OGV @entity { + id: ID! + timestamp: DateTime! @index + blockNumber: Int! @index + circulating: BigInt! + staked: BigInt! + total: BigInt! +} + +type OGVAddress @entity { + id: ID! @index + balance: BigInt! + staked: BigInt! + veogvBalance: BigInt! + votingPower: BigInt! + delegatee: OGVAddress + lastUpdated: DateTime! +} + +enum OGVLockupEventType { + Staked + Unstaked + Extended +} + +type OGVLockupTxLog @entity { + id: ID! + hash: String! + event: OGVLockupEventType! + timestamp: DateTime! + blockNumber: Int! + totalSupply: BigInt! + ogvLockup: OGVLockup! +} + +type OGVLockup @entity { + id: ID! + lockupId: String! @index + address: OGVAddress! @index + logs: [OGVLockupTxLog]! @derivedFrom(field: "ogvLockup") + amount: BigInt! + end: DateTime! + veogv: BigInt! # Amount of veOGV received + timestamp: DateTime! + # active: Boolean +} + +enum OGVProposalState { + Pending + Active + Canceled + Defeated + Succeeded + Queued + Expired + Executed +} + +enum OGVProposalEvent { + Created + Queued + Canceled + Extended + Executed +} + +enum OGVVoteType { + Against + For + Abstain +} + +type OGVProposalTxLog @entity { + id: ID! + hash: String! + event: OGVProposalEvent! + timestamp: DateTime! + proposal: OGVProposal! @index +} + +type OGVProposal @entity { + id: ID! @index + description: String + proposer: OGVAddress! + timestamp: DateTime! + startBlock: BigInt! + endBlock: BigInt! + lastUpdated: DateTime! + status: OGVProposalState! + logs: [OGVProposalTxLog]! @derivedFrom(field: "proposal") + quorum: BigInt! + choices: [String]! + scores: [String]! +} + +type OGVProposalVote @entity { + id: ID! + proposal: OGVProposal! @index + voter: OGVAddress! @index + weight: BigInt! + type: OGVVoteType! + 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! +} diff --git a/scripts/generate-validations.ts b/scripts/generate-validations.ts index 980cc70a..f3cd1bb4 100644 --- a/scripts/generate-validations.ts +++ b/scripts/generate-validations.ts @@ -177,6 +177,7 @@ const oTokenDailyStats = (prefix: string, address: string) => { fees rateETH rateUSD + rateNative yield marketCapUSD accountsOverThreshold @@ -281,6 +282,7 @@ const arm = (prefix: string, armAddress: string) => { totalAssetsCap totalSupply yield + rateNative } `), ] diff --git a/src/model/generated/armDailyStat.model.ts b/src/model/generated/armDailyStat.model.ts index e2f5ba68..be7af972 100644 --- a/src/model/generated/armDailyStat.model.ts +++ b/src/model/generated/armDailyStat.model.ts @@ -88,4 +88,7 @@ export class ArmDailyStat { @FloatColumn_({nullable: false}) rateETH!: number + + @FloatColumn_({nullable: false}) + rateNative!: number } diff --git a/src/model/generated/index.ts b/src/model/generated/index.ts index acb54bd0..8387ca87 100644 --- a/src/model/generated/index.ts +++ b/src/model/generated/index.ts @@ -1,36 +1,18 @@ -export * from "./utilCache.model" -export * from "./exchangeRate.model" -export * from "./nativeBalance.model" -export * from "./legacyStaker.model" -export * from "./curvePool.model" -export * from "./curvePoolBalance.model" -export * from "./curvePoolRate.model" +export * from "./ognDailyStat.model" +export * from "./coinGeckoCoinData.model" export * from "./protocolDailyStat.model" export * from "./protocolDailyStatDetail.model" export * from "./beaconDepositEvent.model" export * from "./beaconDepositPubkey.model" export * from "./accountingConsensusRewards.model" export * from "./executionRewardsCollected.model" -export * from "./coinGeckoCoinData.model" -export * from "./ognBuyback.model" export * from "./walletLabels.model" -export * from "./ognDailyStat.model" -export * from "./ogv.model" -export * from "./ogvAddress.model" -export * from "./ogvLockupTxLog.model" -export * from "./_ogvLockupEventType" -export * from "./ogvLockup.model" -export * from "./ogvProposalTxLog.model" -export * from "./_ogvProposalEvent" -export * from "./ogvProposal.model" -export * from "./_ogvProposalState" -export * from "./ogvProposalVote.model" -export * from "./_ogvVoteType" -export * from "./ogvDailyStat.model" -export * from "./transactionDetails.model" -export * from "./pool.model" -export * from "./poolBooster.model" -export * from "./poolBoosterBribeExecuted.model" +export * from "./curvePool.model" +export * from "./curvePoolBalance.model" +export * from "./curvePoolRate.model" +export * from "./ognBuyback.model" +export * from "./nativeBalance.model" +export * from "./legacyStaker.model" export * from "./oToken.model" export * from "./oTokenRawData.model" export * from "./woToken.model" @@ -51,43 +33,24 @@ export * from "./oTokenHarvesterYieldSent.model" export * from "./oTokenRewardTokenCollected.model" export * from "./oTokenWithdrawalRequest.model" export * from "./oTokenYieldForwarded.model" +export * from "./poolBooster.model" +export * from "./poolBoosterBribeExecuted.model" +export * from "./transactionDetails.model" +export * from "./strategyBalance.model" +export * from "./strategyYield.model" +export * from "./strategyDailyYield.model" export * from "./arm.model" export * from "./armState.model" export * from "./armDailyStat.model" export * from "./armWithdrawalRequest.model" export * from "./armSwap.model" export * from "./traderateChanged.model" -export * from "./erc20.model" -export * from "./erc20Holder.model" -export * from "./erc20State.model" -export * from "./erc20StateByDay.model" -export * from "./erc20Balance.model" -export * from "./erc20Transfer.model" -export * from "./processingStatus.model" -export * from "./aeroClGaugeNotifyReward.model" -export * from "./aeroGaugeNotifyReward.model" -export * from "./aeroPoolCreated.model" -export * from "./aeroClPoolCreated.model" -export * from "./aeroVoterGaugeCreated.model" -export * from "./aeroPoolState.model" -export * from "./aeroClPoolState.model" -export * from "./aeroClPoolTick.model" -export * from "./aeroPoolEpochState.model" -export * from "./_tokenAmount" -export * from "./aeroLp.model" -export * from "./aeroLpPosition.model" export * from "./governanceProposalEvent.model" export * from "./_governanceProposalEventType" export * from "./governanceProposal.model" export * from "./_governanceProposalState" export * from "./governanceProposalVote.model" export * from "./_governanceVoteType" -export * from "./bridgeTransfer.model" -export * from "./bridgeTransferState.model" -export * from "./frrsRewardCollected.model" -export * from "./frrsRewardsPerSecondChanged.model" -export * from "./frrsRewardsTargetChange.model" -export * from "./frrsStrategistUpdated.model" export * from "./esToken.model" export * from "./esAccount.model" export * from "./esYield.model" @@ -101,9 +64,46 @@ export * from "./esPenalty.model" export * from "./esReward.model" export * from "./esStake.model" export * from "./esUnstake.model" -export * from "./strategyBalance.model" -export * from "./strategyYield.model" -export * from "./strategyDailyYield.model" +export * from "./bridgeTransfer.model" +export * from "./bridgeTransferState.model" +export * from "./aeroPoolState.model" +export * from "./aeroClPoolState.model" +export * from "./aeroClPoolTick.model" +export * from "./aeroPoolEpochState.model" +export * from "./_tokenAmount" +export * from "./aeroLp.model" +export * from "./aeroLpPosition.model" +export * from "./aeroClGaugeNotifyReward.model" +export * from "./aeroGaugeNotifyReward.model" +export * from "./aeroPoolCreated.model" +export * from "./aeroClPoolCreated.model" +export * from "./aeroVoterGaugeCreated.model" +export * from "./frrsRewardCollected.model" +export * from "./frrsRewardsPerSecondChanged.model" +export * from "./frrsRewardsTargetChange.model" +export * from "./frrsStrategistUpdated.model" +export * from "./processingStatus.model" +export * from "./erc20.model" +export * from "./erc20Holder.model" +export * from "./erc20State.model" +export * from "./erc20StateByDay.model" +export * from "./erc20Balance.model" +export * from "./erc20Transfer.model" +export * from "./pool.model" export * from "./sfcWithdrawal.model" export * from "./morphoMarketState.model" export * from "./eventWoethPriceUpdated.model" +export * from "./utilCache.model" +export * from "./exchangeRate.model" +export * from "./ogv.model" +export * from "./ogvAddress.model" +export * from "./ogvLockupTxLog.model" +export * from "./_ogvLockupEventType" +export * from "./ogvLockup.model" +export * from "./ogvProposalTxLog.model" +export * from "./_ogvProposalEvent" +export * from "./ogvProposal.model" +export * from "./_ogvProposalState" +export * from "./ogvProposalVote.model" +export * from "./_ogvVoteType" +export * from "./ogvDailyStat.model" diff --git a/src/model/generated/oTokenDailyStat.model.ts b/src/model/generated/oTokenDailyStat.model.ts index 44191c54..0ace6424 100644 --- a/src/model/generated/oTokenDailyStat.model.ts +++ b/src/model/generated/oTokenDailyStat.model.ts @@ -50,6 +50,9 @@ export class OTokenDailyStat { @BigIntColumn_({nullable: false}) rateETH!: bigint + @BigIntColumn_({nullable: false}) + rateNative!: bigint + @BigIntColumn_({nullable: false}) totalSupply!: bigint diff --git a/src/templates/origin-arm/origin-arm.graphql b/src/templates/origin-arm/origin-arm.graphql index 87bf8278..13729f81 100644 --- a/src/templates/origin-arm/origin-arm.graphql +++ b/src/templates/origin-arm/origin-arm.graphql @@ -72,6 +72,7 @@ type ArmDailyStat @entity { cumulativeFees: BigInt! rateUSD: Float! rateETH: Float! + rateNative: Float! } type ArmWithdrawalRequest @entity { diff --git a/src/templates/origin-arm/origin-arm.ts b/src/templates/origin-arm/origin-arm.ts index 0f9e1d6c..7af5fc3a 100644 --- a/src/templates/origin-arm/origin-arm.ts +++ b/src/templates/origin-arm/origin-arm.ts @@ -351,11 +351,12 @@ export const createOriginARMProcessors = ({ for (const block of ctx.blocks) { if (tracker(ctx, block) || (block.header.height > from && ctx.latestBlockOfDay(block))) { // ArmState - const [state, yesterdayState, rateUSD, rateETH] = await Promise.all([ + const [state, yesterdayState, rateUSD, rateETH, rateNative] = await Promise.all([ getCurrentState(block), getYesterdayState(block), ensureExchangeRate(ctx, block, underlyingToken, 'USD'), ensureExchangeRate(ctx, block, underlyingToken, 'ETH'), + ensureExchangeRate(ctx, block, underlyingToken, ctx.chain.nativeCurrency.symbol as Currency), ]) // ArmDailyStat @@ -402,6 +403,7 @@ export const createOriginARMProcessors = ({ cumulativeYield: state.totalYield, rateUSD: +formatUnits(rateUSD?.rate ?? 0n, rateUSD?.decimals ?? 18), rateETH: +formatUnits(rateETH?.rate ?? 0n, rateETH?.decimals ?? 18), + rateNative: +formatUnits(rateNative?.rate ?? 0n, rateNative?.decimals ?? 18), }) dailyStatsMap.set(currentDayId, armDailyStatEntity) } diff --git a/src/templates/otoken/otoken-daily-stats.ts b/src/templates/otoken/otoken-daily-stats.ts index 25fbee3d..47e94b70 100644 --- a/src/templates/otoken/otoken-daily-stats.ts +++ b/src/templates/otoken/otoken-daily-stats.ts @@ -10,7 +10,7 @@ import * as wotokenAbi from '@abi/woeth' import { OToken, OTokenAPY, OTokenDailyStat, OTokenRebase } from '@model' import { Block, Context } from '@originprotocol/squid-utils' import { ensureExchangeRate } from '@shared/post-processors/exchange-rates' -import { CurrencyAddress } from '@shared/post-processors/exchange-rates/mainnetCurrencies' +import { Currency, CurrencyAddress } from '@shared/post-processors/exchange-rates/mainnetCurrencies' /** * For sake of efficiency, we only want to update the daily stats if the block is within 20 seconds of the hourly crossover or if there has been recent activity on the OToken. @@ -79,7 +79,7 @@ export const processOTokenDailyStats = async ( : null const asyncStartTime = Date.now() - const [otokenObject, apy, rebases, rateETH, rateUSD, dripperWETH, amoSupply, wrappedSupply, wrappedRate] = + const [otokenObject, apy, rebases, rateETH, rateUSD, dripperWETH, amoSupply, wrappedSupply, wrappedRate, rateNative] = await Promise.all([ (async () => { let otokenObject = findLast(params.otokens, (o) => o.timestamp <= blockDate) @@ -127,6 +127,9 @@ export const processOTokenDailyStats = async ( params.getAmoSupply(ctx, block.header.height), wotokenContract ? wotokenContract.totalSupply() : 0n, wotokenContract ? wotokenContract.previewRedeem(10n ** 18n) : 0n, + ensureExchangeRate(ctx, block, params.otokenAddress as CurrencyAddress, ctx.chain.nativeCurrency.symbol as Currency).then( + (a) => a?.rate ?? 0n, + ), ]) if (process.env.DEBUG_PERF === 'true') { ctx.log.info(`getOTokenDailyStat async calls took ${Date.now() - asyncStartTime}ms`) @@ -175,6 +178,7 @@ export const processOTokenDailyStats = async ( entity.rateETH = rateETH entity.rateUSD = rateUSD + entity.rateNative = rateNative entity.amoSupply = amoSupply entity.dripperWETH = dripperWETH @@ -217,6 +221,7 @@ export const getOTokenDailyStat = async ( rateUSD: 0n, rateETH: 0n, + rateNative: 0n, totalSupply: 0n, rebasingSupply: 0n, diff --git a/src/templates/otoken/otoken.graphql b/src/templates/otoken/otoken.graphql index e6d46324..289b9c87 100644 --- a/src/templates/otoken/otoken.graphql +++ b/src/templates/otoken/otoken.graphql @@ -177,6 +177,7 @@ type OTokenDailyStat @entity { rateUSD: BigInt! rateETH: BigInt! + rateNative: BigInt! totalSupply: BigInt! rebasingSupply: BigInt! From aefce1abe30265e0e615654a0393d4d3e1c42dfb Mon Sep 17 00:00:00 2001 From: toniocodo Date: Mon, 1 Sep 2025 14:25:57 +0200 Subject: [PATCH 2/5] chore: migrations --- ...42284453-Data.js => 1756729531489-Data.js} | 912 +++++++++--------- 1 file changed, 456 insertions(+), 456 deletions(-) rename db/migrations/{1756242284453-Data.js => 1756729531489-Data.js} (99%) diff --git a/db/migrations/1756242284453-Data.js b/db/migrations/1756729531489-Data.js similarity index 99% rename from db/migrations/1756242284453-Data.js rename to db/migrations/1756729531489-Data.js index 81e0ec32..2779372a 100644 --- a/db/migrations/1756242284453-Data.js +++ b/db/migrations/1756729531489-Data.js @@ -1,24 +1,13 @@ -module.exports = class Data1756242284453 { - name = 'Data1756242284453' +module.exports = class Data1756729531489 { + name = 'Data1756729531489' async up(db) { - await db.query(`CREATE TABLE "util_cache" ("id" character varying NOT NULL, "data" jsonb NOT NULL, CONSTRAINT "PK_d8dba67b2f156e569ad7ecf21d6" PRIMARY KEY ("id"))`) - await db.query(`CREATE TABLE "exchange_rate" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "pair" text NOT NULL, "base" text NOT NULL, "quote" text NOT NULL, "rate" numeric NOT NULL, "decimals" integer NOT NULL, CONSTRAINT "PK_5c5d27d2b900ef6cdeef0398472" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_2b58051dcc72cf0f02aa41ff14" ON "exchange_rate" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_9e23a3f1bf3634820c873a0fe8" ON "exchange_rate" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_c61a93768eed9e58ce399bbe01" ON "exchange_rate" ("block_number") `) - await db.query(`CREATE TABLE "native_balance" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "account" text NOT NULL, "balance" numeric NOT NULL, CONSTRAINT "PK_62f6bdfe058e52d1914d0c2c1ce" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_45fb48f831ccadcf29f404824a" ON "native_balance" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_82d827c3b96fb3c5ab43068502" ON "native_balance" ("block_number") `) - await db.query(`CREATE TABLE "legacy_staker" ("id" character varying NOT NULL, "input_amount" numeric NOT NULL, "output_amount" numeric NOT NULL, "balance" numeric NOT NULL, "reward_amount" numeric NOT NULL, CONSTRAINT "PK_11a12e3c39ce22c9a05990c9a56" PRIMARY KEY ("id"))`) - await db.query(`CREATE TABLE "curve_pool" ("id" character varying NOT NULL, "address" text NOT NULL, "name" text NOT NULL, "token_count" integer NOT NULL, "token0" text NOT NULL, "token1" text NOT NULL, "token2" text, CONSTRAINT "PK_c04bba36a8aa877d6efa4eafd6c" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_76c9202c1160ce818f7a29d131" ON "curve_pool" ("address") `) - await db.query(`CREATE TABLE "curve_pool_balance" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "balance0" numeric NOT NULL, "balance1" numeric NOT NULL, "balance2" numeric NOT NULL, CONSTRAINT "PK_40412750bb910ca560aa084dd88" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_ffb0d0f86f03faacef7cb3e092" ON "curve_pool_balance" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_db5522c865eb8ed76fa7aeb4a8" ON "curve_pool_balance" ("block_number") `) - await db.query(`CREATE TABLE "curve_pool_rate" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "name" text NOT NULL, "rate" numeric NOT NULL, CONSTRAINT "PK_91a04fe55298abe8abd8da1b813" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_561faf9883f4bb00ae6df34cc1" ON "curve_pool_rate" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_cefe6315e78e235fa4ab3de663" ON "curve_pool_rate" ("block_number") `) + await db.query(`CREATE TABLE "ogn_daily_stat" ("id" character varying NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "total_supply" numeric NOT NULL, "total_supply_usd" numeric NOT NULL, "total_staked" numeric NOT NULL, "trading_volume_usd" numeric NOT NULL, "market_cap_usd" numeric NOT NULL, "price_usd" numeric NOT NULL, "holders_over_threshold" integer NOT NULL, CONSTRAINT "PK_c87054f4663051254b7b2afa536" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_cb4297ef85375ee13a3446b240" ON "ogn_daily_stat" ("block_number") `) + await db.query(`CREATE INDEX "IDX_b96b9849e1e479d743ffb547c9" ON "ogn_daily_stat" ("timestamp") `) + await db.query(`CREATE TABLE "coin_gecko_coin_data" ("id" character varying NOT NULL, "product" text NOT NULL, "date" text NOT NULL, "vs_currency" text NOT NULL, "price" numeric NOT NULL, "market_cap" numeric NOT NULL, "trading_volume" numeric NOT NULL, CONSTRAINT "PK_abb8340f8d830c27b3288a1083c" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_55f8b56cad28caa22a995dfb83" ON "coin_gecko_coin_data" ("product") `) + await db.query(`CREATE INDEX "IDX_821542437abc5d0d6aa7959131" ON "coin_gecko_coin_data" ("date") `) await db.query(`CREATE TABLE "protocol_daily_stat" ("id" character varying NOT NULL, "date" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "rate_usd" numeric NOT NULL, "earning_tvl" numeric NOT NULL, "tvl" numeric NOT NULL, "revenue" numeric NOT NULL, "apy" numeric NOT NULL, "meta" jsonb NOT NULL, CONSTRAINT "PK_70427505fb8a9474c634fd7a154" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_f196efecb1b717f74494c4416b" ON "protocol_daily_stat" ("date") `) await db.query(`CREATE INDEX "IDX_a5af597a96fb8752dc00093192" ON "protocol_daily_stat" ("timestamp") `) @@ -46,61 +35,23 @@ module.exports = class Data1756242284453 { await db.query(`CREATE INDEX "IDX_b883d5666bb2f8b5b1f7d9633a" ON "execution_rewards_collected" ("block_number") `) await db.query(`CREATE INDEX "IDX_adcff42ecde1a20daeb870b3c4" ON "execution_rewards_collected" ("address") `) await db.query(`CREATE INDEX "IDX_41665fa5e546780642bacf96c7" ON "execution_rewards_collected" ("strategy") `) - await db.query(`CREATE TABLE "coin_gecko_coin_data" ("id" character varying NOT NULL, "product" text NOT NULL, "date" text NOT NULL, "vs_currency" text NOT NULL, "price" numeric NOT NULL, "market_cap" numeric NOT NULL, "trading_volume" numeric NOT NULL, CONSTRAINT "PK_abb8340f8d830c27b3288a1083c" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_55f8b56cad28caa22a995dfb83" ON "coin_gecko_coin_data" ("product") `) - await db.query(`CREATE INDEX "IDX_821542437abc5d0d6aa7959131" ON "coin_gecko_coin_data" ("date") `) + await db.query(`CREATE TABLE "wallet_labels" ("id" character varying NOT NULL, "address" text NOT NULL, "description" text NOT NULL, "labels" text array NOT NULL, "last_updated" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_59edf57a7c32b43605aec86b9e0" PRIMARY KEY ("id"))`) + await db.query(`CREATE TABLE "curve_pool" ("id" character varying NOT NULL, "address" text NOT NULL, "name" text NOT NULL, "token_count" integer NOT NULL, "token0" text NOT NULL, "token1" text NOT NULL, "token2" text, CONSTRAINT "PK_c04bba36a8aa877d6efa4eafd6c" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_76c9202c1160ce818f7a29d131" ON "curve_pool" ("address") `) + await db.query(`CREATE TABLE "curve_pool_balance" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "balance0" numeric NOT NULL, "balance1" numeric NOT NULL, "balance2" numeric NOT NULL, CONSTRAINT "PK_40412750bb910ca560aa084dd88" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_ffb0d0f86f03faacef7cb3e092" ON "curve_pool_balance" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_db5522c865eb8ed76fa7aeb4a8" ON "curve_pool_balance" ("block_number") `) + await db.query(`CREATE TABLE "curve_pool_rate" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "name" text NOT NULL, "rate" numeric NOT NULL, CONSTRAINT "PK_91a04fe55298abe8abd8da1b813" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_561faf9883f4bb00ae6df34cc1" ON "curve_pool_rate" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_cefe6315e78e235fa4ab3de663" ON "curve_pool_rate" ("block_number") `) await db.query(`CREATE TABLE "ogn_buyback" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "operator" text NOT NULL, "token_sold" text NOT NULL, "amount_sold" numeric NOT NULL, "ogn_bought" numeric NOT NULL, "ogn_bought_usd" numeric NOT NULL, "tx_hash" text NOT NULL, CONSTRAINT "PK_7a3b8c1f6b0f5d5c9ae759744d6" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_daa406e4bd0f1313c9e54aab97" ON "ogn_buyback" ("timestamp") `) await db.query(`CREATE INDEX "IDX_854fb3714182df4d2ba943417a" ON "ogn_buyback" ("block_number") `) await db.query(`CREATE INDEX "IDX_30396766a2f98c53fc916657e6" ON "ogn_buyback" ("operator") `) - await db.query(`CREATE TABLE "wallet_labels" ("id" character varying NOT NULL, "address" text NOT NULL, "description" text NOT NULL, "labels" text array NOT NULL, "last_updated" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_59edf57a7c32b43605aec86b9e0" PRIMARY KEY ("id"))`) - await db.query(`CREATE TABLE "ogn_daily_stat" ("id" character varying NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "total_supply" numeric NOT NULL, "total_supply_usd" numeric NOT NULL, "total_staked" numeric NOT NULL, "trading_volume_usd" numeric NOT NULL, "market_cap_usd" numeric NOT NULL, "price_usd" numeric NOT NULL, "holders_over_threshold" integer NOT NULL, CONSTRAINT "PK_c87054f4663051254b7b2afa536" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_cb4297ef85375ee13a3446b240" ON "ogn_daily_stat" ("block_number") `) - await db.query(`CREATE INDEX "IDX_b96b9849e1e479d743ffb547c9" ON "ogn_daily_stat" ("timestamp") `) - await db.query(`CREATE TABLE "ogv" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "circulating" numeric NOT NULL, "staked" numeric NOT NULL, "total" numeric NOT NULL, CONSTRAINT "PK_f16038abf451ce82bd03ea54ee7" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_2418a8b8b92b2f5977be761cf9" ON "ogv" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_b8f20bcf48e4aa77e0f48d77db" ON "ogv" ("block_number") `) - await db.query(`CREATE TABLE "ogv_address" ("id" character varying NOT NULL, "balance" numeric NOT NULL, "staked" numeric NOT NULL, "veogv_balance" numeric NOT NULL, "voting_power" numeric NOT NULL, "last_updated" TIMESTAMP WITH TIME ZONE NOT NULL, "delegatee_id" character varying, CONSTRAINT "PK_f13c77575687ef480ca0b7de5d8" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_49d26f287904b8b1aef6e9ac2b" ON "ogv_address" ("delegatee_id") `) - await db.query(`CREATE TABLE "ogv_lockup" ("id" character varying NOT NULL, "lockup_id" text NOT NULL, "amount" numeric NOT NULL, "end" TIMESTAMP WITH TIME ZONE NOT NULL, "veogv" numeric NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address_id" character varying, CONSTRAINT "PK_6b6d5ed3a004dd3f546c1b11fa4" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_8114101b53d9d6bc26fe80838a" ON "ogv_lockup" ("lockup_id") `) - await db.query(`CREATE INDEX "IDX_8be94cd63e35b91adf1301a156" ON "ogv_lockup" ("address_id") `) - await db.query(`CREATE TABLE "ogv_lockup_tx_log" ("id" character varying NOT NULL, "hash" text NOT NULL, "event" character varying(8) NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "total_supply" numeric NOT NULL, "ogv_lockup_id" character varying, CONSTRAINT "PK_1c4a8425ce42f0c9da10056adee" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_b49fca291c97d9b55cd91f935f" ON "ogv_lockup_tx_log" ("ogv_lockup_id") `) - await db.query(`CREATE TABLE "ogv_proposal" ("id" character varying NOT NULL, "description" text, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "start_block" numeric NOT NULL, "end_block" numeric NOT NULL, "last_updated" TIMESTAMP WITH TIME ZONE NOT NULL, "status" character varying(9) NOT NULL, "quorum" numeric NOT NULL, "choices" text array NOT NULL, "scores" text array NOT NULL, "proposer_id" character varying, CONSTRAINT "PK_b06db02b26fa37882e013579407" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_c62be3f16dfb3e4a09525c85af" ON "ogv_proposal" ("proposer_id") `) - await db.query(`CREATE TABLE "ogv_proposal_tx_log" ("id" character varying NOT NULL, "hash" text NOT NULL, "event" character varying(8) NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "proposal_id" character varying, CONSTRAINT "PK_da43c287069bba678ca5c60b1ad" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_5d5f5e10892290ee366d26de7d" ON "ogv_proposal_tx_log" ("proposal_id") `) - await db.query(`CREATE TABLE "ogv_proposal_vote" ("id" character varying NOT NULL, "weight" numeric NOT NULL, "type" character varying(7) NOT NULL, "tx_hash" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "proposal_id" character varying, "voter_id" character varying, CONSTRAINT "PK_93c03f35b95221586cb8b83f523" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_58d732bc6523c2609d2725cc0a" ON "ogv_proposal_vote" ("proposal_id") `) - await db.query(`CREATE INDEX "IDX_2fd621aea353448fb3f17721bc" ON "ogv_proposal_vote" ("voter_id") `) - await db.query(`CREATE TABLE "ogv_daily_stat" ("id" character varying NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "total_supply" numeric NOT NULL, "total_supply_usd" numeric NOT NULL, "total_staked" numeric NOT NULL, "trading_volume_usd" numeric NOT NULL, "market_cap_usd" numeric NOT NULL, "price_usd" numeric NOT NULL, "holders_over_threshold" integer NOT NULL, CONSTRAINT "PK_69bc6d866711151e2712481794c" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_c974bde87107cacae6d3654972" ON "ogv_daily_stat" ("block_number") `) - await db.query(`CREATE INDEX "IDX_b62fa80951183bb0acf8a5e8b9" ON "ogv_daily_stat" ("timestamp") `) - await db.query(`CREATE TABLE "transaction_details" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "tx_hash" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "from" text NOT NULL, "to" text NOT NULL, "gas_used" numeric NOT NULL, "effective_gas_price" numeric NOT NULL, "transaction_fee" numeric NOT NULL, CONSTRAINT "PK_b9397af1203ca3a78ca6631e4b7" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_035179d5845a24726b74795cb5" ON "transaction_details" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_9e0953446c15e89dfe68dbe5bd" ON "transaction_details" ("tx_hash") `) - await db.query(`CREATE INDEX "IDX_ec29c6dbcba374ae8819275f22" ON "transaction_details" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_1ada02a88b8355495e0917b49b" ON "transaction_details" ("block_number") `) - await db.query(`CREATE INDEX "IDX_81a859fb3a14a34f194e1d8606" ON "transaction_details" ("from") `) - await db.query(`CREATE INDEX "IDX_ae3e0f0414a1deb6e4840e2e44" ON "transaction_details" ("to") `) - await db.query(`CREATE TABLE "pool" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "exchange" text NOT NULL, "name" text, "symbol" text, "tokens" text array NOT NULL, "symbols" text array NOT NULL, "decimals" integer array NOT NULL, "type" text NOT NULL, "created_at_block" integer NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_db1bfe411e1516c01120b85f8fe" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_ca7b22bed322c7c1c817d7fefc" ON "pool" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_0764827295d4ed49e259aa398f" ON "pool" ("address") `) - await db.query(`CREATE INDEX "IDX_9a38a7d17d1fff09327de45882" ON "pool" ("exchange") `) - await db.query(`CREATE TABLE "pool_booster" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "registry_address" text NOT NULL, "amm_pool_address" text NOT NULL, "factory_address" text NOT NULL, "pool_booster_type" integer NOT NULL, "active" boolean NOT NULL, CONSTRAINT "PK_85efb2983184555953408176314" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_c46c14abc58edf2c6bbd1e8d09" ON "pool_booster" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_2c38cf60d95bd998304076c11c" ON "pool_booster" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_90136d4e23c9ed49f1b9f3a101" ON "pool_booster" ("block_number") `) - await db.query(`CREATE INDEX "IDX_47dd84c80f040852a6d8789a24" ON "pool_booster" ("address") `) - await db.query(`CREATE INDEX "IDX_ab1662265686664891ee4eeb78" ON "pool_booster" ("registry_address") `) - await db.query(`CREATE INDEX "IDX_6d838f9682498d64417204e3cf" ON "pool_booster" ("amm_pool_address") `) - await db.query(`CREATE INDEX "IDX_373e04b978fa8ec37506b82872" ON "pool_booster" ("factory_address") `) - await db.query(`CREATE TABLE "pool_booster_bribe_executed" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "amount" numeric NOT NULL, "fee" numeric NOT NULL, CONSTRAINT "PK_3b9b80d19e643bb171929611e7c" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_3dbdcdcc2418ce9ce520d8ade6" ON "pool_booster_bribe_executed" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_54b5d8f2bbe89855785a038c33" ON "pool_booster_bribe_executed" ("address") `) - await db.query(`CREATE INDEX "IDX_d7693679519921139cb2dcb739" ON "pool_booster_bribe_executed" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_644a87d8df6aced2f35564d43f" ON "pool_booster_bribe_executed" ("block_number") `) + await db.query(`CREATE TABLE "native_balance" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "account" text NOT NULL, "balance" numeric NOT NULL, CONSTRAINT "PK_62f6bdfe058e52d1914d0c2c1ce" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_45fb48f831ccadcf29f404824a" ON "native_balance" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_82d827c3b96fb3c5ab43068502" ON "native_balance" ("block_number") `) + await db.query(`CREATE TABLE "legacy_staker" ("id" character varying NOT NULL, "input_amount" numeric NOT NULL, "output_amount" numeric NOT NULL, "balance" numeric NOT NULL, "reward_amount" numeric NOT NULL, CONSTRAINT "PK_11a12e3c39ce22c9a05990c9a56" PRIMARY KEY ("id"))`) await db.query(`CREATE TABLE "o_token" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "otoken" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "unallocated_supply" numeric NOT NULL, "total_supply" numeric NOT NULL, "rebasing_supply" numeric NOT NULL, "non_rebasing_supply" numeric NOT NULL, "credits_per_token" numeric NOT NULL, "holder_count" integer NOT NULL, CONSTRAINT "PK_4450ef96d5e51ef55bc8ea0b53e" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_1da06ba7d2c0a02d01d1b7a6c0" ON "o_token" ("chain_id") `) await db.query(`CREATE INDEX "IDX_0851d95d178f682d279a04ebf9" ON "o_token" ("otoken") `) @@ -163,7 +114,7 @@ module.exports = class Data1756242284453 { await db.query(`CREATE INDEX "IDX_57bb1f7d2fd6fe063b9cd434b2" ON "o_token_activity" ("timestamp") `) await db.query(`CREATE INDEX "IDX_d6cba0877ee9f5332e6d97e758" ON "o_token_activity" ("block_number") `) await db.query(`CREATE INDEX "IDX_b5826e68934ff671bbe28836ec" ON "o_token_activity" ("tx_hash") `) - await db.query(`CREATE TABLE "o_token_daily_stat" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "otoken" text NOT NULL, "date" text NOT NULL, "apr" numeric NOT NULL, "apy" numeric NOT NULL, "apy7" numeric NOT NULL, "apy14" numeric NOT NULL, "apy30" numeric NOT NULL, "rate_usd" numeric NOT NULL, "rate_eth" numeric NOT NULL, "total_supply" numeric NOT NULL, "rebasing_supply" numeric NOT NULL, "non_rebasing_supply" numeric NOT NULL, "wrapped_supply" numeric NOT NULL, "rate_wrapped" numeric NOT NULL, "amo_supply" numeric, "dripper_weth" numeric NOT NULL, "yield" numeric NOT NULL, "fees" numeric NOT NULL, "cumulative_yield" numeric NOT NULL, "cumulative_fees" numeric NOT NULL, "market_cap_usd" numeric NOT NULL, "accounts_over_threshold" integer NOT NULL, CONSTRAINT "PK_eeabae008c52207e32e2171176d" PRIMARY KEY ("id"))`) + await db.query(`CREATE TABLE "o_token_daily_stat" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "otoken" text NOT NULL, "date" text NOT NULL, "apr" numeric NOT NULL, "apy" numeric NOT NULL, "apy7" numeric NOT NULL, "apy14" numeric NOT NULL, "apy30" numeric NOT NULL, "rate_usd" numeric NOT NULL, "rate_eth" numeric NOT NULL, "rate_native" numeric NOT NULL, "total_supply" numeric NOT NULL, "rebasing_supply" numeric NOT NULL, "non_rebasing_supply" numeric NOT NULL, "wrapped_supply" numeric NOT NULL, "rate_wrapped" numeric NOT NULL, "amo_supply" numeric, "dripper_weth" numeric NOT NULL, "yield" numeric NOT NULL, "fees" numeric NOT NULL, "cumulative_yield" numeric NOT NULL, "cumulative_fees" numeric NOT NULL, "market_cap_usd" numeric NOT NULL, "accounts_over_threshold" integer NOT NULL, CONSTRAINT "PK_eeabae008c52207e32e2171176d" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_98c1ae817f9436c4f602de04c7" ON "o_token_daily_stat" ("chain_id") `) await db.query(`CREATE INDEX "IDX_8da572d689803a6292f00f687c" ON "o_token_daily_stat" ("block_number") `) await db.query(`CREATE INDEX "IDX_41df5fb0657b57079c5e011578" ON "o_token_daily_stat" ("timestamp") `) @@ -195,13 +146,49 @@ module.exports = class Data1756242284453 { await db.query(`CREATE INDEX "IDX_74ae9edf4f308f86740b16b7cd" ON "o_token_yield_forwarded" ("block_number") `) await db.query(`CREATE INDEX "IDX_b8b0b44e2b80be2fbeb211debe" ON "o_token_yield_forwarded" ("timestamp") `) await db.query(`CREATE INDEX "IDX_8e58218e9917d409803beb1479" ON "o_token_yield_forwarded" ("otoken") `) + await db.query(`CREATE TABLE "pool_booster" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "registry_address" text NOT NULL, "amm_pool_address" text NOT NULL, "factory_address" text NOT NULL, "pool_booster_type" integer NOT NULL, "active" boolean NOT NULL, CONSTRAINT "PK_85efb2983184555953408176314" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_c46c14abc58edf2c6bbd1e8d09" ON "pool_booster" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_2c38cf60d95bd998304076c11c" ON "pool_booster" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_90136d4e23c9ed49f1b9f3a101" ON "pool_booster" ("block_number") `) + await db.query(`CREATE INDEX "IDX_47dd84c80f040852a6d8789a24" ON "pool_booster" ("address") `) + await db.query(`CREATE INDEX "IDX_ab1662265686664891ee4eeb78" ON "pool_booster" ("registry_address") `) + await db.query(`CREATE INDEX "IDX_6d838f9682498d64417204e3cf" ON "pool_booster" ("amm_pool_address") `) + await db.query(`CREATE INDEX "IDX_373e04b978fa8ec37506b82872" ON "pool_booster" ("factory_address") `) + await db.query(`CREATE TABLE "pool_booster_bribe_executed" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "amount" numeric NOT NULL, "fee" numeric NOT NULL, CONSTRAINT "PK_3b9b80d19e643bb171929611e7c" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_3dbdcdcc2418ce9ce520d8ade6" ON "pool_booster_bribe_executed" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_54b5d8f2bbe89855785a038c33" ON "pool_booster_bribe_executed" ("address") `) + await db.query(`CREATE INDEX "IDX_d7693679519921139cb2dcb739" ON "pool_booster_bribe_executed" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_644a87d8df6aced2f35564d43f" ON "pool_booster_bribe_executed" ("block_number") `) + await db.query(`CREATE TABLE "transaction_details" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "tx_hash" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "from" text NOT NULL, "to" text NOT NULL, "gas_used" numeric NOT NULL, "effective_gas_price" numeric NOT NULL, "transaction_fee" numeric NOT NULL, CONSTRAINT "PK_b9397af1203ca3a78ca6631e4b7" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_035179d5845a24726b74795cb5" ON "transaction_details" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_9e0953446c15e89dfe68dbe5bd" ON "transaction_details" ("tx_hash") `) + await db.query(`CREATE INDEX "IDX_ec29c6dbcba374ae8819275f22" ON "transaction_details" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_1ada02a88b8355495e0917b49b" ON "transaction_details" ("block_number") `) + await db.query(`CREATE INDEX "IDX_81a859fb3a14a34f194e1d8606" ON "transaction_details" ("from") `) + await db.query(`CREATE INDEX "IDX_ae3e0f0414a1deb6e4840e2e44" ON "transaction_details" ("to") `) + await db.query(`CREATE TABLE "strategy_balance" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "otoken" text NOT NULL, "strategy" text NOT NULL, "asset" text NOT NULL, "symbol" text NOT NULL, "balance" numeric NOT NULL, "balance_eth" numeric NOT NULL, CONSTRAINT "PK_ca6f93229d1392e9546d01dae4f" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_bb5bbdf054deadf169e9e0330a" ON "strategy_balance" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_0113bf0b63183bea0d22cd0d08" ON "strategy_balance" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_a88065dcd92011698bbe7df7b1" ON "strategy_balance" ("block_number") `) + await db.query(`CREATE INDEX "IDX_cf0381c2326669950af23bbee7" ON "strategy_balance" ("otoken") `) + await db.query(`CREATE INDEX "IDX_28b5d09a9e1898c8a071c9ee40" ON "strategy_balance" ("strategy") `) + await db.query(`CREATE TABLE "strategy_yield" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "otoken" text NOT NULL, "strategy" text NOT NULL, "asset" text NOT NULL, "balance" numeric NOT NULL, "balance_weight" numeric NOT NULL, "earnings" numeric NOT NULL, "earnings_change" numeric NOT NULL, CONSTRAINT "PK_e87c46575e870fe2202190c2728" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_5108f2a2563d5665892d0c06b0" ON "strategy_yield" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_41c3567c9d43c598e07a0029c5" ON "strategy_yield" ("block_number") `) + await db.query(`CREATE INDEX "IDX_4230e2aa194f054f8393d36a24" ON "strategy_yield" ("otoken") `) + await db.query(`CREATE INDEX "IDX_0ad9cd89469c34889e94f63525" ON "strategy_yield" ("strategy") `) + await db.query(`CREATE TABLE "strategy_daily_yield" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "otoken" text NOT NULL, "strategy" text NOT NULL, "asset" text NOT NULL, "balance" numeric NOT NULL, "balance_weight" numeric NOT NULL, "earnings" numeric NOT NULL, "earnings_change" numeric NOT NULL, "apr" numeric NOT NULL, "apy" numeric NOT NULL, CONSTRAINT "PK_b0dd2686bc95bb032ff532b3a0e" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_0ba1974747f1906e0c102cd2cd" ON "strategy_daily_yield" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_df364fb6e82d1feeed2a5dfffa" ON "strategy_daily_yield" ("block_number") `) + await db.query(`CREATE INDEX "IDX_095c7036449ae511b4ef2a01df" ON "strategy_daily_yield" ("otoken") `) + await db.query(`CREATE INDEX "IDX_c6a366374690d7e37b070e5788" ON "strategy_daily_yield" ("strategy") `) await db.query(`CREATE TABLE "arm" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "name" text NOT NULL, "symbol" text NOT NULL, "decimals" integer NOT NULL, "token0" text NOT NULL, "token1" text NOT NULL, CONSTRAINT "PK_711e2a749a8c4baeccf8365290c" PRIMARY KEY ("id"))`) await db.query(`CREATE TABLE "arm_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "assets0" numeric NOT NULL, "assets1" numeric NOT NULL, "outstanding_assets1" numeric NOT NULL, "market_assets" numeric NOT NULL, "fees_accrued" numeric NOT NULL, "total_assets" numeric NOT NULL, "total_assets_cap" numeric NOT NULL, "total_supply" numeric NOT NULL, "assets_per_share" numeric NOT NULL, "total_deposits" numeric NOT NULL, "total_withdrawals" numeric NOT NULL, "total_withdrawals_claimed" numeric NOT NULL, "total_yield" numeric NOT NULL, "total_fees" numeric NOT NULL, CONSTRAINT "PK_e58fff61dd95dfeac112204c378" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_68943c1b73a665919e9377027e" ON "arm_state" ("chain_id") `) await db.query(`CREATE INDEX "IDX_85852cf19a3ddc86a4762398dd" ON "arm_state" ("timestamp") `) await db.query(`CREATE INDEX "IDX_d9779389f627b43d2f746323de" ON "arm_state" ("block_number") `) await db.query(`CREATE INDEX "IDX_b9db75a2ca9b9d6e6c5aa744ab" ON "arm_state" ("address") `) - await db.query(`CREATE TABLE "arm_daily_stat" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "date" text NOT NULL, "address" text NOT NULL, "assets0" numeric NOT NULL, "assets1" numeric NOT NULL, "outstanding_assets1" numeric NOT NULL, "market_assets" numeric NOT NULL, "fees_accrued" numeric NOT NULL, "total_assets" numeric NOT NULL, "total_assets_cap" numeric NOT NULL, "total_supply" numeric NOT NULL, "assets_per_share" numeric NOT NULL, "total_deposits" numeric NOT NULL, "total_withdrawals" numeric NOT NULL, "total_withdrawals_claimed" numeric NOT NULL, "apr" numeric NOT NULL, "apy" numeric NOT NULL, "yield" numeric NOT NULL, "fees" numeric NOT NULL, "cumulative_yield" numeric NOT NULL, "cumulative_fees" numeric NOT NULL, "rate_usd" numeric NOT NULL, "rate_eth" numeric NOT NULL, CONSTRAINT "PK_c780cd8a4ec31366f7173a30fb1" PRIMARY KEY ("id"))`) + await db.query(`CREATE TABLE "arm_daily_stat" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "date" text NOT NULL, "address" text NOT NULL, "assets0" numeric NOT NULL, "assets1" numeric NOT NULL, "outstanding_assets1" numeric NOT NULL, "market_assets" numeric NOT NULL, "fees_accrued" numeric NOT NULL, "total_assets" numeric NOT NULL, "total_assets_cap" numeric NOT NULL, "total_supply" numeric NOT NULL, "assets_per_share" numeric NOT NULL, "total_deposits" numeric NOT NULL, "total_withdrawals" numeric NOT NULL, "total_withdrawals_claimed" numeric NOT NULL, "apr" numeric NOT NULL, "apy" numeric NOT NULL, "yield" numeric NOT NULL, "fees" numeric NOT NULL, "cumulative_yield" numeric NOT NULL, "cumulative_fees" numeric NOT NULL, "rate_usd" numeric NOT NULL, "rate_eth" numeric NOT NULL, "rate_native" numeric NOT NULL, CONSTRAINT "PK_c780cd8a4ec31366f7173a30fb1" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_6f3bbb5ed2de643316523b59b4" ON "arm_daily_stat" ("chain_id") `) await db.query(`CREATE INDEX "IDX_9ee28c589c9fa60a45412a64ba" ON "arm_daily_stat" ("timestamp") `) await db.query(`CREATE INDEX "IDX_052999e1ef63fabca403e9c3b8" ON "arm_daily_stat" ("block_number") `) @@ -226,103 +213,6 @@ module.exports = class Data1756242284453 { await db.query(`CREATE INDEX "IDX_ee5733a47926aa5d45d925e427" ON "traderate_changed" ("timestamp") `) await db.query(`CREATE INDEX "IDX_8ba4cfdcc71cd663da41d5c683" ON "traderate_changed" ("block_number") `) await db.query(`CREATE INDEX "IDX_767274005ca866b0c3a89956e1" ON "traderate_changed" ("address") `) - await db.query(`CREATE TABLE "erc20" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "name" text NOT NULL, "decimals" integer NOT NULL, "symbol" text NOT NULL, CONSTRAINT "PK_8d43ce15401ba044c55a72a8ceb" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_905ff854e6782fc32dc4268a25" ON "erc20" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_40fd11c1a0d0f2562824894e85" ON "erc20" ("address") `) - await db.query(`CREATE TABLE "erc20_holder" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "account" text NOT NULL, "since" TIMESTAMP WITH TIME ZONE NOT NULL, "balance" numeric NOT NULL, CONSTRAINT "PK_3adce7edbac4bcb03c662c3a1ac" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_51b9e7c44702ef3a6f05d3702e" ON "erc20_holder" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_98f753777a7d77ff8950aee1c7" ON "erc20_holder" ("address") `) - await db.query(`CREATE INDEX "IDX_875601f8f24f9082f1c3551406" ON "erc20_holder" ("account") `) - await db.query(`CREATE INDEX "IDX_ac960405f4b3290bf5d7ff2007" ON "erc20_holder" ("since") `) - await db.query(`CREATE TABLE "erc20_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "total_supply" numeric NOT NULL, "holder_count" integer NOT NULL, CONSTRAINT "PK_eac1124b07bbdedafd4fff2f7b7" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_2b69abb250c647c7a4b5a5a715" ON "erc20_state" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_c3d08eb2dafe4b5b188924d835" ON "erc20_state" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_29e8edc6ba8cc37c0c16ff0baf" ON "erc20_state" ("block_number") `) - await db.query(`CREATE INDEX "IDX_fe7e53a28ac19fa35a94af35e5" ON "erc20_state" ("address") `) - await db.query(`CREATE TABLE "erc20_state_by_day" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "date" text NOT NULL, "address" text NOT NULL, "total_supply" numeric NOT NULL, "holder_count" integer NOT NULL, CONSTRAINT "PK_f9e03821635f845a41c4812cf76" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_b34a3524b485e28b64872ffb27" ON "erc20_state_by_day" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_5e25c3144354e0df6ada4842a4" ON "erc20_state_by_day" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_2a5cd83ca8e398f298fb60c3e7" ON "erc20_state_by_day" ("block_number") `) - await db.query(`CREATE INDEX "IDX_898a5fddc8c8f32ce617bca89b" ON "erc20_state_by_day" ("date") `) - await db.query(`CREATE INDEX "IDX_2d16390a0d6b57375b580012ea" ON "erc20_state_by_day" ("address") `) - await db.query(`CREATE TABLE "erc20_balance" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "account" text NOT NULL, "balance" numeric NOT NULL, CONSTRAINT "PK_069b6549e7a9938cc89f32063a6" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_bb6a884e702f2887037d5a7eec" ON "erc20_balance" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_c9fbe21a3411d93ea586af2a4c" ON "erc20_balance" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_d1f50dc39003331b76fad8a640" ON "erc20_balance" ("block_number") `) - await db.query(`CREATE INDEX "IDX_5fe068d4a82a445e8b4155f802" ON "erc20_balance" ("address") `) - await db.query(`CREATE INDEX "IDX_5c45a4a58256ea383a4d096ec6" ON "erc20_balance" ("account") `) - await db.query(`CREATE TABLE "erc20_transfer" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "tx_hash" text NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "from" text NOT NULL, "from_balance" numeric NOT NULL, "to" text NOT NULL, "to_balance" numeric NOT NULL, "value" numeric NOT NULL, CONSTRAINT "PK_12764843146818a31e3d28fc577" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_f914d2e140eb88375a5a2ef6c7" ON "erc20_transfer" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_6350ddb2def19c1e3a06d8b3ec" ON "erc20_transfer" ("address") `) - await db.query(`CREATE INDEX "IDX_eca70565083880d00e9110b000" ON "erc20_transfer" ("from") `) - await db.query(`CREATE INDEX "IDX_9fdc9d58b6ae0cb13b9c7f8226" ON "erc20_transfer" ("to") `) - await db.query(`CREATE TABLE "processing_status" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "start_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "head_timestamp" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_85f5e2467b74fb70fac1a053021" PRIMARY KEY ("id"))`) - await db.query(`CREATE TABLE "aero_cl_gauge_notify_reward" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "from" text NOT NULL, "amount" numeric NOT NULL, CONSTRAINT "PK_81e9aaf9cedd501f19b631fa24c" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_bc847340db9380bee59cb5f5fe" ON "aero_cl_gauge_notify_reward" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_32ededc6fe2c4d647215206a02" ON "aero_cl_gauge_notify_reward" ("block_number") `) - await db.query(`CREATE INDEX "IDX_0b2e6dc0ffef94a1b390596ca1" ON "aero_cl_gauge_notify_reward" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_f159f93df2550a7c6d67afd326" ON "aero_cl_gauge_notify_reward" ("address") `) - await db.query(`CREATE INDEX "IDX_b789dc0efc58964980fe36ed71" ON "aero_cl_gauge_notify_reward" ("from") `) - await db.query(`CREATE TABLE "aero_gauge_notify_reward" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "from" text NOT NULL, "amount" numeric NOT NULL, CONSTRAINT "PK_cc6cc4555454beeb72e1f69c78b" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_983aada0809852d4dea444aa1b" ON "aero_gauge_notify_reward" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_993e3d42327053b33a5db4ffe4" ON "aero_gauge_notify_reward" ("block_number") `) - await db.query(`CREATE INDEX "IDX_a099b412c12b8d9e8a5ac999ec" ON "aero_gauge_notify_reward" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_7522fbb7adef5aca9de1dc9900" ON "aero_gauge_notify_reward" ("address") `) - await db.query(`CREATE INDEX "IDX_6fd369509b8e29561b1b2b5310" ON "aero_gauge_notify_reward" ("from") `) - await db.query(`CREATE TABLE "aero_pool_created" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "pool" text NOT NULL, "token0" text NOT NULL, "token1" text NOT NULL, "stable" boolean NOT NULL, CONSTRAINT "PK_92121ac89556a501f1d9d9a3cc4" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_c0420757a8d67132c475450b37" ON "aero_pool_created" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_8e60b2e8b223efda676eff93d9" ON "aero_pool_created" ("block_number") `) - await db.query(`CREATE INDEX "IDX_7f98545a433bc1fa08c9b8d4ed" ON "aero_pool_created" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_6372821d7d9888a53637b6a7ad" ON "aero_pool_created" ("address") `) - await db.query(`CREATE TABLE "aero_cl_pool_created" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "pool" text NOT NULL, "token0" text NOT NULL, "token1" text NOT NULL, "tick_spacing" integer NOT NULL, CONSTRAINT "PK_3c64e6a99fd4cf16f26d514fe32" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_3b7186dca3828117fb53ef0206" ON "aero_cl_pool_created" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_68fc780d94ec199f1eb50e68f7" ON "aero_cl_pool_created" ("block_number") `) - await db.query(`CREATE INDEX "IDX_ec5ee04a8c72b11d543e28e5e6" ON "aero_cl_pool_created" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_2701b481a50882398b9cb7e05b" ON "aero_cl_pool_created" ("address") `) - await db.query(`CREATE TABLE "aero_voter_gauge_created" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "pool_factory" text NOT NULL, "voting_rewards_factory" text NOT NULL, "gauge_factory" text NOT NULL, "pool" text NOT NULL, "bribe_voting_reward" text NOT NULL, "fee_voting_reward" text NOT NULL, "gauge" text NOT NULL, "creator" text NOT NULL, CONSTRAINT "PK_c96d43e26a5474fe42e6feb8525" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_60842e4b20e928204cc0790128" ON "aero_voter_gauge_created" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_74c2a7bf57c43f69f91b7c3b20" ON "aero_voter_gauge_created" ("block_number") `) - await db.query(`CREATE INDEX "IDX_d8be771bb35fe590c45a7d1af2" ON "aero_voter_gauge_created" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_19b4155090d82294060bb44366" ON "aero_voter_gauge_created" ("address") `) - await db.query(`CREATE INDEX "IDX_40d43ab503f180b7532f42f45a" ON "aero_voter_gauge_created" ("pool_factory") `) - await db.query(`CREATE INDEX "IDX_b4ffd29e88ac91115e44fc5b03" ON "aero_voter_gauge_created" ("voting_rewards_factory") `) - await db.query(`CREATE INDEX "IDX_fe01f00328010eac8a03879936" ON "aero_voter_gauge_created" ("gauge_factory") `) - await db.query(`CREATE TABLE "aero_pool_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "total_usd" numeric NOT NULL, "liquidity" numeric NOT NULL, "staked_liquidity" numeric NOT NULL, "asset0" numeric NOT NULL, "asset1" numeric NOT NULL, "vote_weight" numeric NOT NULL, "vote_percentage" numeric NOT NULL, CONSTRAINT "PK_78c7257c7d9124c00362b50bb19" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_9da45b58c4d06201b2de6ed51d" ON "aero_pool_state" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_91022eaca5c237c8181574f6c3" ON "aero_pool_state" ("block_number") `) - await db.query(`CREATE INDEX "IDX_a1f09e4a565cbeac79b02ccfee" ON "aero_pool_state" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_f17f2a943862d7c1c485bf4ccd" ON "aero_pool_state" ("address") `) - await db.query(`CREATE TABLE "aero_cl_pool_tick" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "tick" integer NOT NULL, "tick_price" numeric NOT NULL, "sqrt_price_x96" numeric NOT NULL, "liquidity_gross" numeric NOT NULL, "liquidity_net" numeric NOT NULL, "staked_liquidity_net" numeric NOT NULL, "fee_growth_outside0_x128" numeric NOT NULL, "fee_growth_outside1_x128" numeric NOT NULL, "reward_growth_outside_x128" numeric NOT NULL, "tick_cumulative_outside" numeric NOT NULL, "seconds_per_liquidity_outside_x128" numeric NOT NULL, "seconds_outside" integer NOT NULL, CONSTRAINT "PK_ba8e1ecce7fe090f58e1026d0e1" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_1f062aee707e1d898a99e7d78a" ON "aero_cl_pool_tick" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_9db8ded60dc83ae88b93bbdf61" ON "aero_cl_pool_tick" ("block_number") `) - await db.query(`CREATE INDEX "IDX_8ed6f7b5149327341c751f7956" ON "aero_cl_pool_tick" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_5a4fcc4d09e1e362cff15dd834" ON "aero_cl_pool_tick" ("address") `) - await db.query(`CREATE INDEX "IDX_eb4f3fdb047a473a6b62672251" ON "aero_cl_pool_tick" ("tick") `) - await db.query(`CREATE TABLE "aero_cl_pool_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "total_usd" numeric NOT NULL, "liquidity" numeric NOT NULL, "staked_liquidity" numeric NOT NULL, "asset0" numeric NOT NULL, "asset1" numeric NOT NULL, "vote_weight" numeric NOT NULL, "vote_percentage" numeric NOT NULL, "tick_price" numeric NOT NULL, "sqrt_price_x96" numeric NOT NULL, "tick_id" character varying, CONSTRAINT "PK_21a637df332cf98fca08bd79365" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_e363a6cd0ddeb41a94ed68089c" ON "aero_cl_pool_state" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_e7458985ad9ee1b4472bc30bbb" ON "aero_cl_pool_state" ("block_number") `) - await db.query(`CREATE INDEX "IDX_94a520efd2d3992b50f0469d22" ON "aero_cl_pool_state" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_ca4c93c360bd5dffdc237f9f5a" ON "aero_cl_pool_state" ("address") `) - await db.query(`CREATE INDEX "IDX_02aa86fe0e78999620744402a0" ON "aero_cl_pool_state" ("tick_id") `) - await db.query(`CREATE TABLE "aero_pool_epoch_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "epoch" numeric NOT NULL, "votes" numeric NOT NULL, "emissions" numeric NOT NULL, "bribes" jsonb, "fees" jsonb, CONSTRAINT "PK_a3a3162bf495fa5dd616802b876" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_1bdbc99a8dadba9f6beb7547a5" ON "aero_pool_epoch_state" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_39bfdc610191dd653c67842ae0" ON "aero_pool_epoch_state" ("block_number") `) - await db.query(`CREATE INDEX "IDX_703ee4530d82b62fb6d40410e4" ON "aero_pool_epoch_state" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_01335581495551843503db4a23" ON "aero_pool_epoch_state" ("address") `) - await db.query(`CREATE INDEX "IDX_e04dd7afda9bc4dd6541c92f37" ON "aero_pool_epoch_state" ("epoch") `) - await db.query(`CREATE TABLE "aero_lp" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "pool" text NOT NULL, "account" text NOT NULL, "liquidity" numeric NOT NULL, "staked" numeric NOT NULL, "amount0" numeric NOT NULL, "amount1" numeric NOT NULL, "staked0" numeric NOT NULL, "staked1" numeric NOT NULL, "unstaked_earned0" numeric NOT NULL, "unstaked_earned1" numeric NOT NULL, "emissions_earned" numeric NOT NULL, "tick_lower" integer NOT NULL, "tick_upper" integer NOT NULL, "sqrt_ratio_lower" numeric NOT NULL, "sqrt_ratio_upper" numeric NOT NULL, CONSTRAINT "PK_691dfa620bca29acb95e78c2a15" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_d41b9f42cab6899f26cd6510bf" ON "aero_lp" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_2acd173568dcc7df1b2655cb13" ON "aero_lp" ("block_number") `) - await db.query(`CREATE INDEX "IDX_9cfe5ff27e954044840d274367" ON "aero_lp" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_b5cfd69ccd727c080c4e14d776" ON "aero_lp" ("pool") `) - await db.query(`CREATE INDEX "IDX_a9d6d99b3e4749a53fa3c64bf8" ON "aero_lp" ("account") `) - await db.query(`CREATE TABLE "aero_lp_position" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "pool" text NOT NULL, "position_id" numeric NOT NULL, "account" text NOT NULL, "liquidity" numeric NOT NULL, "staked" numeric NOT NULL, "amount0" numeric NOT NULL, "amount1" numeric NOT NULL, "staked0" numeric NOT NULL, "staked1" numeric NOT NULL, "unstaked_earned0" numeric NOT NULL, "unstaked_earned1" numeric NOT NULL, "emissions_earned" numeric NOT NULL, "tick_lower" integer NOT NULL, "tick_upper" integer NOT NULL, "sqrt_ratio_lower" numeric NOT NULL, "sqrt_ratio_upper" numeric NOT NULL, CONSTRAINT "PK_24563c43a5841a202a95390d876" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_9f163b1720f9f8c8b75d5d0f97" ON "aero_lp_position" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_b42642e1ebc0cbacbba4a5fb1d" ON "aero_lp_position" ("block_number") `) - await db.query(`CREATE INDEX "IDX_ca7d09158297faf6b84487ba5c" ON "aero_lp_position" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_b4e54387b76cb3bce1bd725f7a" ON "aero_lp_position" ("pool") `) - await db.query(`CREATE INDEX "IDX_b465865a93cb044c6649523287" ON "aero_lp_position" ("position_id") `) - await db.query(`CREATE INDEX "IDX_05aaf9416181ddc9012f41da2f" ON "aero_lp_position" ("account") `) await db.query(`CREATE TABLE "governance_proposal" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "proposal_id" numeric NOT NULL, "description" text, "proposer" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "tx_hash" text NOT NULL, "start_block" numeric NOT NULL, "end_block" numeric NOT NULL, "targets" text array NOT NULL, "values" text array NOT NULL, "signatures" text array NOT NULL, "calldatas" text array NOT NULL, "last_updated" TIMESTAMP WITH TIME ZONE NOT NULL, "status" character varying(9) NOT NULL, "quorum" numeric NOT NULL, "choices" text array NOT NULL, "scores" text array NOT NULL, CONSTRAINT "PK_d71b4171baf362416ecfc414531" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_fe8a40923244f99e670b62c14d" ON "governance_proposal" ("chain_id") `) await db.query(`CREATE INDEX "IDX_eea14b5ba6065f9484dfaa00c6" ON "governance_proposal" ("address") `) @@ -333,43 +223,6 @@ module.exports = class Data1756242284453 { await db.query(`CREATE TABLE "governance_proposal_vote" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "voter" text NOT NULL, "weight" numeric NOT NULL, "type" character varying(7) NOT NULL, "tx_hash" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "proposal_id" character varying, CONSTRAINT "PK_e13a15bfb5ccfdec4c19975de87" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_5531af241c24a09c854ead9d55" ON "governance_proposal_vote" ("proposal_id") `) await db.query(`CREATE INDEX "IDX_adc6eb148ad48697e74d23c722" ON "governance_proposal_vote" ("voter") `) - await db.query(`CREATE TABLE "bridge_transfer" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash_in" text NOT NULL, "tx_hash_out" text, "message_id" text NOT NULL, "bridge" text NOT NULL, "transactor" text NOT NULL, "sender" text NOT NULL, "receiver" text NOT NULL, "chain_in" integer NOT NULL, "chain_out" integer NOT NULL, "token_in" text NOT NULL, "token_out" text NOT NULL, "amount_in" numeric NOT NULL, "amount_out" numeric NOT NULL, "state" integer NOT NULL, CONSTRAINT "PK_fab0727701656a3e6c320fca6e9" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_aaedc42eda914e44a21e8eac72" ON "bridge_transfer" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_f8d8d410f058f0bae15eefbc81" ON "bridge_transfer" ("block_number") `) - await db.query(`CREATE INDEX "IDX_85994c1ee045b713bbcbcccc8b" ON "bridge_transfer" ("message_id") `) - await db.query(`CREATE INDEX "IDX_7ff6ab2147f80a465d3752e79f" ON "bridge_transfer" ("bridge") `) - await db.query(`CREATE INDEX "IDX_aaec7d9bb08b9ef8fb1b419c5d" ON "bridge_transfer" ("transactor") `) - await db.query(`CREATE INDEX "IDX_3cbd3eea30bc62ebc91c276e73" ON "bridge_transfer" ("sender") `) - await db.query(`CREATE INDEX "IDX_54f4abe8f2eb80204637ce328e" ON "bridge_transfer" ("receiver") `) - await db.query(`CREATE INDEX "IDX_12fa326ec2496a964493f2a7bc" ON "bridge_transfer" ("chain_in") `) - await db.query(`CREATE TABLE "bridge_transfer_state" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "state" integer NOT NULL, CONSTRAINT "PK_00ca26906171755e6fc01882c68" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_374659ae3bd149042388e132be" ON "bridge_transfer_state" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_74f93b10ec560e63792dcc877e" ON "bridge_transfer_state" ("block_number") `) - await db.query(`CREATE INDEX "IDX_df99bdbf11d4ed57bec0e6c511" ON "bridge_transfer_state" ("tx_hash") `) - await db.query(`CREATE TABLE "frrs_reward_collected" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "amount_collected" numeric NOT NULL, CONSTRAINT "PK_638be8eac1ed06396ae15065985" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_41ff7fbd84f0e932ddff4aaeda" ON "frrs_reward_collected" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_6f8728cf12eedec371ec2b5ac3" ON "frrs_reward_collected" ("address") `) - await db.query(`CREATE INDEX "IDX_fe9c300aa3739b7fedae19bee8" ON "frrs_reward_collected" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_748e8278aa0f4327fdb375ce39" ON "frrs_reward_collected" ("block_number") `) - await db.query(`CREATE INDEX "IDX_76682d76550c1908c0edbf80d6" ON "frrs_reward_collected" ("tx_hash") `) - await db.query(`CREATE TABLE "frrs_rewards_per_second_changed" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "new_rps" numeric NOT NULL, "old_rps" numeric NOT NULL, CONSTRAINT "PK_2673e74455a61c199ae6b457c9e" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_51112ae6ed7acfe5fea9041736" ON "frrs_rewards_per_second_changed" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_27777adfd6d67ce69177e76777" ON "frrs_rewards_per_second_changed" ("address") `) - await db.query(`CREATE INDEX "IDX_0f439534e934e9114e93fe0e0e" ON "frrs_rewards_per_second_changed" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_af32902afcc6d0e38d55b29e68" ON "frrs_rewards_per_second_changed" ("block_number") `) - await db.query(`CREATE INDEX "IDX_7a5afd8ca41d81f9841db0f602" ON "frrs_rewards_per_second_changed" ("tx_hash") `) - await db.query(`CREATE TABLE "frrs_rewards_target_change" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "target" text NOT NULL, "previous_target" text NOT NULL, CONSTRAINT "PK_a55f976a8f537dff9d4ed24047f" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_a6f19822f0e09c509963463fbd" ON "frrs_rewards_target_change" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_598a7d310b076cf239ae7bcb51" ON "frrs_rewards_target_change" ("address") `) - await db.query(`CREATE INDEX "IDX_d593e4b975ae4f8d60303b2ba9" ON "frrs_rewards_target_change" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_9410930fcb952fb4003dc2b2be" ON "frrs_rewards_target_change" ("block_number") `) - await db.query(`CREATE INDEX "IDX_14cbad89905ceeb715f8e1a2c8" ON "frrs_rewards_target_change" ("tx_hash") `) - await db.query(`CREATE TABLE "frrs_strategist_updated" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "strategist_address" text NOT NULL, CONSTRAINT "PK_c71ac16e8ede7acbd61b846676a" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_47dfa32c5be0528074dcf093d6" ON "frrs_strategist_updated" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_2f910a0f9c75adc401d7aa8c0f" ON "frrs_strategist_updated" ("address") `) - await db.query(`CREATE INDEX "IDX_301322e4df8e766e7f4cd892fd" ON "frrs_strategist_updated" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_7f49f2839212126c3d42fb4bf1" ON "frrs_strategist_updated" ("block_number") `) - await db.query(`CREATE INDEX "IDX_aab8ae0cb29505a7014438675b" ON "frrs_strategist_updated" ("tx_hash") `) await db.query(`CREATE TABLE "es_token" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "circulating" numeric NOT NULL, "staked" numeric NOT NULL, "total" numeric NOT NULL, CONSTRAINT "PK_69bef9eb94d9a5d42d726d1e661" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_a234e56547c4f8b9135d80444b" ON "es_token" ("timestamp") `) await db.query(`CREATE INDEX "IDX_588f0be9f9bdc1d8dd29797fec" ON "es_token" ("block_number") `) @@ -440,22 +293,144 @@ module.exports = class Data1756242284453 { await db.query(`CREATE INDEX "IDX_7d988d60b55dc08addc58835d6" ON "es_unstake" ("tx_hash") `) await db.query(`CREATE INDEX "IDX_0adcdd08da131e76d618b73db7" ON "es_unstake" ("account") `) await db.query(`CREATE INDEX "IDX_cc43898a790e6e1d4bbf145097" ON "es_unstake" ("lockup_id") `) - await db.query(`CREATE TABLE "strategy_balance" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "otoken" text NOT NULL, "strategy" text NOT NULL, "asset" text NOT NULL, "symbol" text NOT NULL, "balance" numeric NOT NULL, "balance_eth" numeric NOT NULL, CONSTRAINT "PK_ca6f93229d1392e9546d01dae4f" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_bb5bbdf054deadf169e9e0330a" ON "strategy_balance" ("chain_id") `) - await db.query(`CREATE INDEX "IDX_0113bf0b63183bea0d22cd0d08" ON "strategy_balance" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_a88065dcd92011698bbe7df7b1" ON "strategy_balance" ("block_number") `) - await db.query(`CREATE INDEX "IDX_cf0381c2326669950af23bbee7" ON "strategy_balance" ("otoken") `) - await db.query(`CREATE INDEX "IDX_28b5d09a9e1898c8a071c9ee40" ON "strategy_balance" ("strategy") `) - await db.query(`CREATE TABLE "strategy_yield" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "otoken" text NOT NULL, "strategy" text NOT NULL, "asset" text NOT NULL, "balance" numeric NOT NULL, "balance_weight" numeric NOT NULL, "earnings" numeric NOT NULL, "earnings_change" numeric NOT NULL, CONSTRAINT "PK_e87c46575e870fe2202190c2728" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_5108f2a2563d5665892d0c06b0" ON "strategy_yield" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_41c3567c9d43c598e07a0029c5" ON "strategy_yield" ("block_number") `) - await db.query(`CREATE INDEX "IDX_4230e2aa194f054f8393d36a24" ON "strategy_yield" ("otoken") `) - await db.query(`CREATE INDEX "IDX_0ad9cd89469c34889e94f63525" ON "strategy_yield" ("strategy") `) - await db.query(`CREATE TABLE "strategy_daily_yield" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "otoken" text NOT NULL, "strategy" text NOT NULL, "asset" text NOT NULL, "balance" numeric NOT NULL, "balance_weight" numeric NOT NULL, "earnings" numeric NOT NULL, "earnings_change" numeric NOT NULL, "apr" numeric NOT NULL, "apy" numeric NOT NULL, CONSTRAINT "PK_b0dd2686bc95bb032ff532b3a0e" PRIMARY KEY ("id"))`) - await db.query(`CREATE INDEX "IDX_0ba1974747f1906e0c102cd2cd" ON "strategy_daily_yield" ("timestamp") `) - await db.query(`CREATE INDEX "IDX_df364fb6e82d1feeed2a5dfffa" ON "strategy_daily_yield" ("block_number") `) - await db.query(`CREATE INDEX "IDX_095c7036449ae511b4ef2a01df" ON "strategy_daily_yield" ("otoken") `) - await db.query(`CREATE INDEX "IDX_c6a366374690d7e37b070e5788" ON "strategy_daily_yield" ("strategy") `) + await db.query(`CREATE TABLE "bridge_transfer" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash_in" text NOT NULL, "tx_hash_out" text, "message_id" text NOT NULL, "bridge" text NOT NULL, "transactor" text NOT NULL, "sender" text NOT NULL, "receiver" text NOT NULL, "chain_in" integer NOT NULL, "chain_out" integer NOT NULL, "token_in" text NOT NULL, "token_out" text NOT NULL, "amount_in" numeric NOT NULL, "amount_out" numeric NOT NULL, "state" integer NOT NULL, CONSTRAINT "PK_fab0727701656a3e6c320fca6e9" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_aaedc42eda914e44a21e8eac72" ON "bridge_transfer" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_f8d8d410f058f0bae15eefbc81" ON "bridge_transfer" ("block_number") `) + await db.query(`CREATE INDEX "IDX_85994c1ee045b713bbcbcccc8b" ON "bridge_transfer" ("message_id") `) + await db.query(`CREATE INDEX "IDX_7ff6ab2147f80a465d3752e79f" ON "bridge_transfer" ("bridge") `) + await db.query(`CREATE INDEX "IDX_aaec7d9bb08b9ef8fb1b419c5d" ON "bridge_transfer" ("transactor") `) + await db.query(`CREATE INDEX "IDX_3cbd3eea30bc62ebc91c276e73" ON "bridge_transfer" ("sender") `) + await db.query(`CREATE INDEX "IDX_54f4abe8f2eb80204637ce328e" ON "bridge_transfer" ("receiver") `) + await db.query(`CREATE INDEX "IDX_12fa326ec2496a964493f2a7bc" ON "bridge_transfer" ("chain_in") `) + await db.query(`CREATE TABLE "bridge_transfer_state" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "state" integer NOT NULL, CONSTRAINT "PK_00ca26906171755e6fc01882c68" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_374659ae3bd149042388e132be" ON "bridge_transfer_state" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_74f93b10ec560e63792dcc877e" ON "bridge_transfer_state" ("block_number") `) + await db.query(`CREATE INDEX "IDX_df99bdbf11d4ed57bec0e6c511" ON "bridge_transfer_state" ("tx_hash") `) + await db.query(`CREATE TABLE "aero_pool_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "total_usd" numeric NOT NULL, "liquidity" numeric NOT NULL, "staked_liquidity" numeric NOT NULL, "asset0" numeric NOT NULL, "asset1" numeric NOT NULL, "vote_weight" numeric NOT NULL, "vote_percentage" numeric NOT NULL, CONSTRAINT "PK_78c7257c7d9124c00362b50bb19" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_9da45b58c4d06201b2de6ed51d" ON "aero_pool_state" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_91022eaca5c237c8181574f6c3" ON "aero_pool_state" ("block_number") `) + await db.query(`CREATE INDEX "IDX_a1f09e4a565cbeac79b02ccfee" ON "aero_pool_state" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_f17f2a943862d7c1c485bf4ccd" ON "aero_pool_state" ("address") `) + await db.query(`CREATE TABLE "aero_cl_pool_tick" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "tick" integer NOT NULL, "tick_price" numeric NOT NULL, "sqrt_price_x96" numeric NOT NULL, "liquidity_gross" numeric NOT NULL, "liquidity_net" numeric NOT NULL, "staked_liquidity_net" numeric NOT NULL, "fee_growth_outside0_x128" numeric NOT NULL, "fee_growth_outside1_x128" numeric NOT NULL, "reward_growth_outside_x128" numeric NOT NULL, "tick_cumulative_outside" numeric NOT NULL, "seconds_per_liquidity_outside_x128" numeric NOT NULL, "seconds_outside" integer NOT NULL, CONSTRAINT "PK_ba8e1ecce7fe090f58e1026d0e1" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_1f062aee707e1d898a99e7d78a" ON "aero_cl_pool_tick" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_9db8ded60dc83ae88b93bbdf61" ON "aero_cl_pool_tick" ("block_number") `) + await db.query(`CREATE INDEX "IDX_8ed6f7b5149327341c751f7956" ON "aero_cl_pool_tick" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_5a4fcc4d09e1e362cff15dd834" ON "aero_cl_pool_tick" ("address") `) + await db.query(`CREATE INDEX "IDX_eb4f3fdb047a473a6b62672251" ON "aero_cl_pool_tick" ("tick") `) + await db.query(`CREATE TABLE "aero_cl_pool_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "total_usd" numeric NOT NULL, "liquidity" numeric NOT NULL, "staked_liquidity" numeric NOT NULL, "asset0" numeric NOT NULL, "asset1" numeric NOT NULL, "vote_weight" numeric NOT NULL, "vote_percentage" numeric NOT NULL, "tick_price" numeric NOT NULL, "sqrt_price_x96" numeric NOT NULL, "tick_id" character varying, CONSTRAINT "PK_21a637df332cf98fca08bd79365" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_e363a6cd0ddeb41a94ed68089c" ON "aero_cl_pool_state" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_e7458985ad9ee1b4472bc30bbb" ON "aero_cl_pool_state" ("block_number") `) + await db.query(`CREATE INDEX "IDX_94a520efd2d3992b50f0469d22" ON "aero_cl_pool_state" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_ca4c93c360bd5dffdc237f9f5a" ON "aero_cl_pool_state" ("address") `) + await db.query(`CREATE INDEX "IDX_02aa86fe0e78999620744402a0" ON "aero_cl_pool_state" ("tick_id") `) + await db.query(`CREATE TABLE "aero_pool_epoch_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "epoch" numeric NOT NULL, "votes" numeric NOT NULL, "emissions" numeric NOT NULL, "bribes" jsonb, "fees" jsonb, CONSTRAINT "PK_a3a3162bf495fa5dd616802b876" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_1bdbc99a8dadba9f6beb7547a5" ON "aero_pool_epoch_state" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_39bfdc610191dd653c67842ae0" ON "aero_pool_epoch_state" ("block_number") `) + await db.query(`CREATE INDEX "IDX_703ee4530d82b62fb6d40410e4" ON "aero_pool_epoch_state" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_01335581495551843503db4a23" ON "aero_pool_epoch_state" ("address") `) + await db.query(`CREATE INDEX "IDX_e04dd7afda9bc4dd6541c92f37" ON "aero_pool_epoch_state" ("epoch") `) + await db.query(`CREATE TABLE "aero_lp" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "pool" text NOT NULL, "account" text NOT NULL, "liquidity" numeric NOT NULL, "staked" numeric NOT NULL, "amount0" numeric NOT NULL, "amount1" numeric NOT NULL, "staked0" numeric NOT NULL, "staked1" numeric NOT NULL, "unstaked_earned0" numeric NOT NULL, "unstaked_earned1" numeric NOT NULL, "emissions_earned" numeric NOT NULL, "tick_lower" integer NOT NULL, "tick_upper" integer NOT NULL, "sqrt_ratio_lower" numeric NOT NULL, "sqrt_ratio_upper" numeric NOT NULL, CONSTRAINT "PK_691dfa620bca29acb95e78c2a15" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_d41b9f42cab6899f26cd6510bf" ON "aero_lp" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_2acd173568dcc7df1b2655cb13" ON "aero_lp" ("block_number") `) + await db.query(`CREATE INDEX "IDX_9cfe5ff27e954044840d274367" ON "aero_lp" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_b5cfd69ccd727c080c4e14d776" ON "aero_lp" ("pool") `) + await db.query(`CREATE INDEX "IDX_a9d6d99b3e4749a53fa3c64bf8" ON "aero_lp" ("account") `) + await db.query(`CREATE TABLE "aero_lp_position" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "pool" text NOT NULL, "position_id" numeric NOT NULL, "account" text NOT NULL, "liquidity" numeric NOT NULL, "staked" numeric NOT NULL, "amount0" numeric NOT NULL, "amount1" numeric NOT NULL, "staked0" numeric NOT NULL, "staked1" numeric NOT NULL, "unstaked_earned0" numeric NOT NULL, "unstaked_earned1" numeric NOT NULL, "emissions_earned" numeric NOT NULL, "tick_lower" integer NOT NULL, "tick_upper" integer NOT NULL, "sqrt_ratio_lower" numeric NOT NULL, "sqrt_ratio_upper" numeric NOT NULL, CONSTRAINT "PK_24563c43a5841a202a95390d876" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_9f163b1720f9f8c8b75d5d0f97" ON "aero_lp_position" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_b42642e1ebc0cbacbba4a5fb1d" ON "aero_lp_position" ("block_number") `) + await db.query(`CREATE INDEX "IDX_ca7d09158297faf6b84487ba5c" ON "aero_lp_position" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_b4e54387b76cb3bce1bd725f7a" ON "aero_lp_position" ("pool") `) + await db.query(`CREATE INDEX "IDX_b465865a93cb044c6649523287" ON "aero_lp_position" ("position_id") `) + await db.query(`CREATE INDEX "IDX_05aaf9416181ddc9012f41da2f" ON "aero_lp_position" ("account") `) + await db.query(`CREATE TABLE "aero_cl_gauge_notify_reward" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "from" text NOT NULL, "amount" numeric NOT NULL, CONSTRAINT "PK_81e9aaf9cedd501f19b631fa24c" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_bc847340db9380bee59cb5f5fe" ON "aero_cl_gauge_notify_reward" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_32ededc6fe2c4d647215206a02" ON "aero_cl_gauge_notify_reward" ("block_number") `) + await db.query(`CREATE INDEX "IDX_0b2e6dc0ffef94a1b390596ca1" ON "aero_cl_gauge_notify_reward" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_f159f93df2550a7c6d67afd326" ON "aero_cl_gauge_notify_reward" ("address") `) + await db.query(`CREATE INDEX "IDX_b789dc0efc58964980fe36ed71" ON "aero_cl_gauge_notify_reward" ("from") `) + await db.query(`CREATE TABLE "aero_gauge_notify_reward" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "from" text NOT NULL, "amount" numeric NOT NULL, CONSTRAINT "PK_cc6cc4555454beeb72e1f69c78b" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_983aada0809852d4dea444aa1b" ON "aero_gauge_notify_reward" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_993e3d42327053b33a5db4ffe4" ON "aero_gauge_notify_reward" ("block_number") `) + await db.query(`CREATE INDEX "IDX_a099b412c12b8d9e8a5ac999ec" ON "aero_gauge_notify_reward" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_7522fbb7adef5aca9de1dc9900" ON "aero_gauge_notify_reward" ("address") `) + await db.query(`CREATE INDEX "IDX_6fd369509b8e29561b1b2b5310" ON "aero_gauge_notify_reward" ("from") `) + await db.query(`CREATE TABLE "aero_pool_created" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "pool" text NOT NULL, "token0" text NOT NULL, "token1" text NOT NULL, "stable" boolean NOT NULL, CONSTRAINT "PK_92121ac89556a501f1d9d9a3cc4" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_c0420757a8d67132c475450b37" ON "aero_pool_created" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_8e60b2e8b223efda676eff93d9" ON "aero_pool_created" ("block_number") `) + await db.query(`CREATE INDEX "IDX_7f98545a433bc1fa08c9b8d4ed" ON "aero_pool_created" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_6372821d7d9888a53637b6a7ad" ON "aero_pool_created" ("address") `) + await db.query(`CREATE TABLE "aero_cl_pool_created" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "pool" text NOT NULL, "token0" text NOT NULL, "token1" text NOT NULL, "tick_spacing" integer NOT NULL, CONSTRAINT "PK_3c64e6a99fd4cf16f26d514fe32" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_3b7186dca3828117fb53ef0206" ON "aero_cl_pool_created" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_68fc780d94ec199f1eb50e68f7" ON "aero_cl_pool_created" ("block_number") `) + await db.query(`CREATE INDEX "IDX_ec5ee04a8c72b11d543e28e5e6" ON "aero_cl_pool_created" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_2701b481a50882398b9cb7e05b" ON "aero_cl_pool_created" ("address") `) + await db.query(`CREATE TABLE "aero_voter_gauge_created" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "pool_factory" text NOT NULL, "voting_rewards_factory" text NOT NULL, "gauge_factory" text NOT NULL, "pool" text NOT NULL, "bribe_voting_reward" text NOT NULL, "fee_voting_reward" text NOT NULL, "gauge" text NOT NULL, "creator" text NOT NULL, CONSTRAINT "PK_c96d43e26a5474fe42e6feb8525" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_60842e4b20e928204cc0790128" ON "aero_voter_gauge_created" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_74c2a7bf57c43f69f91b7c3b20" ON "aero_voter_gauge_created" ("block_number") `) + await db.query(`CREATE INDEX "IDX_d8be771bb35fe590c45a7d1af2" ON "aero_voter_gauge_created" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_19b4155090d82294060bb44366" ON "aero_voter_gauge_created" ("address") `) + await db.query(`CREATE INDEX "IDX_40d43ab503f180b7532f42f45a" ON "aero_voter_gauge_created" ("pool_factory") `) + await db.query(`CREATE INDEX "IDX_b4ffd29e88ac91115e44fc5b03" ON "aero_voter_gauge_created" ("voting_rewards_factory") `) + await db.query(`CREATE INDEX "IDX_fe01f00328010eac8a03879936" ON "aero_voter_gauge_created" ("gauge_factory") `) + await db.query(`CREATE TABLE "frrs_reward_collected" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "amount_collected" numeric NOT NULL, CONSTRAINT "PK_638be8eac1ed06396ae15065985" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_41ff7fbd84f0e932ddff4aaeda" ON "frrs_reward_collected" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_6f8728cf12eedec371ec2b5ac3" ON "frrs_reward_collected" ("address") `) + await db.query(`CREATE INDEX "IDX_fe9c300aa3739b7fedae19bee8" ON "frrs_reward_collected" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_748e8278aa0f4327fdb375ce39" ON "frrs_reward_collected" ("block_number") `) + await db.query(`CREATE INDEX "IDX_76682d76550c1908c0edbf80d6" ON "frrs_reward_collected" ("tx_hash") `) + await db.query(`CREATE TABLE "frrs_rewards_per_second_changed" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "new_rps" numeric NOT NULL, "old_rps" numeric NOT NULL, CONSTRAINT "PK_2673e74455a61c199ae6b457c9e" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_51112ae6ed7acfe5fea9041736" ON "frrs_rewards_per_second_changed" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_27777adfd6d67ce69177e76777" ON "frrs_rewards_per_second_changed" ("address") `) + await db.query(`CREATE INDEX "IDX_0f439534e934e9114e93fe0e0e" ON "frrs_rewards_per_second_changed" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_af32902afcc6d0e38d55b29e68" ON "frrs_rewards_per_second_changed" ("block_number") `) + await db.query(`CREATE INDEX "IDX_7a5afd8ca41d81f9841db0f602" ON "frrs_rewards_per_second_changed" ("tx_hash") `) + await db.query(`CREATE TABLE "frrs_rewards_target_change" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "target" text NOT NULL, "previous_target" text NOT NULL, CONSTRAINT "PK_a55f976a8f537dff9d4ed24047f" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_a6f19822f0e09c509963463fbd" ON "frrs_rewards_target_change" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_598a7d310b076cf239ae7bcb51" ON "frrs_rewards_target_change" ("address") `) + await db.query(`CREATE INDEX "IDX_d593e4b975ae4f8d60303b2ba9" ON "frrs_rewards_target_change" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_9410930fcb952fb4003dc2b2be" ON "frrs_rewards_target_change" ("block_number") `) + await db.query(`CREATE INDEX "IDX_14cbad89905ceeb715f8e1a2c8" ON "frrs_rewards_target_change" ("tx_hash") `) + await db.query(`CREATE TABLE "frrs_strategist_updated" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "tx_hash" text NOT NULL, "strategist_address" text NOT NULL, CONSTRAINT "PK_c71ac16e8ede7acbd61b846676a" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_47dfa32c5be0528074dcf093d6" ON "frrs_strategist_updated" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_2f910a0f9c75adc401d7aa8c0f" ON "frrs_strategist_updated" ("address") `) + await db.query(`CREATE INDEX "IDX_301322e4df8e766e7f4cd892fd" ON "frrs_strategist_updated" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_7f49f2839212126c3d42fb4bf1" ON "frrs_strategist_updated" ("block_number") `) + await db.query(`CREATE INDEX "IDX_aab8ae0cb29505a7014438675b" ON "frrs_strategist_updated" ("tx_hash") `) + await db.query(`CREATE TABLE "processing_status" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "start_timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "head_timestamp" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_85f5e2467b74fb70fac1a053021" PRIMARY KEY ("id"))`) + await db.query(`CREATE TABLE "erc20" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "name" text NOT NULL, "decimals" integer NOT NULL, "symbol" text NOT NULL, CONSTRAINT "PK_8d43ce15401ba044c55a72a8ceb" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_905ff854e6782fc32dc4268a25" ON "erc20" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_40fd11c1a0d0f2562824894e85" ON "erc20" ("address") `) + await db.query(`CREATE TABLE "erc20_holder" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "account" text NOT NULL, "since" TIMESTAMP WITH TIME ZONE NOT NULL, "balance" numeric NOT NULL, CONSTRAINT "PK_3adce7edbac4bcb03c662c3a1ac" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_51b9e7c44702ef3a6f05d3702e" ON "erc20_holder" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_98f753777a7d77ff8950aee1c7" ON "erc20_holder" ("address") `) + await db.query(`CREATE INDEX "IDX_875601f8f24f9082f1c3551406" ON "erc20_holder" ("account") `) + await db.query(`CREATE INDEX "IDX_ac960405f4b3290bf5d7ff2007" ON "erc20_holder" ("since") `) + await db.query(`CREATE TABLE "erc20_state" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "total_supply" numeric NOT NULL, "holder_count" integer NOT NULL, CONSTRAINT "PK_eac1124b07bbdedafd4fff2f7b7" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_2b69abb250c647c7a4b5a5a715" ON "erc20_state" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_c3d08eb2dafe4b5b188924d835" ON "erc20_state" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_29e8edc6ba8cc37c0c16ff0baf" ON "erc20_state" ("block_number") `) + await db.query(`CREATE INDEX "IDX_fe7e53a28ac19fa35a94af35e5" ON "erc20_state" ("address") `) + await db.query(`CREATE TABLE "erc20_state_by_day" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "date" text NOT NULL, "address" text NOT NULL, "total_supply" numeric NOT NULL, "holder_count" integer NOT NULL, CONSTRAINT "PK_f9e03821635f845a41c4812cf76" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_b34a3524b485e28b64872ffb27" ON "erc20_state_by_day" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_5e25c3144354e0df6ada4842a4" ON "erc20_state_by_day" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_2a5cd83ca8e398f298fb60c3e7" ON "erc20_state_by_day" ("block_number") `) + await db.query(`CREATE INDEX "IDX_898a5fddc8c8f32ce617bca89b" ON "erc20_state_by_day" ("date") `) + await db.query(`CREATE INDEX "IDX_2d16390a0d6b57375b580012ea" ON "erc20_state_by_day" ("address") `) + await db.query(`CREATE TABLE "erc20_balance" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "address" text NOT NULL, "account" text NOT NULL, "balance" numeric NOT NULL, CONSTRAINT "PK_069b6549e7a9938cc89f32063a6" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_bb6a884e702f2887037d5a7eec" ON "erc20_balance" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_c9fbe21a3411d93ea586af2a4c" ON "erc20_balance" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_d1f50dc39003331b76fad8a640" ON "erc20_balance" ("block_number") `) + await db.query(`CREATE INDEX "IDX_5fe068d4a82a445e8b4155f802" ON "erc20_balance" ("address") `) + await db.query(`CREATE INDEX "IDX_5c45a4a58256ea383a4d096ec6" ON "erc20_balance" ("account") `) + await db.query(`CREATE TABLE "erc20_transfer" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "tx_hash" text NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address" text NOT NULL, "from" text NOT NULL, "from_balance" numeric NOT NULL, "to" text NOT NULL, "to_balance" numeric NOT NULL, "value" numeric NOT NULL, CONSTRAINT "PK_12764843146818a31e3d28fc577" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_f914d2e140eb88375a5a2ef6c7" ON "erc20_transfer" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_6350ddb2def19c1e3a06d8b3ec" ON "erc20_transfer" ("address") `) + await db.query(`CREATE INDEX "IDX_eca70565083880d00e9110b000" ON "erc20_transfer" ("from") `) + await db.query(`CREATE INDEX "IDX_9fdc9d58b6ae0cb13b9c7f8226" ON "erc20_transfer" ("to") `) + await db.query(`CREATE TABLE "pool" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "address" text NOT NULL, "exchange" text NOT NULL, "name" text, "symbol" text, "tokens" text array NOT NULL, "symbols" text array NOT NULL, "decimals" integer array NOT NULL, "type" text NOT NULL, "created_at_block" integer NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_db1bfe411e1516c01120b85f8fe" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_ca7b22bed322c7c1c817d7fefc" ON "pool" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_0764827295d4ed49e259aa398f" ON "pool" ("address") `) + await db.query(`CREATE INDEX "IDX_9a38a7d17d1fff09327de45882" ON "pool" ("exchange") `) await db.query(`CREATE TABLE "sfc_withdrawal" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, "created_at_block" integer NOT NULL, "delegator" text NOT NULL, "to_validator_id" text NOT NULL, "wr_id" text NOT NULL, "amount" numeric NOT NULL, "penalty" numeric, "withdrawn_at" TIMESTAMP WITH TIME ZONE, "withdrawn_at_block" integer, CONSTRAINT "PK_ddb6248f9bf2b19ba24e1de1aae" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_098bb05eb0e21825d9f97d7238" ON "sfc_withdrawal" ("chain_id") `) await db.query(`CREATE INDEX "IDX_c1767bd417033cf6be2fc0dfed" ON "sfc_withdrawal" ("delegator") `) @@ -467,42 +442,56 @@ module.exports = class Data1756242284453 { await db.query(`CREATE INDEX "IDX_e05f1c97627f04cb666bfbfd2e" ON "event_woeth_price_updated" ("timestamp") `) await db.query(`CREATE INDEX "IDX_462441741f17550d40da0cd5c0" ON "event_woeth_price_updated" ("block_number") `) await db.query(`CREATE INDEX "IDX_dd99dbcb9666973f47c7462593" ON "event_woeth_price_updated" ("address") `) + await db.query(`CREATE TABLE "util_cache" ("id" character varying NOT NULL, "data" jsonb NOT NULL, CONSTRAINT "PK_d8dba67b2f156e569ad7ecf21d6" PRIMARY KEY ("id"))`) + await db.query(`CREATE TABLE "exchange_rate" ("id" character varying NOT NULL, "chain_id" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "pair" text NOT NULL, "base" text NOT NULL, "quote" text NOT NULL, "rate" numeric NOT NULL, "decimals" integer NOT NULL, CONSTRAINT "PK_5c5d27d2b900ef6cdeef0398472" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_2b58051dcc72cf0f02aa41ff14" ON "exchange_rate" ("chain_id") `) + await db.query(`CREATE INDEX "IDX_9e23a3f1bf3634820c873a0fe8" ON "exchange_rate" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_c61a93768eed9e58ce399bbe01" ON "exchange_rate" ("block_number") `) + await db.query(`CREATE TABLE "ogv" ("id" character varying NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "circulating" numeric NOT NULL, "staked" numeric NOT NULL, "total" numeric NOT NULL, CONSTRAINT "PK_f16038abf451ce82bd03ea54ee7" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_2418a8b8b92b2f5977be761cf9" ON "ogv" ("timestamp") `) + await db.query(`CREATE INDEX "IDX_b8f20bcf48e4aa77e0f48d77db" ON "ogv" ("block_number") `) + await db.query(`CREATE TABLE "ogv_address" ("id" character varying NOT NULL, "balance" numeric NOT NULL, "staked" numeric NOT NULL, "veogv_balance" numeric NOT NULL, "voting_power" numeric NOT NULL, "last_updated" TIMESTAMP WITH TIME ZONE NOT NULL, "delegatee_id" character varying, CONSTRAINT "PK_f13c77575687ef480ca0b7de5d8" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_49d26f287904b8b1aef6e9ac2b" ON "ogv_address" ("delegatee_id") `) + await db.query(`CREATE TABLE "ogv_lockup" ("id" character varying NOT NULL, "lockup_id" text NOT NULL, "amount" numeric NOT NULL, "end" TIMESTAMP WITH TIME ZONE NOT NULL, "veogv" numeric NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "address_id" character varying, CONSTRAINT "PK_6b6d5ed3a004dd3f546c1b11fa4" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_8114101b53d9d6bc26fe80838a" ON "ogv_lockup" ("lockup_id") `) + await db.query(`CREATE INDEX "IDX_8be94cd63e35b91adf1301a156" ON "ogv_lockup" ("address_id") `) + await db.query(`CREATE TABLE "ogv_lockup_tx_log" ("id" character varying NOT NULL, "hash" text NOT NULL, "event" character varying(8) NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "block_number" integer NOT NULL, "total_supply" numeric NOT NULL, "ogv_lockup_id" character varying, CONSTRAINT "PK_1c4a8425ce42f0c9da10056adee" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_b49fca291c97d9b55cd91f935f" ON "ogv_lockup_tx_log" ("ogv_lockup_id") `) + await db.query(`CREATE TABLE "ogv_proposal" ("id" character varying NOT NULL, "description" text, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "start_block" numeric NOT NULL, "end_block" numeric NOT NULL, "last_updated" TIMESTAMP WITH TIME ZONE NOT NULL, "status" character varying(9) NOT NULL, "quorum" numeric NOT NULL, "choices" text array NOT NULL, "scores" text array NOT NULL, "proposer_id" character varying, CONSTRAINT "PK_b06db02b26fa37882e013579407" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_c62be3f16dfb3e4a09525c85af" ON "ogv_proposal" ("proposer_id") `) + await db.query(`CREATE TABLE "ogv_proposal_tx_log" ("id" character varying NOT NULL, "hash" text NOT NULL, "event" character varying(8) NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "proposal_id" character varying, CONSTRAINT "PK_da43c287069bba678ca5c60b1ad" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_5d5f5e10892290ee366d26de7d" ON "ogv_proposal_tx_log" ("proposal_id") `) + await db.query(`CREATE TABLE "ogv_proposal_vote" ("id" character varying NOT NULL, "weight" numeric NOT NULL, "type" character varying(7) NOT NULL, "tx_hash" text NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "proposal_id" character varying, "voter_id" character varying, CONSTRAINT "PK_93c03f35b95221586cb8b83f523" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_58d732bc6523c2609d2725cc0a" ON "ogv_proposal_vote" ("proposal_id") `) + await db.query(`CREATE INDEX "IDX_2fd621aea353448fb3f17721bc" ON "ogv_proposal_vote" ("voter_id") `) + await db.query(`CREATE TABLE "ogv_daily_stat" ("id" character varying NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "total_supply" numeric NOT NULL, "total_supply_usd" numeric NOT NULL, "total_staked" numeric NOT NULL, "trading_volume_usd" numeric NOT NULL, "market_cap_usd" numeric NOT NULL, "price_usd" numeric NOT NULL, "holders_over_threshold" integer NOT NULL, CONSTRAINT "PK_69bc6d866711151e2712481794c" PRIMARY KEY ("id"))`) + await db.query(`CREATE INDEX "IDX_c974bde87107cacae6d3654972" ON "ogv_daily_stat" ("block_number") `) + await db.query(`CREATE INDEX "IDX_b62fa80951183bb0acf8a5e8b9" ON "ogv_daily_stat" ("timestamp") `) await db.query(`ALTER TABLE "beacon_deposit_event" ADD CONSTRAINT "FK_dff55f23cfcfa0ff664964572ff" FOREIGN KEY ("pubkey_id") REFERENCES "beacon_deposit_pubkey"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "ogv_address" ADD CONSTRAINT "FK_49d26f287904b8b1aef6e9ac2b3" FOREIGN KEY ("delegatee_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "ogv_lockup" ADD CONSTRAINT "FK_8be94cd63e35b91adf1301a156c" FOREIGN KEY ("address_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "ogv_lockup_tx_log" ADD CONSTRAINT "FK_b49fca291c97d9b55cd91f935f3" FOREIGN KEY ("ogv_lockup_id") REFERENCES "ogv_lockup"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "ogv_proposal" ADD CONSTRAINT "FK_c62be3f16dfb3e4a09525c85af8" FOREIGN KEY ("proposer_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "ogv_proposal_tx_log" ADD CONSTRAINT "FK_5d5f5e10892290ee366d26de7dc" FOREIGN KEY ("proposal_id") REFERENCES "ogv_proposal"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "ogv_proposal_vote" ADD CONSTRAINT "FK_58d732bc6523c2609d2725cc0ac" FOREIGN KEY ("proposal_id") REFERENCES "ogv_proposal"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "ogv_proposal_vote" ADD CONSTRAINT "FK_2fd621aea353448fb3f17721bc8" FOREIGN KEY ("voter_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) await db.query(`ALTER TABLE "o_token_history" ADD CONSTRAINT "FK_2f1457755464ec5951d1e96542a" FOREIGN KEY ("address_id") REFERENCES "o_token_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) await db.query(`ALTER TABLE "o_token_rebase" ADD CONSTRAINT "FK_b8653270b96fc932f077b26441d" FOREIGN KEY ("apy_id") REFERENCES "o_token_apy"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) await db.query(`ALTER TABLE "o_token_rebase_option" ADD CONSTRAINT "FK_da7296f8011232dc8675477b841" FOREIGN KEY ("address_id") REFERENCES "o_token_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) - await db.query(`ALTER TABLE "aero_cl_pool_state" ADD CONSTRAINT "FK_02aa86fe0e78999620744402a0c" FOREIGN KEY ("tick_id") REFERENCES "aero_cl_pool_tick"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) await db.query(`ALTER TABLE "governance_proposal_event" ADD CONSTRAINT "FK_ce984d23fc99c537b8f22fd663a" FOREIGN KEY ("proposal_id") REFERENCES "governance_proposal"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) await db.query(`ALTER TABLE "governance_proposal_vote" ADD CONSTRAINT "FK_5531af241c24a09c854ead9d551" FOREIGN KEY ("proposal_id") REFERENCES "governance_proposal"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) await db.query(`ALTER TABLE "es_account" ADD CONSTRAINT "FK_7b43e7bb90d3b435d074112f572" FOREIGN KEY ("delegate_to_id") REFERENCES "es_account"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) await db.query(`ALTER TABLE "es_lockup_event" ADD CONSTRAINT "FK_46d53d4fad340d5939955836004" FOREIGN KEY ("lockup_id") REFERENCES "es_lockup"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "aero_cl_pool_state" ADD CONSTRAINT "FK_02aa86fe0e78999620744402a0c" FOREIGN KEY ("tick_id") REFERENCES "aero_cl_pool_tick"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "ogv_address" ADD CONSTRAINT "FK_49d26f287904b8b1aef6e9ac2b3" FOREIGN KEY ("delegatee_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "ogv_lockup" ADD CONSTRAINT "FK_8be94cd63e35b91adf1301a156c" FOREIGN KEY ("address_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "ogv_lockup_tx_log" ADD CONSTRAINT "FK_b49fca291c97d9b55cd91f935f3" FOREIGN KEY ("ogv_lockup_id") REFERENCES "ogv_lockup"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "ogv_proposal" ADD CONSTRAINT "FK_c62be3f16dfb3e4a09525c85af8" FOREIGN KEY ("proposer_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "ogv_proposal_tx_log" ADD CONSTRAINT "FK_5d5f5e10892290ee366d26de7dc" FOREIGN KEY ("proposal_id") REFERENCES "ogv_proposal"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "ogv_proposal_vote" ADD CONSTRAINT "FK_58d732bc6523c2609d2725cc0ac" FOREIGN KEY ("proposal_id") REFERENCES "ogv_proposal"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) + await db.query(`ALTER TABLE "ogv_proposal_vote" ADD CONSTRAINT "FK_2fd621aea353448fb3f17721bc8" FOREIGN KEY ("voter_id") REFERENCES "ogv_address"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`) } async down(db) { - await db.query(`DROP TABLE "util_cache"`) - await db.query(`DROP TABLE "exchange_rate"`) - await db.query(`DROP INDEX "public"."IDX_2b58051dcc72cf0f02aa41ff14"`) - await db.query(`DROP INDEX "public"."IDX_9e23a3f1bf3634820c873a0fe8"`) - await db.query(`DROP INDEX "public"."IDX_c61a93768eed9e58ce399bbe01"`) - await db.query(`DROP TABLE "native_balance"`) - await db.query(`DROP INDEX "public"."IDX_45fb48f831ccadcf29f404824a"`) - await db.query(`DROP INDEX "public"."IDX_82d827c3b96fb3c5ab43068502"`) - await db.query(`DROP TABLE "legacy_staker"`) - await db.query(`DROP TABLE "curve_pool"`) - await db.query(`DROP INDEX "public"."IDX_76c9202c1160ce818f7a29d131"`) - await db.query(`DROP TABLE "curve_pool_balance"`) - await db.query(`DROP INDEX "public"."IDX_ffb0d0f86f03faacef7cb3e092"`) - await db.query(`DROP INDEX "public"."IDX_db5522c865eb8ed76fa7aeb4a8"`) - await db.query(`DROP TABLE "curve_pool_rate"`) - await db.query(`DROP INDEX "public"."IDX_561faf9883f4bb00ae6df34cc1"`) - await db.query(`DROP INDEX "public"."IDX_cefe6315e78e235fa4ab3de663"`) + await db.query(`DROP TABLE "ogn_daily_stat"`) + await db.query(`DROP INDEX "public"."IDX_cb4297ef85375ee13a3446b240"`) + await db.query(`DROP INDEX "public"."IDX_b96b9849e1e479d743ffb547c9"`) + await db.query(`DROP TABLE "coin_gecko_coin_data"`) + await db.query(`DROP INDEX "public"."IDX_55f8b56cad28caa22a995dfb83"`) + await db.query(`DROP INDEX "public"."IDX_821542437abc5d0d6aa7959131"`) await db.query(`DROP TABLE "protocol_daily_stat"`) await db.query(`DROP INDEX "public"."IDX_f196efecb1b717f74494c4416b"`) await db.query(`DROP INDEX "public"."IDX_a5af597a96fb8752dc00093192"`) @@ -530,61 +519,23 @@ module.exports = class Data1756242284453 { await db.query(`DROP INDEX "public"."IDX_b883d5666bb2f8b5b1f7d9633a"`) await db.query(`DROP INDEX "public"."IDX_adcff42ecde1a20daeb870b3c4"`) await db.query(`DROP INDEX "public"."IDX_41665fa5e546780642bacf96c7"`) - await db.query(`DROP TABLE "coin_gecko_coin_data"`) - await db.query(`DROP INDEX "public"."IDX_55f8b56cad28caa22a995dfb83"`) - await db.query(`DROP INDEX "public"."IDX_821542437abc5d0d6aa7959131"`) + await db.query(`DROP TABLE "wallet_labels"`) + await db.query(`DROP TABLE "curve_pool"`) + await db.query(`DROP INDEX "public"."IDX_76c9202c1160ce818f7a29d131"`) + await db.query(`DROP TABLE "curve_pool_balance"`) + await db.query(`DROP INDEX "public"."IDX_ffb0d0f86f03faacef7cb3e092"`) + await db.query(`DROP INDEX "public"."IDX_db5522c865eb8ed76fa7aeb4a8"`) + await db.query(`DROP TABLE "curve_pool_rate"`) + await db.query(`DROP INDEX "public"."IDX_561faf9883f4bb00ae6df34cc1"`) + await db.query(`DROP INDEX "public"."IDX_cefe6315e78e235fa4ab3de663"`) await db.query(`DROP TABLE "ogn_buyback"`) await db.query(`DROP INDEX "public"."IDX_daa406e4bd0f1313c9e54aab97"`) await db.query(`DROP INDEX "public"."IDX_854fb3714182df4d2ba943417a"`) await db.query(`DROP INDEX "public"."IDX_30396766a2f98c53fc916657e6"`) - await db.query(`DROP TABLE "wallet_labels"`) - await db.query(`DROP TABLE "ogn_daily_stat"`) - await db.query(`DROP INDEX "public"."IDX_cb4297ef85375ee13a3446b240"`) - await db.query(`DROP INDEX "public"."IDX_b96b9849e1e479d743ffb547c9"`) - await db.query(`DROP TABLE "ogv"`) - await db.query(`DROP INDEX "public"."IDX_2418a8b8b92b2f5977be761cf9"`) - await db.query(`DROP INDEX "public"."IDX_b8f20bcf48e4aa77e0f48d77db"`) - await db.query(`DROP TABLE "ogv_address"`) - await db.query(`DROP INDEX "public"."IDX_49d26f287904b8b1aef6e9ac2b"`) - await db.query(`DROP TABLE "ogv_lockup"`) - await db.query(`DROP INDEX "public"."IDX_8114101b53d9d6bc26fe80838a"`) - await db.query(`DROP INDEX "public"."IDX_8be94cd63e35b91adf1301a156"`) - await db.query(`DROP TABLE "ogv_lockup_tx_log"`) - await db.query(`DROP INDEX "public"."IDX_b49fca291c97d9b55cd91f935f"`) - await db.query(`DROP TABLE "ogv_proposal"`) - await db.query(`DROP INDEX "public"."IDX_c62be3f16dfb3e4a09525c85af"`) - await db.query(`DROP TABLE "ogv_proposal_tx_log"`) - await db.query(`DROP INDEX "public"."IDX_5d5f5e10892290ee366d26de7d"`) - await db.query(`DROP TABLE "ogv_proposal_vote"`) - await db.query(`DROP INDEX "public"."IDX_58d732bc6523c2609d2725cc0a"`) - await db.query(`DROP INDEX "public"."IDX_2fd621aea353448fb3f17721bc"`) - await db.query(`DROP TABLE "ogv_daily_stat"`) - await db.query(`DROP INDEX "public"."IDX_c974bde87107cacae6d3654972"`) - await db.query(`DROP INDEX "public"."IDX_b62fa80951183bb0acf8a5e8b9"`) - await db.query(`DROP TABLE "transaction_details"`) - await db.query(`DROP INDEX "public"."IDX_035179d5845a24726b74795cb5"`) - await db.query(`DROP INDEX "public"."IDX_9e0953446c15e89dfe68dbe5bd"`) - await db.query(`DROP INDEX "public"."IDX_ec29c6dbcba374ae8819275f22"`) - await db.query(`DROP INDEX "public"."IDX_1ada02a88b8355495e0917b49b"`) - await db.query(`DROP INDEX "public"."IDX_81a859fb3a14a34f194e1d8606"`) - await db.query(`DROP INDEX "public"."IDX_ae3e0f0414a1deb6e4840e2e44"`) - await db.query(`DROP TABLE "pool"`) - await db.query(`DROP INDEX "public"."IDX_ca7b22bed322c7c1c817d7fefc"`) - await db.query(`DROP INDEX "public"."IDX_0764827295d4ed49e259aa398f"`) - await db.query(`DROP INDEX "public"."IDX_9a38a7d17d1fff09327de45882"`) - await db.query(`DROP TABLE "pool_booster"`) - await db.query(`DROP INDEX "public"."IDX_c46c14abc58edf2c6bbd1e8d09"`) - await db.query(`DROP INDEX "public"."IDX_2c38cf60d95bd998304076c11c"`) - await db.query(`DROP INDEX "public"."IDX_90136d4e23c9ed49f1b9f3a101"`) - await db.query(`DROP INDEX "public"."IDX_47dd84c80f040852a6d8789a24"`) - await db.query(`DROP INDEX "public"."IDX_ab1662265686664891ee4eeb78"`) - await db.query(`DROP INDEX "public"."IDX_6d838f9682498d64417204e3cf"`) - await db.query(`DROP INDEX "public"."IDX_373e04b978fa8ec37506b82872"`) - await db.query(`DROP TABLE "pool_booster_bribe_executed"`) - await db.query(`DROP INDEX "public"."IDX_3dbdcdcc2418ce9ce520d8ade6"`) - await db.query(`DROP INDEX "public"."IDX_54b5d8f2bbe89855785a038c33"`) - await db.query(`DROP INDEX "public"."IDX_d7693679519921139cb2dcb739"`) - await db.query(`DROP INDEX "public"."IDX_644a87d8df6aced2f35564d43f"`) + await db.query(`DROP TABLE "native_balance"`) + await db.query(`DROP INDEX "public"."IDX_45fb48f831ccadcf29f404824a"`) + await db.query(`DROP INDEX "public"."IDX_82d827c3b96fb3c5ab43068502"`) + await db.query(`DROP TABLE "legacy_staker"`) await db.query(`DROP TABLE "o_token"`) await db.query(`DROP INDEX "public"."IDX_1da06ba7d2c0a02d01d1b7a6c0"`) await db.query(`DROP INDEX "public"."IDX_0851d95d178f682d279a04ebf9"`) @@ -679,6 +630,42 @@ module.exports = class Data1756242284453 { await db.query(`DROP INDEX "public"."IDX_74ae9edf4f308f86740b16b7cd"`) await db.query(`DROP INDEX "public"."IDX_b8b0b44e2b80be2fbeb211debe"`) await db.query(`DROP INDEX "public"."IDX_8e58218e9917d409803beb1479"`) + await db.query(`DROP TABLE "pool_booster"`) + await db.query(`DROP INDEX "public"."IDX_c46c14abc58edf2c6bbd1e8d09"`) + await db.query(`DROP INDEX "public"."IDX_2c38cf60d95bd998304076c11c"`) + await db.query(`DROP INDEX "public"."IDX_90136d4e23c9ed49f1b9f3a101"`) + await db.query(`DROP INDEX "public"."IDX_47dd84c80f040852a6d8789a24"`) + await db.query(`DROP INDEX "public"."IDX_ab1662265686664891ee4eeb78"`) + await db.query(`DROP INDEX "public"."IDX_6d838f9682498d64417204e3cf"`) + await db.query(`DROP INDEX "public"."IDX_373e04b978fa8ec37506b82872"`) + await db.query(`DROP TABLE "pool_booster_bribe_executed"`) + await db.query(`DROP INDEX "public"."IDX_3dbdcdcc2418ce9ce520d8ade6"`) + await db.query(`DROP INDEX "public"."IDX_54b5d8f2bbe89855785a038c33"`) + await db.query(`DROP INDEX "public"."IDX_d7693679519921139cb2dcb739"`) + await db.query(`DROP INDEX "public"."IDX_644a87d8df6aced2f35564d43f"`) + await db.query(`DROP TABLE "transaction_details"`) + await db.query(`DROP INDEX "public"."IDX_035179d5845a24726b74795cb5"`) + await db.query(`DROP INDEX "public"."IDX_9e0953446c15e89dfe68dbe5bd"`) + await db.query(`DROP INDEX "public"."IDX_ec29c6dbcba374ae8819275f22"`) + await db.query(`DROP INDEX "public"."IDX_1ada02a88b8355495e0917b49b"`) + await db.query(`DROP INDEX "public"."IDX_81a859fb3a14a34f194e1d8606"`) + await db.query(`DROP INDEX "public"."IDX_ae3e0f0414a1deb6e4840e2e44"`) + await db.query(`DROP TABLE "strategy_balance"`) + await db.query(`DROP INDEX "public"."IDX_bb5bbdf054deadf169e9e0330a"`) + await db.query(`DROP INDEX "public"."IDX_0113bf0b63183bea0d22cd0d08"`) + await db.query(`DROP INDEX "public"."IDX_a88065dcd92011698bbe7df7b1"`) + await db.query(`DROP INDEX "public"."IDX_cf0381c2326669950af23bbee7"`) + await db.query(`DROP INDEX "public"."IDX_28b5d09a9e1898c8a071c9ee40"`) + await db.query(`DROP TABLE "strategy_yield"`) + await db.query(`DROP INDEX "public"."IDX_5108f2a2563d5665892d0c06b0"`) + await db.query(`DROP INDEX "public"."IDX_41c3567c9d43c598e07a0029c5"`) + await db.query(`DROP INDEX "public"."IDX_4230e2aa194f054f8393d36a24"`) + await db.query(`DROP INDEX "public"."IDX_0ad9cd89469c34889e94f63525"`) + await db.query(`DROP TABLE "strategy_daily_yield"`) + await db.query(`DROP INDEX "public"."IDX_0ba1974747f1906e0c102cd2cd"`) + await db.query(`DROP INDEX "public"."IDX_df364fb6e82d1feeed2a5dfffa"`) + await db.query(`DROP INDEX "public"."IDX_095c7036449ae511b4ef2a01df"`) + await db.query(`DROP INDEX "public"."IDX_c6a366374690d7e37b070e5788"`) await db.query(`DROP TABLE "arm"`) await db.query(`DROP TABLE "arm_state"`) await db.query(`DROP INDEX "public"."IDX_68943c1b73a665919e9377027e"`) @@ -710,103 +697,6 @@ module.exports = class Data1756242284453 { await db.query(`DROP INDEX "public"."IDX_ee5733a47926aa5d45d925e427"`) await db.query(`DROP INDEX "public"."IDX_8ba4cfdcc71cd663da41d5c683"`) await db.query(`DROP INDEX "public"."IDX_767274005ca866b0c3a89956e1"`) - await db.query(`DROP TABLE "erc20"`) - await db.query(`DROP INDEX "public"."IDX_905ff854e6782fc32dc4268a25"`) - await db.query(`DROP INDEX "public"."IDX_40fd11c1a0d0f2562824894e85"`) - await db.query(`DROP TABLE "erc20_holder"`) - await db.query(`DROP INDEX "public"."IDX_51b9e7c44702ef3a6f05d3702e"`) - await db.query(`DROP INDEX "public"."IDX_98f753777a7d77ff8950aee1c7"`) - await db.query(`DROP INDEX "public"."IDX_875601f8f24f9082f1c3551406"`) - await db.query(`DROP INDEX "public"."IDX_ac960405f4b3290bf5d7ff2007"`) - await db.query(`DROP TABLE "erc20_state"`) - await db.query(`DROP INDEX "public"."IDX_2b69abb250c647c7a4b5a5a715"`) - await db.query(`DROP INDEX "public"."IDX_c3d08eb2dafe4b5b188924d835"`) - await db.query(`DROP INDEX "public"."IDX_29e8edc6ba8cc37c0c16ff0baf"`) - await db.query(`DROP INDEX "public"."IDX_fe7e53a28ac19fa35a94af35e5"`) - await db.query(`DROP TABLE "erc20_state_by_day"`) - await db.query(`DROP INDEX "public"."IDX_b34a3524b485e28b64872ffb27"`) - await db.query(`DROP INDEX "public"."IDX_5e25c3144354e0df6ada4842a4"`) - await db.query(`DROP INDEX "public"."IDX_2a5cd83ca8e398f298fb60c3e7"`) - await db.query(`DROP INDEX "public"."IDX_898a5fddc8c8f32ce617bca89b"`) - await db.query(`DROP INDEX "public"."IDX_2d16390a0d6b57375b580012ea"`) - await db.query(`DROP TABLE "erc20_balance"`) - await db.query(`DROP INDEX "public"."IDX_bb6a884e702f2887037d5a7eec"`) - await db.query(`DROP INDEX "public"."IDX_c9fbe21a3411d93ea586af2a4c"`) - await db.query(`DROP INDEX "public"."IDX_d1f50dc39003331b76fad8a640"`) - await db.query(`DROP INDEX "public"."IDX_5fe068d4a82a445e8b4155f802"`) - await db.query(`DROP INDEX "public"."IDX_5c45a4a58256ea383a4d096ec6"`) - await db.query(`DROP TABLE "erc20_transfer"`) - await db.query(`DROP INDEX "public"."IDX_f914d2e140eb88375a5a2ef6c7"`) - await db.query(`DROP INDEX "public"."IDX_6350ddb2def19c1e3a06d8b3ec"`) - await db.query(`DROP INDEX "public"."IDX_eca70565083880d00e9110b000"`) - await db.query(`DROP INDEX "public"."IDX_9fdc9d58b6ae0cb13b9c7f8226"`) - await db.query(`DROP TABLE "processing_status"`) - await db.query(`DROP TABLE "aero_cl_gauge_notify_reward"`) - await db.query(`DROP INDEX "public"."IDX_bc847340db9380bee59cb5f5fe"`) - await db.query(`DROP INDEX "public"."IDX_32ededc6fe2c4d647215206a02"`) - await db.query(`DROP INDEX "public"."IDX_0b2e6dc0ffef94a1b390596ca1"`) - await db.query(`DROP INDEX "public"."IDX_f159f93df2550a7c6d67afd326"`) - await db.query(`DROP INDEX "public"."IDX_b789dc0efc58964980fe36ed71"`) - await db.query(`DROP TABLE "aero_gauge_notify_reward"`) - await db.query(`DROP INDEX "public"."IDX_983aada0809852d4dea444aa1b"`) - await db.query(`DROP INDEX "public"."IDX_993e3d42327053b33a5db4ffe4"`) - await db.query(`DROP INDEX "public"."IDX_a099b412c12b8d9e8a5ac999ec"`) - await db.query(`DROP INDEX "public"."IDX_7522fbb7adef5aca9de1dc9900"`) - await db.query(`DROP INDEX "public"."IDX_6fd369509b8e29561b1b2b5310"`) - await db.query(`DROP TABLE "aero_pool_created"`) - await db.query(`DROP INDEX "public"."IDX_c0420757a8d67132c475450b37"`) - await db.query(`DROP INDEX "public"."IDX_8e60b2e8b223efda676eff93d9"`) - await db.query(`DROP INDEX "public"."IDX_7f98545a433bc1fa08c9b8d4ed"`) - await db.query(`DROP INDEX "public"."IDX_6372821d7d9888a53637b6a7ad"`) - await db.query(`DROP TABLE "aero_cl_pool_created"`) - await db.query(`DROP INDEX "public"."IDX_3b7186dca3828117fb53ef0206"`) - await db.query(`DROP INDEX "public"."IDX_68fc780d94ec199f1eb50e68f7"`) - await db.query(`DROP INDEX "public"."IDX_ec5ee04a8c72b11d543e28e5e6"`) - await db.query(`DROP INDEX "public"."IDX_2701b481a50882398b9cb7e05b"`) - await db.query(`DROP TABLE "aero_voter_gauge_created"`) - await db.query(`DROP INDEX "public"."IDX_60842e4b20e928204cc0790128"`) - await db.query(`DROP INDEX "public"."IDX_74c2a7bf57c43f69f91b7c3b20"`) - await db.query(`DROP INDEX "public"."IDX_d8be771bb35fe590c45a7d1af2"`) - await db.query(`DROP INDEX "public"."IDX_19b4155090d82294060bb44366"`) - await db.query(`DROP INDEX "public"."IDX_40d43ab503f180b7532f42f45a"`) - await db.query(`DROP INDEX "public"."IDX_b4ffd29e88ac91115e44fc5b03"`) - await db.query(`DROP INDEX "public"."IDX_fe01f00328010eac8a03879936"`) - await db.query(`DROP TABLE "aero_pool_state"`) - await db.query(`DROP INDEX "public"."IDX_9da45b58c4d06201b2de6ed51d"`) - await db.query(`DROP INDEX "public"."IDX_91022eaca5c237c8181574f6c3"`) - await db.query(`DROP INDEX "public"."IDX_a1f09e4a565cbeac79b02ccfee"`) - await db.query(`DROP INDEX "public"."IDX_f17f2a943862d7c1c485bf4ccd"`) - await db.query(`DROP TABLE "aero_cl_pool_tick"`) - await db.query(`DROP INDEX "public"."IDX_1f062aee707e1d898a99e7d78a"`) - await db.query(`DROP INDEX "public"."IDX_9db8ded60dc83ae88b93bbdf61"`) - await db.query(`DROP INDEX "public"."IDX_8ed6f7b5149327341c751f7956"`) - await db.query(`DROP INDEX "public"."IDX_5a4fcc4d09e1e362cff15dd834"`) - await db.query(`DROP INDEX "public"."IDX_eb4f3fdb047a473a6b62672251"`) - await db.query(`DROP TABLE "aero_cl_pool_state"`) - await db.query(`DROP INDEX "public"."IDX_e363a6cd0ddeb41a94ed68089c"`) - await db.query(`DROP INDEX "public"."IDX_e7458985ad9ee1b4472bc30bbb"`) - await db.query(`DROP INDEX "public"."IDX_94a520efd2d3992b50f0469d22"`) - await db.query(`DROP INDEX "public"."IDX_ca4c93c360bd5dffdc237f9f5a"`) - await db.query(`DROP INDEX "public"."IDX_02aa86fe0e78999620744402a0"`) - await db.query(`DROP TABLE "aero_pool_epoch_state"`) - await db.query(`DROP INDEX "public"."IDX_1bdbc99a8dadba9f6beb7547a5"`) - await db.query(`DROP INDEX "public"."IDX_39bfdc610191dd653c67842ae0"`) - await db.query(`DROP INDEX "public"."IDX_703ee4530d82b62fb6d40410e4"`) - await db.query(`DROP INDEX "public"."IDX_01335581495551843503db4a23"`) - await db.query(`DROP INDEX "public"."IDX_e04dd7afda9bc4dd6541c92f37"`) - await db.query(`DROP TABLE "aero_lp"`) - await db.query(`DROP INDEX "public"."IDX_d41b9f42cab6899f26cd6510bf"`) - await db.query(`DROP INDEX "public"."IDX_2acd173568dcc7df1b2655cb13"`) - await db.query(`DROP INDEX "public"."IDX_9cfe5ff27e954044840d274367"`) - await db.query(`DROP INDEX "public"."IDX_b5cfd69ccd727c080c4e14d776"`) - await db.query(`DROP INDEX "public"."IDX_a9d6d99b3e4749a53fa3c64bf8"`) - await db.query(`DROP TABLE "aero_lp_position"`) - await db.query(`DROP INDEX "public"."IDX_9f163b1720f9f8c8b75d5d0f97"`) - await db.query(`DROP INDEX "public"."IDX_b42642e1ebc0cbacbba4a5fb1d"`) - await db.query(`DROP INDEX "public"."IDX_ca7d09158297faf6b84487ba5c"`) - await db.query(`DROP INDEX "public"."IDX_b4e54387b76cb3bce1bd725f7a"`) - await db.query(`DROP INDEX "public"."IDX_b465865a93cb044c6649523287"`) - await db.query(`DROP INDEX "public"."IDX_05aaf9416181ddc9012f41da2f"`) await db.query(`DROP TABLE "governance_proposal"`) await db.query(`DROP INDEX "public"."IDX_fe8a40923244f99e670b62c14d"`) await db.query(`DROP INDEX "public"."IDX_eea14b5ba6065f9484dfaa00c6"`) @@ -817,43 +707,6 @@ module.exports = class Data1756242284453 { await db.query(`DROP TABLE "governance_proposal_vote"`) await db.query(`DROP INDEX "public"."IDX_5531af241c24a09c854ead9d55"`) await db.query(`DROP INDEX "public"."IDX_adc6eb148ad48697e74d23c722"`) - await db.query(`DROP TABLE "bridge_transfer"`) - await db.query(`DROP INDEX "public"."IDX_aaedc42eda914e44a21e8eac72"`) - await db.query(`DROP INDEX "public"."IDX_f8d8d410f058f0bae15eefbc81"`) - await db.query(`DROP INDEX "public"."IDX_85994c1ee045b713bbcbcccc8b"`) - await db.query(`DROP INDEX "public"."IDX_7ff6ab2147f80a465d3752e79f"`) - await db.query(`DROP INDEX "public"."IDX_aaec7d9bb08b9ef8fb1b419c5d"`) - await db.query(`DROP INDEX "public"."IDX_3cbd3eea30bc62ebc91c276e73"`) - await db.query(`DROP INDEX "public"."IDX_54f4abe8f2eb80204637ce328e"`) - await db.query(`DROP INDEX "public"."IDX_12fa326ec2496a964493f2a7bc"`) - await db.query(`DROP TABLE "bridge_transfer_state"`) - await db.query(`DROP INDEX "public"."IDX_374659ae3bd149042388e132be"`) - await db.query(`DROP INDEX "public"."IDX_74f93b10ec560e63792dcc877e"`) - await db.query(`DROP INDEX "public"."IDX_df99bdbf11d4ed57bec0e6c511"`) - await db.query(`DROP TABLE "frrs_reward_collected"`) - await db.query(`DROP INDEX "public"."IDX_41ff7fbd84f0e932ddff4aaeda"`) - await db.query(`DROP INDEX "public"."IDX_6f8728cf12eedec371ec2b5ac3"`) - await db.query(`DROP INDEX "public"."IDX_fe9c300aa3739b7fedae19bee8"`) - await db.query(`DROP INDEX "public"."IDX_748e8278aa0f4327fdb375ce39"`) - await db.query(`DROP INDEX "public"."IDX_76682d76550c1908c0edbf80d6"`) - await db.query(`DROP TABLE "frrs_rewards_per_second_changed"`) - await db.query(`DROP INDEX "public"."IDX_51112ae6ed7acfe5fea9041736"`) - await db.query(`DROP INDEX "public"."IDX_27777adfd6d67ce69177e76777"`) - await db.query(`DROP INDEX "public"."IDX_0f439534e934e9114e93fe0e0e"`) - await db.query(`DROP INDEX "public"."IDX_af32902afcc6d0e38d55b29e68"`) - await db.query(`DROP INDEX "public"."IDX_7a5afd8ca41d81f9841db0f602"`) - await db.query(`DROP TABLE "frrs_rewards_target_change"`) - await db.query(`DROP INDEX "public"."IDX_a6f19822f0e09c509963463fbd"`) - await db.query(`DROP INDEX "public"."IDX_598a7d310b076cf239ae7bcb51"`) - await db.query(`DROP INDEX "public"."IDX_d593e4b975ae4f8d60303b2ba9"`) - await db.query(`DROP INDEX "public"."IDX_9410930fcb952fb4003dc2b2be"`) - await db.query(`DROP INDEX "public"."IDX_14cbad89905ceeb715f8e1a2c8"`) - await db.query(`DROP TABLE "frrs_strategist_updated"`) - await db.query(`DROP INDEX "public"."IDX_47dfa32c5be0528074dcf093d6"`) - await db.query(`DROP INDEX "public"."IDX_2f910a0f9c75adc401d7aa8c0f"`) - await db.query(`DROP INDEX "public"."IDX_301322e4df8e766e7f4cd892fd"`) - await db.query(`DROP INDEX "public"."IDX_7f49f2839212126c3d42fb4bf1"`) - await db.query(`DROP INDEX "public"."IDX_aab8ae0cb29505a7014438675b"`) await db.query(`DROP TABLE "es_token"`) await db.query(`DROP INDEX "public"."IDX_a234e56547c4f8b9135d80444b"`) await db.query(`DROP INDEX "public"."IDX_588f0be9f9bdc1d8dd29797fec"`) @@ -924,22 +777,144 @@ module.exports = class Data1756242284453 { await db.query(`DROP INDEX "public"."IDX_7d988d60b55dc08addc58835d6"`) await db.query(`DROP INDEX "public"."IDX_0adcdd08da131e76d618b73db7"`) await db.query(`DROP INDEX "public"."IDX_cc43898a790e6e1d4bbf145097"`) - await db.query(`DROP TABLE "strategy_balance"`) - await db.query(`DROP INDEX "public"."IDX_bb5bbdf054deadf169e9e0330a"`) - await db.query(`DROP INDEX "public"."IDX_0113bf0b63183bea0d22cd0d08"`) - await db.query(`DROP INDEX "public"."IDX_a88065dcd92011698bbe7df7b1"`) - await db.query(`DROP INDEX "public"."IDX_cf0381c2326669950af23bbee7"`) - await db.query(`DROP INDEX "public"."IDX_28b5d09a9e1898c8a071c9ee40"`) - await db.query(`DROP TABLE "strategy_yield"`) - await db.query(`DROP INDEX "public"."IDX_5108f2a2563d5665892d0c06b0"`) - await db.query(`DROP INDEX "public"."IDX_41c3567c9d43c598e07a0029c5"`) - await db.query(`DROP INDEX "public"."IDX_4230e2aa194f054f8393d36a24"`) - await db.query(`DROP INDEX "public"."IDX_0ad9cd89469c34889e94f63525"`) - await db.query(`DROP TABLE "strategy_daily_yield"`) - await db.query(`DROP INDEX "public"."IDX_0ba1974747f1906e0c102cd2cd"`) - await db.query(`DROP INDEX "public"."IDX_df364fb6e82d1feeed2a5dfffa"`) - await db.query(`DROP INDEX "public"."IDX_095c7036449ae511b4ef2a01df"`) - await db.query(`DROP INDEX "public"."IDX_c6a366374690d7e37b070e5788"`) + await db.query(`DROP TABLE "bridge_transfer"`) + await db.query(`DROP INDEX "public"."IDX_aaedc42eda914e44a21e8eac72"`) + await db.query(`DROP INDEX "public"."IDX_f8d8d410f058f0bae15eefbc81"`) + await db.query(`DROP INDEX "public"."IDX_85994c1ee045b713bbcbcccc8b"`) + await db.query(`DROP INDEX "public"."IDX_7ff6ab2147f80a465d3752e79f"`) + await db.query(`DROP INDEX "public"."IDX_aaec7d9bb08b9ef8fb1b419c5d"`) + await db.query(`DROP INDEX "public"."IDX_3cbd3eea30bc62ebc91c276e73"`) + await db.query(`DROP INDEX "public"."IDX_54f4abe8f2eb80204637ce328e"`) + await db.query(`DROP INDEX "public"."IDX_12fa326ec2496a964493f2a7bc"`) + await db.query(`DROP TABLE "bridge_transfer_state"`) + await db.query(`DROP INDEX "public"."IDX_374659ae3bd149042388e132be"`) + await db.query(`DROP INDEX "public"."IDX_74f93b10ec560e63792dcc877e"`) + await db.query(`DROP INDEX "public"."IDX_df99bdbf11d4ed57bec0e6c511"`) + await db.query(`DROP TABLE "aero_pool_state"`) + await db.query(`DROP INDEX "public"."IDX_9da45b58c4d06201b2de6ed51d"`) + await db.query(`DROP INDEX "public"."IDX_91022eaca5c237c8181574f6c3"`) + await db.query(`DROP INDEX "public"."IDX_a1f09e4a565cbeac79b02ccfee"`) + await db.query(`DROP INDEX "public"."IDX_f17f2a943862d7c1c485bf4ccd"`) + await db.query(`DROP TABLE "aero_cl_pool_tick"`) + await db.query(`DROP INDEX "public"."IDX_1f062aee707e1d898a99e7d78a"`) + await db.query(`DROP INDEX "public"."IDX_9db8ded60dc83ae88b93bbdf61"`) + await db.query(`DROP INDEX "public"."IDX_8ed6f7b5149327341c751f7956"`) + await db.query(`DROP INDEX "public"."IDX_5a4fcc4d09e1e362cff15dd834"`) + await db.query(`DROP INDEX "public"."IDX_eb4f3fdb047a473a6b62672251"`) + await db.query(`DROP TABLE "aero_cl_pool_state"`) + await db.query(`DROP INDEX "public"."IDX_e363a6cd0ddeb41a94ed68089c"`) + await db.query(`DROP INDEX "public"."IDX_e7458985ad9ee1b4472bc30bbb"`) + await db.query(`DROP INDEX "public"."IDX_94a520efd2d3992b50f0469d22"`) + await db.query(`DROP INDEX "public"."IDX_ca4c93c360bd5dffdc237f9f5a"`) + await db.query(`DROP INDEX "public"."IDX_02aa86fe0e78999620744402a0"`) + await db.query(`DROP TABLE "aero_pool_epoch_state"`) + await db.query(`DROP INDEX "public"."IDX_1bdbc99a8dadba9f6beb7547a5"`) + await db.query(`DROP INDEX "public"."IDX_39bfdc610191dd653c67842ae0"`) + await db.query(`DROP INDEX "public"."IDX_703ee4530d82b62fb6d40410e4"`) + await db.query(`DROP INDEX "public"."IDX_01335581495551843503db4a23"`) + await db.query(`DROP INDEX "public"."IDX_e04dd7afda9bc4dd6541c92f37"`) + await db.query(`DROP TABLE "aero_lp"`) + await db.query(`DROP INDEX "public"."IDX_d41b9f42cab6899f26cd6510bf"`) + await db.query(`DROP INDEX "public"."IDX_2acd173568dcc7df1b2655cb13"`) + await db.query(`DROP INDEX "public"."IDX_9cfe5ff27e954044840d274367"`) + await db.query(`DROP INDEX "public"."IDX_b5cfd69ccd727c080c4e14d776"`) + await db.query(`DROP INDEX "public"."IDX_a9d6d99b3e4749a53fa3c64bf8"`) + await db.query(`DROP TABLE "aero_lp_position"`) + await db.query(`DROP INDEX "public"."IDX_9f163b1720f9f8c8b75d5d0f97"`) + await db.query(`DROP INDEX "public"."IDX_b42642e1ebc0cbacbba4a5fb1d"`) + await db.query(`DROP INDEX "public"."IDX_ca7d09158297faf6b84487ba5c"`) + await db.query(`DROP INDEX "public"."IDX_b4e54387b76cb3bce1bd725f7a"`) + await db.query(`DROP INDEX "public"."IDX_b465865a93cb044c6649523287"`) + await db.query(`DROP INDEX "public"."IDX_05aaf9416181ddc9012f41da2f"`) + await db.query(`DROP TABLE "aero_cl_gauge_notify_reward"`) + await db.query(`DROP INDEX "public"."IDX_bc847340db9380bee59cb5f5fe"`) + await db.query(`DROP INDEX "public"."IDX_32ededc6fe2c4d647215206a02"`) + await db.query(`DROP INDEX "public"."IDX_0b2e6dc0ffef94a1b390596ca1"`) + await db.query(`DROP INDEX "public"."IDX_f159f93df2550a7c6d67afd326"`) + await db.query(`DROP INDEX "public"."IDX_b789dc0efc58964980fe36ed71"`) + await db.query(`DROP TABLE "aero_gauge_notify_reward"`) + await db.query(`DROP INDEX "public"."IDX_983aada0809852d4dea444aa1b"`) + await db.query(`DROP INDEX "public"."IDX_993e3d42327053b33a5db4ffe4"`) + await db.query(`DROP INDEX "public"."IDX_a099b412c12b8d9e8a5ac999ec"`) + await db.query(`DROP INDEX "public"."IDX_7522fbb7adef5aca9de1dc9900"`) + await db.query(`DROP INDEX "public"."IDX_6fd369509b8e29561b1b2b5310"`) + await db.query(`DROP TABLE "aero_pool_created"`) + await db.query(`DROP INDEX "public"."IDX_c0420757a8d67132c475450b37"`) + await db.query(`DROP INDEX "public"."IDX_8e60b2e8b223efda676eff93d9"`) + await db.query(`DROP INDEX "public"."IDX_7f98545a433bc1fa08c9b8d4ed"`) + await db.query(`DROP INDEX "public"."IDX_6372821d7d9888a53637b6a7ad"`) + await db.query(`DROP TABLE "aero_cl_pool_created"`) + await db.query(`DROP INDEX "public"."IDX_3b7186dca3828117fb53ef0206"`) + await db.query(`DROP INDEX "public"."IDX_68fc780d94ec199f1eb50e68f7"`) + await db.query(`DROP INDEX "public"."IDX_ec5ee04a8c72b11d543e28e5e6"`) + await db.query(`DROP INDEX "public"."IDX_2701b481a50882398b9cb7e05b"`) + await db.query(`DROP TABLE "aero_voter_gauge_created"`) + await db.query(`DROP INDEX "public"."IDX_60842e4b20e928204cc0790128"`) + await db.query(`DROP INDEX "public"."IDX_74c2a7bf57c43f69f91b7c3b20"`) + await db.query(`DROP INDEX "public"."IDX_d8be771bb35fe590c45a7d1af2"`) + await db.query(`DROP INDEX "public"."IDX_19b4155090d82294060bb44366"`) + await db.query(`DROP INDEX "public"."IDX_40d43ab503f180b7532f42f45a"`) + await db.query(`DROP INDEX "public"."IDX_b4ffd29e88ac91115e44fc5b03"`) + await db.query(`DROP INDEX "public"."IDX_fe01f00328010eac8a03879936"`) + await db.query(`DROP TABLE "frrs_reward_collected"`) + await db.query(`DROP INDEX "public"."IDX_41ff7fbd84f0e932ddff4aaeda"`) + await db.query(`DROP INDEX "public"."IDX_6f8728cf12eedec371ec2b5ac3"`) + await db.query(`DROP INDEX "public"."IDX_fe9c300aa3739b7fedae19bee8"`) + await db.query(`DROP INDEX "public"."IDX_748e8278aa0f4327fdb375ce39"`) + await db.query(`DROP INDEX "public"."IDX_76682d76550c1908c0edbf80d6"`) + await db.query(`DROP TABLE "frrs_rewards_per_second_changed"`) + await db.query(`DROP INDEX "public"."IDX_51112ae6ed7acfe5fea9041736"`) + await db.query(`DROP INDEX "public"."IDX_27777adfd6d67ce69177e76777"`) + await db.query(`DROP INDEX "public"."IDX_0f439534e934e9114e93fe0e0e"`) + await db.query(`DROP INDEX "public"."IDX_af32902afcc6d0e38d55b29e68"`) + await db.query(`DROP INDEX "public"."IDX_7a5afd8ca41d81f9841db0f602"`) + await db.query(`DROP TABLE "frrs_rewards_target_change"`) + await db.query(`DROP INDEX "public"."IDX_a6f19822f0e09c509963463fbd"`) + await db.query(`DROP INDEX "public"."IDX_598a7d310b076cf239ae7bcb51"`) + await db.query(`DROP INDEX "public"."IDX_d593e4b975ae4f8d60303b2ba9"`) + await db.query(`DROP INDEX "public"."IDX_9410930fcb952fb4003dc2b2be"`) + await db.query(`DROP INDEX "public"."IDX_14cbad89905ceeb715f8e1a2c8"`) + await db.query(`DROP TABLE "frrs_strategist_updated"`) + await db.query(`DROP INDEX "public"."IDX_47dfa32c5be0528074dcf093d6"`) + await db.query(`DROP INDEX "public"."IDX_2f910a0f9c75adc401d7aa8c0f"`) + await db.query(`DROP INDEX "public"."IDX_301322e4df8e766e7f4cd892fd"`) + await db.query(`DROP INDEX "public"."IDX_7f49f2839212126c3d42fb4bf1"`) + await db.query(`DROP INDEX "public"."IDX_aab8ae0cb29505a7014438675b"`) + await db.query(`DROP TABLE "processing_status"`) + await db.query(`DROP TABLE "erc20"`) + await db.query(`DROP INDEX "public"."IDX_905ff854e6782fc32dc4268a25"`) + await db.query(`DROP INDEX "public"."IDX_40fd11c1a0d0f2562824894e85"`) + await db.query(`DROP TABLE "erc20_holder"`) + await db.query(`DROP INDEX "public"."IDX_51b9e7c44702ef3a6f05d3702e"`) + await db.query(`DROP INDEX "public"."IDX_98f753777a7d77ff8950aee1c7"`) + await db.query(`DROP INDEX "public"."IDX_875601f8f24f9082f1c3551406"`) + await db.query(`DROP INDEX "public"."IDX_ac960405f4b3290bf5d7ff2007"`) + await db.query(`DROP TABLE "erc20_state"`) + await db.query(`DROP INDEX "public"."IDX_2b69abb250c647c7a4b5a5a715"`) + await db.query(`DROP INDEX "public"."IDX_c3d08eb2dafe4b5b188924d835"`) + await db.query(`DROP INDEX "public"."IDX_29e8edc6ba8cc37c0c16ff0baf"`) + await db.query(`DROP INDEX "public"."IDX_fe7e53a28ac19fa35a94af35e5"`) + await db.query(`DROP TABLE "erc20_state_by_day"`) + await db.query(`DROP INDEX "public"."IDX_b34a3524b485e28b64872ffb27"`) + await db.query(`DROP INDEX "public"."IDX_5e25c3144354e0df6ada4842a4"`) + await db.query(`DROP INDEX "public"."IDX_2a5cd83ca8e398f298fb60c3e7"`) + await db.query(`DROP INDEX "public"."IDX_898a5fddc8c8f32ce617bca89b"`) + await db.query(`DROP INDEX "public"."IDX_2d16390a0d6b57375b580012ea"`) + await db.query(`DROP TABLE "erc20_balance"`) + await db.query(`DROP INDEX "public"."IDX_bb6a884e702f2887037d5a7eec"`) + await db.query(`DROP INDEX "public"."IDX_c9fbe21a3411d93ea586af2a4c"`) + await db.query(`DROP INDEX "public"."IDX_d1f50dc39003331b76fad8a640"`) + await db.query(`DROP INDEX "public"."IDX_5fe068d4a82a445e8b4155f802"`) + await db.query(`DROP INDEX "public"."IDX_5c45a4a58256ea383a4d096ec6"`) + await db.query(`DROP TABLE "erc20_transfer"`) + await db.query(`DROP INDEX "public"."IDX_f914d2e140eb88375a5a2ef6c7"`) + await db.query(`DROP INDEX "public"."IDX_6350ddb2def19c1e3a06d8b3ec"`) + await db.query(`DROP INDEX "public"."IDX_eca70565083880d00e9110b000"`) + await db.query(`DROP INDEX "public"."IDX_9fdc9d58b6ae0cb13b9c7f8226"`) + await db.query(`DROP TABLE "pool"`) + await db.query(`DROP INDEX "public"."IDX_ca7b22bed322c7c1c817d7fefc"`) + await db.query(`DROP INDEX "public"."IDX_0764827295d4ed49e259aa398f"`) + await db.query(`DROP INDEX "public"."IDX_9a38a7d17d1fff09327de45882"`) await db.query(`DROP TABLE "sfc_withdrawal"`) await db.query(`DROP INDEX "public"."IDX_098bb05eb0e21825d9f97d7238"`) await db.query(`DROP INDEX "public"."IDX_c1767bd417033cf6be2fc0dfed"`) @@ -951,21 +926,46 @@ module.exports = class Data1756242284453 { await db.query(`DROP INDEX "public"."IDX_e05f1c97627f04cb666bfbfd2e"`) await db.query(`DROP INDEX "public"."IDX_462441741f17550d40da0cd5c0"`) await db.query(`DROP INDEX "public"."IDX_dd99dbcb9666973f47c7462593"`) + await db.query(`DROP TABLE "util_cache"`) + await db.query(`DROP TABLE "exchange_rate"`) + await db.query(`DROP INDEX "public"."IDX_2b58051dcc72cf0f02aa41ff14"`) + await db.query(`DROP INDEX "public"."IDX_9e23a3f1bf3634820c873a0fe8"`) + await db.query(`DROP INDEX "public"."IDX_c61a93768eed9e58ce399bbe01"`) + await db.query(`DROP TABLE "ogv"`) + await db.query(`DROP INDEX "public"."IDX_2418a8b8b92b2f5977be761cf9"`) + await db.query(`DROP INDEX "public"."IDX_b8f20bcf48e4aa77e0f48d77db"`) + await db.query(`DROP TABLE "ogv_address"`) + await db.query(`DROP INDEX "public"."IDX_49d26f287904b8b1aef6e9ac2b"`) + await db.query(`DROP TABLE "ogv_lockup"`) + await db.query(`DROP INDEX "public"."IDX_8114101b53d9d6bc26fe80838a"`) + await db.query(`DROP INDEX "public"."IDX_8be94cd63e35b91adf1301a156"`) + await db.query(`DROP TABLE "ogv_lockup_tx_log"`) + await db.query(`DROP INDEX "public"."IDX_b49fca291c97d9b55cd91f935f"`) + await db.query(`DROP TABLE "ogv_proposal"`) + await db.query(`DROP INDEX "public"."IDX_c62be3f16dfb3e4a09525c85af"`) + await db.query(`DROP TABLE "ogv_proposal_tx_log"`) + await db.query(`DROP INDEX "public"."IDX_5d5f5e10892290ee366d26de7d"`) + await db.query(`DROP TABLE "ogv_proposal_vote"`) + await db.query(`DROP INDEX "public"."IDX_58d732bc6523c2609d2725cc0a"`) + await db.query(`DROP INDEX "public"."IDX_2fd621aea353448fb3f17721bc"`) + await db.query(`DROP TABLE "ogv_daily_stat"`) + await db.query(`DROP INDEX "public"."IDX_c974bde87107cacae6d3654972"`) + await db.query(`DROP INDEX "public"."IDX_b62fa80951183bb0acf8a5e8b9"`) await db.query(`ALTER TABLE "beacon_deposit_event" DROP CONSTRAINT "FK_dff55f23cfcfa0ff664964572ff"`) - await db.query(`ALTER TABLE "ogv_address" DROP CONSTRAINT "FK_49d26f287904b8b1aef6e9ac2b3"`) - await db.query(`ALTER TABLE "ogv_lockup" DROP CONSTRAINT "FK_8be94cd63e35b91adf1301a156c"`) - await db.query(`ALTER TABLE "ogv_lockup_tx_log" DROP CONSTRAINT "FK_b49fca291c97d9b55cd91f935f3"`) - await db.query(`ALTER TABLE "ogv_proposal" DROP CONSTRAINT "FK_c62be3f16dfb3e4a09525c85af8"`) - await db.query(`ALTER TABLE "ogv_proposal_tx_log" DROP CONSTRAINT "FK_5d5f5e10892290ee366d26de7dc"`) - await db.query(`ALTER TABLE "ogv_proposal_vote" DROP CONSTRAINT "FK_58d732bc6523c2609d2725cc0ac"`) - await db.query(`ALTER TABLE "ogv_proposal_vote" DROP CONSTRAINT "FK_2fd621aea353448fb3f17721bc8"`) await db.query(`ALTER TABLE "o_token_history" DROP CONSTRAINT "FK_2f1457755464ec5951d1e96542a"`) await db.query(`ALTER TABLE "o_token_rebase" DROP CONSTRAINT "FK_b8653270b96fc932f077b26441d"`) await db.query(`ALTER TABLE "o_token_rebase_option" DROP CONSTRAINT "FK_da7296f8011232dc8675477b841"`) - await db.query(`ALTER TABLE "aero_cl_pool_state" DROP CONSTRAINT "FK_02aa86fe0e78999620744402a0c"`) await db.query(`ALTER TABLE "governance_proposal_event" DROP CONSTRAINT "FK_ce984d23fc99c537b8f22fd663a"`) await db.query(`ALTER TABLE "governance_proposal_vote" DROP CONSTRAINT "FK_5531af241c24a09c854ead9d551"`) await db.query(`ALTER TABLE "es_account" DROP CONSTRAINT "FK_7b43e7bb90d3b435d074112f572"`) await db.query(`ALTER TABLE "es_lockup_event" DROP CONSTRAINT "FK_46d53d4fad340d5939955836004"`) + await db.query(`ALTER TABLE "aero_cl_pool_state" DROP CONSTRAINT "FK_02aa86fe0e78999620744402a0c"`) + await db.query(`ALTER TABLE "ogv_address" DROP CONSTRAINT "FK_49d26f287904b8b1aef6e9ac2b3"`) + await db.query(`ALTER TABLE "ogv_lockup" DROP CONSTRAINT "FK_8be94cd63e35b91adf1301a156c"`) + await db.query(`ALTER TABLE "ogv_lockup_tx_log" DROP CONSTRAINT "FK_b49fca291c97d9b55cd91f935f3"`) + await db.query(`ALTER TABLE "ogv_proposal" DROP CONSTRAINT "FK_c62be3f16dfb3e4a09525c85af8"`) + await db.query(`ALTER TABLE "ogv_proposal_tx_log" DROP CONSTRAINT "FK_5d5f5e10892290ee366d26de7dc"`) + await db.query(`ALTER TABLE "ogv_proposal_vote" DROP CONSTRAINT "FK_58d732bc6523c2609d2725cc0ac"`) + await db.query(`ALTER TABLE "ogv_proposal_vote" DROP CONSTRAINT "FK_2fd621aea353448fb3f17721bc8"`) } } From c30ddb52d82d2be581636a649becdbf325c783bb Mon Sep 17 00:00:00 2001 From: toniocodo Date: Mon, 1 Sep 2025 15:03:21 +0200 Subject: [PATCH 3/5] chore: migrations --- .../{1756729531489-Data.js => 1756731711034-Data.js} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename db/migrations/{1756729531489-Data.js => 1756731711034-Data.js} (99%) diff --git a/db/migrations/1756729531489-Data.js b/db/migrations/1756731711034-Data.js similarity index 99% rename from db/migrations/1756729531489-Data.js rename to db/migrations/1756731711034-Data.js index 2779372a..13b26ae9 100644 --- a/db/migrations/1756729531489-Data.js +++ b/db/migrations/1756731711034-Data.js @@ -1,5 +1,5 @@ -module.exports = class Data1756729531489 { - name = 'Data1756729531489' +module.exports = class Data1756731711034 { + name = 'Data1756731711034' async up(db) { await db.query(`CREATE TABLE "ogn_daily_stat" ("id" character varying NOT NULL, "block_number" integer NOT NULL, "timestamp" TIMESTAMP WITH TIME ZONE NOT NULL, "total_supply" numeric NOT NULL, "total_supply_usd" numeric NOT NULL, "total_staked" numeric NOT NULL, "trading_volume_usd" numeric NOT NULL, "market_cap_usd" numeric NOT NULL, "price_usd" numeric NOT NULL, "holders_over_threshold" integer NOT NULL, CONSTRAINT "PK_c87054f4663051254b7b2afa536" PRIMARY KEY ("id"))`) From 709ce2c2ff0996bba10f46f79d4317d6a79e7568 Mon Sep 17 00:00:00 2001 From: Chris Jacobs Date: Tue, 2 Sep 2025 12:52:55 -0700 Subject: [PATCH 4/5] add CVX/DAI mainnet route --- .../post-processors/exchange-rates/price-routing-mainnet.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/post-processors/exchange-rates/price-routing-mainnet.ts b/src/shared/post-processors/exchange-rates/price-routing-mainnet.ts index 5a46f7ef..3e86e1c9 100644 --- a/src/shared/post-processors/exchange-rates/price-routing-mainnet.ts +++ b/src/shared/post-processors/exchange-rates/price-routing-mainnet.ts @@ -309,4 +309,5 @@ export const priceMap: Partial< ...twoWay('CRV', 'ETH', (ctx, height) => getChainlinkPrice(ctx, height, 'CRV', 'ETH')), ...twoWay('CVX', 'ETH', (ctx, height) => getChainlinkPrice(ctx, height, 'CVX', 'ETH')), ...twoWay('CVX', 'USD', (ctx, height) => getChainlinkPrice(ctx, height, 'CVX', 'USD')), + ...twoWay('CVX', 'DAI', (ctx, height) => getChainlinkPrice(ctx, height, 'CVX', 'USD')), } From 31ad7c9bf52388d244190acd01c18d47a06779e8 Mon Sep 17 00:00:00 2001 From: toniocodo Date: Wed, 3 Sep 2025 13:15:47 +0200 Subject: [PATCH 5/5] feat: add superOETHb_ETH oracle --- src/shared/post-processors/exchange-rates/price-routing-base.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/post-processors/exchange-rates/price-routing-base.ts b/src/shared/post-processors/exchange-rates/price-routing-base.ts index 5d5a0f08..21ec4456 100644 --- a/src/shared/post-processors/exchange-rates/price-routing-base.ts +++ b/src/shared/post-processors/exchange-rates/price-routing-base.ts @@ -18,6 +18,7 @@ const createChainlinkPriceFeed = (address: string, decimals: bigint) => { const chainlinkPriceFeeds: Record Promise> = { ETH_USD: createChainlinkPriceFeed('0x71041dddad3595f9ced3dccfbe3d1f4b0a16bb70', 8n), superOETHb_USD: createChainlinkPriceFeed('0x71041dddad3595f9ced3dccfbe3d1f4b0a16bb70', 8n), + superOETHb_ETH: createChainlinkPriceFeed('0x39C6E14CdE46D4FFD9F04Ff159e7ce8eC20E10B4', 18n), AERO_USD: createChainlinkPriceFeed('0x4EC5970fC728C5f65ba413992CD5fF6FD70fcfF0', 8n), }