Skip to content

Commit

Permalink
Remove non-clm that has indexing issues to avoid errors
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Sep 13, 2024
1 parent adddd89 commit 77b3fec
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 17 deletions.
62 changes: 47 additions & 15 deletions src/queries/InvestorTimeline.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -120,39 +120,71 @@ fragment InvestorTimelineClassicPositionInteraction on ClassicPositionInteractio
type
}

query InvestorTimeline($investor_address: String!, $first: Int = 1000, $skip: Int = 0) {
clmPositions(skip: $skip, first: $first, where: { investor: $investor_address, totalBalance_gt: 0 }) {
query InvestorTimeline(
$investor_address: String!
$first: Int = 1000
$skip: Int = 0
) {
clmPositions(
skip: $skip
first: $first
where: { investor: $investor_address, totalBalance_gt: 0 }
) {
...InvestorTimelineClmPosition
}

clmPositionInteractions(
first: $first
skip: $skip
orderBy: timestamp
orderDirection: asc
where: {
investor: $investor_address,
type_in: [MANAGER_DEPOSIT, MANAGER_WITHDRAW, CLM_REWARD_POOL_STAKE, CLM_REWARD_POOL_UNSTAKE, CLM_REWARD_POOL_CLAIM]
}
first: $first
skip: $skip
orderBy: timestamp
orderDirection: asc
where: {
investor: $investor_address
type_in: [
MANAGER_DEPOSIT
MANAGER_WITHDRAW
CLM_REWARD_POOL_STAKE
CLM_REWARD_POOL_UNSTAKE
CLM_REWARD_POOL_CLAIM
]
}
) {
...InvestorTimelineClmPositionInteraction
investorPosition {
id
}
}

classicPositions(skip: $skip, first: $first, where: { investor: $investor_address, totalBalance_gt: 0 }) {
classicPositions(
skip: $skip
first: $first
where: {
investor: $investor_address
totalBalance_gt: 0
# these vaults are not properly indexed and cause errors
classic_not_in: ["0xbbdeaaa32cbce61e0a2809edcae8d1857c55a5dd"]
}
) {
...InvestorTimelineClassicPosition
}

classicPositionInteractions(first: $first
classicPositionInteractions(
first: $first
skip: $skip
orderBy: timestamp
orderDirection: asc
where: {
investor: $investor_address,
type_in: [VAULT_DEPOSIT, VAULT_WITHDRAW, CLASSIC_REWARD_POOL_STAKE, CLASSIC_REWARD_POOL_UNSTAKE]
}) {
investor: $investor_address
# these vaults are not properly indexed and cause errors
classic_not_in: ["0xbbdeaaa32cbce61e0a2809edcae8d1857c55a5dd"]
type_in: [
VAULT_DEPOSIT
VAULT_WITHDRAW
CLASSIC_REWARD_POOL_STAKE
CLASSIC_REWARD_POOL_UNSTAKE
]
}
) {
...InvestorTimelineClassicPositionInteraction
investorPosition {
id
Expand Down
10 changes: 9 additions & 1 deletion src/queries/VaultsHarvests.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ query VaultsHarvests($since: BigInt!, $first: Int = 1000, $skip: Int = 0) {
...ClmHarvestData
}
}
classics(first: $first, skip: $skip, where: { lifecycle_not: INITIALIZING }) {
classics(
first: $first
skip: $skip
where: {
lifecycle_not: INITIALIZING
# these vaults are not properly indexed and cause errors
id_not_in: ["0xbbdeaaa32cbce61e0a2809edcae8d1857c55a5dd"]
}
) {
vaultAddress: id
underlyingToken {
decimals
Expand Down
7 changes: 6 additions & 1 deletion src/queries/VaultsHarvestsFiltered.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ query VaultsHarvestsFiltered(
...ClmHarvestData
}
}
classics(first: $first, skip: $skip, where: { lifecycle_not: INITIALIZING, id_in: $vaults }) {
classics(first: $first, skip: $skip, where: {
lifecycle_not: INITIALIZING,
id_in: $vaults,
# these vaults are not properly indexed and cause errors
id_not_in: ["0xbbdeaaa32cbce61e0a2809edcae8d1857c55a5dd"]
}) {
vaultAddress: id
underlyingToken {
decimals
Expand Down

0 comments on commit 77b3fec

Please sign in to comment.