diff --git a/.changeset/unlucky-yaks-train.md b/.changeset/unlucky-yaks-train.md new file mode 100644 index 000000000..ee162f64e --- /dev/null +++ b/.changeset/unlucky-yaks-train.md @@ -0,0 +1,5 @@ +--- +'backend': patch +--- + +SOR - Add StablePool for Balancer v2 diff --git a/modules/sor/balancer-sor.integration.test.ts b/modules/sor/balancer-sor.integration.test.ts index 4fde1e0ed..0178a8cf3 100644 --- a/modules/sor/balancer-sor.integration.test.ts +++ b/modules/sor/balancer-sor.integration.test.ts @@ -11,7 +11,6 @@ import { ANVIL_NETWORKS, startFork, stopAnvilForks } from '../../test/anvil/anvi import { prismaPoolDynamicDataFactory, prismaPoolFactory, - prismaPoolTokenDynamicDataFactory, prismaPoolTokenFactory, hookFactory, } from '../../test/factories'; diff --git a/modules/sor/sor-debug.test.ts b/modules/sor/sor-debug.test.ts index 5b687d0f5..3a0893b32 100644 --- a/modules/sor/sor-debug.test.ts +++ b/modules/sor/sor-debug.test.ts @@ -9,7 +9,7 @@ import { sorService } from './sor.service'; describe('sor debugging', () => { it('sor v2', async () => { const useProtocolVersion = 2; - const chain = Chain.ARBITRUM; + const chain = Chain.MAINNET; const chainId = Object.keys(chainIdToChain).find((key) => chainIdToChain[key] === chain) as string; initRequestScopedContext(); @@ -22,10 +22,10 @@ describe('sor debugging', () => { const swaps = await sorService.getSorSwapPaths({ chain, - tokenIn: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1', // weth - tokenOut: '0x5979d7b546e38e414f7e9822514be443a4800529', // wsteth + tokenIn: '0x865377367054516e17014ccded1e7d814edc9ce4', // dola + tokenOut: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // usdc swapType: 'EXACT_IN', - swapAmount: '250', + swapAmount: '100', useProtocolVersion, // callDataInput: { // receiver: '0xb5e6b895734409Df411a052195eb4EE7e40d8696', diff --git a/modules/sor/sorV2/lib/poolsV2/index.ts b/modules/sor/sorV2/lib/poolsV2/index.ts index c5006df24..b60c4ed8d 100644 --- a/modules/sor/sorV2/lib/poolsV2/index.ts +++ b/modules/sor/sorV2/lib/poolsV2/index.ts @@ -4,4 +4,5 @@ export * from './gyro2/gyro2Pool'; export * from './gyro3/gyro3Pool'; export * from './gyroE/gyroEPool'; export * from './metastable/metastablePool'; +export * from './stable/stablePool'; export * from './weighted/weightedPool'; diff --git a/modules/sor/sorV2/lib/poolsV2/stable/stablePool.integration.test.ts b/modules/sor/sorV2/lib/poolsV2/stable/stablePool.integration.test.ts new file mode 100644 index 000000000..5ae9c308c --- /dev/null +++ b/modules/sor/sorV2/lib/poolsV2/stable/stablePool.integration.test.ts @@ -0,0 +1,139 @@ +// yarn vitest poolsV2/stable/stablePool.integration.test.ts + +/** + * Test Data: + * + * In order to properly compare SOR quotes vs SDK queries, we need to setup test data from a specific blockNumber. + * Although the API does not provide that functionality, we can use subgraph to achieve it. + * These tests run against the 12th testnet deployment and these are their respective subgraphs: + * - data common to all pools: [balancer subgraph](https://api.studio.thegraph.com/query/75376/balancer-v3-sepolia/version/latest/graphql) + * - tokens (address, balance, decimals) + * - totalShares + * - swapFee + * - data specific to each pool type: [pools subgraph](https://api.studio.thegraph.com/query/75376/balancer-pools-v3-sepolia/version/latest/graphql) + * - weight + * - amp + * The only item missing from subgraph is priceRate, which can be fetched from a Tenderly simulation (getPoolTokenRates) + * against the VaultExplorer contract (0xEB15EBBF9C1a4D7D243d57dE447Df0b97C40c324). + * + * TODO: improve test data setup by creating a script that fetches all necessary data automatically for a given blockNumber. + */ + +import { ExactInQueryOutput, Swap, SwapKind, Token, Address, Path } from '@balancer/sdk'; + +import { createTestClient, Hex, http, TestClient } from 'viem'; +import { mainnet } from 'viem/chains'; + +import { PathWithAmount } from '../../path'; +import { sorGetPathsWithPools } from '../../static'; +import { getOutputAmount } from '../../utils/helpers'; +import { chainToChainId } from '../../../../../network/chain-id-to-chain'; +import { ANVIL_NETWORKS, startFork } from '../../../../../../test/anvil/anvil-global-setup'; +import { + prismaPoolDynamicDataFactory, + prismaPoolFactory, + prismaPoolTokenFactory, +} from '../../../../../../test/factories'; +import { Chain } from '@prisma/client'; + +const protocolVersion = 2; + +describe('Balancer SOR Integration Tests', () => { + let rpcUrl: string; + let paths: PathWithAmount[]; + let sdkSwap: Swap; + let snapshot: Hex; + let client: TestClient; + + beforeAll(async () => { + // start fork to run queries against + ({ rpcUrl } = await startFork(ANVIL_NETWORKS.MAINNET)); + client = createTestClient({ + mode: 'anvil', + chain: mainnet, + transport: http(rpcUrl), + }); + snapshot = await client.snapshot(); + }); + + beforeEach(async () => { + await client.revert({ + id: snapshot, + }); + snapshot = await client.snapshot(); + }); + + describe('Stable Pool Path', () => { + beforeAll(async () => { + // setup mock pool data for a stable pool + const poolAddress = '0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea6'; + const DOLA = prismaPoolTokenFactory.build({ + address: '0x865377367054516e17014ccded1e7d814edc9ce4', + balance: '2767570.699080547814532726', + priceRate: '1', + }); + const USDC = prismaPoolTokenFactory.build({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + token: { decimals: 6 }, + balance: '1207675.308342', + priceRate: '1', + }); + const prismaStablePool = prismaPoolFactory.stable('200').build({ + chain: Chain.MAINNET, + id: '0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea6000200000000000000000426', + address: poolAddress, + tokens: [DOLA, USDC], + dynamicData: prismaPoolDynamicDataFactory.build({ + totalShares: '3950733.111397308216047101', + swapFee: '0.0004', + }), + }); + + // get SOR paths + const tIn = new Token( + parseFloat(chainToChainId[DOLA.token.chain]), + DOLA.address as Address, + DOLA.token.decimals, + ); + const tOut = new Token( + parseFloat(chainToChainId[USDC.token.chain]), + USDC.address as Address, + USDC.token.decimals, + ); + const amountIn = BigInt(100e18); + paths = (await sorGetPathsWithPools( + tIn, + tOut, + SwapKind.GivenIn, + amountIn, + [prismaStablePool], + protocolVersion, + )) as PathWithAmount[]; + + const swapPaths: Path[] = paths.map((path) => ({ + protocolVersion, + inputAmountRaw: path.inputAmount.amount, + outputAmountRaw: path.outputAmount.amount, + tokens: path.tokens.map((token) => ({ + address: token.address, + decimals: token.decimals, + })), + pools: path.pools.map((pool) => pool.id), + })); + + // build SDK swap from SOR paths + sdkSwap = new Swap({ + chainId: parseFloat(chainToChainId['MAINNET']), + paths: swapPaths, + swapKind: SwapKind.GivenIn, + }); + }); + + test('SOR quote should match swap query', async () => { + const returnAmountSOR = getOutputAmount(paths); + const queryOutput = await sdkSwap.query(rpcUrl); + const returnAmountQuery = (queryOutput as ExactInQueryOutput).expectedAmountOut; + expect(returnAmountQuery.amount).toEqual(returnAmountSOR.amount); + }); + }); +}); diff --git a/modules/sor/sorV2/lib/poolsV2/stable/stablePool.ts b/modules/sor/sorV2/lib/poolsV2/stable/stablePool.ts new file mode 100644 index 000000000..e279404f0 --- /dev/null +++ b/modules/sor/sorV2/lib/poolsV2/stable/stablePool.ts @@ -0,0 +1,197 @@ +import { Chain } from '@prisma/client'; +import { Address, Hex, parseEther, parseUnits } from 'viem'; +import { PrismaPoolAndHookWithDynamic } from '../../../../../../prisma/prisma-types'; +import { _calcInGivenOut, _calcOutGivenIn, _calculateInvariant } from '../composableStable/stableMath'; +import { MathSol, WAD } from '../../utils/math'; +import { PoolType, SwapKind, Token, TokenAmount } from '@balancer/sdk'; +import { chainToChainId as chainToIdMap } from '../../../../../network/chain-id-to-chain'; +import { StableData } from '../../../../../pool/subgraph-mapper'; +import { TokenPairData } from '../../../../../pool/lib/pool-on-chain-tokenpair-data'; +import { BasePool } from '../basePool'; +import { BasePoolToken } from '../basePoolToken'; + +export class StablePool implements BasePool { + public readonly chain: Chain; + public readonly id: Hex; + public readonly address: string; + public readonly poolType: PoolType = PoolType.Stable; + public readonly amp: bigint; + public readonly swapFee: bigint; + public readonly tokens: BasePoolToken[]; + public readonly tokenPairs: TokenPairData[]; + + private readonly tokenMap: Map; + + static fromPrismaPool(pool: PrismaPoolAndHookWithDynamic): StablePool { + const poolTokens: BasePoolToken[] = []; + + if (!pool.dynamicData) throw new Error('Stable pool has no dynamic data'); + + for (const poolToken of pool.tokens) { + const token = new Token( + parseFloat(chainToIdMap[pool.chain]), + poolToken.address as Address, + poolToken.token.decimals, + poolToken.token.symbol, + poolToken.token.name, + ); + const scale18 = parseEther(poolToken.balance); + const tokenAmount = TokenAmount.fromScale18Amount(token, scale18); + + poolTokens.push(new BasePoolToken(token, tokenAmount.amount, poolToken.index)); + } + + const amp = parseUnits((pool.typeData as StableData).amp, 3); + + return new StablePool( + pool.id as Hex, + pool.address, + pool.chain, + amp, + parseEther(pool.dynamicData.swapFee), + poolTokens, + pool.dynamicData.tokenPairsData as TokenPairData[], + ); + } + + constructor( + id: Hex, + address: string, + chain: Chain, + amp: bigint, + swapFee: bigint, + tokens: BasePoolToken[], + tokenPairs: TokenPairData[], + ) { + this.id = id; + this.address = address; + this.chain = chain; + this.amp = amp; + this.swapFee = swapFee; + + this.tokens = tokens.sort((a, b) => a.index - b.index); + this.tokenMap = new Map(this.tokens.map((token) => [token.token.address, token])); + this.tokenPairs = tokenPairs; + } + + public getNormalizedLiquidity(tokenIn: Token, tokenOut: Token): bigint { + const { tIn, tOut } = this.getPoolTokens(tokenIn, tokenOut); + + const tokenPair = this.tokenPairs.find( + (tokenPair) => tokenPair.tokenA === tIn.token.address && tokenPair.tokenB === tOut.token.address, + ); + + if (tokenPair) { + return BigInt(tokenPair.normalizedLiquidity); + } + return 0n; + } + + public swapGivenIn( + tokenIn: Token, + tokenOut: Token, + swapAmount: TokenAmount, + mutateBalances?: boolean, + ): TokenAmount { + const { tIn, tOut } = this.getPoolTokens(tokenIn, tokenOut); + + if (swapAmount.amount > tIn.amount) { + throw new Error('Swap amount exceeds the pool limit'); + } + + const amountInWithFee = this.subtractSwapFeeAmount(swapAmount); + const balances = this.tokens.map((t) => t.scale18); + + const invariant = _calculateInvariant(this.amp, [...balances], true); + + const tokenOutScale18 = _calcOutGivenIn( + this.amp, + [...balances], + tIn.index, + tOut.index, + amountInWithFee.scale18, + invariant, + ); + + const amountOut = TokenAmount.fromScale18Amount(tokenOut, tokenOutScale18); + + if (amountOut.amount < 0n) throw new Error('Swap output negative'); + + if (mutateBalances) { + tIn.increase(swapAmount.amount); + tOut.decrease(amountOut.amount); + } + + return amountOut; + } + + public swapGivenOut( + tokenIn: Token, + tokenOut: Token, + swapAmount: TokenAmount, + mutateBalances?: boolean, + ): TokenAmount { + const { tIn, tOut } = this.getPoolTokens(tokenIn, tokenOut); + + if (swapAmount.amount > tOut.amount) { + throw new Error('Swap amount exceeds the pool limit'); + } + + const balances = this.tokens.map((t) => t.scale18); + + const invariant = _calculateInvariant(this.amp, balances, true); + + const tokenInScale18 = _calcInGivenOut( + this.amp, + [...balances], + tIn.index, + tOut.index, + swapAmount.scale18, + invariant, + ); + + const amountIn = TokenAmount.fromScale18Amount(tokenIn, tokenInScale18, true); + const amountInWithFee = this.addSwapFeeAmount(amountIn); + + if (amountInWithFee.amount < 0n) throw new Error('Swap output negative'); + + if (mutateBalances) { + tIn.increase(amountInWithFee.amount); + tOut.decrease(swapAmount.amount); + } + + return amountInWithFee; + } + + public subtractSwapFeeAmount(amount: TokenAmount): TokenAmount { + const feeAmount = amount.mulUpFixed(this.swapFee); + return amount.sub(feeAmount); + } + + public addSwapFeeAmount(amount: TokenAmount): TokenAmount { + return amount.divUpFixed(MathSol.complementFixed(this.swapFee)); + } + + public getLimitAmountSwap(tokenIn: Token, tokenOut: Token, swapKind: SwapKind): bigint { + const { tIn, tOut } = this.getPoolTokens(tokenIn, tokenOut); + + if (swapKind === SwapKind.GivenIn) { + // Return max valid amount of tokenIn + // As an approx - use almost the total balance of token out as we can add any amount of tokenIn and expect some back + return tIn.amount; + } + // Return max amount of tokenOut - approx is almost all balance + return tOut.amount; + } + + public getPoolTokens(tokenIn: Token, tokenOut: Token): { tIn: BasePoolToken; tOut: BasePoolToken } { + const tIn = this.tokenMap.get(tokenIn.wrapped); + const tOut = this.tokenMap.get(tokenOut.wrapped); + + if (!tIn || !tOut) { + throw new Error('Pool does not contain the tokens provided'); + } + + return { tIn, tOut }; + } +} diff --git a/modules/sor/sorV2/lib/poolsV3/stable/stablePool.test.ts b/modules/sor/sorV2/lib/poolsV3/stable/stablePool.test.ts index 3f5352ba3..1b65082ff 100644 --- a/modules/sor/sorV2/lib/poolsV3/stable/stablePool.test.ts +++ b/modules/sor/sorV2/lib/poolsV3/stable/stablePool.test.ts @@ -4,7 +4,7 @@ import { parseEther, parseUnits } from 'viem'; import { PrismaPoolAndHookWithDynamic } from '../../../../../../prisma/prisma-types'; import { WAD } from '../../utils/math'; -import { StablePool } from './stablePool'; +import { StablePoolV3 } from './stablePool'; import { Token, TokenAmount } from '@balancer/sdk'; @@ -22,8 +22,8 @@ describe('SOR V3 Stable Pool Tests', () => { let amp: string; let scalingFactors: bigint[]; let aggregateSwapFee: bigint; - let stablePool: StablePool; - let stablePoolWithHook: StablePool; + let stablePool: StablePoolV3; + let stablePoolWithHook: StablePoolV3; let stablePrismaPool: PrismaPoolAndHookWithDynamic; let stablePrismaPoolWithHook: PrismaPoolAndHookWithDynamic; let swapFee: string; @@ -93,7 +93,7 @@ describe('SOR V3 Stable Pool Tests', () => { enableRemoveLiquidityCustom: false, }, }); - stablePool = StablePool.fromPrismaPool(stablePrismaPool); + stablePool = StablePoolV3.fromPrismaPool(stablePrismaPool); stablePrismaPoolWithHook = prismaPoolFactory.build({ address: poolAddress, @@ -112,7 +112,7 @@ describe('SOR V3 Stable Pool Tests', () => { enableRemoveLiquidityCustom: false, }, }); - stablePoolWithHook = StablePool.fromPrismaPool(stablePrismaPoolWithHook); + stablePoolWithHook = StablePoolV3.fromPrismaPool(stablePrismaPoolWithHook); }); test('Get Pool State', () => { diff --git a/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts b/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts index 7a7dcd4e8..01882c537 100644 --- a/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts +++ b/modules/sor/sorV2/lib/poolsV3/stable/stablePool.ts @@ -20,7 +20,7 @@ import { LiquidityManagement } from '../../../../../sor/types'; type StablePoolToken = StableBasePoolToken | Erc4626PoolToken; -export class StablePool implements BasePoolV3 { +export class StablePoolV3 implements BasePoolV3 { public readonly chain: Chain; public readonly id: Hex; public readonly address: string; @@ -39,7 +39,7 @@ export class StablePool implements BasePoolV3 { private vault: Vault; private poolState: StableState; - static fromPrismaPool(pool: PrismaPoolAndHookWithDynamic): StablePool { + static fromPrismaPool(pool: PrismaPoolAndHookWithDynamic): StablePoolV3 { const poolTokens: StablePoolToken[] = []; if (!pool.dynamicData) throw new Error('Stable pool has no dynamic data'); @@ -86,11 +86,11 @@ export class StablePool implements BasePoolV3 { const hookState = getHookState(pool); // typeguard - if (pool.protocolVersion === 3 && !isLiquidityManagement(pool.liquidityManagement)) { + if (!isLiquidityManagement(pool.liquidityManagement)) { throw new Error('LiquidityManagement must be of type LiquidityManagement and cannot be null'); } - return new StablePool( + return new StablePoolV3( pool.id as Hex, pool.address, pool.chain, @@ -99,7 +99,7 @@ export class StablePool implements BasePoolV3 { poolTokens, totalShares, pool.dynamicData.tokenPairsData as TokenPairData[], - ((pool.protocolVersion === 3 && pool.liquidityManagement) || {}) as unknown as LiquidityManagement, + pool.liquidityManagement, hookState, ); } diff --git a/modules/sor/sorV2/lib/static.ts b/modules/sor/sorV2/lib/static.ts index bd2190f8a..9e794e1fe 100644 --- a/modules/sor/sorV2/lib/static.ts +++ b/modules/sor/sorV2/lib/static.ts @@ -1,12 +1,21 @@ import { Router } from './router'; import { PrismaPoolAndHookWithDynamic } from '../../../../prisma/prisma-types'; import { checkInputs } from './utils/helpers'; -import { ComposableStablePool, FxPool, Gyro2Pool, Gyro3Pool, GyroEPool, MetaStablePool, WeightedPool } from './poolsV2'; +import { + ComposableStablePool, + FxPool, + Gyro2Pool, + Gyro3Pool, + GyroEPool, + MetaStablePool, + StablePool, + WeightedPool, +} from './poolsV2'; import { SwapKind, Token } from '@balancer/sdk'; import { BasePool } from './poolsV2/basePool'; import { SorSwapOptions } from './types'; import { PathWithAmount } from './path'; -import { StablePool, WeightedPoolV3 } from './poolsV3'; +import { StablePoolV3, WeightedPoolV3 } from './poolsV3'; export async function sorGetPathsWithPools( tokenIn: Token, @@ -41,15 +50,18 @@ export async function sorGetPathsWithPools( case 'STABLE': // Since we allowed all the pools, we started getting BAL#322 errors // Enabling pools one by one until we find the issue - if ( - [ - '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249', // auraBal/8020 - '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d', // sdBal/8020 - '0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea6000200000000000000000426', // dola/usdc - ].includes(prismaPool.id) || - protocolVersion === 3 - ) { - basePools.push(StablePool.fromPrismaPool(prismaPool)); + if (protocolVersion === 3) { + basePools.push(StablePoolV3.fromPrismaPool(prismaPool)); + } else { + if ( + [ + '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249', // auraBal/8020 + '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d', // sdBal/8020 + '0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea6000200000000000000000426', // dola/usdc + ].includes(prismaPool.id) + ) { + basePools.push(StablePool.fromPrismaPool(prismaPool)); + } } break; case 'META_STABLE': 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/subgraphs/sts-subgraph/generated/sts-subgraph-types.ts b/modules/sources/subgraphs/sts-subgraph/generated/sts-subgraph-types.ts index a69c741b8..a4b0c3e47 100644 --- a/modules/sources/subgraphs/sts-subgraph/generated/sts-subgraph-types.ts +++ b/modules/sources/subgraphs/sts-subgraph/generated/sts-subgraph-types.ts @@ -433,12 +433,12 @@ export enum _SubgraphErrorPolicy_ { } export type ValidatorsQueryVariables = 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 ValidatorsQuery = { @@ -447,12 +447,12 @@ export type ValidatorsQuery = { }; export type SonicStakingSnapshotsQueryVariables = 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 SonicStakingSnapshotsQuery = { @@ -544,9 +544,10 @@ export const SonicStakingSnapshotsDocument = 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 { @@ -561,6 +562,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'Validators', + 'query', ); }, SonicStakingSnapshots( @@ -574,6 +576,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'SonicStakingSnapshots', + 'query', ); }, }; diff --git a/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts b/modules/subgraphs/balancer-subgraph/generated/balancer-subgraph-types.ts index 17182c371..639599228 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,19 +6688,16 @@ export type BalancerSwapsQuery = { timestamp: number; tx: string; valueUSD: string; - block?: string | null | undefined; + block?: string | null; poolId: { __typename?: 'Pool'; id: string; swapFee: string; - poolType?: string | null | undefined; - tokens?: - | Array<{ - __typename?: 'PoolToken'; - token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null | undefined }; - }> - | null - | undefined; + poolType?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null }; + }> | null; }; userAddress: { __typename?: 'User'; id: string }; }>; @@ -6774,30 +6716,27 @@ export type BalancerSwapFragment = { timestamp: number; tx: string; valueUSD: string; - block?: string | null | undefined; + block?: string | null; poolId: { __typename?: 'Pool'; id: string; swapFee: string; - poolType?: string | null | undefined; - tokens?: - | Array<{ - __typename?: 'PoolToken'; - token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null | undefined }; - }> - | null - | undefined; + poolType?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + token: { __typename?: 'Token'; address: string; latestFXPrice?: string | null }; + }> | null; }; userAddress: { __typename?: 'User'; id: string }; }; export type BalancerAmpUpdatesQueryVariables = Exact<{ - skip?: 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 = { @@ -6824,12 +6763,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 = { @@ -6867,15 +6806,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 = { @@ -6883,19 +6819,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 = { @@ -6905,10 +6844,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; }>; }; @@ -7585,9 +7527,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 { @@ -7602,6 +7545,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerProtocolData', + 'query', ); }, BalancerUser( @@ -7615,6 +7559,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerUser', + 'query', ); }, BalancerUsers( @@ -7628,6 +7573,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerUsers', + 'query', ); }, BalancerPoolShares( @@ -7641,6 +7587,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPoolShares', + 'query', ); }, BalancerTokenPrices( @@ -7654,6 +7601,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerTokenPrices', + 'query', ); }, BalancerTokens( @@ -7667,6 +7615,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerTokens', + 'query', ); }, BalancerPools( @@ -7680,6 +7629,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPools', + 'query', ); }, BalancerPool( @@ -7693,6 +7643,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPool', + 'query', ); }, BalancerPoolHistoricalLiquidities( @@ -7707,6 +7658,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = { ...requestHeaders, ...wrappedRequestHeaders }, ), 'BalancerPoolHistoricalLiquidities', + 'query', ); }, BalancerPoolSnapshots( @@ -7720,6 +7672,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPoolSnapshots', + 'query', ); }, BalancerLatestPrices( @@ -7733,6 +7686,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerLatestPrices', + 'query', ); }, BalancerLatestPrice( @@ -7746,6 +7700,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerLatestPrice', + 'query', ); }, BalancerJoinExits( @@ -7759,6 +7714,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerJoinExits', + 'query', ); }, BalancerPortfolioData( @@ -7772,6 +7728,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPortfolioData', + 'query', ); }, BalancerPortfolioPoolsData( @@ -7785,6 +7742,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerPortfolioPoolsData', + 'query', ); }, BalancerTradePairSnapshots( @@ -7798,6 +7756,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerTradePairSnapshots', + 'query', ); }, BalancerSwaps( @@ -7811,6 +7770,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerSwaps', + 'query', ); }, BalancerAmpUpdates( @@ -7824,6 +7784,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerAmpUpdates', + 'query', ); }, BalancerGradualWeightUpdates( @@ -7837,6 +7798,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerGradualWeightUpdates', + 'query', ); }, BalancerGetPoolsWithActiveUpdates( @@ -7851,6 +7813,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = { ...requestHeaders, ...wrappedRequestHeaders }, ), 'BalancerGetPoolsWithActiveUpdates', + 'query', ); }, BalancerGetMeta( @@ -7864,6 +7827,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = ...wrappedRequestHeaders, }), 'BalancerGetMeta', + 'query', ); }, PoolBalances( @@ -7877,6 +7841,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/test/factories/prismaPool.factory.ts b/test/factories/prismaPool.factory.ts index 45d02fcd8..54ef477e3 100644 --- a/test/factories/prismaPool.factory.ts +++ b/test/factories/prismaPool.factory.ts @@ -6,7 +6,6 @@ import { Chain, PrismaPoolType } from '@prisma/client'; import { prismaPoolDynamicDataFactory } from './prismaPoolDynamicData.factory'; import { LiquidityManagement } from '../../modules/sor/types'; - class PrismaPoolFactory extends Factory { stable(amp?: string) { return this.params({ type: PrismaPoolType.STABLE, typeData: { amp: amp ?? '10' } }); @@ -22,6 +21,7 @@ export const prismaPoolFactory = PrismaPoolFactory.define(({ params }) => { enableDonation: false, enableRemoveLiquidityCustom: false, }; + const chain = params?.chain || Chain.SEPOLIA; return { id: poolAddress, @@ -34,14 +34,14 @@ export const prismaPoolFactory = PrismaPoolFactory.define(({ params }) => { pauseManager: createRandomAddress(), poolCreator: createRandomAddress(), factory: createRandomAddress(), - chain: Chain.SEPOLIA, + chain, version: 1, protocolVersion: 3, typeData: {}, categories: [], createTime: 1708433018, - dynamicData: prismaPoolDynamicDataFactory.build({ id: poolAddress, chain: params?.chain || Chain.SEPOLIA }), - tokens: prismaPoolTokenFactory.buildList(2), + dynamicData: prismaPoolDynamicDataFactory.build({ id: poolAddress, chain }), + tokens: prismaPoolTokenFactory.buildList(2, { chain }), hookId: null, hook: hook, liquidityManagement: liquidityManagement, diff --git a/test/factories/prismaToken.factory.ts b/test/factories/prismaToken.factory.ts index aec136c32..2156ef6fe 100644 --- a/test/factories/prismaToken.factory.ts +++ b/test/factories/prismaToken.factory.ts @@ -4,7 +4,7 @@ import { createRandomAddress } from '../utils'; import { PrismaPoolTokenWithDynamicData } from '../../prisma/prisma-types'; import { ZERO_ADDRESS } from '@balancer/sdk'; -export const prismaPoolTokenFactory = Factory.define(({ params }) => { +export const prismaPoolTokenFactory = Factory.define(({ sequence, params }) => { const tokenAddress = params?.address || createRandomAddress(); const poolId = params?.poolId || createRandomAddress(); return { @@ -12,7 +12,7 @@ export const prismaPoolTokenFactory = Factory.define(({ params }) => { +export const StablePoolFactory = Factory.define(({ params }) => { const chain: Chain = params.chain || faker.helpers.arrayElement(['MAINNET', 'SEPOLIA']); const id = params.id || (faker.finance.ethereumAddress() as Address); const address = params.address || id; @@ -54,5 +53,16 @@ export const StablePoolFactory = Factory.define(({ params }) => { spotPrice: faker.number.int({ min: 1, max: 1000 }).toString(), })); - return new StablePool(id, address, chain, amp, swapFee, tokens, totalShares, tokenPairs, liquidityManagement as LiquidityManagement, hookState as HookState); + return new StablePoolV3( + id, + address, + chain, + amp, + swapFee, + tokens, + totalShares, + tokenPairs, + liquidityManagement as LiquidityManagement, + hookState as HookState, + ); });