diff --git a/frontend/app/.graphclient/index.ts b/frontend/app/.graphclient/index.ts new file mode 100644 index 00000000..87fe6975 --- /dev/null +++ b/frontend/app/.graphclient/index.ts @@ -0,0 +1,1370 @@ +// @ts-nocheck +import { GraphQLResolveInfo, SelectionSetNode, FieldNode, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import { gql } from '@graphql-mesh/utils'; + +import type { GetMeshOptions } from '@graphql-mesh/runtime'; +import type { YamlConfig } from '@graphql-mesh/types'; +import { PubSub } from '@graphql-mesh/utils'; +import { DefaultLogger } from '@graphql-mesh/utils'; +import MeshCache from "@graphql-mesh/cache-localforage"; +import { fetch as fetchFn } from '@whatwg-node/fetch'; + +import { MeshResolvedSource } from '@graphql-mesh/runtime'; +import { MeshTransform, MeshPlugin } from '@graphql-mesh/types'; +import GraphqlHandler from "@graphql-mesh/graphql" +import BareMerger from "@graphql-mesh/merger-bare"; +import { printWithCache } from '@graphql-mesh/utils'; +import { usePersistedOperations } from '@graphql-yoga/plugin-persisted-operations'; +import { createMeshHTTPHandler, MeshHTTPHandler } from '@graphql-mesh/http'; +import { getMesh, ExecuteMeshFn, SubscribeMeshFn, MeshContext as BaseMeshContext, MeshInstance } from '@graphql-mesh/runtime'; +import { MeshStore, FsStoreStorageAdapter } from '@graphql-mesh/store'; +import { path as pathModule } from '@graphql-mesh/cross-helpers'; +import { ImportFn } from '@graphql-mesh/types'; +import type { Liquity2Types } from './sources/liquity2/types'; +import * as importedModule$0 from "./sources/liquity2/introspectionSchema"; +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +export type RequireFields = Omit & { [P in K]-?: NonNullable }; + + + +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + BigDecimal: { input: bigint; output: bigint; } + BigInt: { input: bigint; output: bigint; } + Bytes: { input: string; output: string; } + Int8: { input: number; output: number; } + Timestamp: { input: string; output: string; } +}; + +export type Aggregation_interval = + | 'hour' + | 'day'; + +export type BlockChangedFilter = { + readonly number_gte: Scalars['Int']['input']; +}; + +export type Block_height = { + readonly hash?: InputMaybe; + readonly number?: InputMaybe; + readonly number_gte?: InputMaybe; +}; + +export type Collateral = { + readonly id: Scalars['ID']['output']; + readonly token: Token; + readonly minCollRatio: Scalars['BigInt']['output']; + readonly troves: ReadonlyArray; + readonly addresses: CollateralAddresses; + readonly totalDeposited: Scalars['BigInt']['output']; + readonly totalDebt: Scalars['BigInt']['output']; +}; + + +export type CollateraltrovesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; +}; + +export type CollateralAddresses = { + readonly id: Scalars['ID']['output']; + readonly borrowerOperations: Scalars['Bytes']['output']; + readonly collateral: Collateral; + readonly sortedTroves: Scalars['Bytes']['output']; + readonly stabilityPool: Scalars['Bytes']['output']; + readonly token: Scalars['Bytes']['output']; + readonly troveManager: Scalars['Bytes']['output']; + readonly troveNft: Scalars['Bytes']['output']; +}; + +export type CollateralAddresses_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly borrowerOperations?: InputMaybe; + readonly borrowerOperations_not?: InputMaybe; + readonly borrowerOperations_gt?: InputMaybe; + readonly borrowerOperations_lt?: InputMaybe; + readonly borrowerOperations_gte?: InputMaybe; + readonly borrowerOperations_lte?: InputMaybe; + readonly borrowerOperations_in?: InputMaybe>; + readonly borrowerOperations_not_in?: InputMaybe>; + readonly borrowerOperations_contains?: InputMaybe; + readonly borrowerOperations_not_contains?: InputMaybe; + readonly collateral?: InputMaybe; + readonly collateral_not?: InputMaybe; + readonly collateral_gt?: InputMaybe; + readonly collateral_lt?: InputMaybe; + readonly collateral_gte?: InputMaybe; + readonly collateral_lte?: InputMaybe; + readonly collateral_in?: InputMaybe>; + readonly collateral_not_in?: InputMaybe>; + readonly collateral_contains?: InputMaybe; + readonly collateral_contains_nocase?: InputMaybe; + readonly collateral_not_contains?: InputMaybe; + readonly collateral_not_contains_nocase?: InputMaybe; + readonly collateral_starts_with?: InputMaybe; + readonly collateral_starts_with_nocase?: InputMaybe; + readonly collateral_not_starts_with?: InputMaybe; + readonly collateral_not_starts_with_nocase?: InputMaybe; + readonly collateral_ends_with?: InputMaybe; + readonly collateral_ends_with_nocase?: InputMaybe; + readonly collateral_not_ends_with?: InputMaybe; + readonly collateral_not_ends_with_nocase?: InputMaybe; + readonly collateral_?: InputMaybe; + readonly sortedTroves?: InputMaybe; + readonly sortedTroves_not?: InputMaybe; + readonly sortedTroves_gt?: InputMaybe; + readonly sortedTroves_lt?: InputMaybe; + readonly sortedTroves_gte?: InputMaybe; + readonly sortedTroves_lte?: InputMaybe; + readonly sortedTroves_in?: InputMaybe>; + readonly sortedTroves_not_in?: InputMaybe>; + readonly sortedTroves_contains?: InputMaybe; + readonly sortedTroves_not_contains?: InputMaybe; + readonly stabilityPool?: InputMaybe; + readonly stabilityPool_not?: InputMaybe; + readonly stabilityPool_gt?: InputMaybe; + readonly stabilityPool_lt?: InputMaybe; + readonly stabilityPool_gte?: InputMaybe; + readonly stabilityPool_lte?: InputMaybe; + readonly stabilityPool_in?: InputMaybe>; + readonly stabilityPool_not_in?: InputMaybe>; + readonly stabilityPool_contains?: InputMaybe; + readonly stabilityPool_not_contains?: InputMaybe; + readonly token?: InputMaybe; + readonly token_not?: InputMaybe; + readonly token_gt?: InputMaybe; + readonly token_lt?: InputMaybe; + readonly token_gte?: InputMaybe; + readonly token_lte?: InputMaybe; + readonly token_in?: InputMaybe>; + readonly token_not_in?: InputMaybe>; + readonly token_contains?: InputMaybe; + readonly token_not_contains?: InputMaybe; + readonly troveManager?: InputMaybe; + readonly troveManager_not?: InputMaybe; + readonly troveManager_gt?: InputMaybe; + readonly troveManager_lt?: InputMaybe; + readonly troveManager_gte?: InputMaybe; + readonly troveManager_lte?: InputMaybe; + readonly troveManager_in?: InputMaybe>; + readonly troveManager_not_in?: InputMaybe>; + readonly troveManager_contains?: InputMaybe; + readonly troveManager_not_contains?: InputMaybe; + readonly troveNft?: InputMaybe; + readonly troveNft_not?: InputMaybe; + readonly troveNft_gt?: InputMaybe; + readonly troveNft_lt?: InputMaybe; + readonly troveNft_gte?: InputMaybe; + readonly troveNft_lte?: InputMaybe; + readonly troveNft_in?: InputMaybe>; + readonly troveNft_not_in?: InputMaybe>; + readonly troveNft_contains?: InputMaybe; + readonly troveNft_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type CollateralAddresses_orderBy = + | 'id' + | 'borrowerOperations' + | 'collateral' + | 'collateral__id' + | 'collateral__minCollRatio' + | 'collateral__totalDeposited' + | 'collateral__totalDebt' + | 'sortedTroves' + | 'stabilityPool' + | 'token' + | 'troveManager' + | 'troveNft'; + +export type Collateral_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly token?: InputMaybe; + readonly token_not?: InputMaybe; + readonly token_gt?: InputMaybe; + readonly token_lt?: InputMaybe; + readonly token_gte?: InputMaybe; + readonly token_lte?: InputMaybe; + readonly token_in?: InputMaybe>; + readonly token_not_in?: InputMaybe>; + readonly token_contains?: InputMaybe; + readonly token_contains_nocase?: InputMaybe; + readonly token_not_contains?: InputMaybe; + readonly token_not_contains_nocase?: InputMaybe; + readonly token_starts_with?: InputMaybe; + readonly token_starts_with_nocase?: InputMaybe; + readonly token_not_starts_with?: InputMaybe; + readonly token_not_starts_with_nocase?: InputMaybe; + readonly token_ends_with?: InputMaybe; + readonly token_ends_with_nocase?: InputMaybe; + readonly token_not_ends_with?: InputMaybe; + readonly token_not_ends_with_nocase?: InputMaybe; + readonly token_?: InputMaybe; + readonly minCollRatio?: InputMaybe; + readonly minCollRatio_not?: InputMaybe; + readonly minCollRatio_gt?: InputMaybe; + readonly minCollRatio_lt?: InputMaybe; + readonly minCollRatio_gte?: InputMaybe; + readonly minCollRatio_lte?: InputMaybe; + readonly minCollRatio_in?: InputMaybe>; + readonly minCollRatio_not_in?: InputMaybe>; + readonly troves_?: InputMaybe; + readonly addresses_?: InputMaybe; + readonly totalDeposited?: InputMaybe; + readonly totalDeposited_not?: InputMaybe; + readonly totalDeposited_gt?: InputMaybe; + readonly totalDeposited_lt?: InputMaybe; + readonly totalDeposited_gte?: InputMaybe; + readonly totalDeposited_lte?: InputMaybe; + readonly totalDeposited_in?: InputMaybe>; + readonly totalDeposited_not_in?: InputMaybe>; + readonly totalDebt?: InputMaybe; + readonly totalDebt_not?: InputMaybe; + readonly totalDebt_gt?: InputMaybe; + readonly totalDebt_lt?: InputMaybe; + readonly totalDebt_gte?: InputMaybe; + readonly totalDebt_lte?: InputMaybe; + readonly totalDebt_in?: InputMaybe>; + readonly totalDebt_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type Collateral_orderBy = + | 'id' + | 'token' + | 'token__id' + | 'token__name' + | 'token__symbol' + | 'token__decimals' + | 'minCollRatio' + | 'troves' + | 'addresses' + | 'addresses__id' + | 'addresses__borrowerOperations' + | 'addresses__sortedTroves' + | 'addresses__stabilityPool' + | 'addresses__token' + | 'addresses__troveManager' + | 'addresses__troveNft' + | 'totalDeposited' + | 'totalDebt'; + +export type InterestRateBracket = { + readonly id: Scalars['ID']['output']; + readonly rate: Scalars['BigInt']['output']; + readonly totalDebt: Scalars['BigInt']['output']; + readonly totalTroves: Scalars['Int']['output']; +}; + +export type InterestRateBracket_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly rate?: InputMaybe; + readonly rate_not?: InputMaybe; + readonly rate_gt?: InputMaybe; + readonly rate_lt?: InputMaybe; + readonly rate_gte?: InputMaybe; + readonly rate_lte?: InputMaybe; + readonly rate_in?: InputMaybe>; + readonly rate_not_in?: InputMaybe>; + readonly totalDebt?: InputMaybe; + readonly totalDebt_not?: InputMaybe; + readonly totalDebt_gt?: InputMaybe; + readonly totalDebt_lt?: InputMaybe; + readonly totalDebt_gte?: InputMaybe; + readonly totalDebt_lte?: InputMaybe; + readonly totalDebt_in?: InputMaybe>; + readonly totalDebt_not_in?: InputMaybe>; + readonly totalTroves?: InputMaybe; + readonly totalTroves_not?: InputMaybe; + readonly totalTroves_gt?: InputMaybe; + readonly totalTroves_lt?: InputMaybe; + readonly totalTroves_gte?: InputMaybe; + readonly totalTroves_lte?: InputMaybe; + readonly totalTroves_in?: InputMaybe>; + readonly totalTroves_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type InterestRateBracket_orderBy = + | 'id' + | 'rate' + | 'totalDebt' + | 'totalTroves'; + +/** Defines the order direction, either ascending or descending */ +export type OrderDirection = + | 'asc' + | 'desc'; + +export type Query = { + readonly collateral?: Maybe; + readonly collaterals: ReadonlyArray; + readonly token?: Maybe; + readonly tokens: ReadonlyArray; + readonly collateralAddresses?: Maybe; + readonly collateralAddresses_collection: ReadonlyArray; + readonly interestRateBracket?: Maybe; + readonly interestRateBrackets: ReadonlyArray; + readonly trove?: Maybe; + readonly troves: ReadonlyArray; + /** Access to subgraph metadata */ + readonly _meta?: Maybe<_Meta_>; +}; + + +export type QuerycollateralArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerycollateralsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytokenArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytokensArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerycollateralAddressesArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerycollateralAddresses_collectionArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryinterestRateBracketArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryinterestRateBracketsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytroveArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytrovesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type Query_metaArgs = { + block?: InputMaybe; +}; + +export type Subscription = { + readonly collateral?: Maybe; + readonly collaterals: ReadonlyArray; + readonly token?: Maybe; + readonly tokens: ReadonlyArray; + readonly collateralAddresses?: Maybe; + readonly collateralAddresses_collection: ReadonlyArray; + readonly interestRateBracket?: Maybe; + readonly interestRateBrackets: ReadonlyArray; + readonly trove?: Maybe; + readonly troves: ReadonlyArray; + /** Access to subgraph metadata */ + readonly _meta?: Maybe<_Meta_>; +}; + + +export type SubscriptioncollateralArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioncollateralsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontokenArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontokensArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioncollateralAddressesArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioncollateralAddresses_collectionArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioninterestRateBracketArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioninterestRateBracketsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontroveArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontrovesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type Subscription_metaArgs = { + block?: InputMaybe; +}; + +export type Token = { + readonly id: Scalars['ID']['output']; + readonly collateral: Collateral; + readonly name: Scalars['String']['output']; + readonly symbol: Scalars['String']['output']; + readonly decimals: Scalars['Int']['output']; +}; + +export type Token_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly collateral?: InputMaybe; + readonly collateral_not?: InputMaybe; + readonly collateral_gt?: InputMaybe; + readonly collateral_lt?: InputMaybe; + readonly collateral_gte?: InputMaybe; + readonly collateral_lte?: InputMaybe; + readonly collateral_in?: InputMaybe>; + readonly collateral_not_in?: InputMaybe>; + readonly collateral_contains?: InputMaybe; + readonly collateral_contains_nocase?: InputMaybe; + readonly collateral_not_contains?: InputMaybe; + readonly collateral_not_contains_nocase?: InputMaybe; + readonly collateral_starts_with?: InputMaybe; + readonly collateral_starts_with_nocase?: InputMaybe; + readonly collateral_not_starts_with?: InputMaybe; + readonly collateral_not_starts_with_nocase?: InputMaybe; + readonly collateral_ends_with?: InputMaybe; + readonly collateral_ends_with_nocase?: InputMaybe; + readonly collateral_not_ends_with?: InputMaybe; + readonly collateral_not_ends_with_nocase?: InputMaybe; + readonly collateral_?: InputMaybe; + readonly name?: InputMaybe; + readonly name_not?: InputMaybe; + readonly name_gt?: InputMaybe; + readonly name_lt?: InputMaybe; + readonly name_gte?: InputMaybe; + readonly name_lte?: InputMaybe; + readonly name_in?: InputMaybe>; + readonly name_not_in?: InputMaybe>; + readonly name_contains?: InputMaybe; + readonly name_contains_nocase?: InputMaybe; + readonly name_not_contains?: InputMaybe; + readonly name_not_contains_nocase?: InputMaybe; + readonly name_starts_with?: InputMaybe; + readonly name_starts_with_nocase?: InputMaybe; + readonly name_not_starts_with?: InputMaybe; + readonly name_not_starts_with_nocase?: InputMaybe; + readonly name_ends_with?: InputMaybe; + readonly name_ends_with_nocase?: InputMaybe; + readonly name_not_ends_with?: InputMaybe; + readonly name_not_ends_with_nocase?: InputMaybe; + readonly symbol?: InputMaybe; + readonly symbol_not?: InputMaybe; + readonly symbol_gt?: InputMaybe; + readonly symbol_lt?: InputMaybe; + readonly symbol_gte?: InputMaybe; + readonly symbol_lte?: InputMaybe; + readonly symbol_in?: InputMaybe>; + readonly symbol_not_in?: InputMaybe>; + readonly symbol_contains?: InputMaybe; + readonly symbol_contains_nocase?: InputMaybe; + readonly symbol_not_contains?: InputMaybe; + readonly symbol_not_contains_nocase?: InputMaybe; + readonly symbol_starts_with?: InputMaybe; + readonly symbol_starts_with_nocase?: InputMaybe; + readonly symbol_not_starts_with?: InputMaybe; + readonly symbol_not_starts_with_nocase?: InputMaybe; + readonly symbol_ends_with?: InputMaybe; + readonly symbol_ends_with_nocase?: InputMaybe; + readonly symbol_not_ends_with?: InputMaybe; + readonly symbol_not_ends_with_nocase?: InputMaybe; + readonly decimals?: InputMaybe; + readonly decimals_not?: InputMaybe; + readonly decimals_gt?: InputMaybe; + readonly decimals_lt?: InputMaybe; + readonly decimals_gte?: InputMaybe; + readonly decimals_lte?: InputMaybe; + readonly decimals_in?: InputMaybe>; + readonly decimals_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type Token_orderBy = + | 'id' + | 'collateral' + | 'collateral__id' + | 'collateral__minCollRatio' + | 'collateral__totalDeposited' + | 'collateral__totalDebt' + | 'name' + | 'symbol' + | 'decimals'; + +export type Trove = { + readonly id: Scalars['ID']['output']; + readonly borrower: Scalars['Bytes']['output']; + readonly debt: Scalars['BigInt']['output']; + readonly deposit: Scalars['BigInt']['output']; + readonly stake: Scalars['BigInt']['output']; + readonly interestRate: Scalars['BigInt']['output']; + readonly createdAt: Scalars['BigInt']['output']; + readonly closedAt?: Maybe; + readonly collateral: Collateral; +}; + +export type Trove_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly borrower?: InputMaybe; + readonly borrower_not?: InputMaybe; + readonly borrower_gt?: InputMaybe; + readonly borrower_lt?: InputMaybe; + readonly borrower_gte?: InputMaybe; + readonly borrower_lte?: InputMaybe; + readonly borrower_in?: InputMaybe>; + readonly borrower_not_in?: InputMaybe>; + readonly borrower_contains?: InputMaybe; + readonly borrower_not_contains?: InputMaybe; + readonly debt?: InputMaybe; + readonly debt_not?: InputMaybe; + readonly debt_gt?: InputMaybe; + readonly debt_lt?: InputMaybe; + readonly debt_gte?: InputMaybe; + readonly debt_lte?: InputMaybe; + readonly debt_in?: InputMaybe>; + readonly debt_not_in?: InputMaybe>; + readonly deposit?: InputMaybe; + readonly deposit_not?: InputMaybe; + readonly deposit_gt?: InputMaybe; + readonly deposit_lt?: InputMaybe; + readonly deposit_gte?: InputMaybe; + readonly deposit_lte?: InputMaybe; + readonly deposit_in?: InputMaybe>; + readonly deposit_not_in?: InputMaybe>; + readonly stake?: InputMaybe; + readonly stake_not?: InputMaybe; + readonly stake_gt?: InputMaybe; + readonly stake_lt?: InputMaybe; + readonly stake_gte?: InputMaybe; + readonly stake_lte?: InputMaybe; + readonly stake_in?: InputMaybe>; + readonly stake_not_in?: InputMaybe>; + readonly interestRate?: InputMaybe; + readonly interestRate_not?: InputMaybe; + readonly interestRate_gt?: InputMaybe; + readonly interestRate_lt?: InputMaybe; + readonly interestRate_gte?: InputMaybe; + readonly interestRate_lte?: InputMaybe; + readonly interestRate_in?: InputMaybe>; + readonly interestRate_not_in?: InputMaybe>; + readonly createdAt?: InputMaybe; + readonly createdAt_not?: InputMaybe; + readonly createdAt_gt?: InputMaybe; + readonly createdAt_lt?: InputMaybe; + readonly createdAt_gte?: InputMaybe; + readonly createdAt_lte?: InputMaybe; + readonly createdAt_in?: InputMaybe>; + readonly createdAt_not_in?: InputMaybe>; + readonly closedAt?: InputMaybe; + readonly closedAt_not?: InputMaybe; + readonly closedAt_gt?: InputMaybe; + readonly closedAt_lt?: InputMaybe; + readonly closedAt_gte?: InputMaybe; + readonly closedAt_lte?: InputMaybe; + readonly closedAt_in?: InputMaybe>; + readonly closedAt_not_in?: InputMaybe>; + readonly collateral?: InputMaybe; + readonly collateral_not?: InputMaybe; + readonly collateral_gt?: InputMaybe; + readonly collateral_lt?: InputMaybe; + readonly collateral_gte?: InputMaybe; + readonly collateral_lte?: InputMaybe; + readonly collateral_in?: InputMaybe>; + readonly collateral_not_in?: InputMaybe>; + readonly collateral_contains?: InputMaybe; + readonly collateral_contains_nocase?: InputMaybe; + readonly collateral_not_contains?: InputMaybe; + readonly collateral_not_contains_nocase?: InputMaybe; + readonly collateral_starts_with?: InputMaybe; + readonly collateral_starts_with_nocase?: InputMaybe; + readonly collateral_not_starts_with?: InputMaybe; + readonly collateral_not_starts_with_nocase?: InputMaybe; + readonly collateral_ends_with?: InputMaybe; + readonly collateral_ends_with_nocase?: InputMaybe; + readonly collateral_not_ends_with?: InputMaybe; + readonly collateral_not_ends_with_nocase?: InputMaybe; + readonly collateral_?: InputMaybe; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type Trove_orderBy = + | 'id' + | 'borrower' + | 'debt' + | 'deposit' + | 'stake' + | 'interestRate' + | 'createdAt' + | 'closedAt' + | 'collateral' + | 'collateral__id' + | 'collateral__minCollRatio' + | 'collateral__totalDeposited' + | 'collateral__totalDebt'; + +export type _Block_ = { + /** The hash of the block */ + readonly hash?: Maybe; + /** The block number */ + readonly number: Scalars['Int']['output']; + /** Integer representation of the timestamp stored in blocks for the chain */ + readonly timestamp?: Maybe; + /** The hash of the parent block */ + readonly parentHash?: Maybe; +}; + +/** The type for the top-level _meta field */ +export type _Meta_ = { + /** + * Information about a specific subgraph block. The hash of the block + * will be null if the _meta field has a block constraint that asks for + * a block number. It will be filled if the _meta field has no block constraint + * and therefore asks for the latest block + * + */ + readonly block: _Block_; + /** The deployment ID */ + readonly deployment: Scalars['String']['output']; + /** If `true`, the subgraph encountered indexing errors at some past block */ + readonly hasIndexingErrors: Scalars['Boolean']['output']; +}; + +export type _SubgraphErrorPolicy_ = + /** Data will be returned even if the subgraph has indexing errors */ + | 'allow' + /** If the subgraph has indexing errors, data will be omitted. The default. */ + | 'deny'; + +export type WithIndex = TObject & Record; +export type ResolversObject = WithIndex; + +export type ResolverTypeWrapper = Promise | T; + + +export type ResolverWithResolve = { + resolve: ResolverFn; +}; + +export type LegacyStitchingResolver = { + fragment: string; + resolve: ResolverFn; +}; + +export type NewStitchingResolver = { + selectionSet: string | ((fieldNode: FieldNode) => SelectionSetNode); + resolve: ResolverFn; +}; +export type StitchingResolver = LegacyStitchingResolver | NewStitchingResolver; +export type Resolver = + | ResolverFn + | ResolverWithResolve + | StitchingResolver; + +export type ResolverFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => Promise | TResult; + +export type SubscriptionSubscribeFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => AsyncIterable | Promise>; + +export type SubscriptionResolveFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => TResult | Promise; + +export interface SubscriptionSubscriberObject { + subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; + resolve?: SubscriptionResolveFn; +} + +export interface SubscriptionResolverObject { + subscribe: SubscriptionSubscribeFn; + resolve: SubscriptionResolveFn; +} + +export type SubscriptionObject = + | SubscriptionSubscriberObject + | SubscriptionResolverObject; + +export type SubscriptionResolver = + | ((...args: any[]) => SubscriptionObject) + | SubscriptionObject; + +export type TypeResolveFn = ( + parent: TParent, + context: TContext, + info: GraphQLResolveInfo +) => Maybe | Promise>; + +export type IsTypeOfResolverFn = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; + +export type NextResolverFn = () => Promise; + +export type DirectiveResolverFn = ( + next: NextResolverFn, + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => TResult | Promise; + + + +/** Mapping between all available schema types and the resolvers types */ +export type ResolversTypes = ResolversObject<{ + Aggregation_interval: Aggregation_interval; + BigDecimal: ResolverTypeWrapper; + BigInt: ResolverTypeWrapper; + BlockChangedFilter: BlockChangedFilter; + Block_height: Block_height; + Boolean: ResolverTypeWrapper; + Bytes: ResolverTypeWrapper; + Collateral: ResolverTypeWrapper; + CollateralAddresses: ResolverTypeWrapper; + CollateralAddresses_filter: CollateralAddresses_filter; + CollateralAddresses_orderBy: CollateralAddresses_orderBy; + Collateral_filter: Collateral_filter; + Collateral_orderBy: Collateral_orderBy; + Float: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Int8: ResolverTypeWrapper; + InterestRateBracket: ResolverTypeWrapper; + InterestRateBracket_filter: InterestRateBracket_filter; + InterestRateBracket_orderBy: InterestRateBracket_orderBy; + OrderDirection: OrderDirection; + Query: ResolverTypeWrapper<{}>; + String: ResolverTypeWrapper; + Subscription: ResolverTypeWrapper<{}>; + Timestamp: ResolverTypeWrapper; + Token: ResolverTypeWrapper; + Token_filter: Token_filter; + Token_orderBy: Token_orderBy; + Trove: ResolverTypeWrapper; + Trove_filter: Trove_filter; + Trove_orderBy: Trove_orderBy; + _Block_: ResolverTypeWrapper<_Block_>; + _Meta_: ResolverTypeWrapper<_Meta_>; + _SubgraphErrorPolicy_: _SubgraphErrorPolicy_; +}>; + +/** Mapping between all available schema types and the resolvers parents */ +export type ResolversParentTypes = ResolversObject<{ + BigDecimal: Scalars['BigDecimal']['output']; + BigInt: Scalars['BigInt']['output']; + BlockChangedFilter: BlockChangedFilter; + Block_height: Block_height; + Boolean: Scalars['Boolean']['output']; + Bytes: Scalars['Bytes']['output']; + Collateral: Collateral; + CollateralAddresses: CollateralAddresses; + CollateralAddresses_filter: CollateralAddresses_filter; + Collateral_filter: Collateral_filter; + Float: Scalars['Float']['output']; + ID: Scalars['ID']['output']; + Int: Scalars['Int']['output']; + Int8: Scalars['Int8']['output']; + InterestRateBracket: InterestRateBracket; + InterestRateBracket_filter: InterestRateBracket_filter; + Query: {}; + String: Scalars['String']['output']; + Subscription: {}; + Timestamp: Scalars['Timestamp']['output']; + Token: Token; + Token_filter: Token_filter; + Trove: Trove; + Trove_filter: Trove_filter; + _Block_: _Block_; + _Meta_: _Meta_; +}>; + +export type entityDirectiveArgs = { }; + +export type entityDirectiveResolver = DirectiveResolverFn; + +export type subgraphIdDirectiveArgs = { + id: Scalars['String']['input']; +}; + +export type subgraphIdDirectiveResolver = DirectiveResolverFn; + +export type derivedFromDirectiveArgs = { + field: Scalars['String']['input']; +}; + +export type derivedFromDirectiveResolver = DirectiveResolverFn; + +export interface BigDecimalScalarConfig extends GraphQLScalarTypeConfig { + name: 'BigDecimal'; +} + +export interface BigIntScalarConfig extends GraphQLScalarTypeConfig { + name: 'BigInt'; +} + +export interface BytesScalarConfig extends GraphQLScalarTypeConfig { + name: 'Bytes'; +} + +export type CollateralResolvers = ResolversObject<{ + id?: Resolver; + token?: Resolver; + minCollRatio?: Resolver; + troves?: Resolver, ParentType, ContextType, RequireFields>; + addresses?: Resolver; + totalDeposited?: Resolver; + totalDebt?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type CollateralAddressesResolvers = ResolversObject<{ + id?: Resolver; + borrowerOperations?: Resolver; + collateral?: Resolver; + sortedTroves?: Resolver; + stabilityPool?: Resolver; + token?: Resolver; + troveManager?: Resolver; + troveNft?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export interface Int8ScalarConfig extends GraphQLScalarTypeConfig { + name: 'Int8'; +} + +export type InterestRateBracketResolvers = ResolversObject<{ + id?: Resolver; + rate?: Resolver; + totalDebt?: Resolver; + totalTroves?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type QueryResolvers = ResolversObject<{ + collateral?: Resolver, ParentType, ContextType, RequireFields>; + collaterals?: Resolver, ParentType, ContextType, RequireFields>; + token?: Resolver, ParentType, ContextType, RequireFields>; + tokens?: Resolver, ParentType, ContextType, RequireFields>; + collateralAddresses?: Resolver, ParentType, ContextType, RequireFields>; + collateralAddresses_collection?: Resolver, ParentType, ContextType, RequireFields>; + interestRateBracket?: Resolver, ParentType, ContextType, RequireFields>; + interestRateBrackets?: Resolver, ParentType, ContextType, RequireFields>; + trove?: Resolver, ParentType, ContextType, RequireFields>; + troves?: Resolver, ParentType, ContextType, RequireFields>; + _meta?: Resolver, ParentType, ContextType, Partial>; +}>; + +export type SubscriptionResolvers = ResolversObject<{ + collateral?: SubscriptionResolver, "collateral", ParentType, ContextType, RequireFields>; + collaterals?: SubscriptionResolver, "collaterals", ParentType, ContextType, RequireFields>; + token?: SubscriptionResolver, "token", ParentType, ContextType, RequireFields>; + tokens?: SubscriptionResolver, "tokens", ParentType, ContextType, RequireFields>; + collateralAddresses?: SubscriptionResolver, "collateralAddresses", ParentType, ContextType, RequireFields>; + collateralAddresses_collection?: SubscriptionResolver, "collateralAddresses_collection", ParentType, ContextType, RequireFields>; + interestRateBracket?: SubscriptionResolver, "interestRateBracket", ParentType, ContextType, RequireFields>; + interestRateBrackets?: SubscriptionResolver, "interestRateBrackets", ParentType, ContextType, RequireFields>; + trove?: SubscriptionResolver, "trove", ParentType, ContextType, RequireFields>; + troves?: SubscriptionResolver, "troves", ParentType, ContextType, RequireFields>; + _meta?: SubscriptionResolver, "_meta", ParentType, ContextType, Partial>; +}>; + +export interface TimestampScalarConfig extends GraphQLScalarTypeConfig { + name: 'Timestamp'; +} + +export type TokenResolvers = ResolversObject<{ + id?: Resolver; + collateral?: Resolver; + name?: Resolver; + symbol?: Resolver; + decimals?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type TroveResolvers = ResolversObject<{ + id?: Resolver; + borrower?: Resolver; + debt?: Resolver; + deposit?: Resolver; + stake?: Resolver; + interestRate?: Resolver; + createdAt?: Resolver; + closedAt?: Resolver, ParentType, ContextType>; + collateral?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type _Block_Resolvers = ResolversObject<{ + hash?: Resolver, ParentType, ContextType>; + number?: Resolver; + timestamp?: Resolver, ParentType, ContextType>; + parentHash?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type _Meta_Resolvers = ResolversObject<{ + block?: Resolver; + deployment?: Resolver; + hasIndexingErrors?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type Resolvers = ResolversObject<{ + BigDecimal?: GraphQLScalarType; + BigInt?: GraphQLScalarType; + Bytes?: GraphQLScalarType; + Collateral?: CollateralResolvers; + CollateralAddresses?: CollateralAddressesResolvers; + Int8?: GraphQLScalarType; + InterestRateBracket?: InterestRateBracketResolvers; + Query?: QueryResolvers; + Subscription?: SubscriptionResolvers; + Timestamp?: GraphQLScalarType; + Token?: TokenResolvers; + Trove?: TroveResolvers; + _Block_?: _Block_Resolvers; + _Meta_?: _Meta_Resolvers; +}>; + +export type DirectiveResolvers = ResolversObject<{ + entity?: entityDirectiveResolver; + subgraphId?: subgraphIdDirectiveResolver; + derivedFrom?: derivedFromDirectiveResolver; +}>; + +export type MeshContext = Liquity2Types.Context & BaseMeshContext; + + +import { fileURLToPath } from '@graphql-mesh/utils'; +const baseDir = pathModule.join(pathModule.dirname(fileURLToPath(import.meta.url)), '..'); + +const importFn: ImportFn = (moduleId: string) => { + const relativeModuleId = (pathModule.isAbsolute(moduleId) ? pathModule.relative(baseDir, moduleId) : moduleId).split('\\').join('/').replace(baseDir + '/', ''); + switch(relativeModuleId) { + case ".graphclient/sources/liquity2/introspectionSchema": + return Promise.resolve(importedModule$0) as T; + + default: + return Promise.reject(new Error(`Cannot find module '${relativeModuleId}'.`)); + } +}; + +const rootStore = new MeshStore('.graphclient', new FsStoreStorageAdapter({ + cwd: baseDir, + importFn, + fileType: "ts", +}), { + readonly: true, + validate: false +}); + +export const rawServeConfig: YamlConfig.Config['serve'] = undefined as any +export async function getMeshOptions(): Promise { +const pubsub = new PubSub(); +const sourcesStore = rootStore.child('sources'); +const logger = new DefaultLogger("GraphClient"); +const cache = new (MeshCache as any)({ + ...({} as any), + importFn, + store: rootStore.child('cache'), + pubsub, + logger, + } as any) + +const sources: MeshResolvedSource[] = []; +const transforms: MeshTransform[] = []; +const additionalEnvelopPlugins: MeshPlugin[] = []; +const liquity2Transforms = []; +const additionalTypeDefs = [] as any[]; +const liquity2Handler = new GraphqlHandler({ + name: "liquity2", + config: {"endpoint":"http://localhost:8000/subgraphs/name/liquity2/liquity2"}, + baseDir, + cache, + pubsub, + store: sourcesStore.child("liquity2"), + logger: logger.child("liquity2"), + importFn, + }); +sources[0] = { + name: 'liquity2', + handler: liquity2Handler, + transforms: liquity2Transforms + } +const additionalResolvers = [] as any[] +const merger = new(BareMerger as any)({ + cache, + pubsub, + logger: logger.child('bareMerger'), + store: rootStore.child('bareMerger') + }) +const documentHashMap = { + "45745732d955f1e9e56be85453b7766bb2b5d776bad265e1e6734958fbc111c8": TrovesByAccountDocument, +"45745732d955f1e9e56be85453b7766bb2b5d776bad265e1e6734958fbc111c8": TroveByIdDocument + } +additionalEnvelopPlugins.push(usePersistedOperations({ + getPersistedOperation(key) { + return documentHashMap[key]; + }, + ...{} + })) + + return { + sources, + transforms, + additionalTypeDefs, + additionalResolvers, + cache, + pubsub, + merger, + logger, + additionalEnvelopPlugins, + get documents() { + return [ + { + document: TrovesByAccountDocument, + get rawSDL() { + return printWithCache(TrovesByAccountDocument); + }, + location: 'TrovesByAccountDocument.graphql', + sha256Hash: '45745732d955f1e9e56be85453b7766bb2b5d776bad265e1e6734958fbc111c8' + },{ + document: TroveByIdDocument, + get rawSDL() { + return printWithCache(TroveByIdDocument); + }, + location: 'TroveByIdDocument.graphql', + sha256Hash: '45745732d955f1e9e56be85453b7766bb2b5d776bad265e1e6734958fbc111c8' + } + ]; + }, + fetchFn, + }; +} + +export function createBuiltMeshHTTPHandler(): MeshHTTPHandler { + return createMeshHTTPHandler({ + baseDir, + getBuiltMesh: getBuiltGraphClient, + rawServeConfig: undefined, + }) +} + + +let meshInstance$: Promise | undefined; + +export const pollingInterval = null; + +export function getBuiltGraphClient(): Promise { + if (meshInstance$ == null) { + if (pollingInterval) { + setInterval(() => { + getMeshOptions() + .then(meshOptions => getMesh(meshOptions)) + .then(newMesh => + meshInstance$.then(oldMesh => { + oldMesh.destroy() + meshInstance$ = Promise.resolve(newMesh) + }) + ).catch(err => { + console.error("Mesh polling failed so the existing version will be used:", err); + }); + }, pollingInterval) + } + meshInstance$ = getMeshOptions().then(meshOptions => getMesh(meshOptions)).then(mesh => { + const id = mesh.pubsub.subscribe('destroy', () => { + meshInstance$ = undefined; + mesh.pubsub.unsubscribe(id); + }); + return mesh; + }); + } + return meshInstance$; +} + +export const execute: ExecuteMeshFn = (...args) => getBuiltGraphClient().then(({ execute }) => execute(...args)); + +export const subscribe: SubscribeMeshFn = (...args) => getBuiltGraphClient().then(({ subscribe }) => subscribe(...args)); +export function getBuiltGraphSDK(globalContext?: TGlobalContext) { + const sdkRequester$ = getBuiltGraphClient().then(({ sdkRequesterFactory }) => sdkRequesterFactory(globalContext)); + return getSdk((...args) => sdkRequester$.then(sdkRequester => sdkRequester(...args))); +} +export type TrovesByAccountQueryVariables = Exact<{ + account: Scalars['Bytes']['input']; +}>; + + +export type TrovesByAccountQuery = { readonly troves: ReadonlyArray<( + Pick + & { readonly collateral: ( + Pick + & { readonly token: Pick } + ) } + )> }; + +export type TroveByIdQueryVariables = Exact<{ + id: Scalars['ID']['input']; +}>; + + +export type TroveByIdQuery = { readonly trove?: Maybe<( + Pick + & { readonly collateral: ( + Pick + & { readonly token: Pick } + ) } + )> }; + + +export const TrovesByAccountDocument = gql` + query TrovesByAccount($account: Bytes!) { + troves(where: {borrower: $account}) { + id + borrower + debt + deposit + stake + interestRate + createdAt + closedAt + collateral { + id + token { + symbol + name + } + minCollRatio + } + } +} + ` as unknown as DocumentNode; +export const TroveByIdDocument = gql` + query TroveById($id: ID!) { + trove(id: $id) { + id + borrower + debt + deposit + stake + interestRate + createdAt + closedAt + collateral { + id + token { + symbol + name + } + minCollRatio + } + } +} + ` as unknown as DocumentNode; + + + +export type Requester = (doc: DocumentNode, vars?: V, options?: C) => Promise | AsyncIterable +export function getSdk(requester: Requester) { + return { + TrovesByAccount(variables: TrovesByAccountQueryVariables, options?: C): Promise { + return requester(TrovesByAccountDocument, variables, options) as Promise; + }, + TroveById(variables: TroveByIdQueryVariables, options?: C): Promise { + return requester(TroveByIdDocument, variables, options) as Promise; + } + }; +} +export type Sdk = ReturnType; \ No newline at end of file diff --git a/frontend/app/.graphclient/persisted_operations.json b/frontend/app/.graphclient/persisted_operations.json new file mode 100644 index 00000000..5c0346b7 --- /dev/null +++ b/frontend/app/.graphclient/persisted_operations.json @@ -0,0 +1,3 @@ +{ + "45745732d955f1e9e56be85453b7766bb2b5d776bad265e1e6734958fbc111c8": "query TrovesByAccount($account: Bytes!) {\n troves(where: {borrower: $account}) {\n id\n borrower\n debt\n deposit\n stake\n interestRate\n createdAt\n closedAt\n collateral {\n id\n token {\n symbol\n name\n }\n minCollRatio\n }\n }\n}\n\nquery TroveById($id: ID!) {\n trove(id: $id) {\n id\n borrower\n debt\n deposit\n stake\n interestRate\n createdAt\n closedAt\n collateral {\n id\n token {\n symbol\n name\n }\n minCollRatio\n }\n }\n}" +} \ No newline at end of file diff --git a/frontend/app/.graphclient/schema.graphql b/frontend/app/.graphclient/schema.graphql new file mode 100644 index 00000000..d53c0294 --- /dev/null +++ b/frontend/app/.graphclient/schema.graphql @@ -0,0 +1,856 @@ +schema { + query: Query + subscription: Subscription +} + +""" +Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. +""" +directive @entity on OBJECT + +"""Defined a Subgraph ID for an object type""" +directive @subgraphId(id: String!) on OBJECT + +""" +creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. +""" +directive @derivedFrom(field: String!) on FIELD_DEFINITION + +enum Aggregation_interval { + hour + day +} + +scalar BigDecimal + +scalar BigInt + +input BlockChangedFilter { + number_gte: Int! +} + +input Block_height { + hash: Bytes + number: Int + number_gte: Int +} + +scalar Bytes + +type Collateral { + id: ID! + token: Token! + minCollRatio: BigInt! + troves(skip: Int = 0, first: Int = 100, orderBy: Trove_orderBy, orderDirection: OrderDirection, where: Trove_filter): [Trove!]! + addresses: CollateralAddresses! + totalDeposited: BigInt! + totalDebt: BigInt! +} + +type CollateralAddresses { + id: ID! + borrowerOperations: Bytes! + collateral: Collateral! + sortedTroves: Bytes! + stabilityPool: Bytes! + token: Bytes! + troveManager: Bytes! + troveNft: Bytes! +} + +input CollateralAddresses_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + borrowerOperations: Bytes + borrowerOperations_not: Bytes + borrowerOperations_gt: Bytes + borrowerOperations_lt: Bytes + borrowerOperations_gte: Bytes + borrowerOperations_lte: Bytes + borrowerOperations_in: [Bytes!] + borrowerOperations_not_in: [Bytes!] + borrowerOperations_contains: Bytes + borrowerOperations_not_contains: Bytes + collateral: String + collateral_not: String + collateral_gt: String + collateral_lt: String + collateral_gte: String + collateral_lte: String + collateral_in: [String!] + collateral_not_in: [String!] + collateral_contains: String + collateral_contains_nocase: String + collateral_not_contains: String + collateral_not_contains_nocase: String + collateral_starts_with: String + collateral_starts_with_nocase: String + collateral_not_starts_with: String + collateral_not_starts_with_nocase: String + collateral_ends_with: String + collateral_ends_with_nocase: String + collateral_not_ends_with: String + collateral_not_ends_with_nocase: String + collateral_: Collateral_filter + sortedTroves: Bytes + sortedTroves_not: Bytes + sortedTroves_gt: Bytes + sortedTroves_lt: Bytes + sortedTroves_gte: Bytes + sortedTroves_lte: Bytes + sortedTroves_in: [Bytes!] + sortedTroves_not_in: [Bytes!] + sortedTroves_contains: Bytes + sortedTroves_not_contains: Bytes + stabilityPool: Bytes + stabilityPool_not: Bytes + stabilityPool_gt: Bytes + stabilityPool_lt: Bytes + stabilityPool_gte: Bytes + stabilityPool_lte: Bytes + stabilityPool_in: [Bytes!] + stabilityPool_not_in: [Bytes!] + stabilityPool_contains: Bytes + stabilityPool_not_contains: Bytes + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + troveManager: Bytes + troveManager_not: Bytes + troveManager_gt: Bytes + troveManager_lt: Bytes + troveManager_gte: Bytes + troveManager_lte: Bytes + troveManager_in: [Bytes!] + troveManager_not_in: [Bytes!] + troveManager_contains: Bytes + troveManager_not_contains: Bytes + troveNft: Bytes + troveNft_not: Bytes + troveNft_gt: Bytes + troveNft_lt: Bytes + troveNft_gte: Bytes + troveNft_lte: Bytes + troveNft_in: [Bytes!] + troveNft_not_in: [Bytes!] + troveNft_contains: Bytes + troveNft_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [CollateralAddresses_filter] + or: [CollateralAddresses_filter] +} + +enum CollateralAddresses_orderBy { + id + borrowerOperations + collateral + collateral__id + collateral__minCollRatio + collateral__totalDeposited + collateral__totalDebt + sortedTroves + stabilityPool + token + troveManager + troveNft +} + +input Collateral_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + token: String + token_not: String + token_gt: String + token_lt: String + token_gte: String + token_lte: String + token_in: [String!] + token_not_in: [String!] + token_contains: String + token_contains_nocase: String + token_not_contains: String + token_not_contains_nocase: String + token_starts_with: String + token_starts_with_nocase: String + token_not_starts_with: String + token_not_starts_with_nocase: String + token_ends_with: String + token_ends_with_nocase: String + token_not_ends_with: String + token_not_ends_with_nocase: String + token_: Token_filter + minCollRatio: BigInt + minCollRatio_not: BigInt + minCollRatio_gt: BigInt + minCollRatio_lt: BigInt + minCollRatio_gte: BigInt + minCollRatio_lte: BigInt + minCollRatio_in: [BigInt!] + minCollRatio_not_in: [BigInt!] + troves_: Trove_filter + addresses_: CollateralAddresses_filter + totalDeposited: BigInt + totalDeposited_not: BigInt + totalDeposited_gt: BigInt + totalDeposited_lt: BigInt + totalDeposited_gte: BigInt + totalDeposited_lte: BigInt + totalDeposited_in: [BigInt!] + totalDeposited_not_in: [BigInt!] + totalDebt: BigInt + totalDebt_not: BigInt + totalDebt_gt: BigInt + totalDebt_lt: BigInt + totalDebt_gte: BigInt + totalDebt_lte: BigInt + totalDebt_in: [BigInt!] + totalDebt_not_in: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Collateral_filter] + or: [Collateral_filter] +} + +enum Collateral_orderBy { + id + token + token__id + token__name + token__symbol + token__decimals + minCollRatio + troves + addresses + addresses__id + addresses__borrowerOperations + addresses__sortedTroves + addresses__stabilityPool + addresses__token + addresses__troveManager + addresses__troveNft + totalDeposited + totalDebt +} + +""" +8 bytes signed integer + +""" +scalar Int8 + +type InterestRateBracket { + id: ID! + rate: BigInt! + totalDebt: BigInt! + totalTroves: Int! +} + +input InterestRateBracket_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + rate: BigInt + rate_not: BigInt + rate_gt: BigInt + rate_lt: BigInt + rate_gte: BigInt + rate_lte: BigInt + rate_in: [BigInt!] + rate_not_in: [BigInt!] + totalDebt: BigInt + totalDebt_not: BigInt + totalDebt_gt: BigInt + totalDebt_lt: BigInt + totalDebt_gte: BigInt + totalDebt_lte: BigInt + totalDebt_in: [BigInt!] + totalDebt_not_in: [BigInt!] + totalTroves: Int + totalTroves_not: Int + totalTroves_gt: Int + totalTroves_lt: Int + totalTroves_gte: Int + totalTroves_lte: Int + totalTroves_in: [Int!] + totalTroves_not_in: [Int!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [InterestRateBracket_filter] + or: [InterestRateBracket_filter] +} + +enum InterestRateBracket_orderBy { + id + rate + totalDebt + totalTroves +} + +"""Defines the order direction, either ascending or descending""" +enum OrderDirection { + asc + desc +} + +type Query { + collateral( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Collateral + collaterals( + skip: Int = 0 + first: Int = 100 + orderBy: Collateral_orderBy + orderDirection: OrderDirection + where: Collateral_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Collateral!]! + token( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Token + tokens( + skip: Int = 0 + first: Int = 100 + orderBy: Token_orderBy + orderDirection: OrderDirection + where: Token_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Token!]! + collateralAddresses( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): CollateralAddresses + collateralAddresses_collection( + skip: Int = 0 + first: Int = 100 + orderBy: CollateralAddresses_orderBy + orderDirection: OrderDirection + where: CollateralAddresses_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [CollateralAddresses!]! + interestRateBracket( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): InterestRateBracket + interestRateBrackets( + skip: Int = 0 + first: Int = 100 + orderBy: InterestRateBracket_orderBy + orderDirection: OrderDirection + where: InterestRateBracket_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [InterestRateBracket!]! + trove( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Trove + troves( + skip: Int = 0 + first: Int = 100 + orderBy: Trove_orderBy + orderDirection: OrderDirection + where: Trove_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Trove!]! + """Access to subgraph metadata""" + _meta(block: Block_height): _Meta_ +} + +type Subscription { + collateral( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Collateral + collaterals( + skip: Int = 0 + first: Int = 100 + orderBy: Collateral_orderBy + orderDirection: OrderDirection + where: Collateral_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Collateral!]! + token( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Token + tokens( + skip: Int = 0 + first: Int = 100 + orderBy: Token_orderBy + orderDirection: OrderDirection + where: Token_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Token!]! + collateralAddresses( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): CollateralAddresses + collateralAddresses_collection( + skip: Int = 0 + first: Int = 100 + orderBy: CollateralAddresses_orderBy + orderDirection: OrderDirection + where: CollateralAddresses_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [CollateralAddresses!]! + interestRateBracket( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): InterestRateBracket + interestRateBrackets( + skip: Int = 0 + first: Int = 100 + orderBy: InterestRateBracket_orderBy + orderDirection: OrderDirection + where: InterestRateBracket_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [InterestRateBracket!]! + trove( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Trove + troves( + skip: Int = 0 + first: Int = 100 + orderBy: Trove_orderBy + orderDirection: OrderDirection + where: Trove_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Trove!]! + """Access to subgraph metadata""" + _meta(block: Block_height): _Meta_ +} + +""" +A string representation of microseconds UNIX timestamp (16 digits) + +""" +scalar Timestamp + +type Token { + id: ID! + collateral: Collateral! + name: String! + symbol: String! + decimals: Int! +} + +input Token_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + collateral: String + collateral_not: String + collateral_gt: String + collateral_lt: String + collateral_gte: String + collateral_lte: String + collateral_in: [String!] + collateral_not_in: [String!] + collateral_contains: String + collateral_contains_nocase: String + collateral_not_contains: String + collateral_not_contains_nocase: String + collateral_starts_with: String + collateral_starts_with_nocase: String + collateral_not_starts_with: String + collateral_not_starts_with_nocase: String + collateral_ends_with: String + collateral_ends_with_nocase: String + collateral_not_ends_with: String + collateral_not_ends_with_nocase: String + collateral_: Collateral_filter + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + symbol: String + symbol_not: String + symbol_gt: String + symbol_lt: String + symbol_gte: String + symbol_lte: String + symbol_in: [String!] + symbol_not_in: [String!] + symbol_contains: String + symbol_contains_nocase: String + symbol_not_contains: String + symbol_not_contains_nocase: String + symbol_starts_with: String + symbol_starts_with_nocase: String + symbol_not_starts_with: String + symbol_not_starts_with_nocase: String + symbol_ends_with: String + symbol_ends_with_nocase: String + symbol_not_ends_with: String + symbol_not_ends_with_nocase: String + decimals: Int + decimals_not: Int + decimals_gt: Int + decimals_lt: Int + decimals_gte: Int + decimals_lte: Int + decimals_in: [Int!] + decimals_not_in: [Int!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Token_filter] + or: [Token_filter] +} + +enum Token_orderBy { + id + collateral + collateral__id + collateral__minCollRatio + collateral__totalDeposited + collateral__totalDebt + name + symbol + decimals +} + +type Trove { + id: ID! + borrower: Bytes! + debt: BigInt! + deposit: BigInt! + stake: BigInt! + interestRate: BigInt! + createdAt: BigInt! + closedAt: BigInt + collateral: Collateral! +} + +input Trove_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + borrower: Bytes + borrower_not: Bytes + borrower_gt: Bytes + borrower_lt: Bytes + borrower_gte: Bytes + borrower_lte: Bytes + borrower_in: [Bytes!] + borrower_not_in: [Bytes!] + borrower_contains: Bytes + borrower_not_contains: Bytes + debt: BigInt + debt_not: BigInt + debt_gt: BigInt + debt_lt: BigInt + debt_gte: BigInt + debt_lte: BigInt + debt_in: [BigInt!] + debt_not_in: [BigInt!] + deposit: BigInt + deposit_not: BigInt + deposit_gt: BigInt + deposit_lt: BigInt + deposit_gte: BigInt + deposit_lte: BigInt + deposit_in: [BigInt!] + deposit_not_in: [BigInt!] + stake: BigInt + stake_not: BigInt + stake_gt: BigInt + stake_lt: BigInt + stake_gte: BigInt + stake_lte: BigInt + stake_in: [BigInt!] + stake_not_in: [BigInt!] + interestRate: BigInt + interestRate_not: BigInt + interestRate_gt: BigInt + interestRate_lt: BigInt + interestRate_gte: BigInt + interestRate_lte: BigInt + interestRate_in: [BigInt!] + interestRate_not_in: [BigInt!] + createdAt: BigInt + createdAt_not: BigInt + createdAt_gt: BigInt + createdAt_lt: BigInt + createdAt_gte: BigInt + createdAt_lte: BigInt + createdAt_in: [BigInt!] + createdAt_not_in: [BigInt!] + closedAt: BigInt + closedAt_not: BigInt + closedAt_gt: BigInt + closedAt_lt: BigInt + closedAt_gte: BigInt + closedAt_lte: BigInt + closedAt_in: [BigInt!] + closedAt_not_in: [BigInt!] + collateral: String + collateral_not: String + collateral_gt: String + collateral_lt: String + collateral_gte: String + collateral_lte: String + collateral_in: [String!] + collateral_not_in: [String!] + collateral_contains: String + collateral_contains_nocase: String + collateral_not_contains: String + collateral_not_contains_nocase: String + collateral_starts_with: String + collateral_starts_with_nocase: String + collateral_not_starts_with: String + collateral_not_starts_with_nocase: String + collateral_ends_with: String + collateral_ends_with_nocase: String + collateral_not_ends_with: String + collateral_not_ends_with_nocase: String + collateral_: Collateral_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Trove_filter] + or: [Trove_filter] +} + +enum Trove_orderBy { + id + borrower + debt + deposit + stake + interestRate + createdAt + closedAt + collateral + collateral__id + collateral__minCollRatio + collateral__totalDeposited + collateral__totalDebt +} + +type _Block_ { + """The hash of the block""" + hash: Bytes + """The block number""" + number: Int! + """Integer representation of the timestamp stored in blocks for the chain""" + timestamp: Int + """The hash of the parent block""" + parentHash: Bytes +} + +"""The type for the top-level _meta field""" +type _Meta_ { + """ + Information about a specific subgraph block. The hash of the block + will be null if the _meta field has a block constraint that asks for + a block number. It will be filled if the _meta field has no block constraint + and therefore asks for the latest block + + """ + block: _Block_! + """The deployment ID""" + deployment: String! + """If `true`, the subgraph encountered indexing errors at some past block""" + hasIndexingErrors: Boolean! +} + +enum _SubgraphErrorPolicy_ { + """Data will be returned even if the subgraph has indexing errors""" + allow + """ + If the subgraph has indexing errors, data will be omitted. The default. + """ + deny +} \ No newline at end of file diff --git a/frontend/app/.graphclient/sources/liquity2/introspectionSchema.ts b/frontend/app/.graphclient/sources/liquity2/introspectionSchema.ts new file mode 100644 index 00000000..4d3350be --- /dev/null +++ b/frontend/app/.graphclient/sources/liquity2/introspectionSchema.ts @@ -0,0 +1,10096 @@ +// @ts-nocheck +import { buildASTSchema } from 'graphql'; + +const schemaAST = { + "kind": "Document", + "definitions": [ + { + "kind": "SchemaDefinition", + "operationTypes": [ + { + "kind": "OperationTypeDefinition", + "operation": "query", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Query" + } + } + }, + { + "kind": "OperationTypeDefinition", + "operation": "subscription", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Subscription" + } + } + } + ], + "directives": [] + }, + { + "kind": "DirectiveDefinition", + "description": { + "kind": "StringValue", + "value": "Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive.", + "block": true + }, + "name": { + "kind": "Name", + "value": "entity" + }, + "arguments": [], + "repeatable": false, + "locations": [ + { + "kind": "Name", + "value": "OBJECT" + } + ] + }, + { + "kind": "DirectiveDefinition", + "description": { + "kind": "StringValue", + "value": "Defined a Subgraph ID for an object type", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphId" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + } + ], + "repeatable": false, + "locations": [ + { + "kind": "Name", + "value": "OBJECT" + } + ] + }, + { + "kind": "DirectiveDefinition", + "description": { + "kind": "StringValue", + "value": "creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API.", + "block": true + }, + "name": { + "kind": "Name", + "value": "derivedFrom" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "field" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + } + ], + "repeatable": false, + "locations": [ + { + "kind": "Name", + "value": "FIELD_DEFINITION" + } + ] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "Aggregation_interval" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "hour" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "day" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "BigDecimal" + }, + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "BigInt" + }, + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "number_gte" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Block_height" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "hash" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "number" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "number_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "Bytes" + }, + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Collateral" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "troves" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_filter" + } + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "addresses" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "totalDebt" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "CollateralAddresses" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "troveManager" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "troveNft" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "CollateralAddresses_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "CollateralAddresses_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "borrowerOperations" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__minCollRatio" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__totalDeposited" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__totalDebt" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "sortedTroves" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "stabilityPool" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "troveManager" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "troveNft" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Collateral_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "troves_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "addresses_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "Collateral_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token__name" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token__symbol" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token__decimals" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "minCollRatio" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "troves" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses__borrowerOperations" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses__sortedTroves" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses__stabilityPool" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses__token" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses__troveManager" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "addresses__troveNft" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "totalDeposited" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "description": { + "kind": "StringValue", + "value": "8 bytes signed integer\n", + "block": true + }, + "name": { + "kind": "Name", + "value": "Int8" + }, + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "InterestRateBracket" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "rate" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "totalDebt" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "totalTroves" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "InterestRateBracket_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "rate_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "InterestRateBracket_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "rate" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "totalDebt" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "totalTroves" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "description": { + "kind": "StringValue", + "value": "Defines the order direction, either ascending or descending", + "block": true + }, + "name": { + "kind": "Name", + "value": "OrderDirection" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "asc" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "desc" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Query" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collaterals" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "tokens" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateralAddresses" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateralAddresses_collection" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "interestRateBracket" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "interestRateBrackets" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "trove" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "troves" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Access to subgraph metadata", + "block": true + }, + "name": { + "kind": "Name", + "value": "_meta" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_Meta_" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Subscription" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collaterals" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "tokens" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateralAddresses" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateralAddresses_collection" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "CollateralAddresses" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "interestRateBracket" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "interestRateBrackets" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "InterestRateBracket" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "trove" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "troves" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Access to subgraph metadata", + "block": true + }, + "name": { + "kind": "Name", + "value": "_meta" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_Meta_" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "description": { + "kind": "StringValue", + "value": "A string representation of microseconds UNIX timestamp (16 digits)\n", + "block": true + }, + "name": { + "kind": "Name", + "value": "Timestamp" + }, + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Token" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "name" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "symbol" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "decimals" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Token_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "name_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "symbol_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "decimals_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Token_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "Token_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__minCollRatio" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__totalDeposited" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__totalDebt" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "name" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "symbol" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "decimals" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Trove" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "borrower" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "debt" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "deposit" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "stake" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "interestRate" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "createdAt" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "closedAt" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Trove_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "borrower_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "debt_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "stake_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "collateral_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Collateral_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Trove_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "Trove_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "borrower" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "debt" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "deposit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "stake" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "interestRate" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "createdAt" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "closedAt" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__minCollRatio" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__totalDeposited" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "collateral__totalDebt" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "_Block_" + }, + "fields": [ + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "The hash of the block", + "block": true + }, + "name": { + "kind": "Name", + "value": "hash" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "The block number", + "block": true + }, + "name": { + "kind": "Name", + "value": "number" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Integer representation of the timestamp stored in blocks for the chain", + "block": true + }, + "name": { + "kind": "Name", + "value": "timestamp" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "The hash of the parent block", + "block": true + }, + "name": { + "kind": "Name", + "value": "parentHash" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "description": { + "kind": "StringValue", + "value": "The type for the top-level _meta field", + "block": true + }, + "name": { + "kind": "Name", + "value": "_Meta_" + }, + "fields": [ + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_Block_" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "The deployment ID", + "block": true + }, + "name": { + "kind": "Name", + "value": "deployment" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "If `true`, the subgraph encountered indexing errors at some past block", + "block": true + }, + "name": { + "kind": "Name", + "value": "hasIndexingErrors" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "description": { + "kind": "StringValue", + "value": "Data will be returned even if the subgraph has indexing errors", + "block": true + }, + "name": { + "kind": "Name", + "value": "allow" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "description": { + "kind": "StringValue", + "value": "If the subgraph has indexing errors, data will be omitted. The default.", + "block": true + }, + "name": { + "kind": "Name", + "value": "deny" + }, + "directives": [] + } + ], + "directives": [] + } + ] +}; + +export default buildASTSchema(schemaAST, { + assumeValid: true, + assumeValidSDL: true +}); \ No newline at end of file diff --git a/frontend/app/.graphclient/sources/liquity2/schema.graphql b/frontend/app/.graphclient/sources/liquity2/schema.graphql new file mode 100644 index 00000000..d53c0294 --- /dev/null +++ b/frontend/app/.graphclient/sources/liquity2/schema.graphql @@ -0,0 +1,856 @@ +schema { + query: Query + subscription: Subscription +} + +""" +Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive. +""" +directive @entity on OBJECT + +"""Defined a Subgraph ID for an object type""" +directive @subgraphId(id: String!) on OBJECT + +""" +creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API. +""" +directive @derivedFrom(field: String!) on FIELD_DEFINITION + +enum Aggregation_interval { + hour + day +} + +scalar BigDecimal + +scalar BigInt + +input BlockChangedFilter { + number_gte: Int! +} + +input Block_height { + hash: Bytes + number: Int + number_gte: Int +} + +scalar Bytes + +type Collateral { + id: ID! + token: Token! + minCollRatio: BigInt! + troves(skip: Int = 0, first: Int = 100, orderBy: Trove_orderBy, orderDirection: OrderDirection, where: Trove_filter): [Trove!]! + addresses: CollateralAddresses! + totalDeposited: BigInt! + totalDebt: BigInt! +} + +type CollateralAddresses { + id: ID! + borrowerOperations: Bytes! + collateral: Collateral! + sortedTroves: Bytes! + stabilityPool: Bytes! + token: Bytes! + troveManager: Bytes! + troveNft: Bytes! +} + +input CollateralAddresses_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + borrowerOperations: Bytes + borrowerOperations_not: Bytes + borrowerOperations_gt: Bytes + borrowerOperations_lt: Bytes + borrowerOperations_gte: Bytes + borrowerOperations_lte: Bytes + borrowerOperations_in: [Bytes!] + borrowerOperations_not_in: [Bytes!] + borrowerOperations_contains: Bytes + borrowerOperations_not_contains: Bytes + collateral: String + collateral_not: String + collateral_gt: String + collateral_lt: String + collateral_gte: String + collateral_lte: String + collateral_in: [String!] + collateral_not_in: [String!] + collateral_contains: String + collateral_contains_nocase: String + collateral_not_contains: String + collateral_not_contains_nocase: String + collateral_starts_with: String + collateral_starts_with_nocase: String + collateral_not_starts_with: String + collateral_not_starts_with_nocase: String + collateral_ends_with: String + collateral_ends_with_nocase: String + collateral_not_ends_with: String + collateral_not_ends_with_nocase: String + collateral_: Collateral_filter + sortedTroves: Bytes + sortedTroves_not: Bytes + sortedTroves_gt: Bytes + sortedTroves_lt: Bytes + sortedTroves_gte: Bytes + sortedTroves_lte: Bytes + sortedTroves_in: [Bytes!] + sortedTroves_not_in: [Bytes!] + sortedTroves_contains: Bytes + sortedTroves_not_contains: Bytes + stabilityPool: Bytes + stabilityPool_not: Bytes + stabilityPool_gt: Bytes + stabilityPool_lt: Bytes + stabilityPool_gte: Bytes + stabilityPool_lte: Bytes + stabilityPool_in: [Bytes!] + stabilityPool_not_in: [Bytes!] + stabilityPool_contains: Bytes + stabilityPool_not_contains: Bytes + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + troveManager: Bytes + troveManager_not: Bytes + troveManager_gt: Bytes + troveManager_lt: Bytes + troveManager_gte: Bytes + troveManager_lte: Bytes + troveManager_in: [Bytes!] + troveManager_not_in: [Bytes!] + troveManager_contains: Bytes + troveManager_not_contains: Bytes + troveNft: Bytes + troveNft_not: Bytes + troveNft_gt: Bytes + troveNft_lt: Bytes + troveNft_gte: Bytes + troveNft_lte: Bytes + troveNft_in: [Bytes!] + troveNft_not_in: [Bytes!] + troveNft_contains: Bytes + troveNft_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [CollateralAddresses_filter] + or: [CollateralAddresses_filter] +} + +enum CollateralAddresses_orderBy { + id + borrowerOperations + collateral + collateral__id + collateral__minCollRatio + collateral__totalDeposited + collateral__totalDebt + sortedTroves + stabilityPool + token + troveManager + troveNft +} + +input Collateral_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + token: String + token_not: String + token_gt: String + token_lt: String + token_gte: String + token_lte: String + token_in: [String!] + token_not_in: [String!] + token_contains: String + token_contains_nocase: String + token_not_contains: String + token_not_contains_nocase: String + token_starts_with: String + token_starts_with_nocase: String + token_not_starts_with: String + token_not_starts_with_nocase: String + token_ends_with: String + token_ends_with_nocase: String + token_not_ends_with: String + token_not_ends_with_nocase: String + token_: Token_filter + minCollRatio: BigInt + minCollRatio_not: BigInt + minCollRatio_gt: BigInt + minCollRatio_lt: BigInt + minCollRatio_gte: BigInt + minCollRatio_lte: BigInt + minCollRatio_in: [BigInt!] + minCollRatio_not_in: [BigInt!] + troves_: Trove_filter + addresses_: CollateralAddresses_filter + totalDeposited: BigInt + totalDeposited_not: BigInt + totalDeposited_gt: BigInt + totalDeposited_lt: BigInt + totalDeposited_gte: BigInt + totalDeposited_lte: BigInt + totalDeposited_in: [BigInt!] + totalDeposited_not_in: [BigInt!] + totalDebt: BigInt + totalDebt_not: BigInt + totalDebt_gt: BigInt + totalDebt_lt: BigInt + totalDebt_gte: BigInt + totalDebt_lte: BigInt + totalDebt_in: [BigInt!] + totalDebt_not_in: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Collateral_filter] + or: [Collateral_filter] +} + +enum Collateral_orderBy { + id + token + token__id + token__name + token__symbol + token__decimals + minCollRatio + troves + addresses + addresses__id + addresses__borrowerOperations + addresses__sortedTroves + addresses__stabilityPool + addresses__token + addresses__troveManager + addresses__troveNft + totalDeposited + totalDebt +} + +""" +8 bytes signed integer + +""" +scalar Int8 + +type InterestRateBracket { + id: ID! + rate: BigInt! + totalDebt: BigInt! + totalTroves: Int! +} + +input InterestRateBracket_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + rate: BigInt + rate_not: BigInt + rate_gt: BigInt + rate_lt: BigInt + rate_gte: BigInt + rate_lte: BigInt + rate_in: [BigInt!] + rate_not_in: [BigInt!] + totalDebt: BigInt + totalDebt_not: BigInt + totalDebt_gt: BigInt + totalDebt_lt: BigInt + totalDebt_gte: BigInt + totalDebt_lte: BigInt + totalDebt_in: [BigInt!] + totalDebt_not_in: [BigInt!] + totalTroves: Int + totalTroves_not: Int + totalTroves_gt: Int + totalTroves_lt: Int + totalTroves_gte: Int + totalTroves_lte: Int + totalTroves_in: [Int!] + totalTroves_not_in: [Int!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [InterestRateBracket_filter] + or: [InterestRateBracket_filter] +} + +enum InterestRateBracket_orderBy { + id + rate + totalDebt + totalTroves +} + +"""Defines the order direction, either ascending or descending""" +enum OrderDirection { + asc + desc +} + +type Query { + collateral( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Collateral + collaterals( + skip: Int = 0 + first: Int = 100 + orderBy: Collateral_orderBy + orderDirection: OrderDirection + where: Collateral_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Collateral!]! + token( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Token + tokens( + skip: Int = 0 + first: Int = 100 + orderBy: Token_orderBy + orderDirection: OrderDirection + where: Token_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Token!]! + collateralAddresses( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): CollateralAddresses + collateralAddresses_collection( + skip: Int = 0 + first: Int = 100 + orderBy: CollateralAddresses_orderBy + orderDirection: OrderDirection + where: CollateralAddresses_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [CollateralAddresses!]! + interestRateBracket( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): InterestRateBracket + interestRateBrackets( + skip: Int = 0 + first: Int = 100 + orderBy: InterestRateBracket_orderBy + orderDirection: OrderDirection + where: InterestRateBracket_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [InterestRateBracket!]! + trove( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Trove + troves( + skip: Int = 0 + first: Int = 100 + orderBy: Trove_orderBy + orderDirection: OrderDirection + where: Trove_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Trove!]! + """Access to subgraph metadata""" + _meta(block: Block_height): _Meta_ +} + +type Subscription { + collateral( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Collateral + collaterals( + skip: Int = 0 + first: Int = 100 + orderBy: Collateral_orderBy + orderDirection: OrderDirection + where: Collateral_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Collateral!]! + token( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Token + tokens( + skip: Int = 0 + first: Int = 100 + orderBy: Token_orderBy + orderDirection: OrderDirection + where: Token_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Token!]! + collateralAddresses( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): CollateralAddresses + collateralAddresses_collection( + skip: Int = 0 + first: Int = 100 + orderBy: CollateralAddresses_orderBy + orderDirection: OrderDirection + where: CollateralAddresses_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [CollateralAddresses!]! + interestRateBracket( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): InterestRateBracket + interestRateBrackets( + skip: Int = 0 + first: Int = 100 + orderBy: InterestRateBracket_orderBy + orderDirection: OrderDirection + where: InterestRateBracket_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [InterestRateBracket!]! + trove( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Trove + troves( + skip: Int = 0 + first: Int = 100 + orderBy: Trove_orderBy + orderDirection: OrderDirection + where: Trove_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Trove!]! + """Access to subgraph metadata""" + _meta(block: Block_height): _Meta_ +} + +""" +A string representation of microseconds UNIX timestamp (16 digits) + +""" +scalar Timestamp + +type Token { + id: ID! + collateral: Collateral! + name: String! + symbol: String! + decimals: Int! +} + +input Token_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + collateral: String + collateral_not: String + collateral_gt: String + collateral_lt: String + collateral_gte: String + collateral_lte: String + collateral_in: [String!] + collateral_not_in: [String!] + collateral_contains: String + collateral_contains_nocase: String + collateral_not_contains: String + collateral_not_contains_nocase: String + collateral_starts_with: String + collateral_starts_with_nocase: String + collateral_not_starts_with: String + collateral_not_starts_with_nocase: String + collateral_ends_with: String + collateral_ends_with_nocase: String + collateral_not_ends_with: String + collateral_not_ends_with_nocase: String + collateral_: Collateral_filter + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + symbol: String + symbol_not: String + symbol_gt: String + symbol_lt: String + symbol_gte: String + symbol_lte: String + symbol_in: [String!] + symbol_not_in: [String!] + symbol_contains: String + symbol_contains_nocase: String + symbol_not_contains: String + symbol_not_contains_nocase: String + symbol_starts_with: String + symbol_starts_with_nocase: String + symbol_not_starts_with: String + symbol_not_starts_with_nocase: String + symbol_ends_with: String + symbol_ends_with_nocase: String + symbol_not_ends_with: String + symbol_not_ends_with_nocase: String + decimals: Int + decimals_not: Int + decimals_gt: Int + decimals_lt: Int + decimals_gte: Int + decimals_lte: Int + decimals_in: [Int!] + decimals_not_in: [Int!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Token_filter] + or: [Token_filter] +} + +enum Token_orderBy { + id + collateral + collateral__id + collateral__minCollRatio + collateral__totalDeposited + collateral__totalDebt + name + symbol + decimals +} + +type Trove { + id: ID! + borrower: Bytes! + debt: BigInt! + deposit: BigInt! + stake: BigInt! + interestRate: BigInt! + createdAt: BigInt! + closedAt: BigInt + collateral: Collateral! +} + +input Trove_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + borrower: Bytes + borrower_not: Bytes + borrower_gt: Bytes + borrower_lt: Bytes + borrower_gte: Bytes + borrower_lte: Bytes + borrower_in: [Bytes!] + borrower_not_in: [Bytes!] + borrower_contains: Bytes + borrower_not_contains: Bytes + debt: BigInt + debt_not: BigInt + debt_gt: BigInt + debt_lt: BigInt + debt_gte: BigInt + debt_lte: BigInt + debt_in: [BigInt!] + debt_not_in: [BigInt!] + deposit: BigInt + deposit_not: BigInt + deposit_gt: BigInt + deposit_lt: BigInt + deposit_gte: BigInt + deposit_lte: BigInt + deposit_in: [BigInt!] + deposit_not_in: [BigInt!] + stake: BigInt + stake_not: BigInt + stake_gt: BigInt + stake_lt: BigInt + stake_gte: BigInt + stake_lte: BigInt + stake_in: [BigInt!] + stake_not_in: [BigInt!] + interestRate: BigInt + interestRate_not: BigInt + interestRate_gt: BigInt + interestRate_lt: BigInt + interestRate_gte: BigInt + interestRate_lte: BigInt + interestRate_in: [BigInt!] + interestRate_not_in: [BigInt!] + createdAt: BigInt + createdAt_not: BigInt + createdAt_gt: BigInt + createdAt_lt: BigInt + createdAt_gte: BigInt + createdAt_lte: BigInt + createdAt_in: [BigInt!] + createdAt_not_in: [BigInt!] + closedAt: BigInt + closedAt_not: BigInt + closedAt_gt: BigInt + closedAt_lt: BigInt + closedAt_gte: BigInt + closedAt_lte: BigInt + closedAt_in: [BigInt!] + closedAt_not_in: [BigInt!] + collateral: String + collateral_not: String + collateral_gt: String + collateral_lt: String + collateral_gte: String + collateral_lte: String + collateral_in: [String!] + collateral_not_in: [String!] + collateral_contains: String + collateral_contains_nocase: String + collateral_not_contains: String + collateral_not_contains_nocase: String + collateral_starts_with: String + collateral_starts_with_nocase: String + collateral_not_starts_with: String + collateral_not_starts_with_nocase: String + collateral_ends_with: String + collateral_ends_with_nocase: String + collateral_not_ends_with: String + collateral_not_ends_with_nocase: String + collateral_: Collateral_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Trove_filter] + or: [Trove_filter] +} + +enum Trove_orderBy { + id + borrower + debt + deposit + stake + interestRate + createdAt + closedAt + collateral + collateral__id + collateral__minCollRatio + collateral__totalDeposited + collateral__totalDebt +} + +type _Block_ { + """The hash of the block""" + hash: Bytes + """The block number""" + number: Int! + """Integer representation of the timestamp stored in blocks for the chain""" + timestamp: Int + """The hash of the parent block""" + parentHash: Bytes +} + +"""The type for the top-level _meta field""" +type _Meta_ { + """ + Information about a specific subgraph block. The hash of the block + will be null if the _meta field has a block constraint that asks for + a block number. It will be filled if the _meta field has no block constraint + and therefore asks for the latest block + + """ + block: _Block_! + """The deployment ID""" + deployment: String! + """If `true`, the subgraph encountered indexing errors at some past block""" + hasIndexingErrors: Boolean! +} + +enum _SubgraphErrorPolicy_ { + """Data will be returned even if the subgraph has indexing errors""" + allow + """ + If the subgraph has indexing errors, data will be omitted. The default. + """ + deny +} \ No newline at end of file diff --git a/frontend/app/.graphclient/sources/liquity2/types.ts b/frontend/app/.graphclient/sources/liquity2/types.ts new file mode 100644 index 00000000..4852f8c1 --- /dev/null +++ b/frontend/app/.graphclient/sources/liquity2/types.ts @@ -0,0 +1,856 @@ +// @ts-nocheck + +import { InContextSdkMethod } from '@graphql-mesh/types'; +import { MeshContext } from '@graphql-mesh/runtime'; + +export namespace Liquity2Types { + export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + BigDecimal: { input: bigint; output: bigint; } + BigInt: { input: bigint; output: bigint; } + Bytes: { input: string; output: string; } + Int8: { input: number; output: number; } + Timestamp: { input: string; output: string; } +}; + +export type Aggregation_interval = + | 'hour' + | 'day'; + +export type BlockChangedFilter = { + readonly number_gte: Scalars['Int']['input']; +}; + +export type Block_height = { + readonly hash?: InputMaybe; + readonly number?: InputMaybe; + readonly number_gte?: InputMaybe; +}; + +export type Collateral = { + readonly id: Scalars['ID']['output']; + readonly token: Token; + readonly minCollRatio: Scalars['BigInt']['output']; + readonly troves: ReadonlyArray; + readonly addresses: CollateralAddresses; + readonly totalDeposited: Scalars['BigInt']['output']; + readonly totalDebt: Scalars['BigInt']['output']; +}; + + +export type CollateraltrovesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; +}; + +export type CollateralAddresses = { + readonly id: Scalars['ID']['output']; + readonly borrowerOperations: Scalars['Bytes']['output']; + readonly collateral: Collateral; + readonly sortedTroves: Scalars['Bytes']['output']; + readonly stabilityPool: Scalars['Bytes']['output']; + readonly token: Scalars['Bytes']['output']; + readonly troveManager: Scalars['Bytes']['output']; + readonly troveNft: Scalars['Bytes']['output']; +}; + +export type CollateralAddresses_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly borrowerOperations?: InputMaybe; + readonly borrowerOperations_not?: InputMaybe; + readonly borrowerOperations_gt?: InputMaybe; + readonly borrowerOperations_lt?: InputMaybe; + readonly borrowerOperations_gte?: InputMaybe; + readonly borrowerOperations_lte?: InputMaybe; + readonly borrowerOperations_in?: InputMaybe>; + readonly borrowerOperations_not_in?: InputMaybe>; + readonly borrowerOperations_contains?: InputMaybe; + readonly borrowerOperations_not_contains?: InputMaybe; + readonly collateral?: InputMaybe; + readonly collateral_not?: InputMaybe; + readonly collateral_gt?: InputMaybe; + readonly collateral_lt?: InputMaybe; + readonly collateral_gte?: InputMaybe; + readonly collateral_lte?: InputMaybe; + readonly collateral_in?: InputMaybe>; + readonly collateral_not_in?: InputMaybe>; + readonly collateral_contains?: InputMaybe; + readonly collateral_contains_nocase?: InputMaybe; + readonly collateral_not_contains?: InputMaybe; + readonly collateral_not_contains_nocase?: InputMaybe; + readonly collateral_starts_with?: InputMaybe; + readonly collateral_starts_with_nocase?: InputMaybe; + readonly collateral_not_starts_with?: InputMaybe; + readonly collateral_not_starts_with_nocase?: InputMaybe; + readonly collateral_ends_with?: InputMaybe; + readonly collateral_ends_with_nocase?: InputMaybe; + readonly collateral_not_ends_with?: InputMaybe; + readonly collateral_not_ends_with_nocase?: InputMaybe; + readonly collateral_?: InputMaybe; + readonly sortedTroves?: InputMaybe; + readonly sortedTroves_not?: InputMaybe; + readonly sortedTroves_gt?: InputMaybe; + readonly sortedTroves_lt?: InputMaybe; + readonly sortedTroves_gte?: InputMaybe; + readonly sortedTroves_lte?: InputMaybe; + readonly sortedTroves_in?: InputMaybe>; + readonly sortedTroves_not_in?: InputMaybe>; + readonly sortedTroves_contains?: InputMaybe; + readonly sortedTroves_not_contains?: InputMaybe; + readonly stabilityPool?: InputMaybe; + readonly stabilityPool_not?: InputMaybe; + readonly stabilityPool_gt?: InputMaybe; + readonly stabilityPool_lt?: InputMaybe; + readonly stabilityPool_gte?: InputMaybe; + readonly stabilityPool_lte?: InputMaybe; + readonly stabilityPool_in?: InputMaybe>; + readonly stabilityPool_not_in?: InputMaybe>; + readonly stabilityPool_contains?: InputMaybe; + readonly stabilityPool_not_contains?: InputMaybe; + readonly token?: InputMaybe; + readonly token_not?: InputMaybe; + readonly token_gt?: InputMaybe; + readonly token_lt?: InputMaybe; + readonly token_gte?: InputMaybe; + readonly token_lte?: InputMaybe; + readonly token_in?: InputMaybe>; + readonly token_not_in?: InputMaybe>; + readonly token_contains?: InputMaybe; + readonly token_not_contains?: InputMaybe; + readonly troveManager?: InputMaybe; + readonly troveManager_not?: InputMaybe; + readonly troveManager_gt?: InputMaybe; + readonly troveManager_lt?: InputMaybe; + readonly troveManager_gte?: InputMaybe; + readonly troveManager_lte?: InputMaybe; + readonly troveManager_in?: InputMaybe>; + readonly troveManager_not_in?: InputMaybe>; + readonly troveManager_contains?: InputMaybe; + readonly troveManager_not_contains?: InputMaybe; + readonly troveNft?: InputMaybe; + readonly troveNft_not?: InputMaybe; + readonly troveNft_gt?: InputMaybe; + readonly troveNft_lt?: InputMaybe; + readonly troveNft_gte?: InputMaybe; + readonly troveNft_lte?: InputMaybe; + readonly troveNft_in?: InputMaybe>; + readonly troveNft_not_in?: InputMaybe>; + readonly troveNft_contains?: InputMaybe; + readonly troveNft_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type CollateralAddresses_orderBy = + | 'id' + | 'borrowerOperations' + | 'collateral' + | 'collateral__id' + | 'collateral__minCollRatio' + | 'collateral__totalDeposited' + | 'collateral__totalDebt' + | 'sortedTroves' + | 'stabilityPool' + | 'token' + | 'troveManager' + | 'troveNft'; + +export type Collateral_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly token?: InputMaybe; + readonly token_not?: InputMaybe; + readonly token_gt?: InputMaybe; + readonly token_lt?: InputMaybe; + readonly token_gte?: InputMaybe; + readonly token_lte?: InputMaybe; + readonly token_in?: InputMaybe>; + readonly token_not_in?: InputMaybe>; + readonly token_contains?: InputMaybe; + readonly token_contains_nocase?: InputMaybe; + readonly token_not_contains?: InputMaybe; + readonly token_not_contains_nocase?: InputMaybe; + readonly token_starts_with?: InputMaybe; + readonly token_starts_with_nocase?: InputMaybe; + readonly token_not_starts_with?: InputMaybe; + readonly token_not_starts_with_nocase?: InputMaybe; + readonly token_ends_with?: InputMaybe; + readonly token_ends_with_nocase?: InputMaybe; + readonly token_not_ends_with?: InputMaybe; + readonly token_not_ends_with_nocase?: InputMaybe; + readonly token_?: InputMaybe; + readonly minCollRatio?: InputMaybe; + readonly minCollRatio_not?: InputMaybe; + readonly minCollRatio_gt?: InputMaybe; + readonly minCollRatio_lt?: InputMaybe; + readonly minCollRatio_gte?: InputMaybe; + readonly minCollRatio_lte?: InputMaybe; + readonly minCollRatio_in?: InputMaybe>; + readonly minCollRatio_not_in?: InputMaybe>; + readonly troves_?: InputMaybe; + readonly addresses_?: InputMaybe; + readonly totalDeposited?: InputMaybe; + readonly totalDeposited_not?: InputMaybe; + readonly totalDeposited_gt?: InputMaybe; + readonly totalDeposited_lt?: InputMaybe; + readonly totalDeposited_gte?: InputMaybe; + readonly totalDeposited_lte?: InputMaybe; + readonly totalDeposited_in?: InputMaybe>; + readonly totalDeposited_not_in?: InputMaybe>; + readonly totalDebt?: InputMaybe; + readonly totalDebt_not?: InputMaybe; + readonly totalDebt_gt?: InputMaybe; + readonly totalDebt_lt?: InputMaybe; + readonly totalDebt_gte?: InputMaybe; + readonly totalDebt_lte?: InputMaybe; + readonly totalDebt_in?: InputMaybe>; + readonly totalDebt_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type Collateral_orderBy = + | 'id' + | 'token' + | 'token__id' + | 'token__name' + | 'token__symbol' + | 'token__decimals' + | 'minCollRatio' + | 'troves' + | 'addresses' + | 'addresses__id' + | 'addresses__borrowerOperations' + | 'addresses__sortedTroves' + | 'addresses__stabilityPool' + | 'addresses__token' + | 'addresses__troveManager' + | 'addresses__troveNft' + | 'totalDeposited' + | 'totalDebt'; + +export type InterestRateBracket = { + readonly id: Scalars['ID']['output']; + readonly rate: Scalars['BigInt']['output']; + readonly totalDebt: Scalars['BigInt']['output']; + readonly totalTroves: Scalars['Int']['output']; +}; + +export type InterestRateBracket_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly rate?: InputMaybe; + readonly rate_not?: InputMaybe; + readonly rate_gt?: InputMaybe; + readonly rate_lt?: InputMaybe; + readonly rate_gte?: InputMaybe; + readonly rate_lte?: InputMaybe; + readonly rate_in?: InputMaybe>; + readonly rate_not_in?: InputMaybe>; + readonly totalDebt?: InputMaybe; + readonly totalDebt_not?: InputMaybe; + readonly totalDebt_gt?: InputMaybe; + readonly totalDebt_lt?: InputMaybe; + readonly totalDebt_gte?: InputMaybe; + readonly totalDebt_lte?: InputMaybe; + readonly totalDebt_in?: InputMaybe>; + readonly totalDebt_not_in?: InputMaybe>; + readonly totalTroves?: InputMaybe; + readonly totalTroves_not?: InputMaybe; + readonly totalTroves_gt?: InputMaybe; + readonly totalTroves_lt?: InputMaybe; + readonly totalTroves_gte?: InputMaybe; + readonly totalTroves_lte?: InputMaybe; + readonly totalTroves_in?: InputMaybe>; + readonly totalTroves_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type InterestRateBracket_orderBy = + | 'id' + | 'rate' + | 'totalDebt' + | 'totalTroves'; + +/** Defines the order direction, either ascending or descending */ +export type OrderDirection = + | 'asc' + | 'desc'; + +export type Query = { + readonly collateral?: Maybe; + readonly collaterals: ReadonlyArray; + readonly token?: Maybe; + readonly tokens: ReadonlyArray; + readonly collateralAddresses?: Maybe; + readonly collateralAddresses_collection: ReadonlyArray; + readonly interestRateBracket?: Maybe; + readonly interestRateBrackets: ReadonlyArray; + readonly trove?: Maybe; + readonly troves: ReadonlyArray; + /** Access to subgraph metadata */ + readonly _meta?: Maybe<_Meta_>; +}; + + +export type QuerycollateralArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerycollateralsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytokenArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytokensArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerycollateralAddressesArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerycollateralAddresses_collectionArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryinterestRateBracketArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryinterestRateBracketsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytroveArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytrovesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type Query_metaArgs = { + block?: InputMaybe; +}; + +export type Subscription = { + readonly collateral?: Maybe; + readonly collaterals: ReadonlyArray; + readonly token?: Maybe; + readonly tokens: ReadonlyArray; + readonly collateralAddresses?: Maybe; + readonly collateralAddresses_collection: ReadonlyArray; + readonly interestRateBracket?: Maybe; + readonly interestRateBrackets: ReadonlyArray; + readonly trove?: Maybe; + readonly troves: ReadonlyArray; + /** Access to subgraph metadata */ + readonly _meta?: Maybe<_Meta_>; +}; + + +export type SubscriptioncollateralArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioncollateralsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontokenArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontokensArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioncollateralAddressesArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioncollateralAddresses_collectionArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioninterestRateBracketArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptioninterestRateBracketsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontroveArgs = { + id: Scalars['ID']['input']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontrovesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type Subscription_metaArgs = { + block?: InputMaybe; +}; + +export type Token = { + readonly id: Scalars['ID']['output']; + readonly collateral: Collateral; + readonly name: Scalars['String']['output']; + readonly symbol: Scalars['String']['output']; + readonly decimals: Scalars['Int']['output']; +}; + +export type Token_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly collateral?: InputMaybe; + readonly collateral_not?: InputMaybe; + readonly collateral_gt?: InputMaybe; + readonly collateral_lt?: InputMaybe; + readonly collateral_gte?: InputMaybe; + readonly collateral_lte?: InputMaybe; + readonly collateral_in?: InputMaybe>; + readonly collateral_not_in?: InputMaybe>; + readonly collateral_contains?: InputMaybe; + readonly collateral_contains_nocase?: InputMaybe; + readonly collateral_not_contains?: InputMaybe; + readonly collateral_not_contains_nocase?: InputMaybe; + readonly collateral_starts_with?: InputMaybe; + readonly collateral_starts_with_nocase?: InputMaybe; + readonly collateral_not_starts_with?: InputMaybe; + readonly collateral_not_starts_with_nocase?: InputMaybe; + readonly collateral_ends_with?: InputMaybe; + readonly collateral_ends_with_nocase?: InputMaybe; + readonly collateral_not_ends_with?: InputMaybe; + readonly collateral_not_ends_with_nocase?: InputMaybe; + readonly collateral_?: InputMaybe; + readonly name?: InputMaybe; + readonly name_not?: InputMaybe; + readonly name_gt?: InputMaybe; + readonly name_lt?: InputMaybe; + readonly name_gte?: InputMaybe; + readonly name_lte?: InputMaybe; + readonly name_in?: InputMaybe>; + readonly name_not_in?: InputMaybe>; + readonly name_contains?: InputMaybe; + readonly name_contains_nocase?: InputMaybe; + readonly name_not_contains?: InputMaybe; + readonly name_not_contains_nocase?: InputMaybe; + readonly name_starts_with?: InputMaybe; + readonly name_starts_with_nocase?: InputMaybe; + readonly name_not_starts_with?: InputMaybe; + readonly name_not_starts_with_nocase?: InputMaybe; + readonly name_ends_with?: InputMaybe; + readonly name_ends_with_nocase?: InputMaybe; + readonly name_not_ends_with?: InputMaybe; + readonly name_not_ends_with_nocase?: InputMaybe; + readonly symbol?: InputMaybe; + readonly symbol_not?: InputMaybe; + readonly symbol_gt?: InputMaybe; + readonly symbol_lt?: InputMaybe; + readonly symbol_gte?: InputMaybe; + readonly symbol_lte?: InputMaybe; + readonly symbol_in?: InputMaybe>; + readonly symbol_not_in?: InputMaybe>; + readonly symbol_contains?: InputMaybe; + readonly symbol_contains_nocase?: InputMaybe; + readonly symbol_not_contains?: InputMaybe; + readonly symbol_not_contains_nocase?: InputMaybe; + readonly symbol_starts_with?: InputMaybe; + readonly symbol_starts_with_nocase?: InputMaybe; + readonly symbol_not_starts_with?: InputMaybe; + readonly symbol_not_starts_with_nocase?: InputMaybe; + readonly symbol_ends_with?: InputMaybe; + readonly symbol_ends_with_nocase?: InputMaybe; + readonly symbol_not_ends_with?: InputMaybe; + readonly symbol_not_ends_with_nocase?: InputMaybe; + readonly decimals?: InputMaybe; + readonly decimals_not?: InputMaybe; + readonly decimals_gt?: InputMaybe; + readonly decimals_lt?: InputMaybe; + readonly decimals_gte?: InputMaybe; + readonly decimals_lte?: InputMaybe; + readonly decimals_in?: InputMaybe>; + readonly decimals_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type Token_orderBy = + | 'id' + | 'collateral' + | 'collateral__id' + | 'collateral__minCollRatio' + | 'collateral__totalDeposited' + | 'collateral__totalDebt' + | 'name' + | 'symbol' + | 'decimals'; + +export type Trove = { + readonly id: Scalars['ID']['output']; + readonly borrower: Scalars['Bytes']['output']; + readonly debt: Scalars['BigInt']['output']; + readonly deposit: Scalars['BigInt']['output']; + readonly stake: Scalars['BigInt']['output']; + readonly interestRate: Scalars['BigInt']['output']; + readonly createdAt: Scalars['BigInt']['output']; + readonly closedAt?: Maybe; + readonly collateral: Collateral; +}; + +export type Trove_filter = { + readonly id?: InputMaybe; + readonly id_not?: InputMaybe; + readonly id_gt?: InputMaybe; + readonly id_lt?: InputMaybe; + readonly id_gte?: InputMaybe; + readonly id_lte?: InputMaybe; + readonly id_in?: InputMaybe>; + readonly id_not_in?: InputMaybe>; + readonly borrower?: InputMaybe; + readonly borrower_not?: InputMaybe; + readonly borrower_gt?: InputMaybe; + readonly borrower_lt?: InputMaybe; + readonly borrower_gte?: InputMaybe; + readonly borrower_lte?: InputMaybe; + readonly borrower_in?: InputMaybe>; + readonly borrower_not_in?: InputMaybe>; + readonly borrower_contains?: InputMaybe; + readonly borrower_not_contains?: InputMaybe; + readonly debt?: InputMaybe; + readonly debt_not?: InputMaybe; + readonly debt_gt?: InputMaybe; + readonly debt_lt?: InputMaybe; + readonly debt_gte?: InputMaybe; + readonly debt_lte?: InputMaybe; + readonly debt_in?: InputMaybe>; + readonly debt_not_in?: InputMaybe>; + readonly deposit?: InputMaybe; + readonly deposit_not?: InputMaybe; + readonly deposit_gt?: InputMaybe; + readonly deposit_lt?: InputMaybe; + readonly deposit_gte?: InputMaybe; + readonly deposit_lte?: InputMaybe; + readonly deposit_in?: InputMaybe>; + readonly deposit_not_in?: InputMaybe>; + readonly stake?: InputMaybe; + readonly stake_not?: InputMaybe; + readonly stake_gt?: InputMaybe; + readonly stake_lt?: InputMaybe; + readonly stake_gte?: InputMaybe; + readonly stake_lte?: InputMaybe; + readonly stake_in?: InputMaybe>; + readonly stake_not_in?: InputMaybe>; + readonly interestRate?: InputMaybe; + readonly interestRate_not?: InputMaybe; + readonly interestRate_gt?: InputMaybe; + readonly interestRate_lt?: InputMaybe; + readonly interestRate_gte?: InputMaybe; + readonly interestRate_lte?: InputMaybe; + readonly interestRate_in?: InputMaybe>; + readonly interestRate_not_in?: InputMaybe>; + readonly createdAt?: InputMaybe; + readonly createdAt_not?: InputMaybe; + readonly createdAt_gt?: InputMaybe; + readonly createdAt_lt?: InputMaybe; + readonly createdAt_gte?: InputMaybe; + readonly createdAt_lte?: InputMaybe; + readonly createdAt_in?: InputMaybe>; + readonly createdAt_not_in?: InputMaybe>; + readonly closedAt?: InputMaybe; + readonly closedAt_not?: InputMaybe; + readonly closedAt_gt?: InputMaybe; + readonly closedAt_lt?: InputMaybe; + readonly closedAt_gte?: InputMaybe; + readonly closedAt_lte?: InputMaybe; + readonly closedAt_in?: InputMaybe>; + readonly closedAt_not_in?: InputMaybe>; + readonly collateral?: InputMaybe; + readonly collateral_not?: InputMaybe; + readonly collateral_gt?: InputMaybe; + readonly collateral_lt?: InputMaybe; + readonly collateral_gte?: InputMaybe; + readonly collateral_lte?: InputMaybe; + readonly collateral_in?: InputMaybe>; + readonly collateral_not_in?: InputMaybe>; + readonly collateral_contains?: InputMaybe; + readonly collateral_contains_nocase?: InputMaybe; + readonly collateral_not_contains?: InputMaybe; + readonly collateral_not_contains_nocase?: InputMaybe; + readonly collateral_starts_with?: InputMaybe; + readonly collateral_starts_with_nocase?: InputMaybe; + readonly collateral_not_starts_with?: InputMaybe; + readonly collateral_not_starts_with_nocase?: InputMaybe; + readonly collateral_ends_with?: InputMaybe; + readonly collateral_ends_with_nocase?: InputMaybe; + readonly collateral_not_ends_with?: InputMaybe; + readonly collateral_not_ends_with_nocase?: InputMaybe; + readonly collateral_?: InputMaybe; + /** Filter for the block changed event. */ + readonly _change_block?: InputMaybe; + readonly and?: InputMaybe>>; + readonly or?: InputMaybe>>; +}; + +export type Trove_orderBy = + | 'id' + | 'borrower' + | 'debt' + | 'deposit' + | 'stake' + | 'interestRate' + | 'createdAt' + | 'closedAt' + | 'collateral' + | 'collateral__id' + | 'collateral__minCollRatio' + | 'collateral__totalDeposited' + | 'collateral__totalDebt'; + +export type _Block_ = { + /** The hash of the block */ + readonly hash?: Maybe; + /** The block number */ + readonly number: Scalars['Int']['output']; + /** Integer representation of the timestamp stored in blocks for the chain */ + readonly timestamp?: Maybe; + /** The hash of the parent block */ + readonly parentHash?: Maybe; +}; + +/** The type for the top-level _meta field */ +export type _Meta_ = { + /** + * Information about a specific subgraph block. The hash of the block + * will be null if the _meta field has a block constraint that asks for + * a block number. It will be filled if the _meta field has no block constraint + * and therefore asks for the latest block + * + */ + readonly block: _Block_; + /** The deployment ID */ + readonly deployment: Scalars['String']['output']; + /** If `true`, the subgraph encountered indexing errors at some past block */ + readonly hasIndexingErrors: Scalars['Boolean']['output']; +}; + +export type _SubgraphErrorPolicy_ = + /** Data will be returned even if the subgraph has indexing errors */ + | 'allow' + /** If the subgraph has indexing errors, data will be omitted. The default. */ + | 'deny'; + + export type QuerySdk = { + /** null **/ + collateral: InContextSdkMethod, + /** null **/ + collaterals: InContextSdkMethod, + /** null **/ + token: InContextSdkMethod, + /** null **/ + tokens: InContextSdkMethod, + /** null **/ + collateralAddresses: InContextSdkMethod, + /** null **/ + collateralAddresses_collection: InContextSdkMethod, + /** null **/ + interestRateBracket: InContextSdkMethod, + /** null **/ + interestRateBrackets: InContextSdkMethod, + /** null **/ + trove: InContextSdkMethod, + /** null **/ + troves: InContextSdkMethod, + /** Access to subgraph metadata **/ + _meta: InContextSdkMethod + }; + + export type MutationSdk = { + + }; + + export type SubscriptionSdk = { + /** null **/ + collateral: InContextSdkMethod, + /** null **/ + collaterals: InContextSdkMethod, + /** null **/ + token: InContextSdkMethod, + /** null **/ + tokens: InContextSdkMethod, + /** null **/ + collateralAddresses: InContextSdkMethod, + /** null **/ + collateralAddresses_collection: InContextSdkMethod, + /** null **/ + interestRateBracket: InContextSdkMethod, + /** null **/ + interestRateBrackets: InContextSdkMethod, + /** null **/ + trove: InContextSdkMethod, + /** null **/ + troves: InContextSdkMethod, + /** Access to subgraph metadata **/ + _meta: InContextSdkMethod + }; + + export type Context = { + ["liquity2"]: { Query: QuerySdk, Mutation: MutationSdk, Subscription: SubscriptionSdk }, + + }; +} diff --git a/frontend/app/.graphclientrc.yml b/frontend/app/.graphclientrc.yml new file mode 100644 index 00000000..77649ff9 --- /dev/null +++ b/frontend/app/.graphclientrc.yml @@ -0,0 +1,20 @@ +sources: + - name: liquity2 + handler: + graphql: + endpoint: http://localhost:8000/subgraphs/name/liquity2/liquity2 + +codegen: + strictScalars: true + immutableTypes: true + useTypeImports: false # import name conflict if set to true + dedupeFragments: true + scalars: + BigDecimal: bigint + BigInt: bigint + Bytes: string + Int8: number + Timestamp: string + +documents: + - ./src/subgraph-queries.graphql diff --git a/frontend/app/package.json b/frontend/app/package.json index 2f3f4533..399b94c5 100644 --- a/frontend/app/package.json +++ b/frontend/app/package.json @@ -6,15 +6,17 @@ "scripts": { "build": "pnpm build-uikit && pnpm panda-codegen && next build", "build-uikit": "cd ../uikit && pnpm build && pnpm panda-codegen", + "coverage": "vitest run --coverage ./src", "dev": "rm -rf ./.next && next dev", "fmt": "dprint fmt **/*.{ts,tsx,js,json,html,md}", "lint": "pnpm oxlint ./src --import-plugin --nextjs-plugin --react-perf-plugin --jsx-a11y-plugin --allow pedantic", "panda-codegen": "panda codegen --silent", + "subgraph-codegen": "pnpm graphclient build", "test": "vitest", - "coverage": "vitest run --coverage ./src", "update-liquity-abis": "node --loader ts-node/esm ./scripts/update-liquity-abis.ts" }, "dependencies": { + "@graphprotocol/client-cli": "^3.0.7", "@liquity2/uikit": "workspace:*", "@rainbow-me/rainbowkit": "^2.1.3", "@react-spring/web": "^9.7.4", diff --git a/frontend/app/src/comps/AppLayout/AppLayout.tsx b/frontend/app/src/comps/AppLayout/AppLayout.tsx index 632de09d..790443d3 100644 --- a/frontend/app/src/comps/AppLayout/AppLayout.tsx +++ b/frontend/app/src/comps/AppLayout/AppLayout.tsx @@ -1,6 +1,7 @@ import type { ReactNode } from "react"; import { UpdatePrices } from "@/src/comps/Debug/UpdatePrices"; +import { ProtocolStats } from "@/src/comps/ProtocolStats/ProtocolStats"; import { TopBar } from "@/src/comps/TopBar/TopBar"; import { css } from "@/styled-system/css"; @@ -45,6 +46,14 @@ export function AppLayout({ })} > {children} +
+ +
diff --git a/frontend/app/src/comps/Debug/UpdatePrices.tsx b/frontend/app/src/comps/Debug/UpdatePrices.tsx index 20c2a7b2..a5b30a46 100644 --- a/frontend/app/src/comps/Debug/UpdatePrices.tsx +++ b/frontend/app/src/comps/Debug/UpdatePrices.tsx @@ -44,7 +44,7 @@ export function UpdatePrices() { color: "contentAlt", })} > - Simulate prices + simulate prices {" "}
void; -}) { - const position = ( - DEMO_MODE - ? ACCOUNT_POSITIONS.find((position) => ( - (position.type === "borrow" || position.type === "leverage") && position.troveId === troveId - )) - : undefined - ) as PositionLoan | undefined; - - const collateral = position && TOKENS_BY_SYMBOL[position.collateral]; - - const collPriceUsd = usePrice(collateral ? collateral.symbol : null); - - if (!position || !collPriceUsd || !collateral) { - return null; - } - - const { deposit, borrowed, interestRate } = position; - - const loanDetails = getLoanDetails( - deposit, - borrowed, - interestRate, - collateral.collateralRatio, - collPriceUsd, - ); - - const { - ltv, - depositPreLeverage, - leverageFactor, - redemptionRisk, - liquidationRisk, - } = loanDetails; - - const maxLtv = dn.div(dn.from(1, 18), collateral.collateralRatio); - - return ( -
-

-
-
- {leverageMode - ? - : } -
- {leverageMode ? "Leverage loan" : "BOLD loan"} -
-

-
-
- {leverageMode - ? ( -
-
{fmtnum(position.deposit)}
- -
-
- - {loanDetails.status === "underwater" || leverageFactor === null - ? INFINITY - : `${roundToDecimal(leverageFactor, 1)}x`} - -
- { - /*
- ${fmtnum(dn.mul(position.deposit, collPriceUsd), { digits: 2 })} -
*/ - } -
-
- ) - : ( -
- {fmtnum(position.borrowed)} - -
- )} -
-
-
-
- -
- {leverageMode - ? ( - - - {fmtnum(depositPreLeverage)} {TOKENS_BY_SYMBOL[position.collateral].name} - - - ) - : ( - -
- {fmtnum(position.deposit)} {TOKENS_BY_SYMBOL[position.collateral].name} -
-
- )} - - - ${fmtnum(loanDetails.liquidationPrice)} - - - - {fmtnum(dn.mul(position.interestRate, 100))}% - - -
- {ltv && fmtnum(dn.mul(ltv, 100))}% -
-
- - - - {formatRisk(liquidationRisk)} - - - {redemptionRisk && ( - - - - {formatRisk(redemptionRisk)} - - - )} -
-
- ); -} - -function GridItem({ - children, - label, -}: { - children: ReactNode; - label: string; -}) { - return ( -
-
- {label} -
-
- {children} -
-
- ); -} diff --git a/frontend/app/src/comps/Positions/Positions.tsx b/frontend/app/src/comps/Positions/Positions.tsx index 6b5c2190..b729804a 100644 --- a/frontend/app/src/comps/Positions/Positions.tsx +++ b/frontend/app/src/comps/Positions/Positions.tsx @@ -5,10 +5,12 @@ import { ActionCard } from "@/src/comps/ActionCard/ActionCard"; import { LQTY_SUPPLY } from "@/src/constants"; import content from "@/src/content"; import { ACCOUNT_POSITIONS } from "@/src/demo-mode"; +import { DEMO_MODE } from "@/src/env"; import { formatLiquidationRisk, formatRedemptionRisk } from "@/src/formatting"; import { getLiquidationRisk, getLtv, getRedemptionRisk } from "@/src/liquity-math"; import { useAccount } from "@/src/services/Ethereum"; import { usePrice } from "@/src/services/Prices"; +import { useLoansByAccount } from "@/src/subgraph-hooks"; import { riskLevelToStatusMode } from "@/src/uikit-utils"; import { css } from "@/styled-system/css"; import { @@ -26,12 +28,16 @@ import { import { a, useTransition } from "@react-spring/web"; import * as dn from "dnum"; import Link from "next/link"; +import { useState } from "react"; import { match } from "ts-pattern"; export function Positions() { const account = useAccount(); + const loans = useLoansByAccount(account.address); - const positionCards = ACCOUNT_POSITIONS.map((position, index) => ( + const positions = DEMO_MODE ? ACCOUNT_POSITIONS : loans.data ?? []; + + const positionCards = positions.map((position, index) => ( match(position) .with({ type: "borrow" }, ({ type, ...props }) => [index, ]) .with({ type: "earn" }, ({ type, ...props }) => [index, ]) @@ -40,7 +46,7 @@ export function Positions() { .exhaustive() )); - const mode = account.isConnected && positionCards.length > 0 ? "positions" : "actions"; + const mode = account.isConnected && (positionCards.length > 0 || loans.isLoading) ? "positions" : "actions"; const actionCards = [ , @@ -49,52 +55,152 @@ export function Positions() { , ].map((card, index) => [index, card]); - const positionTransitions = useTransition(mode === "positions" ? positionCards : actionCards, { - keys: ([index]) => `${index}${mode}`, - from: { opacity: 0, transform: "scale3d(0.95, 0.95, 1)" }, - enter: { opacity: 1, transform: "scale3d(1, 1, 1)" }, - leave: { display: "none", immediate: true }, - trail: 10, + const [increment, setIncrement] = useState(0); + + const positionTransitions = useTransition( + mode === "positions" ? positionCards : actionCards, + { + keys: ([index]) => `${index}${mode}${increment}`, + from: { opacity: 0, transform: "scale3d(0.95, 0.95, 1)" }, + enter: { opacity: 1, transform: "scale3d(1, 1, 1)" }, + leave: { display: "none", immediate: true }, + trail: 10, + config: { + mass: 1, + tension: 2800, + friction: 80, + }, + }, + ); + + const [forceLoading, setForceLoading] = useState(false); + + return ( + { + setForceLoading(true); + setTimeout(() => { + setForceLoading(false); + setIncrement((i) => i + 1); + }, 1000); + }} + > + {positionTransitions((style, [_, card]) => ( + + {card} + + ))} + + ); +} + +function PositionsGroup({ + children, + loading, + mode, + onTitleClick, +}: { + children: ReactNode; + loading?: boolean; + mode: "positions" | "actions"; + onTitleClick?: () => void; +}) { + const loadingTransition = useTransition(loading, { + from: { + opacity: 0, + transform: "scale3d(0.95, 0.95, 1)", + }, + enter: { + opacity: 1, + transform: "scale3d(1, 1, 1)", + }, + leave: { + opacity: 0, + transform: "scale3d(0.95, 0.95, 1)", + }, config: { mass: 1, - tension: 2800, + tension: 1800, friction: 80, }, }); - return (

{mode === "positions" ? content.home.myPositionsTitle : content.home.openPositionTitle}

- {positionTransitions((style, [_, card]) => ( - ( + loading && ( + +
+
+ Fetching positions… +
+ + ) + ))} + {!loading && ( +
- {card} - - ))} + {children} +
+ )}
); @@ -131,13 +237,13 @@ function PositionBorrow({ - {dn.format(dn.add(deposit, borrowed), 4)} + {dn.format(dn.add(deposit, borrowed), 2)} ), - label: "Total debt", + // label: "Total debt", + label: ( +
+ Backed by {deposit ? dn.format(deposit, 2) : "−"} {token.name} + +
+ ), }} secondary={ diff --git a/frontend/app/src/comps/ProtocolStats/ProtocolStats.tsx b/frontend/app/src/comps/ProtocolStats/ProtocolStats.tsx index b15eddc8..4dfb54dc 100644 --- a/frontend/app/src/comps/ProtocolStats/ProtocolStats.tsx +++ b/frontend/app/src/comps/ProtocolStats/ProtocolStats.tsx @@ -1,194 +1,66 @@ -import type { SpringValue } from "@react-spring/web"; -import type { Dnum } from "dnum"; -import type { ComponentProps } from "react"; +"use client"; import content from "@/src/content"; +import { BORROW_STATS } from "@/src/demo-mode"; +import { usePrice } from "@/src/services/Prices"; import { css } from "@/styled-system/css"; -import { TokenIcon } from "@liquity2/uikit"; -import { a, useTransition } from "@react-spring/web"; +import { HFlex, TokenIcon } from "@liquity2/uikit"; import * as dn from "dnum"; -import { useEffect, useState } from "react"; -import { stringify } from "viem"; - -type Stat = { - amount: Dnum | string; - label: string; - token?: ComponentProps["symbol"]; -}; export function ProtocolStats() { - const stats = useStats(); - - const transitions = useTransition(stats, { - keys: (stat) => stat.label, - from: { progress: 0 }, - initial: { progress: 0 }, - enter: { progress: 1 }, - leave: { progress: 0, immediate: true }, - config: { - mass: 1, - tension: 1800, - friction: 60, - }, - trail: 60, - }); + const prices = [ + ["LQTY", usePrice("LQTY")], + ["BOLD", usePrice("BOLD")], + ["ETH", usePrice("ETH")], + ] as const; - return ( -
-

{content.home.statsBar.label}

- {stats.length > 0 - ? ( -
- {transitions(({ progress }, item) => { - return ( - - ); - })} -
- ) - : ( -
- Loading… -
- )} -
+ const totalTvl = Object.values(BORROW_STATS).reduce( + (acc, { tvl }) => dn.add(acc, tvl), + dn.from(0, 18), ); -} -function AmountUsd({ - amount, - label, - tokenSymbol, - progress, -}: { - amount?: Dnum | string; - label: string; - tokenSymbol?: ComponentProps["symbol"]; - progress: SpringValue; -}) { return (
- {tokenSymbol && ( - `scale(${1.4 - v * 0.4})`), - }} - > - - - )} - {content.home.statsBar.label}
+ + + TVL{" "} + + ${dn.format(totalTvl, { compact: true })} + + + {prices.map(([symbol, price]) => { + return ( + + + + {symbol} + + ${price && dn.format(price, { + digits: 2, + trailingZeros: true, + })} + + + + ); })} - style={{ - opacity: progress, - transform: progress.to((v) => `scale(${1 - (1 - v) * 0.2})`), - }} - > -
{label}
- - {typeof amount === "string" ? amount : amount && dn.format(amount, { - digits: 2, - trailingZeros: true, - })} - - - {" $"} - - +
); } - -function formatMillions(amount: Dnum) { - return dn.gt(amount, 1_000_000) - ? `${dn.format(dn.div(amount, 1_000_000))}M` - : dn.format(amount, { compact: true }); -} - -function useStats() { - const [stats, setStats] = useState([]); - useEffect(() => { - const update = () => { - setStats([{ - amount: formatMillions([1_408_000_000n, 0]), - label: "TVL", - }, { - amount: [13_72n + BigInt(-100 + Math.round(Math.random() * 200)), 2], - label: "LQTY", - token: "LQTY", - }, { - amount: [1_01n + BigInt(-10 + Math.round(Math.random() * 20)), 2], - label: "BOLD", - token: "BOLD", - }, { - amount: [3421_55n, 2], - label: "ETH", - token: "ETH", - }]); - }; - - update(); - - const timer = setInterval(update, 30_000); - - return () => { - clearInterval(timer); - }; - }, []); - - return stats; -} diff --git a/frontend/app/src/demo-mode/demo-data.ts b/frontend/app/src/demo-mode/demo-data.ts index 23db0b4a..3fb9d64f 100644 --- a/frontend/app/src/demo-mode/demo-data.ts +++ b/frontend/app/src/demo-mode/demo-data.ts @@ -7,7 +7,7 @@ import * as dn from "dnum"; export const PRICE_UPDATE_INTERVAL = 15_000; export const PRICE_UPDATE_VARIATION = 0.003; -export const PRICE_UPDATE_MANUAL = true; +export const PRICE_UPDATE_MANUAL = false; export const LQTY_PRICE = dn.from(0.64832, 18); export const ETH_PRICE = dn.from(2_580.293872, 18); @@ -38,7 +38,7 @@ export const ACCOUNT_POSITIONS: Position[] = [ collateral: "RETH", deposit: dn.from(5.5, 18), interestRate: dn.from(0.067, 18), - troveId: 1n, + troveId: "0x01", }, { type: "leverage", @@ -46,7 +46,7 @@ export const ACCOUNT_POSITIONS: Position[] = [ collateral: "ETH", deposit: dn.from(19.20, 18), // 8 ETH @ 2.4 leverage interestRate: dn.from(0.045, 18), - troveId: 2n, + troveId: "0x02", }, { type: "earn", diff --git a/frontend/app/src/dnum-utils.ts b/frontend/app/src/dnum-utils.ts index 87deb50c..a5d3dcab 100644 --- a/frontend/app/src/dnum-utils.ts +++ b/frontend/app/src/dnum-utils.ts @@ -2,6 +2,10 @@ import type { Dnum } from "dnum"; import * as dn from "dnum"; +export function dnum18(value: string | bigint | number): Dnum { + return [BigInt(value), 18]; +} + export function formatAmountCompact(value: Dnum, digits: number = 2) { const valueAbs = dn.abs(value); if (dn.eq(valueAbs, 1e9) || dn.gt(valueAbs, 1e9)) { diff --git a/frontend/app/src/liquity-utils.ts b/frontend/app/src/liquity-utils.ts index 0645c4c2..9143adcf 100644 --- a/frontend/app/src/liquity-utils.ts +++ b/frontend/app/src/liquity-utils.ts @@ -1,5 +1,5 @@ import type { TroveId } from "@/src/types"; -import type { Address } from "@liquity2/uikit"; +import type { Address, CollateralSymbol } from "@liquity2/uikit"; import type { Dnum } from "dnum"; import { useCollateralContract, useProtocolContract } from "@/src/contracts"; @@ -34,6 +34,12 @@ type Rewards = { bold: Dnum; }; +export function shortenTroveId(troveId: TroveId, chars = 4) { + return troveId.length < chars * 2 + 2 + ? troveId + : troveId.slice(0, chars + 2) + "…" + troveId.slice(-chars); +} + function troveStatusFromNumber(value: number): TroveStatus { return match(value) .with(0, () => "nonExistent") @@ -333,6 +339,21 @@ export function getTroveId(owner: Address, ownerIndex: bigint | number) { ))); } +export function getCollateralFromTroveSymbol(symbol: string): null | CollateralSymbol { + symbol = symbol.toUpperCase(); + if (symbol === "ETH" || symbol === "WETH") { + return "ETH"; + } + // this is to handle symbols used for testing, like stETH1, stETH2, etc. + if (symbol.startsWith("RETH")) { + return "RETH"; + } + if (symbol.startsWith("STETH")) { + return "STETH"; + } + return null; +} + export function useCollTokenAllowance() { const account = useAccount(); diff --git a/frontend/app/src/screens/BorrowScreen/BorrowScreen.tsx b/frontend/app/src/screens/BorrowScreen/BorrowScreen.tsx index 30662d3c..988c6e85 100644 --- a/frontend/app/src/screens/BorrowScreen/BorrowScreen.tsx +++ b/frontend/app/src/screens/BorrowScreen/BorrowScreen.tsx @@ -24,6 +24,7 @@ import { IconSuggestion, InfoTooltip, InputField, + isCollateralSymbol, PillButton, TextButton, TokenIcon, @@ -35,11 +36,6 @@ import { match, P } from "ts-pattern"; const collateralSymbols = COLLATERALS.map(({ symbol }) => symbol); -function isCollateralSymbol(symbol: string): symbol is typeof collateralSymbols[number] { - const c: string[] = collateralSymbols; - return c.includes(symbol); -} - export function BorrowScreen() { const account = useAccount(); diff --git a/frontend/app/src/screens/EarnPoolScreen/EarnPoolScreen.tsx b/frontend/app/src/screens/EarnPoolScreen/EarnPoolScreen.tsx index a7fa0e6c..33ef2231 100644 --- a/frontend/app/src/screens/EarnPoolScreen/EarnPoolScreen.tsx +++ b/frontend/app/src/screens/EarnPoolScreen/EarnPoolScreen.tsx @@ -11,7 +11,15 @@ import { ACCOUNT_BALANCES, ACCOUNT_POSITIONS, EARN_POOLS } from "@/src/demo-mode import { useAccount } from "@/src/services/Ethereum"; import { infoTooltipProps } from "@/src/uikit-utils"; import { css } from "@/styled-system/css"; -import { COLLATERALS, HFlex, InfoTooltip, Tabs, TokenIcon, TokenIconGroup, TOKENS_BY_SYMBOL } from "@liquity2/uikit"; +import { + HFlex, + InfoTooltip, + isCollateralSymbol, + Tabs, + TokenIcon, + TokenIconGroup, + TOKENS_BY_SYMBOL, +} from "@liquity2/uikit"; import * as dn from "dnum"; import { useParams, useRouter } from "next/navigation"; import { DepositPanel } from "./DepositPanel"; @@ -24,13 +32,6 @@ const TABS = [ { action: "claim", label: content.earnScreen.tabs.claim }, ] as const; -const collateralSymbols = COLLATERALS.map(({ symbol }) => symbol); -function isCollateralSymbol(symbol: string): symbol is typeof collateralSymbols[number] { - console.log(symbol, collateralSymbols); - const c: string[] = collateralSymbols; - return c.includes(symbol); -} - export function EarnPoolScreen() { const account = useAccount(); const router = useRouter(); diff --git a/frontend/app/src/screens/HomeScreen/HomeProtocolStats.tsx b/frontend/app/src/screens/HomeScreen/HomeProtocolStats.tsx index b83141f4..e69de29b 100644 --- a/frontend/app/src/screens/HomeScreen/HomeProtocolStats.tsx +++ b/frontend/app/src/screens/HomeScreen/HomeProtocolStats.tsx @@ -1,63 +0,0 @@ -import content from "@/src/content"; -import { BORROW_STATS } from "@/src/demo-mode"; -import { usePrice } from "@/src/services/Prices"; -import { css } from "@/styled-system/css"; -import { HFlex, TokenIcon } from "@liquity2/uikit"; -import * as dn from "dnum"; - -export function HomeProtocolStats() { - const prices = [ - ["LQTY", usePrice("LQTY")], - ["BOLD", usePrice("BOLD")], - ["ETH", usePrice("ETH")], - ] as const; - - const totalTvl = Object.values(BORROW_STATS).reduce( - (acc, { tvl }) => dn.add(acc, tvl), - dn.from(0, 18), - ); - - return ( -
-
{content.home.statsBar.label}
- - - TVL{" "} - - ${dn.format(totalTvl, { compact: true })} - - - {prices.map(([symbol, price]) => { - return ( - - - - {symbol} - - ${price && dn.format(price, { - digits: 2, - trailingZeros: true, - })} - - - - ); - })} - -
- ); -} diff --git a/frontend/app/src/screens/HomeScreen/HomeScreen.tsx b/frontend/app/src/screens/HomeScreen/HomeScreen.tsx index 24734982..92907da4 100644 --- a/frontend/app/src/screens/HomeScreen/HomeScreen.tsx +++ b/frontend/app/src/screens/HomeScreen/HomeScreen.tsx @@ -6,7 +6,6 @@ import { css } from "@/styled-system/css"; import { AnchorTextButton, COLLATERALS, IconBorrow, IconEarn, TokenIcon } from "@liquity2/uikit"; import * as dn from "dnum"; import Link from "next/link"; -import { HomeProtocolStats } from "./HomeProtocolStats"; import { HomeTable } from "./HomeTable"; export function HomeScreen() { @@ -152,13 +151,6 @@ export function HomeScreen() { })} />
-
- -
); } diff --git a/frontend/app/src/screens/LeverageScreen/LeverageScreen.tsx b/frontend/app/src/screens/LeverageScreen/LeverageScreen.tsx index d8c4cdae..1406f188 100644 --- a/frontend/app/src/screens/LeverageScreen/LeverageScreen.tsx +++ b/frontend/app/src/screens/LeverageScreen/LeverageScreen.tsx @@ -23,6 +23,7 @@ import { IconSuggestion, InfoTooltip, InputField, + isCollateralSymbol, TextButton, TokenIcon, VFlex, @@ -33,11 +34,6 @@ import { useEffect, useState } from "react"; const collateralSymbols = COLLATERALS.map(({ symbol }) => symbol); -function isCollateralSymbol(symbol: string): symbol is typeof collateralSymbols[number] { - const c: string[] = collateralSymbols; - return c.includes(symbol); -} - export function LeverageScreen() { const account = useAccount(); const router = useRouter(); diff --git a/frontend/app/src/screens/LoanScreen/LoanCard.tsx b/frontend/app/src/screens/LoanScreen/LoanCard.tsx new file mode 100644 index 00000000..5d25be80 --- /dev/null +++ b/frontend/app/src/screens/LoanScreen/LoanCard.tsx @@ -0,0 +1,513 @@ +import type { PositionLoan, TroveId } from "@/src/types"; +import type { ReactNode } from "react"; +import type { LoanLoadingState } from "./LoanScreen"; + +import { INFINITY } from "@/src/characters"; +import { Value } from "@/src/comps/Value/Value"; +import { formatRisk } from "@/src/formatting"; +import { fmtnum } from "@/src/formatting"; +import { getLoanDetails } from "@/src/liquity-math"; +import { shortenTroveId } from "@/src/liquity-utils"; +import { usePrice } from "@/src/services/Prices"; +import { riskLevelToStatusMode } from "@/src/uikit-utils"; +import { roundToDecimal } from "@/src/utils"; +import { css } from "@/styled-system/css"; +import { token } from "@/styled-system/tokens"; +import { Button, HFlex, IconBorrow, IconLeverage, StatusDot, TokenIcon, TOKENS_BY_SYMBOL } from "@liquity2/uikit"; +import { a, useSpring } from "@react-spring/web"; +import * as dn from "dnum"; +import { match, P } from "ts-pattern"; + +const LOAN_CARD_HEIGHT = 246; + +export function LoanCard({ + leverageMode, + loadingState, + loan, + onLeverageModeChange, + onRetry, + troveId, +}: { + leverageMode: boolean; + loadingState: LoanLoadingState; + loan: PositionLoan | null; + onLeverageModeChange: (leverageMode: boolean) => void; + onRetry: () => void; + troveId: TroveId; +}) { + const collateral = loan && TOKENS_BY_SYMBOL[loan.collateral]; + const collPriceUsd = usePrice(collateral ? collateral.symbol : null); + + const loanDetails = loan && collateral && getLoanDetails( + loan.deposit, + loan.borrowed, + loan.interestRate, + collateral.collateralRatio, + collPriceUsd, + ); + + const { + ltv, + depositPreLeverage, + leverageFactor, + redemptionRisk, + liquidationRisk, + } = loanDetails || {}; + + const maxLtv = collateral && dn.div( + dn.from(1, 18), + collateral.collateralRatio, + ); + + return ( + + {loan + && loanDetails + && collateral + && typeof leverageFactor === "number" + && depositPreLeverage + && maxLtv + && liquidationRisk + && ( + <> +
+
+ {leverageMode + ? ( +
+
{fmtnum(loan.deposit)}
+ +
+
+ + {loanDetails.status === "underwater" || leverageFactor === null + ? INFINITY + : `${roundToDecimal(leverageFactor, 1)}x`} + +
+
+
+ ) + : ( +
+ {fmtnum(loan.borrowed)} + +
+ )} +
+
+
+
+
+ {leverageMode + ? ( + + + {fmtnum(depositPreLeverage)} {collateral.name} + + + ) + : ( + +
+ {fmtnum(loan.deposit)} {collateral.name} +
+
+ )} + + + ${fmtnum(loanDetails.liquidationPrice)} + + + + {fmtnum(dn.mul(loan.interestRate, 100))}% + + +
+ {ltv && fmtnum(dn.mul(ltv, 100))}% +
+
+ + + + {formatRisk(liquidationRisk)} + + + {redemptionRisk && ( + + + + {formatRisk(redemptionRisk)} + + + )} +
+ + )} +
+ ); +} + +function LoadingCard({ + children, + leverage, + loadingState, + loan, + onRetry, + troveId, +}: { + children: ReactNode; + leverage: boolean; + loadingState: LoanLoadingState; + loan: PositionLoan | null; + onRetry: () => void; + troveId: TroveId; +}) { + const title = leverage ? "Leverage loan" : "BOLD loan"; + const titleFull = loan && `${title}: ${troveId}`; + + const spring = useSpring({ + to: match(loadingState) + .with( + P.union( + "loading", + "error", + "awaiting-confirmation", + "not-found", + ), + (s) => ({ + cardtransform: "scale3d(0.95, 0.95, 1)", + containerHeight: ( + window.innerHeight + - 120 // top bar + - 24 * 2 // padding + - 48 // bottom bar 1 + - 40 + // - 40 // bottom bar 2 + ), + cardHeight: s === "error" || s === "not-found" ? 180 : 120, + cardBackground: token("colors.blue:50"), + cardColor: token("colors.blue:950"), + }), + ) + .otherwise(() => ({ + cardtransform: "scale3d(1, 1, 1)", + containerHeight: LOAN_CARD_HEIGHT, + cardHeight: LOAN_CARD_HEIGHT, + cardBackground: token("colors.blue:950"), + cardColor: token("colors.white"), + })), + config: { + mass: 1, + tension: 2000, + friction: 120, + }, + }); + + return ( + + +

+
+
+ {leverage + ? + : } +
+ {title} +
+

+ {match(loadingState) + .with(P.union("loading", "awaiting-confirmation"), () => ( +
+ Fetching loan + + {shortenTroveId(troveId)}… + + +
+ )) + .with("error", () => ( +
+
+ Error fetching loan{" "} + + {shortenTroveId(troveId)} + . +
+
+ )) + .with("not-found", () => ( +
+
+ Loan{" "} + + {shortenTroveId(troveId)} + {" "} + not found. +
+
+ )) + .otherwise(() => ( +
+ {children} +
+ ))} +
+
+ ); +} + +function Spinner({ + size = 24, +}: { + size?: number; +}) { + const spring = useSpring({ + from: { rotate: 0 }, + to: { rotate: 360 }, + loop: true, + config: { + duration: 1000, + }, + }); + return ( + `rotate(${r}deg)`), + }} + > + + + ); +} + +function GridItem({ + children, + label, +}: { + children: ReactNode; + label: string; +}) { + return ( +
+
+ {label} +
+
+ {children} +
+
+ ); +} diff --git a/frontend/app/src/screens/LoanScreen/LoanScreen.tsx b/frontend/app/src/screens/LoanScreen/LoanScreen.tsx index b1abcc4b..17367871 100644 --- a/frontend/app/src/screens/LoanScreen/LoanScreen.tsx +++ b/frontend/app/src/screens/LoanScreen/LoanScreen.tsx @@ -1,14 +1,15 @@ "use client"; -import type { PositionLoan } from "@/src/types"; - -import { Position } from "@/src/comps/Position/Position"; import { Screen } from "@/src/comps/Screen/Screen"; -import { ACCOUNT_POSITIONS } from "@/src/demo-mode"; +import { useLoanById } from "@/src/subgraph-hooks"; +import { isTroveId } from "@/src/types"; import { css } from "@/styled-system/css"; -import { IconSettings, Tabs, VFlex } from "@liquity2/uikit"; +import { Button, IconSettings, Tabs, VFlex } from "@liquity2/uikit"; +import { a, useTransition } from "@react-spring/web"; import { notFound, useRouter, useSearchParams, useSelectedLayoutSegment } from "next/navigation"; -import { useMemo, useState } from "react"; +import { useState } from "react"; +import { match, P } from "ts-pattern"; +import { LoanCard } from "./LoanCard"; import { PanelClosePosition } from "./PanelClosePosition"; import { PanelUpdateBorrowPosition } from "./PanelUpdateBorrowPosition"; import { PanelUpdateLeveragePosition } from "./PanelUpdateLeveragePosition"; @@ -20,89 +21,161 @@ const TABS = [ { label: "Close position", id: "close" }, ]; +export type LoanLoadingState = + | "awaiting-confirmation" + | "error" + | "loading" + | "not-found" + | "success"; + +export const LOAN_STATES: LoanLoadingState[] = [ + "success", + "loading", + "awaiting-confirmation", + "error", + "not-found", +]; + export function LoanScreen() { const router = useRouter(); const action = useSelectedLayoutSegment() ?? "colldebt"; const searchParams = useSearchParams(); - const trove = useTrove(searchParams.get("id")); + const paramId = searchParams.get("id"); + const troveId = isTroveId(paramId) ? paramId : null; - const [leverageMode, setLeverageMode] = useState(trove?.type === "leverage"); - - if (!trove) { + const loan = useLoanById(troveId); + if (loan.isLoadingError || !troveId) { notFound(); } const tab = TABS.findIndex(({ id }) => id === action); + const [leverageMode, setLeverageMode] = useState(false); + + const [forcedLoadingState, setForcedLoadingState] = useState(null); + const loadingState = forcedLoadingState ?? match(loan) + .returnType() + .with({ status: "error" }, () => "error") + .with({ status: "pending" }, () => "loading") + .with({ data: null }, () => "not-found") + .with({ data: P.nonNullable }, () => "success") + .otherwise(() => "error"); + + const setLoadingstate = (state: LoanLoadingState) => { + setForcedLoadingState(state); + }; + // const [loadingState, setLoadingstate] = useState("loading"); + + const tabsTransition = useTransition(loadingState, { + from: { opacity: 0 }, + enter: { opacity: 1 }, + leave: { opacity: 0 }, + config: { + mass: 1, + tension: 2000, + friction: 120, + }, + }); return ( +
+ loan state: {LOAN_STATES.map((s) => ( +
- { + setLoadingstate("loading"); + loan.refetch(); + }} + troveId={troveId} /> -
-
Manage your position
-
- -
-
- - ({ - label, - panelId: `p-${id}`, - tabId: `t-${id}`, - }))} - selected={tab} - onSelect={(index) => { - router.push(`/loan/${TABS[index].id}?id=${trove.troveId}`, { scroll: false }); - }} - /> - {action === "colldebt" && ( - leverageMode - ? - : - )} - {action === "rate" && } - {action === "close" && } - + {tabsTransition((style, item) => ( + item === "success" && loan.data && ( + +
+
Manage your position
+
+ +
+
+ + ({ + label, + panelId: `p-${id}`, + tabId: `t-${id}`, + }))} + selected={tab} + onSelect={(index) => { + router.push( + `/loan/${TABS[index].id}?id=${loan.data?.troveId}`, + { scroll: false }, + ); + }} + /> + {action === "colldebt" && ( + leverageMode + ? + : + )} + {action === "rate" && } + {action === "close" && } + +
+ ) + ))}
); } - -function useTrove(troveId: string | null) { - return useMemo(() => { - if (troveId === null) { - return null; - } - let troveIdInt: bigint; - try { - troveIdInt = BigInt(troveId); - } catch { - return null; - } - const position = ACCOUNT_POSITIONS.find((position) => (( - position.type === "borrow" || position.type === "leverage" - ) && position.troveId === troveIdInt)) ?? null; - return position as PositionLoan | null; - }, [troveId]); -} diff --git a/frontend/app/src/services/Prices.tsx b/frontend/app/src/services/Prices.tsx index 5943c694..9288901c 100644 --- a/frontend/app/src/services/Prices.tsx +++ b/frontend/app/src/services/Prices.tsx @@ -65,7 +65,8 @@ let useWatchPrices = function useWatchPrices(callback: (prices: Prices) => void) ]); }; -if (DEMO_MODE) { +// if (DEMO_MODE) { +if (true) { // TODO: fix useWatchPrices above so we only use this if DEMO_MODE=true // in demo mode, simulate a variation of the prices useWatchPrices = (callback) => { useEffect(() => { diff --git a/frontend/app/src/subgraph-hooks.ts b/frontend/app/src/subgraph-hooks.ts new file mode 100644 index 00000000..42ebe0ae --- /dev/null +++ b/frontend/app/src/subgraph-hooks.ts @@ -0,0 +1,94 @@ +import type { Address, PositionLoan, TroveId } from "@/src/types"; + +import { getBuiltGraphSDK } from "@/.graphclient"; +import { ACCOUNT_POSITIONS } from "@/src/demo-mode"; +import { dnum18 } from "@/src/dnum-utils"; +import { DEMO_MODE } from "@/src/env"; +import { getCollateralFromTroveSymbol } from "@/src/liquity-utils"; +import { isPositionLoan, isTroveId } from "@/src/types"; +import { sleep } from "@/src/utils"; +import { useQuery } from "@tanstack/react-query"; + +const graphSdk = getBuiltGraphSDK(); + +function subgraphTroveToLoan( + trove: Awaited>["troves"][0], +): PositionLoan { + if (!isTroveId(trove.id)) { + throw new Error(`Invalid trove ID: ${trove.id}`); + } + const collSymbol = getCollateralFromTroveSymbol(trove.collateral.token.symbol); + if (!collSymbol) { + throw new Error(`Invalid collateral symbol: ${collSymbol}`); + } + return { + type: "borrow", + borrowed: dnum18(trove.debt), + collateral: collSymbol, + deposit: dnum18(trove.deposit), + interestRate: dnum18(trove.interestRate), + troveId: trove.id, + }; +} + +export let useLoansByAccount = (account?: Address) => { + return useQuery({ + queryKey: ["TrovesByAccount", account], + queryFn: async () => { + if (!account) { + return null; + } + const { troves } = await graphSdk.TrovesByAccount({ account }); + return troves.map(subgraphTroveToLoan); + }, + }); +}; + +if (DEMO_MODE) { + useLoansByAccount = (account?: Address) => { + return useQuery({ + queryKey: ["TrovesByAccount", account], + queryFn: async () => { + if (!account) { + return []; + } + return ACCOUNT_POSITIONS.filter(isPositionLoan); + }, + }); + }; +} + +export let useLoanById = (troveId?: TroveId | null) => { + return useQuery({ + queryKey: ["TroveById", troveId], + queryFn: async () => { + if (!troveId || !isTroveId(troveId)) { + return null; + } + await sleep(500); + const { trove } = await graphSdk.TroveById({ id: troveId }); + return trove && isTroveId(trove.id) + ? subgraphTroveToLoan(trove) + : null; + }, + }); +}; + +if (DEMO_MODE) { + useLoanById = (troveId?: TroveId | null) => { + return useQuery({ + queryKey: ["TroveById", troveId], + queryFn: async () => { + if (!troveId || !isTroveId(troveId)) { + return null; + } + for (const position of ACCOUNT_POSITIONS) { + if (isPositionLoan(position) && position.troveId === troveId) { + return position; + } + } + return null; + }, + }); + }; +} diff --git a/frontend/app/src/subgraph-queries.graphql b/frontend/app/src/subgraph-queries.graphql new file mode 100644 index 00000000..44a43cad --- /dev/null +++ b/frontend/app/src/subgraph-queries.graphql @@ -0,0 +1,41 @@ +query TrovesByAccount($account: Bytes!) { + troves(where: { borrower: $account }) { + id + borrower + debt + deposit + stake + interestRate + createdAt + closedAt + collateral { + id + token { + symbol + name + } + minCollRatio + } + } +} + +query TroveById($id: ID!) { + trove(id: $id) { + id + borrower + debt + deposit + stake + interestRate + createdAt + closedAt + collateral { + id + token { + symbol + name + } + minCollRatio + } + } +} diff --git a/frontend/app/src/types.ts b/frontend/app/src/types.ts index 1e403354..d004bc6d 100644 --- a/frontend/app/src/types.ts +++ b/frontend/app/src/types.ts @@ -6,7 +6,11 @@ export type { Address, CollateralSymbol, Dnum, Token }; export type RiskLevel = "low" | "medium" | "high"; -export type TroveId = bigint; +export type TroveId = `0x${string}`; + +export function isTroveId(value: unknown): value is TroveId { + return typeof value === "string" && /^0x[0-9a-f]+$/.test(value); +} // Utility type to get type-safe entries of an object, // to be used like this: Object.entries(o) as Entries) @@ -34,6 +38,10 @@ export type PositionLoan = { troveId: TroveId; }; +export function isPositionLoan(position: Position): position is PositionLoan { + return position.type === "borrow" || position.type === "leverage"; +} + export type PositionEarn = { type: "earn"; apr: Dnum; diff --git a/frontend/uikit/src/tokens.ts b/frontend/uikit/src/tokens.ts index f63990de..6003bced 100644 --- a/frontend/uikit/src/tokens.ts +++ b/frontend/uikit/src/tokens.ts @@ -9,6 +9,10 @@ import tokenSteth from "./token-icons/wsteth.svg"; export type CollateralSymbol = "ETH" | "RETH" | "STETH"; +export function isCollateralSymbol(symbol: string): symbol is CollateralSymbol { + return symbol === "ETH" || symbol === "RETH" || symbol === "STETH"; +} + export type CollateralToken = Token & { collateralRatio: number; symbol: CollateralSymbol;