From 0b8ef6cdfbb3f066cb77225396a818d5e84682ad Mon Sep 17 00:00:00 2001 From: franz Date: Wed, 5 Nov 2025 07:18:03 +0100 Subject: [PATCH] remove unused --- .../balancer-subgraph-queries.graphql | 312 ---- .../balancer-subgraph-types.ts | 7 - .../generated/balancer-subgraph-types.ts | 1252 ++--------------- 3 files changed, 116 insertions(+), 1455 deletions(-) delete mode 100644 modules/subgraphs/balancer-subgraph/balancer-subgraph-types.ts diff --git a/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql b/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql index 6b051ada9..7f15a9e3a 100644 --- a/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql +++ b/modules/subgraphs/balancer-subgraph/balancer-subgraph-queries.graphql @@ -1,64 +1,3 @@ -query BalancerProtocolData( - $skip: Int - $first: Int - $orderBy: Balancer_orderBy - $orderDirection: OrderDirection - $where: Balancer_filter - $block: Block_height -) { - balancers( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - id - totalLiquidity - totalSwapVolume - totalSwapFee - poolCount - } -} - -query BalancerUser($id: ID!, $block: Block_height) { - user(id: $id, block: $block) { - ...BalancerUser - } -} - -query BalancerUsers( - $skip: Int - $first: Int - $orderBy: User_orderBy - $orderDirection: OrderDirection - $where: User_filter - $block: Block_height -) { - users( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerUser - } -} - -fragment BalancerUser on User { - id - sharesOwned(first: 1000) { - id - balance - poolId { - id - } - } -} - query BalancerPoolShares( $skip: Int $first: Int @@ -87,74 +26,6 @@ fragment BalancerPoolShare on PoolShare { } } -query BalancerTokenPrices( - $skip: Int - $first: Int - $orderBy: TokenPrice_orderBy - $orderDirection: OrderDirection - $where: TokenPrice_filter - $block: Block_height -) { - tokenPrices( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerTokenPrice - } -} - -fragment BalancerTokenPrice on TokenPrice { - id - poolId { - id - } - asset - amount - pricingAsset - price - block - timestamp -} - -query BalancerTokens( - $skip: Int - $first: Int - $orderBy: Token_orderBy - $orderDirection: OrderDirection - $where: Token_filter - $block: Block_height -) { - tokens( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerToken - } -} - -fragment BalancerToken on Token { - id - symbol - address - latestFXPrice - latestUSDPrice - totalVolumeNotional - totalVolumeUSD - totalSwapCount - latestPrice { - pricingAsset - price - } -} - fragment BalancerPool on Pool { id address @@ -258,34 +129,6 @@ query BalancerPool($id: ID!, $block: Block_height) { } } -query BalancerPoolHistoricalLiquidities( - $skip: Int - $first: Int - $orderBy: PoolHistoricalLiquidity_orderBy - $orderDirection: OrderDirection - $where: PoolHistoricalLiquidity_filter - $block: Block_height -) { - poolHistoricalLiquidities( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - id - poolId { - id - } - poolTotalShares - poolLiquidity - poolShareValue - pricingAsset - block - } -} - query BalancerPoolSnapshots( $skip: Int $first: Int @@ -321,32 +164,6 @@ fragment BalancerPoolSnapshot on PoolSnapshot { holdersCount } -query BalancerLatestPrices( - $skip: Int - $first: Int - $orderBy: LatestPrice_orderBy - $orderDirection: OrderDirection - $where: LatestPrice_filter - $block: Block_height -) { - latestPrices( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerLatestPrice - } -} - -query BalancerLatestPrice($id: ID!) { - latestPrice(id: $id) { - ...BalancerLatestPrice - } -} - query BalancerJoinExits( $skip: Int $first: Int @@ -367,17 +184,6 @@ query BalancerJoinExits( } } -fragment BalancerLatestPrice on LatestPrice { - id - asset - price - poolId { - id - } - pricingAsset - block -} - fragment BalancerJoinExit on JoinExit { amounts id @@ -393,62 +199,6 @@ fragment BalancerJoinExit on JoinExit { valueUSD } -query BalancerPortfolioData($id: ID!, $previousBlockNumber: Int!) { - user(id: $id) { - ...BalancerUser - } - previousUser: user(id: $id, block: { number: $previousBlockNumber }) { - ...BalancerUser - } -} - -query BalancerPortfolioPoolsData($previousBlockNumber: Int!) { - pools(first: 1000, where: { totalShares_gt: "0" }) { - ...BalancerPool - } - - previousPools: pools(first: 1000, where: { totalShares_gt: "0" }, block: { number: $previousBlockNumber }) { - ...BalancerPool - } -} - -query BalancerTradePairSnapshots( - $skip: Int - $first: Int - $orderBy: TradePairSnapshot_orderBy - $orderDirection: OrderDirection - $where: TradePairSnapshot_filter - $block: Block_height -) { - tradePairSnapshots( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerTradePairSnapshot - } -} - -fragment BalancerTradePairSnapshot on TradePairSnapshot { - id - totalSwapFee - totalSwapVolume - timestamp - pair { - token0 { - address - symbol - } - token1 { - address - symbol - } - } -} - query BalancerSwaps( $skip: Int $first: Int @@ -498,68 +248,6 @@ fragment BalancerSwap on Swap { block } -query BalancerAmpUpdates( - $skip: Int - $first: Int - $orderBy: AmpUpdate_orderBy - $orderDirection: OrderDirection - $where: AmpUpdate_filter - $block: Block_height -) { - ampUpdates( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerAmpUpdate - } -} - -fragment BalancerAmpUpdate on AmpUpdate { - id - poolId { - id - } - startAmp - endAmp - startTimestamp - endTimestamp -} - -query BalancerGradualWeightUpdates( - $skip: Int - $first: Int - $orderBy: GradualWeightUpdate_orderBy - $orderDirection: OrderDirection - $where: GradualWeightUpdate_filter - $block: Block_height -) { - gradualWeightUpdates( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerGradualWeightUpdate - } -} - -fragment BalancerGradualWeightUpdate on GradualWeightUpdate { - id - startTimestamp - endWeights - startWeights - endWeights - poolId { - id - } -} - query BalancerGetPoolsWithActiveUpdates($timestamp: BigInt!) { ampUpdates(where: { endTimestamp_gte: $timestamp }) { poolId { diff --git a/modules/subgraphs/balancer-subgraph/balancer-subgraph-types.ts b/modules/subgraphs/balancer-subgraph/balancer-subgraph-types.ts deleted file mode 100644 index 2231d57a0..000000000 --- a/modules/subgraphs/balancer-subgraph/balancer-subgraph-types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface BalancerUserPoolShare { - id: string; - balance: string; - poolId: string; - poolAddress: string; - userAddress: string; -} diff --git a/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts b/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts index aaa0c9a06..49a126fee 100644 --- a/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts +++ b/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts @@ -5404,80 +5404,6 @@ export enum _SubgraphErrorPolicy_ { Deny = 'deny', } -export type BalancerProtocolDataQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerProtocolDataQuery = { - __typename?: 'Query'; - balancers: Array<{ - __typename?: 'Balancer'; - id: string; - totalLiquidity: string; - totalSwapVolume: string; - totalSwapFee: string; - poolCount: number; - }>; -}; - -export type BalancerUserQueryVariables = Exact<{ - id: Scalars['ID']; - block?: InputMaybe; -}>; - -export type BalancerUserQuery = { - __typename?: 'Query'; - user?: { - __typename?: 'User'; - id: string; - sharesOwned?: Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; - }> | null; - } | null; -}; - -export type BalancerUsersQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerUsersQuery = { - __typename?: 'Query'; - users: Array<{ - __typename?: 'User'; - id: string; - sharesOwned?: Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; - }> | null; - }>; -}; - -export type BalancerUserFragment = { - __typename?: 'User'; - id: string; - sharesOwned?: Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; - }> | null; -}; - export type BalancerPoolSharesQueryVariables = Exact<{ skip?: InputMaybe; first?: InputMaybe; @@ -5504,80 +5430,6 @@ export type BalancerPoolShareFragment = { poolId: { __typename?: 'Pool'; id: string }; }; -export type BalancerTokenPricesQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerTokenPricesQuery = { - __typename?: 'Query'; - tokenPrices: Array<{ - __typename?: 'TokenPrice'; - id: string; - asset: string; - amount: string; - pricingAsset: string; - price: string; - block: string; - timestamp: number; - poolId: { __typename?: 'Pool'; id: string }; - }>; -}; - -export type BalancerTokenPriceFragment = { - __typename?: 'TokenPrice'; - id: string; - asset: string; - amount: string; - pricingAsset: string; - price: string; - block: string; - timestamp: number; - poolId: { __typename?: 'Pool'; id: string }; -}; - -export type BalancerTokensQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerTokensQuery = { - __typename?: 'Query'; - tokens: Array<{ - __typename?: 'Token'; - id: string; - symbol?: string | null; - address: string; - latestFXPrice?: string | null; - latestUSDPrice?: string | null; - totalVolumeNotional: string; - totalVolumeUSD: string; - totalSwapCount: string; - latestPrice?: { __typename?: 'LatestPrice'; pricingAsset: string; price: string } | null; - }>; -}; - -export type BalancerTokenFragment = { - __typename?: 'Token'; - id: string; - symbol?: string | null; - address: string; - latestFXPrice?: string | null; - latestUSDPrice?: string | null; - totalVolumeNotional: string; - totalVolumeUSD: string; - totalSwapCount: string; - latestPrice?: { __typename?: 'LatestPrice'; pricingAsset: string; price: string } | null; -}; - export type BalancerPoolFragment = { __typename?: 'Pool'; id: string; @@ -5823,29 +5675,6 @@ export type BalancerPoolQuery = { } | null; }; -export type BalancerPoolHistoricalLiquiditiesQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerPoolHistoricalLiquiditiesQuery = { - __typename?: 'Query'; - poolHistoricalLiquidities: Array<{ - __typename?: 'PoolHistoricalLiquidity'; - id: string; - poolTotalShares: string; - poolLiquidity: string; - poolShareValue: string; - pricingAsset: string; - block: string; - poolId: { __typename?: 'Pool'; id: string }; - }>; -}; - export type BalancerPoolSnapshotsQueryVariables = Exact<{ skip?: InputMaybe; first?: InputMaybe; @@ -5886,45 +5715,6 @@ export type BalancerPoolSnapshotFragment = { pool: { __typename?: 'Pool'; id: string }; }; -export type BalancerLatestPricesQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerLatestPricesQuery = { - __typename?: 'Query'; - latestPrices: Array<{ - __typename?: 'LatestPrice'; - id: string; - asset: string; - price: string; - pricingAsset: string; - block: string; - poolId: { __typename?: 'Pool'; id: string }; - }>; -}; - -export type BalancerLatestPriceQueryVariables = Exact<{ - id: Scalars['ID']; -}>; - -export type BalancerLatestPriceQuery = { - __typename?: 'Query'; - latestPrice?: { - __typename?: 'LatestPrice'; - id: string; - asset: string; - price: string; - pricingAsset: string; - block: string; - poolId: { __typename?: 'Pool'; id: string }; - } | null; -}; - export type BalancerJoinExitsQueryVariables = Exact<{ skip?: InputMaybe; first?: InputMaybe; @@ -5950,16 +5740,6 @@ export type BalancerJoinExitsQuery = { }>; }; -export type BalancerLatestPriceFragment = { - __typename?: 'LatestPrice'; - id: string; - asset: string; - price: string; - pricingAsset: string; - block: string; - poolId: { __typename?: 'Pool'; id: string }; -}; - export type BalancerJoinExitFragment = { __typename?: 'JoinExit'; amounts: Array; @@ -5973,421 +5753,134 @@ export type BalancerJoinExitFragment = { pool: { __typename?: 'Pool'; id: string; tokensList: Array }; }; -export type BalancerPortfolioDataQueryVariables = Exact<{ - id: Scalars['ID']; - previousBlockNumber: Scalars['Int']; +export type BalancerSwapsQueryVariables = Exact<{ + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; -export type BalancerPortfolioDataQuery = { +export type BalancerSwapsQuery = { __typename?: 'Query'; - user?: { - __typename?: 'User'; + swaps: Array<{ + __typename?: 'Swap'; id: string; - sharesOwned?: Array<{ - __typename?: 'PoolShare'; + caller: string; + tokenIn: string; + tokenInSym: string; + tokenOut: string; + tokenOutSym: string; + tokenAmountIn: string; + tokenAmountOut: string; + timestamp: number; + tx: string; + valueUSD: string; + block?: string | null; + poolId: { + __typename?: 'Pool'; id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; - }> | null; - } | null; - previousUser?: { - __typename?: 'User'; + swapFee: string; + poolType?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null }; + }> | null; + }; + userAddress: { __typename?: 'User'; id: string }; + }>; +}; + +export type BalancerSwapFragment = { + __typename?: 'Swap'; + id: string; + caller: string; + tokenIn: string; + tokenInSym: string; + tokenOut: string; + tokenOutSym: string; + tokenAmountIn: string; + tokenAmountOut: string; + timestamp: number; + tx: string; + valueUSD: string; + block?: string | null; + poolId: { + __typename?: 'Pool'; id: string; - sharesOwned?: Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; + swapFee: string; + poolType?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null }; }> | null; + }; + userAddress: { __typename?: 'User'; id: string }; +}; + +export type BalancerGetPoolsWithActiveUpdatesQueryVariables = Exact<{ + timestamp: Scalars['BigInt']; +}>; + +export type BalancerGetPoolsWithActiveUpdatesQuery = { + __typename?: 'Query'; + ampUpdates: Array<{ __typename?: 'AmpUpdate'; poolId: { __typename?: 'Pool'; id: string } }>; + gradualWeightUpdates: Array<{ __typename?: 'GradualWeightUpdate'; poolId: { __typename?: 'Pool'; id: string } }>; +}; + +export type BalancerGetMetaQueryVariables = Exact<{ [key: string]: never }>; + +export type BalancerGetMetaQuery = { + __typename?: 'Query'; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; } | null; }; -export type BalancerPortfolioPoolsDataQueryVariables = Exact<{ - previousBlockNumber: Scalars['Int']; +export type PoolBalancesFragment = { + __typename?: 'Pool'; + id: string; + address: string; + totalShares: string; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + decimals: number; + balance: string; + priceRate: string; + }> | null; +}; + +export type PoolBalancesQueryVariables = Exact<{ + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; -export type BalancerPortfolioPoolsDataQuery = { +export type PoolBalancesQuery = { __typename?: 'Query'; pools: Array<{ __typename?: 'Pool'; id: string; address: string; - poolType?: string | null; - poolTypeVersion?: number | null; - symbol?: string | null; - name?: string | null; - swapFee: string; - totalWeight?: string | null; - totalSwapVolume: string; - totalSwapFee: string; - totalLiquidity: string; totalShares: string; - swapsCount: string; - holdersCount: string; - createTime: number; - swapEnabled: boolean; - tokensList: Array; - lowerTarget?: string | null; - upperTarget?: string | null; - mainIndex?: number | null; - wrappedIndex?: number | null; - factory?: string | null; - expiryTime?: string | null; - unitSeconds?: string | null; - principalToken?: string | null; - baseToken?: string | null; - owner?: string | null; - amp?: string | null; - alpha?: string | null; - beta?: string | null; - sqrtAlpha?: string | null; - sqrtBeta?: string | null; - root3Alpha?: string | null; - c?: string | null; - s?: string | null; - lambda?: string | null; - tauAlphaX?: string | null; - tauAlphaY?: string | null; - tauBetaX?: string | null; - tauBetaY?: string | null; - u?: string | null; - v?: string | null; - w?: string | null; - z?: string | null; - dSq?: string | null; - delta?: string | null; - epsilon?: string | null; - priceRateProviders?: Array<{ - __typename?: 'PriceRateProvider'; - address: string; - token: { __typename?: 'PoolToken'; address: string }; - }> | null; tokens?: Array<{ __typename?: 'PoolToken'; - id: string; - symbol: string; - name: string; - decimals: number; - address: string; - balance: string; - weight?: string | null; - priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null; - index?: number | null; - token: { __typename?: 'Token'; latestFXPrice?: string | null }; - }> | null; - }>; - previousPools: Array<{ - __typename?: 'Pool'; - id: string; - address: string; - poolType?: string | null; - poolTypeVersion?: number | null; - symbol?: string | null; - name?: string | null; - swapFee: string; - totalWeight?: string | null; - totalSwapVolume: string; - totalSwapFee: string; - totalLiquidity: string; - totalShares: string; - swapsCount: string; - holdersCount: string; - createTime: number; - swapEnabled: boolean; - tokensList: Array; - lowerTarget?: string | null; - upperTarget?: string | null; - mainIndex?: number | null; - wrappedIndex?: number | null; - factory?: string | null; - expiryTime?: string | null; - unitSeconds?: string | null; - principalToken?: string | null; - baseToken?: string | null; - owner?: string | null; - amp?: string | null; - alpha?: string | null; - beta?: string | null; - sqrtAlpha?: string | null; - sqrtBeta?: string | null; - root3Alpha?: string | null; - c?: string | null; - s?: string | null; - lambda?: string | null; - tauAlphaX?: string | null; - tauAlphaY?: string | null; - tauBetaX?: string | null; - tauBetaY?: string | null; - u?: string | null; - v?: string | null; - w?: string | null; - z?: string | null; - dSq?: string | null; - delta?: string | null; - epsilon?: string | null; - priceRateProviders?: Array<{ - __typename?: 'PriceRateProvider'; address: string; - token: { __typename?: 'PoolToken'; address: string }; - }> | null; - tokens?: Array<{ - __typename?: 'PoolToken'; - id: string; - symbol: string; - name: string; decimals: number; - address: string; balance: string; - weight?: string | null; priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null; - index?: number | null; - token: { __typename?: 'Token'; latestFXPrice?: string | null }; }> | null; }>; }; -export type BalancerTradePairSnapshotsQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerTradePairSnapshotsQuery = { - __typename?: 'Query'; - tradePairSnapshots: Array<{ - __typename?: 'TradePairSnapshot'; - id: string; - totalSwapFee: string; - totalSwapVolume: string; - timestamp: number; - pair: { - __typename?: 'TradePair'; - token0: { __typename?: 'Token'; address: string; symbol?: string | null }; - token1: { __typename?: 'Token'; address: string; symbol?: string | null }; - }; - }>; -}; - -export type BalancerTradePairSnapshotFragment = { - __typename?: 'TradePairSnapshot'; - id: string; - totalSwapFee: string; - totalSwapVolume: string; - timestamp: number; - pair: { - __typename?: 'TradePair'; - token0: { __typename?: 'Token'; address: string; symbol?: string | null }; - token1: { __typename?: 'Token'; address: string; symbol?: string | null }; - }; -}; - -export type BalancerSwapsQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerSwapsQuery = { - __typename?: 'Query'; - swaps: Array<{ - __typename?: 'Swap'; - id: string; - caller: string; - tokenIn: string; - tokenInSym: string; - tokenOut: string; - tokenOutSym: string; - tokenAmountIn: string; - tokenAmountOut: string; - timestamp: number; - tx: string; - valueUSD: string; - block?: string | null; - poolId: { - __typename?: 'Pool'; - id: string; - swapFee: string; - poolType?: string | null; - tokens?: Array<{ - __typename?: 'PoolToken'; - token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null }; - }> | null; - }; - userAddress: { __typename?: 'User'; id: string }; - }>; -}; - -export type BalancerSwapFragment = { - __typename?: 'Swap'; - id: string; - caller: string; - tokenIn: string; - tokenInSym: string; - tokenOut: string; - tokenOutSym: string; - tokenAmountIn: string; - tokenAmountOut: string; - timestamp: number; - tx: string; - valueUSD: string; - block?: string | null; - poolId: { - __typename?: 'Pool'; - id: string; - swapFee: string; - poolType?: string | null; - tokens?: Array<{ - __typename?: 'PoolToken'; - token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null }; - }> | null; - }; - userAddress: { __typename?: 'User'; id: string }; -}; - -export type BalancerAmpUpdatesQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerAmpUpdatesQuery = { - __typename?: 'Query'; - ampUpdates: Array<{ - __typename?: 'AmpUpdate'; - id: string; - startAmp: string; - endAmp: string; - startTimestamp: string; - endTimestamp: string; - poolId: { __typename?: 'Pool'; id: string }; - }>; -}; - -export type BalancerAmpUpdateFragment = { - __typename?: 'AmpUpdate'; - id: string; - startAmp: string; - endAmp: string; - startTimestamp: string; - endTimestamp: string; - poolId: { __typename?: 'Pool'; id: string }; -}; - -export type BalancerGradualWeightUpdatesQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type BalancerGradualWeightUpdatesQuery = { - __typename?: 'Query'; - gradualWeightUpdates: Array<{ - __typename?: 'GradualWeightUpdate'; - id: string; - startTimestamp: string; - endWeights: Array; - startWeights: Array; - poolId: { __typename?: 'Pool'; id: string }; - }>; -}; - -export type BalancerGradualWeightUpdateFragment = { - __typename?: 'GradualWeightUpdate'; - id: string; - startTimestamp: string; - endWeights: Array; - startWeights: Array; - poolId: { __typename?: 'Pool'; id: string }; -}; - -export type BalancerGetPoolsWithActiveUpdatesQueryVariables = Exact<{ - timestamp: Scalars['BigInt']; -}>; - -export type BalancerGetPoolsWithActiveUpdatesQuery = { - __typename?: 'Query'; - ampUpdates: Array<{ __typename?: 'AmpUpdate'; poolId: { __typename?: 'Pool'; id: string } }>; - gradualWeightUpdates: Array<{ __typename?: 'GradualWeightUpdate'; poolId: { __typename?: 'Pool'; id: string } }>; -}; - -export type BalancerGetMetaQueryVariables = Exact<{ [key: string]: never }>; - -export type BalancerGetMetaQuery = { - __typename?: 'Query'; - meta?: { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } | null; -}; - -export type PoolBalancesFragment = { - __typename?: 'Pool'; - id: string; - address: string; - totalShares: string; - tokens?: Array<{ - __typename?: 'PoolToken'; - address: string; - decimals: number; - balance: string; - priceRate: string; - }> | null; -}; - -export type PoolBalancesQueryVariables = Exact<{ - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; -}>; - -export type PoolBalancesQuery = { - __typename?: 'Query'; - pools: Array<{ - __typename?: 'Pool'; - id: string; - address: string; - totalShares: string; - tokens?: Array<{ - __typename?: 'PoolToken'; - address: string; - decimals: number; - balance: string; - priceRate: string; - }> | null; - }>; -}; - -export const BalancerUserFragmentDoc = gql` - fragment BalancerUser on User { - id - sharesOwned(first: 1000) { - id - balance - poolId { - id - } - } - } -`; export const BalancerPoolShareFragmentDoc = gql` fragment BalancerPoolShare on PoolShare { id @@ -6397,36 +5890,6 @@ export const BalancerPoolShareFragmentDoc = gql` } } `; -export const BalancerTokenPriceFragmentDoc = gql` - fragment BalancerTokenPrice on TokenPrice { - id - poolId { - id - } - asset - amount - pricingAsset - price - block - timestamp - } -`; -export const BalancerTokenFragmentDoc = gql` - fragment BalancerToken on Token { - id - symbol - address - latestFXPrice - latestUSDPrice - totalVolumeNotional - totalVolumeUSD - totalSwapCount - latestPrice { - pricingAsset - price - } - } -`; export const BalancerPoolTokenFragmentDoc = gql` fragment BalancerPoolToken on PoolToken { id @@ -6521,18 +5984,6 @@ export const BalancerPoolSnapshotFragmentDoc = gql` holdersCount } `; -export const BalancerLatestPriceFragmentDoc = gql` - fragment BalancerLatestPrice on LatestPrice { - id - asset - price - poolId { - id - } - pricingAsset - block - } -`; export const BalancerJoinExitFragmentDoc = gql` fragment BalancerJoinExit on JoinExit { amounts @@ -6549,24 +6000,6 @@ export const BalancerJoinExitFragmentDoc = gql` valueUSD } `; -export const BalancerTradePairSnapshotFragmentDoc = gql` - fragment BalancerTradePairSnapshot on TradePairSnapshot { - id - totalSwapFee - totalSwapVolume - timestamp - pair { - token0 { - address - symbol - } - token1 { - address - symbol - } - } - } -`; export const BalancerSwapFragmentDoc = gql` fragment BalancerSwap on Swap { id @@ -6591,103 +6024,24 @@ export const BalancerSwapFragmentDoc = gql` userAddress { id } - timestamp - tx - valueUSD - block - } -`; -export const BalancerAmpUpdateFragmentDoc = gql` - fragment BalancerAmpUpdate on AmpUpdate { - id - poolId { - id - } - startAmp - endAmp - startTimestamp - endTimestamp - } -`; -export const BalancerGradualWeightUpdateFragmentDoc = gql` - fragment BalancerGradualWeightUpdate on GradualWeightUpdate { - id - startTimestamp - endWeights - startWeights - endWeights - poolId { - id - } - } -`; -export const PoolBalancesFragmentDoc = gql` - fragment PoolBalances on Pool { - id - address - totalShares - tokens { - address - decimals - balance - priceRate - } - } -`; -export const BalancerProtocolDataDocument = gql` - query BalancerProtocolData( - $skip: Int - $first: Int - $orderBy: Balancer_orderBy - $orderDirection: OrderDirection - $where: Balancer_filter - $block: Block_height - ) { - balancers( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - id - totalLiquidity - totalSwapVolume - totalSwapFee - poolCount - } - } -`; -export const BalancerUserDocument = gql` - query BalancerUser($id: ID!, $block: Block_height) { - user(id: $id, block: $block) { - ...BalancerUser - } - } - ${BalancerUserFragmentDoc} -`; -export const BalancerUsersDocument = gql` - query BalancerUsers( - $skip: Int - $first: Int - $orderBy: User_orderBy - $orderDirection: OrderDirection - $where: User_filter - $block: Block_height - ) { - users( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerUser + timestamp + tx + valueUSD + block + } +`; +export const PoolBalancesFragmentDoc = gql` + fragment PoolBalances on Pool { + id + address + totalShares + tokens { + address + decimals + balance + priceRate } } - ${BalancerUserFragmentDoc} `; export const BalancerPoolSharesDocument = gql` query BalancerPoolShares( @@ -6711,50 +6065,6 @@ export const BalancerPoolSharesDocument = gql` } ${BalancerPoolShareFragmentDoc} `; -export const BalancerTokenPricesDocument = gql` - query BalancerTokenPrices( - $skip: Int - $first: Int - $orderBy: TokenPrice_orderBy - $orderDirection: OrderDirection - $where: TokenPrice_filter - $block: Block_height - ) { - tokenPrices( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerTokenPrice - } - } - ${BalancerTokenPriceFragmentDoc} -`; -export const BalancerTokensDocument = gql` - query BalancerTokens( - $skip: Int - $first: Int - $orderBy: Token_orderBy - $orderDirection: OrderDirection - $where: Token_filter - $block: Block_height - ) { - tokens( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerToken - } - } - ${BalancerTokenFragmentDoc} -`; export const BalancerPoolsDocument = gql` query BalancerPools( $skip: Int @@ -6785,35 +6095,6 @@ export const BalancerPoolDocument = gql` } ${BalancerPoolFragmentDoc} `; -export const BalancerPoolHistoricalLiquiditiesDocument = gql` - query BalancerPoolHistoricalLiquidities( - $skip: Int - $first: Int - $orderBy: PoolHistoricalLiquidity_orderBy - $orderDirection: OrderDirection - $where: PoolHistoricalLiquidity_filter - $block: Block_height - ) { - poolHistoricalLiquidities( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - id - poolId { - id - } - poolTotalShares - poolLiquidity - poolShareValue - pricingAsset - block - } - } -`; export const BalancerPoolSnapshotsDocument = gql` query BalancerPoolSnapshots( $skip: Int @@ -6836,36 +6117,6 @@ export const BalancerPoolSnapshotsDocument = gql` } ${BalancerPoolSnapshotFragmentDoc} `; -export const BalancerLatestPricesDocument = gql` - query BalancerLatestPrices( - $skip: Int - $first: Int - $orderBy: LatestPrice_orderBy - $orderDirection: OrderDirection - $where: LatestPrice_filter - $block: Block_height - ) { - latestPrices( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerLatestPrice - } - } - ${BalancerLatestPriceFragmentDoc} -`; -export const BalancerLatestPriceDocument = gql` - query BalancerLatestPrice($id: ID!) { - latestPrice(id: $id) { - ...BalancerLatestPrice - } - } - ${BalancerLatestPriceFragmentDoc} -`; export const BalancerJoinExitsDocument = gql` query BalancerJoinExits( $skip: Int @@ -6888,50 +6139,6 @@ export const BalancerJoinExitsDocument = gql` } ${BalancerJoinExitFragmentDoc} `; -export const BalancerPortfolioDataDocument = gql` - query BalancerPortfolioData($id: ID!, $previousBlockNumber: Int!) { - user(id: $id) { - ...BalancerUser - } - previousUser: user(id: $id, block: { number: $previousBlockNumber }) { - ...BalancerUser - } - } - ${BalancerUserFragmentDoc} -`; -export const BalancerPortfolioPoolsDataDocument = gql` - query BalancerPortfolioPoolsData($previousBlockNumber: Int!) { - pools(first: 1000, where: { totalShares_gt: "0" }) { - ...BalancerPool - } - previousPools: pools(first: 1000, where: { totalShares_gt: "0" }, block: { number: $previousBlockNumber }) { - ...BalancerPool - } - } - ${BalancerPoolFragmentDoc} -`; -export const BalancerTradePairSnapshotsDocument = gql` - query BalancerTradePairSnapshots( - $skip: Int - $first: Int - $orderBy: TradePairSnapshot_orderBy - $orderDirection: OrderDirection - $where: TradePairSnapshot_filter - $block: Block_height - ) { - tradePairSnapshots( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerTradePairSnapshot - } - } - ${BalancerTradePairSnapshotFragmentDoc} -`; export const BalancerSwapsDocument = gql` query BalancerSwaps( $skip: Int @@ -6954,50 +6161,6 @@ export const BalancerSwapsDocument = gql` } ${BalancerSwapFragmentDoc} `; -export const BalancerAmpUpdatesDocument = gql` - query BalancerAmpUpdates( - $skip: Int - $first: Int - $orderBy: AmpUpdate_orderBy - $orderDirection: OrderDirection - $where: AmpUpdate_filter - $block: Block_height - ) { - ampUpdates( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerAmpUpdate - } - } - ${BalancerAmpUpdateFragmentDoc} -`; -export const BalancerGradualWeightUpdatesDocument = gql` - query BalancerGradualWeightUpdates( - $skip: Int - $first: Int - $orderBy: GradualWeightUpdate_orderBy - $orderDirection: OrderDirection - $where: GradualWeightUpdate_filter - $block: Block_height - ) { - gradualWeightUpdates( - skip: $skip - first: $first - orderBy: $orderBy - orderDirection: $orderDirection - where: $where - block: $block - ) { - ...BalancerGradualWeightUpdate - } - } - ${BalancerGradualWeightUpdateFragmentDoc} -`; export const BalancerGetPoolsWithActiveUpdatesDocument = gql` query BalancerGetPoolsWithActiveUpdates($timestamp: BigInt!) { ampUpdates(where: { endTimestamp_gte: $timestamp }) { @@ -7056,48 +6219,6 @@ const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationTy export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { - BalancerProtocolData( - variables?: BalancerProtocolDataQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerProtocolDataDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerProtocolData', - 'query', - ); - }, - BalancerUser( - variables: BalancerUserQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerUserDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerUser', - 'query', - ); - }, - BalancerUsers( - variables?: BalancerUsersQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerUsersDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerUsers', - 'query', - ); - }, BalancerPoolShares( variables?: BalancerPoolSharesQueryVariables, requestHeaders?: Dom.RequestInit['headers'], @@ -7112,34 +6233,6 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = 'query', ); }, - BalancerTokenPrices( - variables?: BalancerTokenPricesQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerTokenPricesDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerTokenPrices', - 'query', - ); - }, - BalancerTokens( - variables?: BalancerTokensQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerTokensDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerTokens', - 'query', - ); - }, BalancerPools( variables?: BalancerPoolsQueryVariables, requestHeaders?: Dom.RequestInit['headers'], @@ -7168,21 +6261,6 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = 'query', ); }, - BalancerPoolHistoricalLiquidities( - variables?: BalancerPoolHistoricalLiquiditiesQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request( - BalancerPoolHistoricalLiquiditiesDocument, - variables, - { ...requestHeaders, ...wrappedRequestHeaders }, - ), - 'BalancerPoolHistoricalLiquidities', - 'query', - ); - }, BalancerPoolSnapshots( variables?: BalancerPoolSnapshotsQueryVariables, requestHeaders?: Dom.RequestInit['headers'], @@ -7197,34 +6275,6 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = 'query', ); }, - BalancerLatestPrices( - variables?: BalancerLatestPricesQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerLatestPricesDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerLatestPrices', - 'query', - ); - }, - BalancerLatestPrice( - variables: BalancerLatestPriceQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerLatestPriceDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerLatestPrice', - 'query', - ); - }, BalancerJoinExits( variables?: BalancerJoinExitsQueryVariables, requestHeaders?: Dom.RequestInit['headers'], @@ -7239,48 +6289,6 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = 'query', ); }, - BalancerPortfolioData( - variables: BalancerPortfolioDataQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerPortfolioDataDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerPortfolioData', - 'query', - ); - }, - BalancerPortfolioPoolsData( - variables: BalancerPortfolioPoolsDataQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerPortfolioPoolsDataDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerPortfolioPoolsData', - 'query', - ); - }, - BalancerTradePairSnapshots( - variables?: BalancerTradePairSnapshotsQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerTradePairSnapshotsDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerTradePairSnapshots', - 'query', - ); - }, BalancerSwaps( variables?: BalancerSwapsQueryVariables, requestHeaders?: Dom.RequestInit['headers'], @@ -7295,34 +6303,6 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = 'query', ); }, - BalancerAmpUpdates( - variables?: BalancerAmpUpdatesQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerAmpUpdatesDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerAmpUpdates', - 'query', - ); - }, - BalancerGradualWeightUpdates( - variables?: BalancerGradualWeightUpdatesQueryVariables, - requestHeaders?: Dom.RequestInit['headers'], - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(BalancerGradualWeightUpdatesDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - 'BalancerGradualWeightUpdates', - 'query', - ); - }, BalancerGetPoolsWithActiveUpdates( variables: BalancerGetPoolsWithActiveUpdatesQueryVariables, requestHeaders?: Dom.RequestInit['headers'],