From 5ba5c1544b54bc998ff6e9502994a341c714f0eb Mon Sep 17 00:00:00 2001 From: Bruno Eidam Guerios Date: Fri, 20 Dec 2024 11:39:08 -0300 Subject: [PATCH] Update SOR buffers to use unwrapRate from erc4626 tokens --- .changeset/nasty-adults-applaud.md | 5 + apps/api/gql/schema/token.gql | 4 + graphql_schema_generated.ts | 5 + modules/actions/pool/v3/upsert-pools.ts | 16 +- modules/actions/token/sync-erc4626-tokens.ts | 4 +- modules/sor/sor-debug.test.ts | 11 +- .../sor/sorV2/lib/poolsV2/erc4626PoolToken.ts | 11 +- .../sorV2/lib/poolsV3/buffer/bufferPool.ts | 2 +- .../sorV2/lib/poolsV3/stable/stablePool.ts | 1 + .../weighted/weightedErc4626PoolToken.ts | 3 +- .../lib/poolsV3/weighted/weightedPool.ts | 1 + .../contracts/fetch-erc4626-token-data.ts | 41 +- .../sources/contracts/v3/fetch-pool-data.ts | 7 +- modules/sources/contracts/v3/vault-client.ts | 4 +- .../sources/enrichers/apply-onchain-data.ts | 7 +- .../aura/generated/aura-subgraph-types.ts | 9 +- .../balancer-v3-pools/generated/types.ts | 26 +- .../balancer-v3-vault/generated/types.ts | 235 ++-- .../subgraphs/cow-amm/generated/types.ts | 102 +- .../generated/sftmx-subgraph-types.ts | 29 +- modules/sources/types.ts | 2 +- .../generated/balancer-subgraph-types.ts | 1017 ++++++++--------- .../generated/beets-bar-subgraph-types.ts | 300 +++-- .../generated/blocks-subgraph-types.ts | 16 +- .../generated/gauge-subgraph-types.ts | 201 ++-- .../generated/masterchef-subgraph-types.ts | 117 +- .../generated/reliquary-subgraph-types.ts | 205 ++-- .../generated/veBal-locks-subgraph-types.ts | 45 +- .../migration.sql | 2 + prisma/schema.prisma | 1 + prisma/schema/token.prisma | 1 + schema.ts | 3 + test/factories/prismaToken.factory.ts | 1 + 33 files changed, 1218 insertions(+), 1216 deletions(-) create mode 100644 .changeset/nasty-adults-applaud.md create mode 100644 prisma/migrations/20241220143822_erc4626_unwrap_rate/migration.sql diff --git a/.changeset/nasty-adults-applaud.md b/.changeset/nasty-adults-applaud.md new file mode 100644 index 000000000..f3382b710 --- /dev/null +++ b/.changeset/nasty-adults-applaud.md @@ -0,0 +1,5 @@ +--- +'backend': minor +--- + +Update SOR buffers to use unwrapRate from erc4626 tokens diff --git a/apps/api/gql/schema/token.gql b/apps/api/gql/schema/token.gql index f847bf9ac..93976f132 100644 --- a/apps/api/gql/schema/token.gql +++ b/apps/api/gql/schema/token.gql @@ -196,6 +196,10 @@ type GqlToken { """ isBufferAllowed: Boolean! """ + If it is an ERC4626 token, it represents the rate between wrapped/underlying. + """ + unwrapRate: BigDecimal! + """ The ERC4626 review data for the token """ erc4626ReviewData: Erc4626ReviewData diff --git a/graphql_schema_generated.ts b/graphql_schema_generated.ts index 7ae7a60ca..2666ff6ce 100644 --- a/graphql_schema_generated.ts +++ b/graphql_schema_generated.ts @@ -3221,6 +3221,11 @@ export const schema = gql` """ underlyingTokenAddress: String + """ + If it is an ERC4626 token, it represents the rate between wrapped/underlying. + """ + unwrapRate: BigDecimal! + """ The website URL of the token """ diff --git a/modules/actions/pool/v3/upsert-pools.ts b/modules/actions/pool/v3/upsert-pools.ts index 4f1cc2a0f..1891b3e58 100644 --- a/modules/actions/pool/v3/upsert-pools.ts +++ b/modules/actions/pool/v3/upsert-pools.ts @@ -3,7 +3,7 @@ import { prisma } from '../../../../prisma/prisma-client'; import { tokensTransformer } from '../../../sources/transformers/tokens-transformer'; import { V3JoinedSubgraphPool } from '../../../sources/subgraphs'; import { enrichPoolUpsertsUsd } from '../../../sources/enrichers/pool-upserts-usd'; -import type { VaultClient } from '../../../sources/contracts'; +import { type VaultClient } from '../../../sources/contracts'; import { poolUpsertTransformerV3 } from '../../../sources/transformers/pool-upsert-transformer-v3'; import { applyOnchainDataUpdateV3 } from '../../../sources/enrichers/apply-onchain-data'; import { fetchErc4626AndUnderlyingTokenData } from '../../../sources/contracts/fetch-erc4626-token-data'; @@ -68,6 +68,20 @@ export const upsertPools = async ( type: 'ERC4626', }, }); + await prisma.prismaToken.upsert({ + where: { + address_chain: { + address: token.address, + chain, + }, + }, + create: { + ...token, + }, + update: { + ...token, + }, + }); } } diff --git a/modules/actions/token/sync-erc4626-tokens.ts b/modules/actions/token/sync-erc4626-tokens.ts index 2cf9dd773..21ac1e69c 100644 --- a/modules/actions/token/sync-erc4626-tokens.ts +++ b/modules/actions/token/sync-erc4626-tokens.ts @@ -15,9 +15,9 @@ export const syncErc4626Tokens = async (viemClient: ViemClient, chain: Chain) => }, }); - const erc4626AndUnderlying = await fetchErc4626AndUnderlyingTokenData(allTokens, viemClient); + const enrichedTokensWithErc4626Data = await fetchErc4626AndUnderlyingTokenData(allTokens, viemClient); - for (const token of erc4626AndUnderlying) { + for (const token of enrichedTokensWithErc4626Data) { await prisma.prismaToken.upsert({ where: { address_chain: { diff --git a/modules/sor/sor-debug.test.ts b/modules/sor/sor-debug.test.ts index 766a97b3b..e2d6629dd 100644 --- a/modules/sor/sor-debug.test.ts +++ b/modules/sor/sor-debug.test.ts @@ -36,7 +36,7 @@ describe('sor debugging', () => { expect(parseFloat(swaps.returnAmount)).toBeGreaterThan(0); }, 5000000); - it('sor v3 mainnet wusdl -> csusdl', async () => { + it.only('sor v3 mainnet wstETH -> waGnowstETH', async () => { const chain = Chain.MAINNET; const chainId = Object.keys(chainIdToChain).find((key) => chainIdToChain[key] === chain) as string; @@ -44,16 +44,15 @@ describe('sor debugging', () => { setRequestScopedContextValue('chainId', chainId); //only do once before starting to debug await PoolController().reloadPoolsV3(chain); - await PoolController().updateLiquidityValuesForActivePools(chain); const swaps = await sorService.getSorSwapPaths({ chain, - tokenIn: '0x7751e2f4b8ae93ef6b79d86419d42fe3295a4559', // wusdl - tokenOut: '0xbeefc01767ed5086f35decb6c00e6c12bc7476c1', // csusdl + tokenIn: '0xbeef01735c132ada46aa9aa4c54623caa92a64cb', // steakUSDC 18 decimals + tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC 6 decimals swapType: 'EXACT_IN', - swapAmount: '10', + swapAmount: '1', useProtocolVersion: 3, - // poolIds: ['0xbeefc01767ed5086f35decb6c00e6c12bc7476c1'], // buffer + poolIds: ['0x5dd88b3aa3143173eb26552923922bdf33f50949'], // boosted }); console.log(swaps.returnAmount); diff --git a/modules/sor/sorV2/lib/poolsV2/erc4626PoolToken.ts b/modules/sor/sorV2/lib/poolsV2/erc4626PoolToken.ts index 775eca8c0..016b02b91 100644 --- a/modules/sor/sorV2/lib/poolsV2/erc4626PoolToken.ts +++ b/modules/sor/sorV2/lib/poolsV2/erc4626PoolToken.ts @@ -3,11 +3,20 @@ import { BasePoolToken } from './basePoolToken'; export class Erc4626PoolToken extends BasePoolToken { public readonly rate: bigint; + public readonly unwrapRate: bigint; public readonly underlyingTokenAddress: string; - public constructor(token: Token, amount: BigintIsh, index: number, rate: bigint, underlyingTokenAddress: string) { + public constructor( + token: Token, + amount: BigintIsh, + index: number, + rate: bigint, + unwrapRate: bigint, + underlyingTokenAddress: string, + ) { super(token, amount, index); this.rate = rate; + this.unwrapRate = unwrapRate; this.underlyingTokenAddress = underlyingTokenAddress; } diff --git a/modules/sor/sorV2/lib/poolsV3/buffer/bufferPool.ts b/modules/sor/sorV2/lib/poolsV3/buffer/bufferPool.ts index 5bbb38c9f..8bac8f842 100644 --- a/modules/sor/sorV2/lib/poolsV3/buffer/bufferPool.ts +++ b/modules/sor/sorV2/lib/poolsV3/buffer/bufferPool.ts @@ -44,7 +44,7 @@ export class BufferPool implements BasePoolV3 { erc4626Token.token.address, erc4626Token.token.address, erc4626Token.token.chainId, - erc4626Token.rate, + erc4626Token.unwrapRate, mainToken, underlyingToken, ); diff --git a/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts b/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts index 824a6d3aa..b31e73c1f 100644 --- a/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts +++ b/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts @@ -57,6 +57,7 @@ export class StablePool implements BasePoolV3 { tokenAmount.amount, poolToken.index, parseEther(poolToken.priceRate), + parseEther(poolToken.token.unwrapRate), poolToken.token.underlyingTokenAddress, ), ); diff --git a/modules/sor/sorV2/lib/poolsV3/weighted/weightedErc4626PoolToken.ts b/modules/sor/sorV2/lib/poolsV3/weighted/weightedErc4626PoolToken.ts index 6ceed43a1..0fc0fe55b 100644 --- a/modules/sor/sorV2/lib/poolsV3/weighted/weightedErc4626PoolToken.ts +++ b/modules/sor/sorV2/lib/poolsV3/weighted/weightedErc4626PoolToken.ts @@ -9,10 +9,11 @@ export class WeightedErc4626PoolToken extends Erc4626PoolToken { amount: BigintIsh, index: number, rate: bigint, + unwrapRate: bigint, underlyingTokenAddress: string, weight: BigintIsh, ) { - super(token, amount, index, rate, underlyingTokenAddress); + super(token, amount, index, rate, unwrapRate, underlyingTokenAddress); this.weight = BigInt(weight); } } diff --git a/modules/sor/sorV2/lib/poolsV3/weighted/weightedPool.ts b/modules/sor/sorV2/lib/poolsV3/weighted/weightedPool.ts index 709c5fe4f..b9c9bfc90 100644 --- a/modules/sor/sorV2/lib/poolsV3/weighted/weightedPool.ts +++ b/modules/sor/sorV2/lib/poolsV3/weighted/weightedPool.ts @@ -61,6 +61,7 @@ export class WeightedPoolV3 implements BasePoolV3 { tokenAmount.amount, poolToken.index, parseEther(poolToken.priceRate), + parseEther(poolToken.token.unwrapRate), poolToken.token.underlyingTokenAddress, parseEther(poolToken.weight), ), diff --git a/modules/sources/contracts/fetch-erc4626-token-data.ts b/modules/sources/contracts/fetch-erc4626-token-data.ts index 227cc69ad..f848aab00 100644 --- a/modules/sources/contracts/fetch-erc4626-token-data.ts +++ b/modules/sources/contracts/fetch-erc4626-token-data.ts @@ -3,6 +3,7 @@ import MinimalErc4626Abi from './abis/MinimalERC4626'; import { fetchErc20Headers } from '.'; import { multicallViem, ViemMulticallCall } from '../../web3/multicaller-viem'; import { Chain } from '@prisma/client'; +import { formatUnits, parseEther, parseUnits } from 'viem'; interface Erc4626Data { asset?: string; @@ -25,6 +26,7 @@ export async function fetchErc4626AndUnderlyingTokenData( symbol: string; chain: Chain; underlyingTokenAddress?: string; + unwrapRate?: string; }[] > { const tokenData: { @@ -35,6 +37,7 @@ export async function fetchErc4626AndUnderlyingTokenData( symbol: string; chain: Chain; underlyingTokenAddress?: string; + unwrapRate?: string; }; } = {}; @@ -53,7 +56,7 @@ export async function fetchErc4626AndUnderlyingTokenData( address: token.address as `0x${string}`, abi: MinimalErc4626Abi, functionName: 'convertToAssets', - args: [1n], + args: [parseUnits('1', token.decimals)], }, { path: `${token.address}.convertToShares`, @@ -118,22 +121,32 @@ export async function fetchErc4626AndUnderlyingTokenData( name: token.name, symbol: token.symbol, chain: token.chain, - underlyingTokenAddress: underlyingTokenAddress, + underlyingTokenAddress, }; - if (underlyingTokenAddress && !tokenData[underlyingTokenAddress]) { - const underlyingTokenDetail = await fetchErc20Headers( - [underlyingTokenAddress as `0x${string}`], - viemClient, - ); + if (underlyingTokenAddress) { + if (!tokenData[underlyingTokenAddress]) { + const underlyingTokenDetail = await fetchErc20Headers( + [underlyingTokenAddress as `0x${string}`], + viemClient, + ); + + tokenData[underlyingTokenAddress] = { + address: underlyingTokenAddress, + decimals: underlyingTokenDetail[underlyingTokenAddress].decimals, + name: underlyingTokenDetail[underlyingTokenAddress].name, + symbol: underlyingTokenDetail[underlyingTokenAddress].symbol, + chain: token.chain, + underlyingTokenAddress: undefined, + }; + } - tokenData[underlyingTokenAddress] = { - address: underlyingTokenAddress, - decimals: underlyingTokenDetail[underlyingTokenAddress].decimals, - name: underlyingTokenDetail[underlyingTokenAddress].name, - symbol: underlyingTokenDetail[underlyingTokenAddress].symbol, - chain: token.chain, - underlyingTokenAddress: undefined, + const unwrapRate = result.convertToAssets + ? formatUnits(BigInt(result.convertToAssets), tokenData[underlyingTokenAddress].decimals) + : '1'; + tokenData[token.address] = { + ...tokenData[token.address], + unwrapRate, }; } } diff --git a/modules/sources/contracts/v3/fetch-pool-data.ts b/modules/sources/contracts/v3/fetch-pool-data.ts index 7e1ffe367..4f0afbb91 100644 --- a/modules/sources/contracts/v3/fetch-pool-data.ts +++ b/modules/sources/contracts/v3/fetch-pool-data.ts @@ -15,7 +15,8 @@ type PoolTokenRates = [ AbiParameterToPrimitiveType['outputs'][0]>, // decimalScalingFactors AbiParameterToPrimitiveType['outputs'][1]>, // tokenRates ]; -export interface OnchainDataV3 { + +export interface PoolDataV3 { totalSupply: bigint; swapFee: bigint; aggregateSwapFee?: bigint; @@ -28,7 +29,6 @@ export interface OnchainDataV3 { balance: bigint; rateProvider: string; rate: bigint; - isErc4626: boolean; scalingFactor: bigint; }[]; } @@ -38,7 +38,7 @@ export async function fetchPoolData( pools: string[], client: ViemClient, blockNumber?: bigint, -): Promise<{ [address: string]: OnchainDataV3 }> { +): Promise<{ [address: string]: PoolDataV3 }> { const contracts = pools .map((pool) => [ { @@ -102,7 +102,6 @@ export async function fetchPoolData( paysYieldFees: poolTokenInfo[1][i].paysYieldFees, rateProvider: poolTokenInfo[1][i].rateProvider, rate: poolTokenRates ? poolTokenRates[1][i] : 1000000000000000000n, - isErc4626: false, // will be added later in the process scalingFactor: poolTokenRates ? poolTokenRates[0][i] : 1000000000000000000n, })), }, diff --git a/modules/sources/contracts/v3/vault-client.ts b/modules/sources/contracts/v3/vault-client.ts index 02abea3d3..6c3807e3e 100644 --- a/modules/sources/contracts/v3/vault-client.ts +++ b/modules/sources/contracts/v3/vault-client.ts @@ -1,9 +1,9 @@ import { ViemClient } from '../../viem-client'; -import { OnchainDataV3, fetchPoolData } from './fetch-pool-data'; +import { PoolDataV3, fetchPoolData } from './fetch-pool-data'; import { ProtocolFees, fetchProtocolFees } from './fetch-protocol-fees'; export interface VaultClient { - fetchPoolData: (pools: string[], blockNumber?: bigint) => Promise<{ [address: string]: OnchainDataV3 }>; + fetchPoolData: (pools: string[], blockNumber?: bigint) => Promise<{ [address: string]: PoolDataV3 }>; fetchProtocolFees: (blockNumber?: bigint) => Promise; } diff --git a/modules/sources/enrichers/apply-onchain-data.ts b/modules/sources/enrichers/apply-onchain-data.ts index eed6a2ba2..22335b64d 100644 --- a/modules/sources/enrichers/apply-onchain-data.ts +++ b/modules/sources/enrichers/apply-onchain-data.ts @@ -1,17 +1,18 @@ -import { formatEther, formatUnits } from 'viem'; -import { OnchainDataCowAmm, OnchainDataV3 } from '../contracts'; +import { formatEther, formatUnits, parseEther } from 'viem'; +import { OnchainDataCowAmm, PoolDataV3 } from '../contracts'; import { Chain } from '@prisma/client'; import { PoolDynamicUpsertData, PoolUpsertData } from '../../../prisma/prisma-types'; export const applyOnchainDataUpdateV3 = ( data: Partial = {}, - onchainPoolData: OnchainDataV3, + onchainPoolData: PoolDataV3, allTokens: { address: string; decimals: number }[], chain: Chain, poolId: string, blockNumber: bigint, ): PoolDynamicUpsertData => { const decimals = Object.fromEntries(allTokens.map((token) => [token.address, token.decimals])); + return { poolDynamicData: { ...data.poolDynamicData, diff --git a/modules/sources/subgraphs/aura/generated/aura-subgraph-types.ts b/modules/sources/subgraphs/aura/generated/aura-subgraph-types.ts index b0a76ab6a..4d370a9cf 100644 --- a/modules/sources/subgraphs/aura/generated/aura-subgraph-types.ts +++ b/modules/sources/subgraphs/aura/generated/aura-subgraph-types.ts @@ -400,7 +400,7 @@ export type VaultSchemaHistoricApRsArgs = { }; export type AllPoolsQueryVariables = Exact<{ - chainIds?: Maybe | Scalars['Int']>; + chainIds?: InputMaybe | Scalars['Int']>; }>; export type AllPoolsQuery = { @@ -427,7 +427,7 @@ export type PoolSchemaFragment = { }; export type AccountsQueryVariables = Exact<{ - ids?: Maybe | Scalars['String']>; + ids?: InputMaybe | Scalars['String']>; }>; export type AccountsQuery = { @@ -515,9 +515,10 @@ export const AccountsDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -532,6 +533,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'allPools', + 'query', ); }, accounts( @@ -545,6 +547,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'accounts', + 'query', ); }, }; diff --git a/modules/sources/subgraphs/balancer-v3-pools/generated/types.ts b/modules/sources/subgraphs/balancer-v3-pools/generated/types.ts index 8fc64f8b2..9aa7de38c 100644 --- a/modules/sources/subgraphs/balancer-v3-pools/generated/types.ts +++ b/modules/sources/subgraphs/balancer-v3-pools/generated/types.ts @@ -514,7 +514,7 @@ export type FactoryFragment = { id: string; type: PoolType; version: number; - pools?: Array<{ __typename?: 'Pool'; id: string; address: string }> | null | undefined; + pools?: Array<{ __typename?: 'Pool'; id: string; address: string }> | null; }; export type TypePoolFragment = { @@ -522,17 +522,17 @@ export type TypePoolFragment = { id: string; address: string; factory: { __typename?: 'Factory'; id: string; type: PoolType; version: number }; - stableParams?: { __typename?: 'StableParams'; amp: string } | null | undefined; - weightedParams?: { __typename?: 'WeightedParams'; weights: Array } | null | undefined; + stableParams?: { __typename?: 'StableParams'; amp: string } | null; + weightedParams?: { __typename?: 'WeightedParams'; weights: Array } | null; }; export type PoolsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolsQuery = { @@ -542,8 +542,8 @@ export type PoolsQuery = { id: string; address: string; factory: { __typename?: 'Factory'; id: string; type: PoolType; version: number }; - stableParams?: { __typename?: 'StableParams'; amp: string } | null | undefined; - weightedParams?: { __typename?: 'WeightedParams'; weights: Array } | null | undefined; + stableParams?: { __typename?: 'StableParams'; amp: string } | null; + weightedParams?: { __typename?: 'WeightedParams'; weights: Array } | null; }>; }; @@ -601,9 +601,10 @@ export const PoolsDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -615,6 +616,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Pools', + 'query', ); }, }; diff --git a/modules/sources/subgraphs/balancer-v3-vault/generated/types.ts b/modules/sources/subgraphs/balancer-v3-vault/generated/types.ts index c74c7ecae..06d3d0891 100644 --- a/modules/sources/subgraphs/balancer-v3-vault/generated/types.ts +++ b/modules/sources/subgraphs/balancer-v3-vault/generated/types.ts @@ -2989,12 +2989,12 @@ export type AddRemoveFragment = { }; export type AddRemoveQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type AddRemoveQuery = { @@ -3027,12 +3027,12 @@ export type PoolBalancesFragment = { }; export type PoolBalancesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolBalancesQuery = { @@ -3056,26 +3056,23 @@ export type MetadataQueryVariables = Exact<{ [key: string]: never }>; export type MetadataQuery = { __typename?: 'Query'; - meta?: - | { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } - | null - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export type PoolShareFragment = { __typename?: 'PoolShare'; id: string; balance: string }; export type PoolSharesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolSharesQuery = { @@ -3104,12 +3101,12 @@ export type PoolSnapshotFragment = { }; export type PoolSnapshotsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolSnapshotsQuery = { @@ -3163,18 +3160,15 @@ export type VaultPoolFragment = { totalProtocolYieldFee: string; paysYieldFees: boolean; scalingFactor: string; - nestedPool?: - | { - __typename?: 'Pool'; - id: string; - tokens: Array<{ - __typename?: 'PoolToken'; - address: string; - nestedPool?: { __typename?: 'Pool'; id: string } | null | undefined; - }>; - } - | null - | undefined; + nestedPool?: { + __typename?: 'Pool'; + id: string; + tokens: Array<{ + __typename?: 'PoolToken'; + address: string; + nestedPool?: { __typename?: 'Pool'; id: string } | null; + }>; + } | null; }>; rateProviders: Array<{ __typename?: 'RateProvider'; @@ -3205,12 +3199,12 @@ export type VaultPoolFragment = { }; export type PoolsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolsQuery = { @@ -3243,18 +3237,15 @@ export type PoolsQuery = { totalProtocolYieldFee: string; paysYieldFees: boolean; scalingFactor: string; - nestedPool?: - | { - __typename?: 'Pool'; - id: string; - tokens: Array<{ - __typename?: 'PoolToken'; - address: string; - nestedPool?: { __typename?: 'Pool'; id: string } | null | undefined; - }>; - } - | null - | undefined; + nestedPool?: { + __typename?: 'Pool'; + id: string; + tokens: Array<{ + __typename?: 'PoolToken'; + address: string; + nestedPool?: { __typename?: 'Pool'; id: string } | null; + }>; + } | null; }>; rateProviders: Array<{ __typename?: 'RateProvider'; @@ -3305,12 +3296,12 @@ export type SwapFragment = { }; export type SwapsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type SwapsQuery = { @@ -3338,35 +3329,34 @@ export type SwapsQuery = { export type UserFragment = { __typename?: 'User'; id: string; - swaps?: - | Array<{ - __typename?: 'Swap'; - id: string; - pool: string; - tokenIn: string; - tokenOut: string; - tokenAmountIn: string; - tokenAmountOut: string; - swapFeeAmount: string; - blockNumber: string; - blockTimestamp: string; - transactionHash: string; - }> - | null - | undefined; - shares?: - | Array<{ __typename?: 'PoolShare'; id: string; balance: string; pool: { __typename?: 'Pool'; id: string } }> - | null - | undefined; + swaps?: Array<{ + __typename?: 'Swap'; + id: string; + pool: string; + tokenIn: string; + tokenOut: string; + tokenAmountIn: string; + tokenAmountOut: string; + swapFeeAmount: string; + blockNumber: string; + blockTimestamp: string; + transactionHash: string; + }> | null; + shares?: Array<{ + __typename?: 'PoolShare'; + id: string; + balance: string; + pool: { __typename?: 'Pool'; id: string }; + }> | null; }; export type UsersQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type UsersQuery = { @@ -3374,31 +3364,25 @@ export type UsersQuery = { users: Array<{ __typename?: 'User'; id: string; - swaps?: - | Array<{ - __typename?: 'Swap'; - id: string; - pool: string; - tokenIn: string; - tokenOut: string; - tokenAmountIn: string; - tokenAmountOut: string; - swapFeeAmount: string; - blockNumber: string; - blockTimestamp: string; - transactionHash: string; - }> - | null - | undefined; - shares?: - | Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - pool: { __typename?: 'Pool'; id: string }; - }> - | null - | undefined; + swaps?: Array<{ + __typename?: 'Swap'; + id: string; + pool: string; + tokenIn: string; + tokenOut: string; + tokenAmountIn: string; + tokenAmountOut: string; + swapFeeAmount: string; + blockNumber: string; + blockTimestamp: string; + transactionHash: string; + }> | null; + shares?: Array<{ + __typename?: 'PoolShare'; + id: string; + balance: string; + pool: { __typename?: 'Pool'; id: string }; + }> | null; }>; }; @@ -3745,9 +3729,10 @@ export const UsersDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -3762,6 +3747,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'AddRemove', + 'query', ); }, PoolBalances( @@ -3775,6 +3761,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'PoolBalances', + 'query', ); }, Metadata( @@ -3788,6 +3775,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Metadata', + 'query', ); }, PoolShares( @@ -3801,6 +3789,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'PoolShares', + 'query', ); }, PoolSnapshots( @@ -3814,6 +3803,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'PoolSnapshots', + 'query', ); }, Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise { @@ -3824,6 +3814,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Pools', + 'query', ); }, Swaps(variables?: SwapsQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise { @@ -3834,6 +3825,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Swaps', + 'query', ); }, Users(variables?: UsersQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise { @@ -3844,6 +3836,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Users', + 'query', ); }, }; diff --git a/modules/sources/subgraphs/cow-amm/generated/types.ts b/modules/sources/subgraphs/cow-amm/generated/types.ts index eefd13557..39c736dad 100644 --- a/modules/sources/subgraphs/cow-amm/generated/types.ts +++ b/modules/sources/subgraphs/cow-amm/generated/types.ts @@ -1723,12 +1723,12 @@ export type CowAmmAddRemoveFragment = { }; export type AddRemovesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type AddRemovesQuery = { @@ -1765,10 +1765,10 @@ export type CowAmmSwapFragment = { blockTimestamp: string; transactionHash: string; logIndex: string; - surplusAmount?: string | null | undefined; - surplusToken?: string | null | undefined; - swapFeeAmount?: string | null | undefined; - swapFeeToken?: string | null | undefined; + surplusAmount?: string | null; + surplusToken?: string | null; + swapFeeAmount?: string | null; + swapFeeToken?: string | null; pool: { __typename?: 'Pool'; id: string; @@ -1778,12 +1778,12 @@ export type CowAmmSwapFragment = { }; export type SwapsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type SwapsQuery = { @@ -1801,10 +1801,10 @@ export type SwapsQuery = { blockTimestamp: string; transactionHash: string; logIndex: string; - surplusAmount?: string | null | undefined; - surplusToken?: string | null | undefined; - swapFeeAmount?: string | null | undefined; - swapFeeToken?: string | null | undefined; + surplusAmount?: string | null; + surplusToken?: string | null; + swapFeeAmount?: string | null; + swapFeeToken?: string | null; pool: { __typename?: 'Pool'; id: string; @@ -1818,26 +1818,23 @@ export type MetadataQueryVariables = Exact<{ [key: string]: never }>; export type MetadataQuery = { __typename?: 'Query'; - meta?: - | { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } - | null - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export type PoolShareFragment = { __typename?: 'PoolShare'; id: string; balance: string }; export type PoolSharesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolSharesQuery = { @@ -1873,12 +1870,12 @@ export type CowAmmPoolFragment = { }; export type PoolsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolsQuery = { @@ -1909,16 +1906,16 @@ export type PoolsQuery = { weight: string; }>; }>; - _meta?: { __typename?: '_Meta_'; block: { __typename?: '_Block_'; number: number } } | null | undefined; + _meta?: { __typename?: '_Meta_'; block: { __typename?: '_Block_'; number: number } } | null; }; export type SnapshotsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type SnapshotsQuery = { @@ -2202,9 +2199,10 @@ export const SnapshotsDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -2219,6 +2217,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'AddRemoves', + 'query', ); }, Swaps(variables?: SwapsQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise { @@ -2229,6 +2228,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Swaps', + 'query', ); }, Metadata( @@ -2242,6 +2242,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Metadata', + 'query', ); }, PoolShares( @@ -2255,6 +2256,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'PoolShares', + 'query', ); }, Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise { @@ -2265,6 +2267,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Pools', + 'query', ); }, Snapshots( @@ -2278,6 +2281,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Snapshots', + 'query', ); }, }; diff --git a/modules/sources/subgraphs/sftmx-subgraph/generated/sftmx-subgraph-types.ts b/modules/sources/subgraphs/sftmx-subgraph/generated/sftmx-subgraph-types.ts index e7a5c2277..508dc189c 100644 --- a/modules/sources/subgraphs/sftmx-subgraph/generated/sftmx-subgraph-types.ts +++ b/modules/sources/subgraphs/sftmx-subgraph/generated/sftmx-subgraph-types.ts @@ -860,12 +860,12 @@ export enum _SubgraphErrorPolicy_ { } export type WithdrawalRequestsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type WithdrawalRequestsQuery = { @@ -881,12 +881,12 @@ export type WithdrawalRequestsQuery = { }; export type FtmStakingSnapshotsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type FtmStakingSnapshotsQuery = { @@ -990,9 +990,10 @@ export const FtmStakingSnapshotsDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -1007,6 +1008,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'WithdrawalRequests', + 'query', ); }, ftmStakingSnapshots( @@ -1020,6 +1022,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ftmStakingSnapshots', + 'query', ); }, }; diff --git a/modules/sources/types.ts b/modules/sources/types.ts index 624873ac5..f9ff3eba9 100644 --- a/modules/sources/types.ts +++ b/modules/sources/types.ts @@ -1,3 +1,3 @@ export type { ViemClient } from './viem-client'; -export type { OnchainDataV3 as OnchainPoolData } from './contracts/v3/fetch-pool-data'; +export type { PoolDataV3 } from './contracts/v3/fetch-pool-data'; export type { V3JoinedSubgraphClient, V3JoinedSubgraphPool } from './subgraphs/joined-client'; diff --git a/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts b/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts index c54a116ce..01a4a057a 100644 --- a/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts +++ b/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts @@ -5883,12 +5883,12 @@ export enum _SubgraphErrorPolicy_ { } export type BalancerProtocolDataQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerProtocolDataQuery = { @@ -5905,36 +5905,30 @@ export type BalancerProtocolDataQuery = { export type BalancerUserQueryVariables = Exact<{ id: Scalars['ID']; - block?: Maybe; + 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 - | undefined; - } - | null - | undefined; + 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?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerUsersQuery = { @@ -5942,34 +5936,33 @@ export type BalancerUsersQuery = { users: Array<{ __typename?: 'User'; id: string; - sharesOwned?: - | Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; - }> - | null - | undefined; + 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 - | undefined; + sharesOwned?: Array<{ + __typename?: 'PoolShare'; + id: string; + balance: string; + poolId: { __typename?: 'Pool'; id: string }; + }> | null; }; export type BalancerPoolSharesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerPoolSharesQuery = { @@ -5990,12 +5983,12 @@ export type BalancerPoolShareFragment = { }; export type BalancerTokenPricesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerTokenPricesQuery = { @@ -6026,12 +6019,12 @@ export type BalancerTokenPriceFragment = { }; export type BalancerTokensQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerTokensQuery = { @@ -6039,40 +6032,40 @@ export type BalancerTokensQuery = { tokens: Array<{ __typename?: 'Token'; id: string; - symbol?: string | null | undefined; + symbol?: string | null; address: string; - latestFXPrice?: string | null | undefined; - latestUSDPrice?: string | null | undefined; + latestFXPrice?: string | null; + latestUSDPrice?: string | null; totalVolumeNotional: string; totalVolumeUSD: string; totalSwapCount: string; - latestPrice?: { __typename?: 'LatestPrice'; pricingAsset: string; price: string } | null | undefined; + latestPrice?: { __typename?: 'LatestPrice'; pricingAsset: string; price: string } | null; }>; }; export type BalancerTokenFragment = { __typename?: 'Token'; id: string; - symbol?: string | null | undefined; + symbol?: string | null; address: string; - latestFXPrice?: string | null | undefined; - latestUSDPrice?: string | null | undefined; + latestFXPrice?: string | null; + latestUSDPrice?: string | null; totalVolumeNotional: string; totalVolumeUSD: string; totalSwapCount: string; - latestPrice?: { __typename?: 'LatestPrice'; pricingAsset: string; price: string } | null | undefined; + latestPrice?: { __typename?: 'LatestPrice'; pricingAsset: string; price: string } | null; }; export type BalancerPoolFragment = { __typename?: 'Pool'; id: string; address: string; - poolType?: string | null | undefined; - poolTypeVersion?: number | null | undefined; - symbol?: string | null | undefined; - name?: string | null | undefined; + poolType?: string | null; + poolTypeVersion?: number | null; + symbol?: string | null; + name?: string | null; swapFee: string; - totalWeight?: string | null | undefined; + totalWeight?: string | null; totalSwapVolume: string; totalSwapFee: string; totalLiquidity: string; @@ -6082,61 +6075,55 @@ export type BalancerPoolFragment = { createTime: number; swapEnabled: boolean; tokensList: Array; - lowerTarget?: string | null | undefined; - upperTarget?: string | null | undefined; - mainIndex?: number | null | undefined; - wrappedIndex?: number | null | undefined; - factory?: string | null | undefined; - expiryTime?: string | null | undefined; - unitSeconds?: string | null | undefined; - principalToken?: string | null | undefined; - baseToken?: string | null | undefined; - owner?: string | null | undefined; - amp?: string | null | undefined; - alpha?: string | null | undefined; - beta?: string | null | undefined; - sqrtAlpha?: string | null | undefined; - sqrtBeta?: string | null | undefined; - root3Alpha?: string | null | undefined; - c?: string | null | undefined; - s?: string | null | undefined; - lambda?: string | null | undefined; - tauAlphaX?: string | null | undefined; - tauAlphaY?: string | null | undefined; - tauBetaX?: string | null | undefined; - tauBetaY?: string | null | undefined; - u?: string | null | undefined; - v?: string | null | undefined; - w?: string | null | undefined; - z?: string | null | undefined; - dSq?: string | null | undefined; - delta?: string | null | undefined; - epsilon?: string | null | undefined; - priceRateProviders?: - | Array<{ - __typename?: 'PriceRateProvider'; - address: string; - token: { __typename?: 'PoolToken'; address: string }; - }> - | null - | undefined; - tokens?: - | Array<{ - __typename?: 'PoolToken'; - id: string; - symbol: string; - name: string; - decimals: number; - address: string; - balance: string; - weight?: string | null | undefined; - priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null | undefined; - index?: number | null | undefined; - token: { __typename?: 'Token'; latestFXPrice?: string | null | undefined }; - }> - | null - | undefined; + 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 BalancerPoolTokenFragment = { @@ -6147,20 +6134,20 @@ export type BalancerPoolTokenFragment = { decimals: number; address: string; balance: string; - weight?: string | null | undefined; + weight?: string | null; priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null | undefined; - index?: number | null | undefined; - token: { __typename?: 'Token'; latestFXPrice?: string | null | undefined }; + isExemptFromYieldProtocolFee?: boolean | null; + index?: number | null; + token: { __typename?: 'Token'; latestFXPrice?: string | null }; }; export type BalancerPoolsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerPoolsQuery = { @@ -6169,12 +6156,12 @@ export type BalancerPoolsQuery = { __typename?: 'Pool'; id: string; address: string; - poolType?: string | null | undefined; - poolTypeVersion?: number | null | undefined; - symbol?: string | null | undefined; - name?: string | null | undefined; + poolType?: string | null; + poolTypeVersion?: number | null; + symbol?: string | null; + name?: string | null; swapFee: string; - totalWeight?: string | null | undefined; + totalWeight?: string | null; totalSwapVolume: string; totalSwapFee: string; totalLiquidity: string; @@ -6184,158 +6171,143 @@ export type BalancerPoolsQuery = { createTime: number; swapEnabled: boolean; tokensList: Array; - lowerTarget?: string | null | undefined; - upperTarget?: string | null | undefined; - mainIndex?: number | null | undefined; - wrappedIndex?: number | null | undefined; - factory?: string | null | undefined; - expiryTime?: string | null | undefined; - unitSeconds?: string | null | undefined; - principalToken?: string | null | undefined; - baseToken?: string | null | undefined; - owner?: string | null | undefined; - amp?: string | null | undefined; - alpha?: string | null | undefined; - beta?: string | null | undefined; - sqrtAlpha?: string | null | undefined; - sqrtBeta?: string | null | undefined; - root3Alpha?: string | null | undefined; - c?: string | null | undefined; - s?: string | null | undefined; - lambda?: string | null | undefined; - tauAlphaX?: string | null | undefined; - tauAlphaY?: string | null | undefined; - tauBetaX?: string | null | undefined; - tauBetaY?: string | null | undefined; - u?: string | null | undefined; - v?: string | null | undefined; - w?: string | null | undefined; - z?: string | null | undefined; - dSq?: string | null | undefined; - delta?: string | null | undefined; - epsilon?: string | null | undefined; - priceRateProviders?: - | Array<{ - __typename?: 'PriceRateProvider'; - address: string; - token: { __typename?: 'PoolToken'; address: string }; - }> - | null - | undefined; - tokens?: - | Array<{ - __typename?: 'PoolToken'; - id: string; - symbol: string; - name: string; - decimals: number; - address: string; - balance: string; - weight?: string | null | undefined; - priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null | undefined; - index?: number | null | undefined; - token: { __typename?: 'Token'; latestFXPrice?: string | null | undefined }; - }> - | null - | undefined; + 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 BalancerPoolQueryVariables = Exact<{ id: Scalars['ID']; - block?: Maybe; + block?: InputMaybe; }>; export type BalancerPoolQuery = { __typename?: 'Query'; - pool?: - | { - __typename?: 'Pool'; - id: string; - address: string; - poolType?: string | null | undefined; - poolTypeVersion?: number | null | undefined; - symbol?: string | null | undefined; - name?: string | null | undefined; - swapFee: string; - totalWeight?: string | null | undefined; - totalSwapVolume: string; - totalSwapFee: string; - totalLiquidity: string; - totalShares: string; - swapsCount: string; - holdersCount: string; - createTime: number; - swapEnabled: boolean; - tokensList: Array; - lowerTarget?: string | null | undefined; - upperTarget?: string | null | undefined; - mainIndex?: number | null | undefined; - wrappedIndex?: number | null | undefined; - factory?: string | null | undefined; - expiryTime?: string | null | undefined; - unitSeconds?: string | null | undefined; - principalToken?: string | null | undefined; - baseToken?: string | null | undefined; - owner?: string | null | undefined; - amp?: string | null | undefined; - alpha?: string | null | undefined; - beta?: string | null | undefined; - sqrtAlpha?: string | null | undefined; - sqrtBeta?: string | null | undefined; - root3Alpha?: string | null | undefined; - c?: string | null | undefined; - s?: string | null | undefined; - lambda?: string | null | undefined; - tauAlphaX?: string | null | undefined; - tauAlphaY?: string | null | undefined; - tauBetaX?: string | null | undefined; - tauBetaY?: string | null | undefined; - u?: string | null | undefined; - v?: string | null | undefined; - w?: string | null | undefined; - z?: string | null | undefined; - dSq?: string | null | undefined; - delta?: string | null | undefined; - epsilon?: string | null | undefined; - priceRateProviders?: - | Array<{ - __typename?: 'PriceRateProvider'; - address: string; - token: { __typename?: 'PoolToken'; address: string }; - }> - | null - | undefined; - tokens?: - | Array<{ - __typename?: 'PoolToken'; - id: string; - symbol: string; - name: string; - decimals: number; - address: string; - balance: string; - weight?: string | null | undefined; - priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null | undefined; - index?: number | null | undefined; - token: { __typename?: 'Token'; latestFXPrice?: string | null | undefined }; - }> - | null - | undefined; - } - | null - | undefined; + pool?: { + __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; + } | null; }; export type BalancerPoolHistoricalLiquiditiesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerPoolHistoricalLiquiditiesQuery = { @@ -6353,12 +6325,12 @@ export type BalancerPoolHistoricalLiquiditiesQuery = { }; export type BalancerPoolSnapshotsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerPoolSnapshotsQuery = { @@ -6393,12 +6365,12 @@ export type BalancerPoolSnapshotFragment = { }; export type BalancerLatestPricesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerLatestPricesQuery = { @@ -6420,27 +6392,24 @@ export type BalancerLatestPriceQueryVariables = Exact<{ export type BalancerLatestPriceQuery = { __typename?: 'Query'; - latestPrice?: - | { - __typename?: 'LatestPrice'; - id: string; - asset: string; - price: string; - pricingAsset: string; - block: string; - poolId: { __typename?: 'Pool'; id: string }; - } - | null - | undefined; + latestPrice?: { + __typename?: 'LatestPrice'; + id: string; + asset: string; + price: string; + pricingAsset: string; + block: string; + poolId: { __typename?: 'Pool'; id: string }; + } | null; }; export type BalancerJoinExitsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerJoinExitsQuery = { @@ -6450,11 +6419,11 @@ export type BalancerJoinExitsQuery = { amounts: Array; id: string; sender: string; - block?: string | null | undefined; + block?: string | null; timestamp: number; tx: string; type: InvestType; - valueUSD?: string | null | undefined; + valueUSD?: string | null; pool: { __typename?: 'Pool'; id: string; tokensList: Array }; }>; }; @@ -6474,11 +6443,11 @@ export type BalancerJoinExitFragment = { amounts: Array; id: string; sender: string; - block?: string | null | undefined; + block?: string | null; timestamp: number; tx: string; type: InvestType; - valueUSD?: string | null | undefined; + valueUSD?: string | null; pool: { __typename?: 'Pool'; id: string; tokensList: Array }; }; @@ -6489,38 +6458,26 @@ export type BalancerPortfolioDataQueryVariables = Exact<{ export type BalancerPortfolioDataQuery = { __typename?: 'Query'; - user?: - | { - __typename?: 'User'; - id: string; - sharesOwned?: - | Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; - }> - | null - | undefined; - } - | null - | undefined; - previousUser?: - | { - __typename?: 'User'; - id: string; - sharesOwned?: - | Array<{ - __typename?: 'PoolShare'; - id: string; - balance: string; - poolId: { __typename?: 'Pool'; id: string }; - }> - | null - | undefined; - } - | null - | undefined; + user?: { + __typename?: 'User'; + id: string; + sharesOwned?: Array<{ + __typename?: 'PoolShare'; + id: string; + balance: string; + poolId: { __typename?: 'Pool'; id: string }; + }> | null; + } | null; + previousUser?: { + __typename?: 'User'; + id: string; + sharesOwned?: Array<{ + __typename?: 'PoolShare'; + id: string; + balance: string; + poolId: { __typename?: 'Pool'; id: string }; + }> | null; + } | null; }; export type BalancerPortfolioPoolsDataQueryVariables = Exact<{ @@ -6533,12 +6490,12 @@ export type BalancerPortfolioPoolsDataQuery = { __typename?: 'Pool'; id: string; address: string; - poolType?: string | null | undefined; - poolTypeVersion?: number | null | undefined; - symbol?: string | null | undefined; - name?: string | null | undefined; + poolType?: string | null; + poolTypeVersion?: number | null; + symbol?: string | null; + name?: string | null; swapFee: string; - totalWeight?: string | null | undefined; + totalWeight?: string | null; totalSwapVolume: string; totalSwapFee: string; totalLiquidity: string; @@ -6548,72 +6505,66 @@ export type BalancerPortfolioPoolsDataQuery = { createTime: number; swapEnabled: boolean; tokensList: Array; - lowerTarget?: string | null | undefined; - upperTarget?: string | null | undefined; - mainIndex?: number | null | undefined; - wrappedIndex?: number | null | undefined; - factory?: string | null | undefined; - expiryTime?: string | null | undefined; - unitSeconds?: string | null | undefined; - principalToken?: string | null | undefined; - baseToken?: string | null | undefined; - owner?: string | null | undefined; - amp?: string | null | undefined; - alpha?: string | null | undefined; - beta?: string | null | undefined; - sqrtAlpha?: string | null | undefined; - sqrtBeta?: string | null | undefined; - root3Alpha?: string | null | undefined; - c?: string | null | undefined; - s?: string | null | undefined; - lambda?: string | null | undefined; - tauAlphaX?: string | null | undefined; - tauAlphaY?: string | null | undefined; - tauBetaX?: string | null | undefined; - tauBetaY?: string | null | undefined; - u?: string | null | undefined; - v?: string | null | undefined; - w?: string | null | undefined; - z?: string | null | undefined; - dSq?: string | null | undefined; - delta?: string | null | undefined; - epsilon?: string | null | undefined; - priceRateProviders?: - | Array<{ - __typename?: 'PriceRateProvider'; - address: string; - token: { __typename?: 'PoolToken'; address: string }; - }> - | null - | undefined; - tokens?: - | Array<{ - __typename?: 'PoolToken'; - id: string; - symbol: string; - name: string; - decimals: number; - address: string; - balance: string; - weight?: string | null | undefined; - priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null | undefined; - index?: number | null | undefined; - token: { __typename?: 'Token'; latestFXPrice?: string | null | undefined }; - }> - | null - | undefined; + 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 | undefined; - poolTypeVersion?: number | null | undefined; - symbol?: string | null | undefined; - name?: string | null | undefined; + poolType?: string | null; + poolTypeVersion?: number | null; + symbol?: string | null; + name?: string | null; swapFee: string; - totalWeight?: string | null | undefined; + totalWeight?: string | null; totalSwapVolume: string; totalSwapFee: string; totalLiquidity: string; @@ -6623,71 +6574,65 @@ export type BalancerPortfolioPoolsDataQuery = { createTime: number; swapEnabled: boolean; tokensList: Array; - lowerTarget?: string | null | undefined; - upperTarget?: string | null | undefined; - mainIndex?: number | null | undefined; - wrappedIndex?: number | null | undefined; - factory?: string | null | undefined; - expiryTime?: string | null | undefined; - unitSeconds?: string | null | undefined; - principalToken?: string | null | undefined; - baseToken?: string | null | undefined; - owner?: string | null | undefined; - amp?: string | null | undefined; - alpha?: string | null | undefined; - beta?: string | null | undefined; - sqrtAlpha?: string | null | undefined; - sqrtBeta?: string | null | undefined; - root3Alpha?: string | null | undefined; - c?: string | null | undefined; - s?: string | null | undefined; - lambda?: string | null | undefined; - tauAlphaX?: string | null | undefined; - tauAlphaY?: string | null | undefined; - tauBetaX?: string | null | undefined; - tauBetaY?: string | null | undefined; - u?: string | null | undefined; - v?: string | null | undefined; - w?: string | null | undefined; - z?: string | null | undefined; - dSq?: string | null | undefined; - delta?: string | null | undefined; - epsilon?: string | null | undefined; - priceRateProviders?: - | Array<{ - __typename?: 'PriceRateProvider'; - address: string; - token: { __typename?: 'PoolToken'; address: string }; - }> - | null - | undefined; - tokens?: - | Array<{ - __typename?: 'PoolToken'; - id: string; - symbol: string; - name: string; - decimals: number; - address: string; - balance: string; - weight?: string | null | undefined; - priceRate: string; - isExemptFromYieldProtocolFee?: boolean | null | undefined; - index?: number | null | undefined; - token: { __typename?: 'Token'; latestFXPrice?: string | null | undefined }; - }> - | null - | undefined; + 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?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerTradePairSnapshotsQuery = { @@ -6700,8 +6645,8 @@ export type BalancerTradePairSnapshotsQuery = { timestamp: number; pair: { __typename?: 'TradePair'; - token0: { __typename?: 'Token'; address: string; symbol?: string | null | undefined }; - token1: { __typename?: 'Token'; address: string; symbol?: string | null | undefined }; + token0: { __typename?: 'Token'; address: string; symbol?: string | null }; + token1: { __typename?: 'Token'; address: string; symbol?: string | null }; }; }>; }; @@ -6714,18 +6659,18 @@ export type BalancerTradePairSnapshotFragment = { timestamp: number; pair: { __typename?: 'TradePair'; - token0: { __typename?: 'Token'; address: string; symbol?: string | null | undefined }; - token1: { __typename?: 'Token'; address: string; symbol?: string | null | undefined }; + token0: { __typename?: 'Token'; address: string; symbol?: string | null }; + token1: { __typename?: 'Token'; address: string; symbol?: string | null }; }; }; export type BalancerSwapsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerSwapsQuery = { @@ -6743,7 +6688,7 @@ export type BalancerSwapsQuery = { timestamp: number; tx: string; valueUSD: string; - block?: string | null | undefined; + block?: string | null; poolId: { __typename?: 'Pool'; id: string; swapFee: string }; userAddress: { __typename?: 'User'; id: string }; }>; @@ -6762,18 +6707,18 @@ export type BalancerSwapFragment = { timestamp: number; tx: string; valueUSD: string; - block?: string | null | undefined; + block?: string | null; poolId: { __typename?: 'Pool'; id: string; swapFee: string }; userAddress: { __typename?: 'User'; id: string }; }; export type BalancerAmpUpdatesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerAmpUpdatesQuery = { @@ -6800,12 +6745,12 @@ export type BalancerAmpUpdateFragment = { }; export type BalancerGradualWeightUpdatesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BalancerGradualWeightUpdatesQuery = { @@ -6843,15 +6788,12 @@ 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 - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export type PoolBalancesFragment = { @@ -6859,19 +6801,22 @@ export type PoolBalancesFragment = { id: string; address: string; totalShares: string; - tokens?: - | Array<{ __typename?: 'PoolToken'; address: string; decimals: number; balance: string; priceRate: string }> - | null - | undefined; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + decimals: number; + balance: string; + priceRate: string; + }> | null; }; export type PoolBalancesQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type PoolBalancesQuery = { @@ -6881,10 +6826,13 @@ export type PoolBalancesQuery = { id: string; address: string; totalShares: string; - tokens?: - | Array<{ __typename?: 'PoolToken'; address: string; decimals: number; balance: string; priceRate: string }> - | null - | undefined; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + decimals: number; + balance: string; + priceRate: string; + }> | null; }>; }; @@ -7554,9 +7502,10 @@ export const PoolBalancesDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -7571,6 +7520,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerProtocolData', + 'query', ); }, BalancerUser( @@ -7584,6 +7534,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerUser', + 'query', ); }, BalancerUsers( @@ -7597,6 +7548,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerUsers', + 'query', ); }, BalancerPoolShares( @@ -7610,6 +7562,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPoolShares', + 'query', ); }, BalancerTokenPrices( @@ -7623,6 +7576,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerTokenPrices', + 'query', ); }, BalancerTokens( @@ -7636,6 +7590,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerTokens', + 'query', ); }, BalancerPools( @@ -7649,6 +7604,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPools', + 'query', ); }, BalancerPool( @@ -7662,6 +7618,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPool', + 'query', ); }, BalancerPoolHistoricalLiquidities( @@ -7676,6 +7633,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = { ...requestHeaders, ...wrappedRequestHeaders }, ), 'BalancerPoolHistoricalLiquidities', + 'query', ); }, BalancerPoolSnapshots( @@ -7689,6 +7647,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPoolSnapshots', + 'query', ); }, BalancerLatestPrices( @@ -7702,6 +7661,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerLatestPrices', + 'query', ); }, BalancerLatestPrice( @@ -7715,6 +7675,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerLatestPrice', + 'query', ); }, BalancerJoinExits( @@ -7728,6 +7689,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerJoinExits', + 'query', ); }, BalancerPortfolioData( @@ -7741,6 +7703,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPortfolioData', + 'query', ); }, BalancerPortfolioPoolsData( @@ -7754,6 +7717,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPortfolioPoolsData', + 'query', ); }, BalancerTradePairSnapshots( @@ -7767,6 +7731,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerTradePairSnapshots', + 'query', ); }, BalancerSwaps( @@ -7780,6 +7745,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerSwaps', + 'query', ); }, BalancerAmpUpdates( @@ -7793,6 +7759,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerAmpUpdates', + 'query', ); }, BalancerGradualWeightUpdates( @@ -7806,6 +7773,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerGradualWeightUpdates', + 'query', ); }, BalancerGetPoolsWithActiveUpdates( @@ -7820,6 +7788,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = { ...requestHeaders, ...wrappedRequestHeaders }, ), 'BalancerGetPoolsWithActiveUpdates', + 'query', ); }, BalancerGetMeta( @@ -7833,6 +7802,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerGetMeta', + 'query', ); }, PoolBalances( @@ -7846,6 +7816,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'PoolBalances', + 'query', ); }, }; diff --git a/modules/subgraphs/beets-bar-subgraph/generated/beets-bar-subgraph-types.ts b/modules/subgraphs/beets-bar-subgraph/generated/beets-bar-subgraph-types.ts index 426f3ac96..5b0289049 100644 --- a/modules/subgraphs/beets-bar-subgraph/generated/beets-bar-subgraph-types.ts +++ b/modules/subgraphs/beets-bar-subgraph/generated/beets-bar-subgraph-types.ts @@ -497,63 +497,57 @@ export enum _SubgraphErrorPolicy_ { export type GetBeetsBarQueryVariables = Exact<{ id: Scalars['ID']; - block?: Maybe; + block?: InputMaybe; }>; export type GetBeetsBarQuery = { __typename?: 'Query'; - bar?: - | { - __typename?: 'Bar'; - id: string; - address: string; - block: string; - decimals: number; - fBeetsBurned: string; - fBeetsMinted: string; - name: string; - ratio: string; - sharedVestingTokenRevenue: string; - symbol: string; - timestamp: string; - totalSupply: string; - vestingToken: string; - vestingTokenStaked: string; - } - | null - | undefined; + bar?: { + __typename?: 'Bar'; + id: string; + address: string; + block: string; + decimals: number; + fBeetsBurned: string; + fBeetsMinted: string; + name: string; + ratio: string; + sharedVestingTokenRevenue: string; + symbol: string; + timestamp: string; + totalSupply: string; + vestingToken: string; + vestingTokenStaked: string; + } | null; }; export type GetBeetsBarUserQueryVariables = Exact<{ id: Scalars['ID']; - block?: Maybe; + block?: InputMaybe; }>; export type GetBeetsBarUserQuery = { __typename?: 'Query'; - user?: - | { - __typename?: 'User'; - id: string; - address: string; - block: string; - fBeets: string; - timestamp: string; - vestingTokenHarvested: string; - vestingTokenIn: string; - vestingTokenOut: string; - } - | null - | undefined; + user?: { + __typename?: 'User'; + id: string; + address: string; + block: string; + fBeets: string; + timestamp: string; + vestingTokenHarvested: string; + vestingTokenIn: string; + vestingTokenOut: string; + } | null; }; export type BeetsBarUsersQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BeetsBarUsersQuery = { @@ -609,74 +603,62 @@ export type BeetsBarPortfolioDataQueryVariables = Exact<{ export type BeetsBarPortfolioDataQuery = { __typename?: 'Query'; - beetsBar?: - | { - __typename?: 'Bar'; - id: string; - address: string; - block: string; - decimals: number; - fBeetsBurned: string; - fBeetsMinted: string; - name: string; - ratio: string; - sharedVestingTokenRevenue: string; - symbol: string; - timestamp: string; - totalSupply: string; - vestingToken: string; - vestingTokenStaked: string; - } - | null - | undefined; - previousBeetsBar?: - | { - __typename?: 'Bar'; - id: string; - address: string; - block: string; - decimals: number; - fBeetsBurned: string; - fBeetsMinted: string; - name: string; - ratio: string; - sharedVestingTokenRevenue: string; - symbol: string; - timestamp: string; - totalSupply: string; - vestingToken: string; - vestingTokenStaked: string; - } - | null - | undefined; - beetsBarUser?: - | { - __typename?: 'User'; - id: string; - address: string; - block: string; - fBeets: string; - timestamp: string; - vestingTokenHarvested: string; - vestingTokenIn: string; - vestingTokenOut: string; - } - | null - | undefined; - previousBeetsBarUser?: - | { - __typename?: 'User'; - id: string; - address: string; - block: string; - fBeets: string; - timestamp: string; - vestingTokenHarvested: string; - vestingTokenIn: string; - vestingTokenOut: string; - } - | null - | undefined; + beetsBar?: { + __typename?: 'Bar'; + id: string; + address: string; + block: string; + decimals: number; + fBeetsBurned: string; + fBeetsMinted: string; + name: string; + ratio: string; + sharedVestingTokenRevenue: string; + symbol: string; + timestamp: string; + totalSupply: string; + vestingToken: string; + vestingTokenStaked: string; + } | null; + previousBeetsBar?: { + __typename?: 'Bar'; + id: string; + address: string; + block: string; + decimals: number; + fBeetsBurned: string; + fBeetsMinted: string; + name: string; + ratio: string; + sharedVestingTokenRevenue: string; + symbol: string; + timestamp: string; + totalSupply: string; + vestingToken: string; + vestingTokenStaked: string; + } | null; + beetsBarUser?: { + __typename?: 'User'; + id: string; + address: string; + block: string; + fBeets: string; + timestamp: string; + vestingTokenHarvested: string; + vestingTokenIn: string; + vestingTokenOut: string; + } | null; + previousBeetsBarUser?: { + __typename?: 'User'; + id: string; + address: string; + block: string; + fBeets: string; + timestamp: string; + vestingTokenHarvested: string; + vestingTokenIn: string; + vestingTokenOut: string; + } | null; }; export type BeetsBarDataQueryVariables = Exact<{ @@ -686,61 +668,52 @@ export type BeetsBarDataQueryVariables = Exact<{ export type BeetsBarDataQuery = { __typename?: 'Query'; - beetsBar?: - | { - __typename?: 'Bar'; - id: string; - address: string; - block: string; - decimals: number; - fBeetsBurned: string; - fBeetsMinted: string; - name: string; - ratio: string; - sharedVestingTokenRevenue: string; - symbol: string; - timestamp: string; - totalSupply: string; - vestingToken: string; - vestingTokenStaked: string; - } - | null - | undefined; - previousBeetsBar?: - | { - __typename?: 'Bar'; - id: string; - address: string; - block: string; - decimals: number; - fBeetsBurned: string; - fBeetsMinted: string; - name: string; - ratio: string; - sharedVestingTokenRevenue: string; - symbol: string; - timestamp: string; - totalSupply: string; - vestingToken: string; - vestingTokenStaked: string; - } - | null - | undefined; + beetsBar?: { + __typename?: 'Bar'; + id: string; + address: string; + block: string; + decimals: number; + fBeetsBurned: string; + fBeetsMinted: string; + name: string; + ratio: string; + sharedVestingTokenRevenue: string; + symbol: string; + timestamp: string; + totalSupply: string; + vestingToken: string; + vestingTokenStaked: string; + } | null; + previousBeetsBar?: { + __typename?: 'Bar'; + id: string; + address: string; + block: string; + decimals: number; + fBeetsBurned: string; + fBeetsMinted: string; + name: string; + ratio: string; + sharedVestingTokenRevenue: string; + symbol: string; + timestamp: string; + totalSupply: string; + vestingToken: string; + vestingTokenStaked: string; + } | null; }; export type BeetsBarGetMetaQueryVariables = Exact<{ [key: string]: never }>; export type BeetsBarGetMetaQuery = { __typename?: 'Query'; - meta?: - | { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } - | null - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export const BeetsBarFragmentDoc = gql` @@ -855,9 +828,10 @@ export const BeetsBarGetMetaDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -872,6 +846,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'GetBeetsBar', + 'query', ); }, GetBeetsBarUser( @@ -885,6 +860,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'GetBeetsBarUser', + 'query', ); }, BeetsBarUsers( @@ -898,6 +874,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BeetsBarUsers', + 'query', ); }, BeetsBarPortfolioData( @@ -911,6 +888,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BeetsBarPortfolioData', + 'query', ); }, BeetsBarData( @@ -924,6 +902,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BeetsBarData', + 'query', ); }, BeetsBarGetMeta( @@ -937,6 +916,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BeetsBarGetMeta', + 'query', ); }, }; diff --git a/modules/subgraphs/blocks-subgraph/generated/blocks-subgraph-types.ts b/modules/subgraphs/blocks-subgraph/generated/blocks-subgraph-types.ts index a8e25e133..651c08324 100644 --- a/modules/subgraphs/blocks-subgraph/generated/blocks-subgraph-types.ts +++ b/modules/subgraphs/blocks-subgraph/generated/blocks-subgraph-types.ts @@ -360,12 +360,12 @@ export enum _SubgraphErrorPolicy_ { } export type BlocksQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type BlocksQuery = { @@ -408,9 +408,10 @@ export const BlocksDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -422,6 +423,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Blocks', + 'query', ); }, }; diff --git a/modules/subgraphs/gauge-subgraph/generated/gauge-subgraph-types.ts b/modules/subgraphs/gauge-subgraph/generated/gauge-subgraph-types.ts index af21cdc78..8016f0a57 100644 --- a/modules/subgraphs/gauge-subgraph/generated/gauge-subgraph-types.ts +++ b/modules/subgraphs/gauge-subgraph/generated/gauge-subgraph-types.ts @@ -2318,11 +2318,11 @@ export enum _SubgraphErrorPolicy_ { } export type GaugeLiquidityGaugesQueryVariables = Exact<{ - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - skip?: Maybe; - where?: Maybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }>; export type GaugeLiquidityGaugesQuery = { @@ -2330,56 +2330,48 @@ export type GaugeLiquidityGaugesQuery = { liquidityGauges: Array<{ __typename?: 'LiquidityGauge'; id: string; - poolId?: string | null | undefined; + poolId?: string | null; poolAddress: string; totalSupply: string; - streamer?: string | null | undefined; + streamer?: string | null; isPreferentialGauge: boolean; isKilled: boolean; - tokens?: - | Array<{ - __typename?: 'RewardToken'; - id: string; - decimals: number; - symbol: string; - rate?: string | null | undefined; - periodFinish?: string | null | undefined; - }> - | null - | undefined; - shares?: - | Array<{ __typename?: 'GaugeShare'; balance: string; user: { __typename?: 'User'; id: string } }> - | null - | undefined; - gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null | undefined; + tokens?: Array<{ + __typename?: 'RewardToken'; + id: string; + decimals: number; + symbol: string; + rate?: string | null; + periodFinish?: string | null; + }> | null; + shares?: Array<{ + __typename?: 'GaugeShare'; + balance: string; + user: { __typename?: 'User'; id: string }; + }> | null; + gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null; }>; }; export type GaugeFragment = { __typename?: 'LiquidityGauge'; id: string; - poolId?: string | null | undefined; + poolId?: string | null; poolAddress: string; totalSupply: string; - streamer?: string | null | undefined; + streamer?: string | null; isPreferentialGauge: boolean; isKilled: boolean; - tokens?: - | Array<{ - __typename?: 'RewardToken'; - id: string; - decimals: number; - symbol: string; - rate?: string | null | undefined; - periodFinish?: string | null | undefined; - }> - | null - | undefined; - shares?: - | Array<{ __typename?: 'GaugeShare'; balance: string; user: { __typename?: 'User'; id: string } }> - | null - | undefined; - gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null | undefined; + tokens?: Array<{ + __typename?: 'RewardToken'; + id: string; + decimals: number; + symbol: string; + rate?: string | null; + periodFinish?: string | null; + }> | null; + shares?: Array<{ __typename?: 'GaugeShare'; balance: string; user: { __typename?: 'User'; id: string } }> | null; + gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null; }; export type GaugeLiquidityGaugeAddressesQueryVariables = Exact<{ [key: string]: never }>; @@ -2395,47 +2387,38 @@ export type GaugeUserGaugesQueryVariables = Exact<{ export type GaugeUserGaugesQuery = { __typename?: 'Query'; - user?: - | { - __typename?: 'User'; - id: string; - gaugeShares?: - | Array<{ - __typename?: 'GaugeShare'; - balance: string; - gauge: { - __typename?: 'LiquidityGauge'; - id: string; - poolId?: string | null | undefined; - isPreferentialGauge: boolean; - isKilled: boolean; - tokens?: - | Array<{ - __typename?: 'RewardToken'; - id: string; - decimals: number; - symbol: string; - rate?: string | null | undefined; - periodFinish?: string | null | undefined; - }> - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + user?: { + __typename?: 'User'; + id: string; + gaugeShares?: Array<{ + __typename?: 'GaugeShare'; + balance: string; + gauge: { + __typename?: 'LiquidityGauge'; + id: string; + poolId?: string | null; + isPreferentialGauge: boolean; + isKilled: boolean; + tokens?: Array<{ + __typename?: 'RewardToken'; + id: string; + decimals: number; + symbol: string; + rate?: string | null; + periodFinish?: string | null; + }> | null; + }; + }> | null; + } | null; }; export type GaugeSharesQueryVariables = Exact<{ - block?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - skip?: Maybe; - where?: Maybe; + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }>; export type GaugeSharesQuery = { @@ -2447,7 +2430,7 @@ export type GaugeSharesQuery = { gauge: { __typename?: 'LiquidityGauge'; id: string; - poolId?: string | null | undefined; + poolId?: string | null; poolAddress: string; isPreferentialGauge: boolean; isKilled: boolean; @@ -2463,7 +2446,7 @@ export type GaugeShareFragment = { gauge: { __typename?: 'LiquidityGauge'; id: string; - poolId?: string | null | undefined; + poolId?: string | null; poolAddress: string; isPreferentialGauge: boolean; isKilled: boolean; @@ -2475,24 +2458,21 @@ export type GaugeGetMetaQueryVariables = Exact<{ [key: string]: never }>; export type GaugeGetMetaQuery = { __typename?: 'Query'; - meta?: - | { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } - | null - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export type VotingEscrowLocksQueryVariables = Exact<{ - block?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - skip?: Maybe; - where?: Maybe; + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }>; export type VotingEscrowLocksQuery = { @@ -2506,12 +2486,12 @@ export type VotingEscrowLocksQuery = { }; export type RootGaugesQueryVariables = Exact<{ - block?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - skip?: Maybe; - where?: Maybe; + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }>; export type RootGaugesQuery = { @@ -2521,7 +2501,7 @@ export type RootGaugesQuery = { id: string; chain: Chain; recipient: string; - gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null | undefined; + gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null; }>; }; @@ -2530,11 +2510,11 @@ export type RootGaugeFragment = { id: string; chain: Chain; recipient: string; - gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null | undefined; + gauge?: { __typename?: 'Gauge'; addedTimestamp: number } | null; }; export type LiquidityGaugesQueryVariables = Exact<{ - ids?: Maybe | Scalars['ID']>; + ids?: InputMaybe | Scalars['ID']>; }>; export type LiquidityGaugesQuery = { @@ -2730,9 +2710,10 @@ export const LiquidityGaugesDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -2747,6 +2728,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'GaugeLiquidityGauges', + 'query', ); }, GaugeLiquidityGaugeAddresses( @@ -2760,6 +2742,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'GaugeLiquidityGaugeAddresses', + 'query', ); }, GaugeUserGauges( @@ -2773,6 +2756,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'GaugeUserGauges', + 'query', ); }, GaugeShares( @@ -2786,6 +2770,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'GaugeShares', + 'query', ); }, GaugeGetMeta( @@ -2799,6 +2784,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'GaugeGetMeta', + 'query', ); }, VotingEscrowLocks( @@ -2812,6 +2798,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'VotingEscrowLocks', + 'query', ); }, RootGauges( @@ -2825,6 +2812,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'RootGauges', + 'query', ); }, LiquidityGauges( @@ -2838,6 +2826,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'LiquidityGauges', + 'query', ); }, }; diff --git a/modules/subgraphs/masterchef-subgraph/generated/masterchef-subgraph-types.ts b/modules/subgraphs/masterchef-subgraph/generated/masterchef-subgraph-types.ts index f42ae54e8..73114e6da 100644 --- a/modules/subgraphs/masterchef-subgraph/generated/masterchef-subgraph-types.ts +++ b/modules/subgraphs/masterchef-subgraph/generated/masterchef-subgraph-types.ts @@ -988,12 +988,12 @@ export enum _SubgraphErrorPolicy_ { } export type MasterchefUsersQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type MasterchefUsersQuery = { @@ -1006,7 +1006,7 @@ export type MasterchefUsersQuery = { rewardDebt: string; beetsHarvested: string; timestamp: string; - pool?: { __typename?: 'Pool'; id: string; pair: string } | null | undefined; + pool?: { __typename?: 'Pool'; id: string; pair: string } | null; }>; }; @@ -1018,16 +1018,16 @@ export type FarmUserFragment = { rewardDebt: string; beetsHarvested: string; timestamp: string; - pool?: { __typename?: 'Pool'; id: string; pair: string } | null | undefined; + pool?: { __typename?: 'Pool'; id: string; pair: string } | null; }; export type MasterchefsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type MasterchefsQuery = { @@ -1045,12 +1045,12 @@ export type MasterchefsQuery = { }; export type MasterchefFarmsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type MasterchefFarmsQuery = { @@ -1067,20 +1067,17 @@ export type MasterchefFarmsQuery = { timestamp: string; block: string; masterChef: { __typename?: 'MasterChef'; id: string; totalAllocPoint: string; beetsPerBlock: string }; - rewarder?: - | { - __typename?: 'Rewarder'; - id: string; - rewardTokens: Array<{ - __typename?: 'RewardToken'; - token: string; - decimals: number; - symbol: string; - rewardPerSecond: string; - }>; - } - | null - | undefined; + rewarder?: { + __typename?: 'Rewarder'; + id: string; + rewardTokens: Array<{ + __typename?: 'RewardToken'; + token: string; + decimals: number; + symbol: string; + rewardPerSecond: string; + }>; + } | null; }>; }; @@ -1096,20 +1093,17 @@ export type FarmFragment = { timestamp: string; block: string; masterChef: { __typename?: 'MasterChef'; id: string; totalAllocPoint: string; beetsPerBlock: string }; - rewarder?: - | { - __typename?: 'Rewarder'; - id: string; - rewardTokens: Array<{ - __typename?: 'RewardToken'; - token: string; - decimals: number; - symbol: string; - rewardPerSecond: string; - }>; - } - | null - | undefined; + rewarder?: { + __typename?: 'Rewarder'; + id: string; + rewardTokens: Array<{ + __typename?: 'RewardToken'; + token: string; + decimals: number; + symbol: string; + rewardPerSecond: string; + }>; + } | null; }; export type MasterchefPortfolioDataQueryVariables = Exact<{ @@ -1127,7 +1121,7 @@ export type MasterchefPortfolioDataQuery = { rewardDebt: string; beetsHarvested: string; timestamp: string; - pool?: { __typename?: 'Pool'; id: string; pair: string } | null | undefined; + pool?: { __typename?: 'Pool'; id: string; pair: string } | null; }>; previousFarmUsers: Array<{ __typename?: 'User'; @@ -1137,7 +1131,7 @@ export type MasterchefPortfolioDataQuery = { rewardDebt: string; beetsHarvested: string; timestamp: string; - pool?: { __typename?: 'Pool'; id: string; pair: string } | null | undefined; + pool?: { __typename?: 'Pool'; id: string; pair: string } | null; }>; }; @@ -1145,15 +1139,12 @@ export type MasterchefGetMetaQueryVariables = Exact<{ [key: string]: never }>; export type MasterchefGetMetaQuery = { __typename?: 'Query'; - meta?: - | { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } - | null - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export const FarmUserFragmentDoc = gql` @@ -1294,9 +1285,10 @@ export const MasterchefGetMetaDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -1311,6 +1303,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'MasterchefUsers', + 'query', ); }, Masterchefs( @@ -1324,6 +1317,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Masterchefs', + 'query', ); }, MasterchefFarms( @@ -1337,6 +1331,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'MasterchefFarms', + 'query', ); }, MasterchefPortfolioData( @@ -1350,6 +1345,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'MasterchefPortfolioData', + 'query', ); }, MasterchefGetMeta( @@ -1363,6 +1359,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'MasterchefGetMeta', + 'query', ); }, }; diff --git a/modules/subgraphs/reliquary-subgraph/generated/reliquary-subgraph-types.ts b/modules/subgraphs/reliquary-subgraph/generated/reliquary-subgraph-types.ts index 45200c463..800971a45 100644 --- a/modules/subgraphs/reliquary-subgraph/generated/reliquary-subgraph-types.ts +++ b/modules/subgraphs/reliquary-subgraph/generated/reliquary-subgraph-types.ts @@ -2068,39 +2068,36 @@ export enum _SubgraphErrorPolicy_ { export type ReliquaryQueryVariables = Exact<{ id: Scalars['ID']; - block?: Maybe; + block?: InputMaybe; }>; export type ReliquaryQuery = { __typename?: 'Query'; - reliquary?: - | { - __typename?: 'Reliquary'; - id: string; - totalAllocPoint: number; - poolCount: number; - relicCount: number; - emissionToken: { - __typename?: 'Token'; - id: string; - address: string; - name: string; - symbol: string; - decimals: number; - }; - emissionCurve: { __typename?: 'EmissionCurve'; id: string; address: string; rewardPerSecond: string }; - } - | null - | undefined; + reliquary?: { + __typename?: 'Reliquary'; + id: string; + totalAllocPoint: number; + poolCount: number; + relicCount: number; + emissionToken: { + __typename?: 'Token'; + id: string; + address: string; + name: string; + symbol: string; + decimals: number; + }; + emissionCurve: { __typename?: 'EmissionCurve'; id: string; address: string; rewardPerSecond: string }; + } | null; }; export type ReliquaryRelicsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type ReliquaryRelicsQuery = { @@ -2119,12 +2116,12 @@ export type ReliquaryRelicsQuery = { }; export type ReliquaryUsersQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type ReliquaryUsersQuery = { @@ -2147,12 +2144,12 @@ export type ReliquaryUsersQuery = { }; export type ReliquaryPoolsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type ReliquaryPoolsQuery = { @@ -2166,25 +2163,22 @@ export type ReliquaryPoolsQuery = { totalBalance: string; relicCount: number; allocPoint: number; - rewarder?: - | { - __typename?: 'Rewarder'; - id: string; - emissions: Array<{ - __typename?: 'RewarderEmission'; - rewardPerSecond: string; - rewardToken: { - __typename?: 'Token'; - id: string; - address: string; - name: string; - symbol: string; - decimals: number; - }; - }>; - } - | null - | undefined; + rewarder?: { + __typename?: 'Rewarder'; + id: string; + emissions: Array<{ + __typename?: 'RewarderEmission'; + rewardPerSecond: string; + rewardToken: { + __typename?: 'Token'; + id: string; + address: string; + name: string; + symbol: string; + decimals: number; + }; + }>; + } | null; levels: Array<{ __typename?: 'PoolLevel'; level: number; @@ -2196,12 +2190,12 @@ export type ReliquaryPoolsQuery = { }; export type ReliquaryFarmSnapshotsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type ReliquaryFarmSnapshotsQuery = { @@ -2219,12 +2213,12 @@ export type ReliquaryFarmSnapshotsQuery = { }; export type ReliquaryRelicSnapshotsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type ReliquaryRelicSnapshotsQuery = { @@ -2243,12 +2237,12 @@ export type ReliquaryRelicSnapshotsQuery = { }; export type ReliquaryPoolLevelsQueryVariables = Exact<{ - skip?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - where?: Maybe; - block?: Maybe; + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; }>; export type ReliquaryPoolLevelsQuery = { @@ -2300,25 +2294,22 @@ export type ReliquaryFarmFragment = { totalBalance: string; relicCount: number; allocPoint: number; - rewarder?: - | { - __typename?: 'Rewarder'; - id: string; - emissions: Array<{ - __typename?: 'RewarderEmission'; - rewardPerSecond: string; - rewardToken: { - __typename?: 'Token'; - id: string; - address: string; - name: string; - symbol: string; - decimals: number; - }; - }>; - } - | null - | undefined; + rewarder?: { + __typename?: 'Rewarder'; + id: string; + emissions: Array<{ + __typename?: 'RewarderEmission'; + rewardPerSecond: string; + rewardToken: { + __typename?: 'Token'; + id: string; + address: string; + name: string; + symbol: string; + decimals: number; + }; + }>; + } | null; levels: Array<{ __typename?: 'PoolLevel'; level: number; @@ -2355,15 +2346,12 @@ export type ReliquaryGetMetaQueryVariables = Exact<{ [key: string]: never }>; export type ReliquaryGetMetaQuery = { __typename?: 'Query'; - meta?: - | { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } - | null - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export const ReliquaryRelicFragmentDoc = gql` @@ -2614,9 +2602,10 @@ export const ReliquaryGetMetaDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -2631,6 +2620,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Reliquary', + 'query', ); }, ReliquaryRelics( @@ -2644,6 +2634,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ReliquaryRelics', + 'query', ); }, ReliquaryUsers( @@ -2657,6 +2648,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ReliquaryUsers', + 'query', ); }, ReliquaryPools( @@ -2670,6 +2662,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ReliquaryPools', + 'query', ); }, ReliquaryFarmSnapshots( @@ -2683,6 +2676,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ReliquaryFarmSnapshots', + 'query', ); }, ReliquaryRelicSnapshots( @@ -2696,6 +2690,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ReliquaryRelicSnapshots', + 'query', ); }, ReliquaryPoolLevels( @@ -2709,6 +2704,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ReliquaryPoolLevels', + 'query', ); }, ReliquaryGetMeta( @@ -2722,6 +2718,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'ReliquaryGetMeta', + 'query', ); }, }; diff --git a/modules/subgraphs/veBal-locks-subgraph/generated/veBal-locks-subgraph-types.ts b/modules/subgraphs/veBal-locks-subgraph/generated/veBal-locks-subgraph-types.ts index 20be807a0..87b361092 100644 --- a/modules/subgraphs/veBal-locks-subgraph/generated/veBal-locks-subgraph-types.ts +++ b/modules/subgraphs/veBal-locks-subgraph/generated/veBal-locks-subgraph-types.ts @@ -2318,12 +2318,12 @@ export enum _SubgraphErrorPolicy_ { } export type VotingEscrowLocksQueryVariables = Exact<{ - block?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - skip?: Maybe; - where?: Maybe; + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }>; export type VotingEscrowLocksQuery = { @@ -2337,12 +2337,12 @@ export type VotingEscrowLocksQuery = { }; export type LockSnapshotsQueryVariables = Exact<{ - block?: Maybe; - first?: Maybe; - orderBy?: Maybe; - orderDirection?: Maybe; - skip?: Maybe; - where?: Maybe; + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }>; export type LockSnapshotsQuery = { @@ -2361,15 +2361,12 @@ export type VebalGetMetaQueryVariables = Exact<{ [key: string]: never }>; export type VebalGetMetaQuery = { __typename?: 'Query'; - meta?: - | { - __typename?: '_Meta_'; - deployment: string; - hasIndexingErrors: boolean; - block: { __typename?: '_Block_'; number: number }; - } - | null - | undefined; + meta?: { + __typename?: '_Meta_'; + deployment: string; + hasIndexingErrors: boolean; + block: { __typename?: '_Block_'; number: number }; + } | null; }; export const VotingEscrowLocksDocument = gql` @@ -2439,9 +2436,10 @@ export const VebalGetMetaDocument = gql` export type SdkFunctionWrapper = ( action: (requestHeaders?: Record) => Promise, operationName: string, + operationType?: string, ) => Promise; -const defaultWrapper: SdkFunctionWrapper = (action, _operationName) => action(); +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { @@ -2456,6 +2454,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'VotingEscrowLocks', + 'query', ); }, LockSnapshots( @@ -2469,6 +2468,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'LockSnapshots', + 'query', ); }, VebalGetMeta( @@ -2482,6 +2482,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'VebalGetMeta', + 'query', ); }, }; diff --git a/prisma/migrations/20241220143822_erc4626_unwrap_rate/migration.sql b/prisma/migrations/20241220143822_erc4626_unwrap_rate/migration.sql new file mode 100644 index 000000000..e0bf71465 --- /dev/null +++ b/prisma/migrations/20241220143822_erc4626_unwrap_rate/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "PrismaToken" ADD COLUMN "unwrapRate" TEXT NOT NULL DEFAULT '1'; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index bb9b7f430..f5338d69f 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -725,6 +725,7 @@ model PrismaToken { underlyingTokenAddress String? isBufferAllowed Boolean @default(true) + unwrapRate String @default("1") walletBalances PrismaUserWalletBalance[] stakedBalances PrismaUserStakedBalance[] diff --git a/prisma/schema/token.prisma b/prisma/schema/token.prisma index c9b855e60..2330a1764 100644 --- a/prisma/schema/token.prisma +++ b/prisma/schema/token.prisma @@ -31,6 +31,7 @@ model PrismaToken { underlyingTokenAddress String? isBufferAllowed Boolean @default(true) + unwrapRate String @default("1") walletBalances PrismaUserWalletBalance[] stakedBalances PrismaUserStakedBalance[] diff --git a/schema.ts b/schema.ts index e786a6cd9..ca2dc2648 100644 --- a/schema.ts +++ b/schema.ts @@ -2161,6 +2161,8 @@ export interface GqlToken { twitterUsername?: Maybe; /** The ERC4626 underlying token address, if applicable. */ underlyingTokenAddress?: Maybe; + /** If it is an ERC4626 token, it represents the rate between wrapped/underlying. */ + unwrapRate: Scalars['BigDecimal']; /** The website URL of the token */ websiteUrl?: Maybe; } @@ -4985,6 +4987,7 @@ export type GqlTokenResolvers< tradable?: Resolver; twitterUsername?: Resolver, ParentType, ContextType>; underlyingTokenAddress?: Resolver, ParentType, ContextType>; + unwrapRate?: Resolver; websiteUrl?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }>; diff --git a/test/factories/prismaToken.factory.ts b/test/factories/prismaToken.factory.ts index 86444f170..aec136c32 100644 --- a/test/factories/prismaToken.factory.ts +++ b/test/factories/prismaToken.factory.ts @@ -46,5 +46,6 @@ export const prismaTokenFactory = Factory.define(() => { excludedFromCoingecko: false, underlyingTokenAddress: null, isBufferAllowed: true, + unwrapRate: '1', }; });