From e1aa348eb11d9acc0f1cad1a6bd4f919cf9ce567 Mon Sep 17 00:00:00 2001 From: tiltom Date: Tue, 18 Apr 2023 15:45:49 +0200 Subject: [PATCH] SOV-2028: Enforce Babelfish Aggregator pause state for tokens on Bridge (#2517) * Add Babelfish subgraph * Add Babelfish client * Fetch paused tokens * Check the correct contract for crossbridge assets * chore: remove old comment --------- Co-authored-by: soulBit --- .env.local | 2 + .env.mainnet.local | 2 + .env.production | 2 + .env.testnet | 2 + codegen.fetch.yml | 5 + codegen.yml | 15 + netlify.toml | 4 + .../components/TokenSelector/TokenItem.tsx | 32 +- .../components/TokenSelector/index.tsx | 4 + .../hooks/useGetPausedTokens.ts | 13 + src/index.tsx | 15 +- src/utils/classifiers.ts | 2 + src/utils/clients.ts | 16 + src/utils/graphql/babelfish/generated.tsx | 1275 +++++++++++++++ .../operations/getPausedBassetList.graphql | 6 + src/utils/graphql/babelfish/schema.graphql | 1393 +++++++++++++++++ 16 files changed, 2773 insertions(+), 15 deletions(-) create mode 100644 src/app/pages/BridgeDepositPage/hooks/useGetPausedTokens.ts create mode 100644 src/utils/clients.ts create mode 100644 src/utils/graphql/babelfish/generated.tsx create mode 100644 src/utils/graphql/babelfish/operations/getPausedBassetList.graphql create mode 100644 src/utils/graphql/babelfish/schema.graphql diff --git a/.env.local b/.env.local index 801df17969..108724d836 100644 --- a/.env.local +++ b/.env.local @@ -24,4 +24,6 @@ REACT_APP_INFURA_KEY=12b606df88b3420aad7828acd0f11902 REACT_APP_GRAPH_RSK=https://subgraph.test.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph +REACT_APP_GRAPH_BABELFISH=https://babelfish-subgraph.test.sovryn.app/subgraphs/name/babelfish/rskTestnet-graph + REACT_APP_BSC_API_KEY=QWDBQDJY6P3AQ1YA3CMXKG3ADCZQQGWPBT diff --git a/.env.mainnet.local b/.env.mainnet.local index ef19500fd8..b342d15096 100644 --- a/.env.mainnet.local +++ b/.env.mainnet.local @@ -23,4 +23,6 @@ REACT_APP_BYPASS_MAINTENANCE=1 REACT_APP_GRAPH_RSK=https://subgraph.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph +REACT_APP_GRAPH_BABELFISH=https://babelfish-subgraph.sovryn.app/subgraphs/name/babelfish/rsk-graph + REACT_APP_BSC_API_KEY=QWDBQDJY6P3AQ1YA3CMXKG3ADCZQQGWPBT diff --git a/.env.production b/.env.production index 368deb7039..d57399f5d0 100644 --- a/.env.production +++ b/.env.production @@ -16,4 +16,6 @@ REACT_APP_INFURA_KEY=12b606df88b3420aad7828acd0f11902 REACT_APP_GRAPH_RSK=https://subgraph.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph +REACT_APP_GRAPH_BABELFISH=https://babelfish-subgraph.sovryn.app/subgraphs/name/babelfish/rsk-graph + REACT_APP_BSC_API_KEY=QWDBQDJY6P3AQ1YA3CMXKG3ADCZQQGWPBT diff --git a/.env.testnet b/.env.testnet index ff9760d925..76830f20b9 100644 --- a/.env.testnet +++ b/.env.testnet @@ -17,4 +17,6 @@ REACT_APP_INFURA_KEY=12b606df88b3420aad7828acd0f11902 REACT_APP_GRAPH_RSK=https://subgraph.test.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph +REACT_APP_GRAPH_BABELFISH=https://babelfish-subgraph.test.sovryn.app/subgraphs/name/babelfish/rskTestnet-graph + REACT_APP_BSC_API_KEY=QWDBQDJY6P3AQ1YA3CMXKG3ADCZQQGWPBT diff --git a/codegen.fetch.yml b/codegen.fetch.yml index 13b051251e..0fff3575a4 100644 --- a/codegen.fetch.yml +++ b/codegen.fetch.yml @@ -4,6 +4,11 @@ generates: - ${REACT_APP_GRAPH_RSK} plugins: - schema-ast + ./src/utils/graphql/babelfish/schema.graphql: + schema: + - ${REACT_APP_GRAPH_BABELFISH} + plugins: + - schema-ast hooks: afterAllFileWrite: - prettier ./src/utils/graphql/**/schema.graphql --write diff --git a/codegen.yml b/codegen.yml index 6c6111c79a..693e8173c5 100644 --- a/codegen.yml +++ b/codegen.yml @@ -14,6 +14,21 @@ generates: Bytes: string BigInt: string BigDecimal: string + ./src/utils/graphql/babelfish/generated.tsx: + schema: + - './src/utils/graphql/babelfish/schema.graphql' + documents: + - './src/utils/graphql/babelfish/operations/*.graphql' + plugins: + - typescript + - typescript-operations + - typescript-react-apollo + config: + withHooks: true + scalars: + Bytes: string + BigInt: string + BigDecimal: string hooks: afterAllFileWrite: - prettier ./src/utils/graphql --write diff --git a/netlify.toml b/netlify.toml index 2793f44af2..b9bdfe556b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -16,6 +16,7 @@ REACT_APP_ESTIMATOR_URI = "https://simulator.sovryn.app" REACT_APP_MAILCHIMP = "https://gmail.us17.list-manage.com/subscribe/post?u=e66850f0b51ebbdbe1f2c3e36&id=ef5d452839" REACT_APP_GRAPH_RSK = "https://subgraph.test.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" + REACT_APP_GRAPH_BABELFISH = "https://babelfish-subgraph.test.sovryn.app/subgraphs/name/babelfish/rskTestnet-graph" [context.production] [context.production.environment] @@ -23,6 +24,7 @@ REACT_APP_GOOGLE_ANALYTICS = "GTM-KTSX2PL" REACT_APP_GOOGLE_ANALYTICS_CLICKTHROUGH = "GTM-5MWCJN3" REACT_APP_GRAPH_RSK = "https://subgraph.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" + REACT_APP_GRAPH_BABELFISH = "https://babelfish-subgraph.sovryn.app/subgraphs/name/babelfish/rsk-graph" REACT_APP_INFURA_KEY = "12b606df88b3420aad7828acd0f11902" REACT_APP_TRANSAK_ENV = "PRODUCTION" REACT_APP_TRANSAK_API_KEY = "fadc5140-4d8f-4eda-ab37-5999dfedf353" @@ -41,6 +43,7 @@ REACT_APP_GOOGLE_ANALYTICS = "GTM-KTSX2PL" REACT_APP_GOOGLE_ANALYTICS_CLICKTHROUGH = "GTM-5MWCJN3" REACT_APP_GRAPH_RSK = "https://subgraph.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" + REACT_APP_GRAPH_BABELFISH = "https://babelfish-subgraph.sovryn.app/subgraphs/name/babelfish/rsk-graph" REACT_APP_INFURA_KEY = "12b606df88b3420aad7828acd0f11902" REACT_APP_TRANSAK_ENV = "PRODUCTION" REACT_APP_TRANSAK_API_KEY = "fadc5140-4d8f-4eda-ab37-5999dfedf353" @@ -52,5 +55,6 @@ [context.development.environment] REACT_APP_NETWORK = "testnet" REACT_APP_GRAPH_RSK = "https://subgraph.test.sovryn.app/subgraphs/name/DistributedCollective/sovryn-subgraph" + REACT_APP_GRAPH_BABELFISH = "https://babelfish-subgraph.test.sovryn.app/subgraphs/name/babelfish/rskTestnet-graph" BUILD_STORYBOOK = "true" REACT_APP_STAGING = "false" diff --git a/src/app/pages/BridgeDepositPage/components/TokenSelector/TokenItem.tsx b/src/app/pages/BridgeDepositPage/components/TokenSelector/TokenItem.tsx index 2f8569066c..8d4a9918ba 100644 --- a/src/app/pages/BridgeDepositPage/components/TokenSelector/TokenItem.tsx +++ b/src/app/pages/BridgeDepositPage/components/TokenSelector/TokenItem.tsx @@ -20,6 +20,7 @@ interface ITokenItemProps { symbol: string; onClick: () => void; disabled?: boolean; + pausedTokens: string[]; } export const TokenItem: React.FC = ({ @@ -28,6 +29,7 @@ export const TokenItem: React.FC = ({ symbol, onClick, disabled, + pausedTokens, }) => { const { t } = useTranslation(); const { chain, targetChain } = useSelector(selectBridgeDepositPage); @@ -39,10 +41,36 @@ export const TokenItem: React.FC = ({ [chain, sourceAsset, targetChain], ); + const xusdBridgeTokens = useMemo( + () => + BridgeDictionary.get(targetChain, chain as Chain)?.getAsset( + CrossBridgeAsset.XUSD as CrossBridgeAsset, + )?.bridgeTokenAddresses, + [chain, targetChain], + ); + + const rskBridgeTokenAddress = useMemo( + () => xusdBridgeTokens?.get(sourceAsset), + [sourceAsset, xusdBridgeTokens], + ); + const balance = useTokenBalance(chain as any, asset); + const isPaused = useMemo( + () => + pausedTokens.includes(asset.bridgeTokenAddress) || + pausedTokens.includes(asset.tokenContractAddress) || + (!!rskBridgeTokenAddress && pausedTokens.includes(rskBridgeTokenAddress)), + [ + asset.bridgeTokenAddress, + asset.tokenContractAddress, + pausedTokens, + rskBridgeTokenAddress, + ], + ); + const isDisabled = useCallback( - () => disabled || !bignumber(balance.value).greaterThan(0), - [balance, disabled], + () => disabled || !bignumber(balance.value).greaterThan(0) || isPaused, + [balance.value, disabled, isPaused], ); return ( diff --git a/src/app/pages/BridgeDepositPage/components/TokenSelector/index.tsx b/src/app/pages/BridgeDepositPage/components/TokenSelector/index.tsx index 64c34b3e79..e51b0d310e 100644 --- a/src/app/pages/BridgeDepositPage/components/TokenSelector/index.tsx +++ b/src/app/pages/BridgeDepositPage/components/TokenSelector/index.tsx @@ -17,6 +17,7 @@ import { translations } from 'locales/i18n'; import { useWalletContext } from '@sovryn/react-wallet'; import { useIsBridgeDepositLocked } from 'app/pages/BridgeDepositPage/hooks/useIsBridgeDepositLocked'; import { ErrorBadge } from 'app/components/Form/ErrorBadge'; +import { useGetPausedTokens } from '../../hooks/useGetPausedTokens'; export const TokenSelector: React.FC = () => { const { chain, targetChain, targetAsset } = useSelector( @@ -26,6 +27,8 @@ export const TokenSelector: React.FC = () => { const dispatch = useDispatch(); const { t } = useTranslation(); + const pausedTokens = useGetPausedTokens(); + useEffect(() => { if (chain === null) { dispatch(actions.setStep(DepositStep.CHAIN_SELECTOR)); @@ -110,6 +113,7 @@ export const TokenSelector: React.FC = () => { symbol={item.symbol} onClick={() => selectSourceAsset(item.asset)} disabled={bridgeDepositLocked} + pausedTokens={pausedTokens} /> ); })} diff --git a/src/app/pages/BridgeDepositPage/hooks/useGetPausedTokens.ts b/src/app/pages/BridgeDepositPage/hooks/useGetPausedTokens.ts new file mode 100644 index 0000000000..2173fd2064 --- /dev/null +++ b/src/app/pages/BridgeDepositPage/hooks/useGetPausedTokens.ts @@ -0,0 +1,13 @@ +import { useMemo } from 'react'; +import { babelfishClient } from 'utils/clients'; +import { useGetPausedBassetListQuery } from 'utils/graphql/babelfish/generated'; + +export const useGetPausedTokens = () => { + const { data } = useGetPausedBassetListQuery({ client: babelfishClient }); + + const pausedTokens = useMemo(() => data?.bassets.map(item => item.id) || [], [ + data, + ]); + + return pausedTokens; +}; diff --git a/src/index.tsx b/src/index.tsx index 65abac3ca0..147ba8b823 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -22,10 +22,6 @@ import './styles/tailwindcss/index.css'; import '@sovryn/react-wallet/index.css'; import '@blueprintjs/icons/lib/css/blueprint-icons.css'; -// Import global types -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import * as GlobalTypes from './global'; - // Import root app import { App } from 'app'; import { ServiceWorkerToaster } from './app/components/ServiceWorkerToaster/Loadable'; @@ -39,19 +35,12 @@ import { store } from './store/store'; // Initialize languages import './locales/i18n'; import './locales/dayjs'; -import { ApolloProvider, ApolloClient, InMemoryCache } from '@apollo/client'; -import { graphRskUrl } from './utils/classifiers'; +import { ApolloProvider } from '@apollo/client'; import { ToastContainer } from 'react-toastify'; +import { rskClient } from 'utils/clients'; const MOUNT_NODE = document.getElementById('root') as HTMLElement; -const rskClient = new ApolloClient({ - uri: graphRskUrl, - cache: new InMemoryCache({ - resultCaching: false, - }), -}); - interface Props { Component: typeof App; } diff --git a/src/utils/classifiers.ts b/src/utils/classifiers.ts index f09c2fe002..cefe007649 100644 --- a/src/utils/classifiers.ts +++ b/src/utils/classifiers.ts @@ -88,6 +88,8 @@ export const bscScanApi = export const graphRskUrl = process.env.REACT_APP_GRAPH_RSK; +export const graphBabelfishUrl = process.env.REACT_APP_GRAPH_BABELFISH; + export const ethGenesisAddress = '0x0000000000000000000000000000000000000000'; export const sovAnalyticsCookie = { name: 'SovAnalytics', value: 'optout' }; diff --git a/src/utils/clients.ts b/src/utils/clients.ts new file mode 100644 index 0000000000..42c3dc85ec --- /dev/null +++ b/src/utils/clients.ts @@ -0,0 +1,16 @@ +import { ApolloClient, InMemoryCache } from '@apollo/client'; +import { graphBabelfishUrl, graphRskUrl } from './classifiers'; + +export const rskClient = new ApolloClient({ + uri: graphRskUrl, + cache: new InMemoryCache({ + resultCaching: false, + }), +}); + +export const babelfishClient = new ApolloClient({ + uri: graphBabelfishUrl, + cache: new InMemoryCache({ + resultCaching: false, + }), +}); diff --git a/src/utils/graphql/babelfish/generated.tsx b/src/utils/graphql/babelfish/generated.tsx new file mode 100644 index 0000000000..ea28dad501 --- /dev/null +++ b/src/utils/graphql/babelfish/generated.tsx @@ -0,0 +1,1275 @@ +import { gql } from '@apollo/client'; +import * as Apollo from '@apollo/client'; +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 }; +const defaultOptions = {} as const; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + BigDecimal: string; + BigInt: string; + Bytes: string; +}; + +export type BAsset = { + __typename?: 'BAsset'; + decimals: Scalars['Int']; + global: Global; + id: Scalars['ID']; + name: Scalars['String']; + paused: Scalars['Boolean']; + symbol: Scalars['String']; +}; + +export type BAsset_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + decimals?: InputMaybe; + decimals_gt?: InputMaybe; + decimals_gte?: InputMaybe; + decimals_in?: InputMaybe>; + decimals_lt?: InputMaybe; + decimals_lte?: InputMaybe; + decimals_not?: InputMaybe; + decimals_not_in?: InputMaybe>; + global?: InputMaybe; + global_?: InputMaybe; + global_contains?: InputMaybe; + global_contains_nocase?: InputMaybe; + global_ends_with?: InputMaybe; + global_ends_with_nocase?: InputMaybe; + global_gt?: InputMaybe; + global_gte?: InputMaybe; + global_in?: InputMaybe>; + global_lt?: InputMaybe; + global_lte?: InputMaybe; + global_not?: InputMaybe; + global_not_contains?: InputMaybe; + global_not_contains_nocase?: InputMaybe; + global_not_ends_with?: InputMaybe; + global_not_ends_with_nocase?: InputMaybe; + global_not_in?: InputMaybe>; + global_not_starts_with?: InputMaybe; + global_not_starts_with_nocase?: InputMaybe; + global_starts_with?: InputMaybe; + global_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + name?: InputMaybe; + name_contains?: InputMaybe; + name_contains_nocase?: InputMaybe; + name_ends_with?: InputMaybe; + name_ends_with_nocase?: InputMaybe; + name_gt?: InputMaybe; + name_gte?: InputMaybe; + name_in?: InputMaybe>; + name_lt?: InputMaybe; + name_lte?: InputMaybe; + name_not?: InputMaybe; + name_not_contains?: InputMaybe; + name_not_contains_nocase?: InputMaybe; + name_not_ends_with?: InputMaybe; + name_not_ends_with_nocase?: InputMaybe; + name_not_in?: InputMaybe>; + name_not_starts_with?: InputMaybe; + name_not_starts_with_nocase?: InputMaybe; + name_starts_with?: InputMaybe; + name_starts_with_nocase?: InputMaybe; + paused?: InputMaybe; + paused_in?: InputMaybe>; + paused_not?: InputMaybe; + paused_not_in?: InputMaybe>; + symbol?: InputMaybe; + symbol_contains?: InputMaybe; + symbol_contains_nocase?: InputMaybe; + symbol_ends_with?: InputMaybe; + symbol_ends_with_nocase?: InputMaybe; + symbol_gt?: InputMaybe; + symbol_gte?: InputMaybe; + symbol_in?: InputMaybe>; + symbol_lt?: InputMaybe; + symbol_lte?: InputMaybe; + symbol_not?: InputMaybe; + symbol_not_contains?: InputMaybe; + symbol_not_contains_nocase?: InputMaybe; + symbol_not_ends_with?: InputMaybe; + symbol_not_ends_with_nocase?: InputMaybe; + symbol_not_in?: InputMaybe>; + symbol_not_starts_with?: InputMaybe; + symbol_not_starts_with_nocase?: InputMaybe; + symbol_starts_with?: InputMaybe; + symbol_starts_with_nocase?: InputMaybe; +}; + +export enum BAsset_OrderBy { + Decimals = 'decimals', + Global = 'global', + Id = 'id', + Name = 'name', + Paused = 'paused', + Symbol = 'symbol', +} + +export type BlockChangedFilter = { + number_gte: Scalars['Int']; +}; + +export type Block_Height = { + hash?: InputMaybe; + number?: InputMaybe; + number_gte?: InputMaybe; +}; + +export enum Event { + Deposit = 'Deposit', + Withdraw = 'Withdraw', +} + +export type Global = { + __typename?: 'Global'; + assets?: Maybe>; + id: Scalars['ID']; +}; + +export type GlobalAssetsArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type Global_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + assets_?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; +}; + +export enum Global_OrderBy { + Assets = 'assets', + Id = 'id', +} + +/** Defines the order direction, either ascending or descending */ +export enum OrderDirection { + Asc = 'asc', + Desc = 'desc', +} + +export type Proposal = { + __typename?: 'Proposal'; + actions: Array; + againstVotesAmount: Scalars['BigInt']; + contractAddress: Scalars['Bytes']; + createdAt: Scalars['BigInt']; + description: Scalars['String']; + endBlock: Scalars['BigInt']; + eta?: Maybe; + forVotesAmount: Scalars['BigInt']; + id: Scalars['ID']; + proposalId: Scalars['BigInt']; + proposer: Scalars['Bytes']; + startBlock: Scalars['BigInt']; + startDate: Scalars['BigInt']; + votes: Array; +}; + +export type ProposalActionsArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type ProposalVotesArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type ProposalAction = { + __typename?: 'ProposalAction'; + calldata: Scalars['Bytes']; + contract: Scalars['Bytes']; + id: Scalars['ID']; + proposal: Proposal; + signature: Scalars['String']; +}; + +export type ProposalAction_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + calldata?: InputMaybe; + calldata_contains?: InputMaybe; + calldata_in?: InputMaybe>; + calldata_not?: InputMaybe; + calldata_not_contains?: InputMaybe; + calldata_not_in?: InputMaybe>; + contract?: InputMaybe; + contract_contains?: InputMaybe; + contract_in?: InputMaybe>; + contract_not?: InputMaybe; + contract_not_contains?: InputMaybe; + contract_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + proposal?: InputMaybe; + proposal_?: InputMaybe; + proposal_contains?: InputMaybe; + proposal_contains_nocase?: InputMaybe; + proposal_ends_with?: InputMaybe; + proposal_ends_with_nocase?: InputMaybe; + proposal_gt?: InputMaybe; + proposal_gte?: InputMaybe; + proposal_in?: InputMaybe>; + proposal_lt?: InputMaybe; + proposal_lte?: InputMaybe; + proposal_not?: InputMaybe; + proposal_not_contains?: InputMaybe; + proposal_not_contains_nocase?: InputMaybe; + proposal_not_ends_with?: InputMaybe; + proposal_not_ends_with_nocase?: InputMaybe; + proposal_not_in?: InputMaybe>; + proposal_not_starts_with?: InputMaybe; + proposal_not_starts_with_nocase?: InputMaybe; + proposal_starts_with?: InputMaybe; + proposal_starts_with_nocase?: InputMaybe; + signature?: InputMaybe; + signature_contains?: InputMaybe; + signature_contains_nocase?: InputMaybe; + signature_ends_with?: InputMaybe; + signature_ends_with_nocase?: InputMaybe; + signature_gt?: InputMaybe; + signature_gte?: InputMaybe; + signature_in?: InputMaybe>; + signature_lt?: InputMaybe; + signature_lte?: InputMaybe; + signature_not?: InputMaybe; + signature_not_contains?: InputMaybe; + signature_not_contains_nocase?: InputMaybe; + signature_not_ends_with?: InputMaybe; + signature_not_ends_with_nocase?: InputMaybe; + signature_not_in?: InputMaybe>; + signature_not_starts_with?: InputMaybe; + signature_not_starts_with_nocase?: InputMaybe; + signature_starts_with?: InputMaybe; + signature_starts_with_nocase?: InputMaybe; +}; + +export enum ProposalAction_OrderBy { + Calldata = 'calldata', + Contract = 'contract', + Id = 'id', + Proposal = 'proposal', + Signature = 'signature', +} + +export type Proposal_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + actions_?: InputMaybe; + againstVotesAmount?: InputMaybe; + againstVotesAmount_gt?: InputMaybe; + againstVotesAmount_gte?: InputMaybe; + againstVotesAmount_in?: InputMaybe>; + againstVotesAmount_lt?: InputMaybe; + againstVotesAmount_lte?: InputMaybe; + againstVotesAmount_not?: InputMaybe; + againstVotesAmount_not_in?: InputMaybe>; + contractAddress?: InputMaybe; + contractAddress_contains?: InputMaybe; + contractAddress_in?: InputMaybe>; + contractAddress_not?: InputMaybe; + contractAddress_not_contains?: InputMaybe; + contractAddress_not_in?: InputMaybe>; + createdAt?: InputMaybe; + createdAt_gt?: InputMaybe; + createdAt_gte?: InputMaybe; + createdAt_in?: InputMaybe>; + createdAt_lt?: InputMaybe; + createdAt_lte?: InputMaybe; + createdAt_not?: InputMaybe; + createdAt_not_in?: InputMaybe>; + description?: InputMaybe; + description_contains?: InputMaybe; + description_contains_nocase?: InputMaybe; + description_ends_with?: InputMaybe; + description_ends_with_nocase?: InputMaybe; + description_gt?: InputMaybe; + description_gte?: InputMaybe; + description_in?: InputMaybe>; + description_lt?: InputMaybe; + description_lte?: InputMaybe; + description_not?: InputMaybe; + description_not_contains?: InputMaybe; + description_not_contains_nocase?: InputMaybe; + description_not_ends_with?: InputMaybe; + description_not_ends_with_nocase?: InputMaybe; + description_not_in?: InputMaybe>; + description_not_starts_with?: InputMaybe; + description_not_starts_with_nocase?: InputMaybe; + description_starts_with?: InputMaybe; + description_starts_with_nocase?: InputMaybe; + endBlock?: InputMaybe; + endBlock_gt?: InputMaybe; + endBlock_gte?: InputMaybe; + endBlock_in?: InputMaybe>; + endBlock_lt?: InputMaybe; + endBlock_lte?: InputMaybe; + endBlock_not?: InputMaybe; + endBlock_not_in?: InputMaybe>; + eta?: InputMaybe; + eta_gt?: InputMaybe; + eta_gte?: InputMaybe; + eta_in?: InputMaybe>; + eta_lt?: InputMaybe; + eta_lte?: InputMaybe; + eta_not?: InputMaybe; + eta_not_in?: InputMaybe>; + forVotesAmount?: InputMaybe; + forVotesAmount_gt?: InputMaybe; + forVotesAmount_gte?: InputMaybe; + forVotesAmount_in?: InputMaybe>; + forVotesAmount_lt?: InputMaybe; + forVotesAmount_lte?: InputMaybe; + forVotesAmount_not?: InputMaybe; + forVotesAmount_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + proposalId?: InputMaybe; + proposalId_gt?: InputMaybe; + proposalId_gte?: InputMaybe; + proposalId_in?: InputMaybe>; + proposalId_lt?: InputMaybe; + proposalId_lte?: InputMaybe; + proposalId_not?: InputMaybe; + proposalId_not_in?: InputMaybe>; + proposer?: InputMaybe; + proposer_contains?: InputMaybe; + proposer_in?: InputMaybe>; + proposer_not?: InputMaybe; + proposer_not_contains?: InputMaybe; + proposer_not_in?: InputMaybe>; + startBlock?: InputMaybe; + startBlock_gt?: InputMaybe; + startBlock_gte?: InputMaybe; + startBlock_in?: InputMaybe>; + startBlock_lt?: InputMaybe; + startBlock_lte?: InputMaybe; + startBlock_not?: InputMaybe; + startBlock_not_in?: InputMaybe>; + startDate?: InputMaybe; + startDate_gt?: InputMaybe; + startDate_gte?: InputMaybe; + startDate_in?: InputMaybe>; + startDate_lt?: InputMaybe; + startDate_lte?: InputMaybe; + startDate_not?: InputMaybe; + startDate_not_in?: InputMaybe>; + votes_?: InputMaybe; +}; + +export enum Proposal_OrderBy { + Actions = 'actions', + AgainstVotesAmount = 'againstVotesAmount', + ContractAddress = 'contractAddress', + CreatedAt = 'createdAt', + Description = 'description', + EndBlock = 'endBlock', + Eta = 'eta', + ForVotesAmount = 'forVotesAmount', + Id = 'id', + ProposalId = 'proposalId', + Proposer = 'proposer', + StartBlock = 'startBlock', + StartDate = 'startDate', + Votes = 'votes', +} + +export type Query = { + __typename?: 'Query'; + /** Access to subgraph metadata */ + _meta?: Maybe<_Meta_>; + basset?: Maybe; + bassets: Array; + global?: Maybe; + globals: Array; + proposal?: Maybe; + proposalAction?: Maybe; + proposalActions: Array; + proposals: Array; + stakeEvent?: Maybe; + stakeEvents: Array; + user?: Maybe; + users: Array; + vestingContract?: Maybe; + vestingContracts: Array; + vote?: Maybe; + votes: Array; + xusdTransaction?: Maybe; + xusdTransactions: Array; +}; + +export type Query_MetaArgs = { + block?: InputMaybe; +}; + +export type QueryBassetArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryBassetsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryGlobalArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryGlobalsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryProposalArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryProposalActionArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryProposalActionsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryProposalsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryStakeEventArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryStakeEventsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryUserArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryUsersArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryVestingContractArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryVestingContractsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryVoteArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryVotesArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type QueryXusdTransactionArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type QueryXusdTransactionsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type StakeEvent = { + __typename?: 'StakeEvent'; + amount: Scalars['BigInt']; + blockTimestamp: Scalars['BigInt']; + id: Scalars['ID']; + lockedUntil: Scalars['BigInt']; + staker: Scalars['Bytes']; + totalStaked: Scalars['BigInt']; + transactionHash: Scalars['Bytes']; +}; + +export type StakeEvent_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + lockedUntil?: InputMaybe; + lockedUntil_gt?: InputMaybe; + lockedUntil_gte?: InputMaybe; + lockedUntil_in?: InputMaybe>; + lockedUntil_lt?: InputMaybe; + lockedUntil_lte?: InputMaybe; + lockedUntil_not?: InputMaybe; + lockedUntil_not_in?: InputMaybe>; + staker?: InputMaybe; + staker_contains?: InputMaybe; + staker_in?: InputMaybe>; + staker_not?: InputMaybe; + staker_not_contains?: InputMaybe; + staker_not_in?: InputMaybe>; + totalStaked?: InputMaybe; + totalStaked_gt?: InputMaybe; + totalStaked_gte?: InputMaybe; + totalStaked_in?: InputMaybe>; + totalStaked_lt?: InputMaybe; + totalStaked_lte?: InputMaybe; + totalStaked_not?: InputMaybe; + totalStaked_not_in?: InputMaybe>; + transactionHash?: InputMaybe; + transactionHash_contains?: InputMaybe; + transactionHash_in?: InputMaybe>; + transactionHash_not?: InputMaybe; + transactionHash_not_contains?: InputMaybe; + transactionHash_not_in?: InputMaybe>; +}; + +export enum StakeEvent_OrderBy { + Amount = 'amount', + BlockTimestamp = 'blockTimestamp', + Id = 'id', + LockedUntil = 'lockedUntil', + Staker = 'staker', + TotalStaked = 'totalStaked', + TransactionHash = 'transactionHash', +} + +export type Subscription = { + __typename?: 'Subscription'; + /** Access to subgraph metadata */ + _meta?: Maybe<_Meta_>; + basset?: Maybe; + bassets: Array; + global?: Maybe; + globals: Array; + proposal?: Maybe; + proposalAction?: Maybe; + proposalActions: Array; + proposals: Array; + stakeEvent?: Maybe; + stakeEvents: Array; + user?: Maybe; + users: Array; + vestingContract?: Maybe; + vestingContracts: Array; + vote?: Maybe; + votes: Array; + xusdTransaction?: Maybe; + xusdTransactions: Array; +}; + +export type Subscription_MetaArgs = { + block?: InputMaybe; +}; + +export type SubscriptionBassetArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionBassetsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionGlobalArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionGlobalsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionProposalArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionProposalActionArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionProposalActionsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionProposalsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionStakeEventArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionStakeEventsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionUserArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionUsersArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionVestingContractArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionVestingContractsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionVoteArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionVotesArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type SubscriptionXusdTransactionArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + +export type SubscriptionXusdTransactionsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + +export type User = { + __typename?: 'User'; + address: Scalars['Bytes']; + allStakes: Array; + id: Scalars['ID']; + stakes: Array; + vests: Array; +}; + +export type UserAllStakesArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type UserStakesArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type UserVestsArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type User_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + address?: InputMaybe; + address_contains?: InputMaybe; + address_in?: InputMaybe>; + address_not?: InputMaybe; + address_not_contains?: InputMaybe; + address_not_in?: InputMaybe>; + allStakes?: InputMaybe>; + allStakes_?: InputMaybe; + allStakes_contains?: InputMaybe>; + allStakes_contains_nocase?: InputMaybe>; + allStakes_not?: InputMaybe>; + allStakes_not_contains?: InputMaybe>; + allStakes_not_contains_nocase?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + stakes?: InputMaybe>; + stakes_?: InputMaybe; + stakes_contains?: InputMaybe>; + stakes_contains_nocase?: InputMaybe>; + stakes_not?: InputMaybe>; + stakes_not_contains?: InputMaybe>; + stakes_not_contains_nocase?: InputMaybe>; + vests?: InputMaybe>; + vests_?: InputMaybe; + vests_contains?: InputMaybe>; + vests_contains_nocase?: InputMaybe>; + vests_not?: InputMaybe>; + vests_not_contains?: InputMaybe>; + vests_not_contains_nocase?: InputMaybe>; +}; + +export enum User_OrderBy { + Address = 'address', + AllStakes = 'allStakes', + Id = 'id', + Stakes = 'stakes', + Vests = 'vests', +} + +export type VestingContract = { + __typename?: 'VestingContract'; + address: Scalars['Bytes']; + id: Scalars['ID']; + owner: Scalars['Bytes']; + stakes: Array; + type: Scalars['String']; +}; + +export type VestingContractStakesArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type VestingContract_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + address?: InputMaybe; + address_contains?: InputMaybe; + address_in?: InputMaybe>; + address_not?: InputMaybe; + address_not_contains?: InputMaybe; + address_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + owner?: InputMaybe; + owner_contains?: InputMaybe; + owner_in?: InputMaybe>; + owner_not?: InputMaybe; + owner_not_contains?: InputMaybe; + owner_not_in?: InputMaybe>; + stakes?: InputMaybe>; + stakes_?: InputMaybe; + stakes_contains?: InputMaybe>; + stakes_contains_nocase?: InputMaybe>; + stakes_not?: InputMaybe>; + stakes_not_contains?: InputMaybe>; + stakes_not_contains_nocase?: InputMaybe>; + type?: InputMaybe; + type_contains?: InputMaybe; + type_contains_nocase?: InputMaybe; + type_ends_with?: InputMaybe; + type_ends_with_nocase?: InputMaybe; + type_gt?: InputMaybe; + type_gte?: InputMaybe; + type_in?: InputMaybe>; + type_lt?: InputMaybe; + type_lte?: InputMaybe; + type_not?: InputMaybe; + type_not_contains?: InputMaybe; + type_not_contains_nocase?: InputMaybe; + type_not_ends_with?: InputMaybe; + type_not_ends_with_nocase?: InputMaybe; + type_not_in?: InputMaybe>; + type_not_starts_with?: InputMaybe; + type_not_starts_with_nocase?: InputMaybe; + type_starts_with?: InputMaybe; + type_starts_with_nocase?: InputMaybe; +}; + +export enum VestingContract_OrderBy { + Address = 'address', + Id = 'id', + Owner = 'owner', + Stakes = 'stakes', + Type = 'type', +} + +export type Vote = { + __typename?: 'Vote'; + id: Scalars['ID']; + isPro: Scalars['Boolean']; + proposal: Proposal; + txHash: Scalars['Bytes']; + voter: Scalars['Bytes']; + votes: Scalars['BigInt']; +}; + +export type Vote_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + isPro?: InputMaybe; + isPro_in?: InputMaybe>; + isPro_not?: InputMaybe; + isPro_not_in?: InputMaybe>; + proposal?: InputMaybe; + proposal_?: InputMaybe; + proposal_contains?: InputMaybe; + proposal_contains_nocase?: InputMaybe; + proposal_ends_with?: InputMaybe; + proposal_ends_with_nocase?: InputMaybe; + proposal_gt?: InputMaybe; + proposal_gte?: InputMaybe; + proposal_in?: InputMaybe>; + proposal_lt?: InputMaybe; + proposal_lte?: InputMaybe; + proposal_not?: InputMaybe; + proposal_not_contains?: InputMaybe; + proposal_not_contains_nocase?: InputMaybe; + proposal_not_ends_with?: InputMaybe; + proposal_not_ends_with_nocase?: InputMaybe; + proposal_not_in?: InputMaybe>; + proposal_not_starts_with?: InputMaybe; + proposal_not_starts_with_nocase?: InputMaybe; + proposal_starts_with?: InputMaybe; + proposal_starts_with_nocase?: InputMaybe; + txHash?: InputMaybe; + txHash_contains?: InputMaybe; + txHash_in?: InputMaybe>; + txHash_not?: InputMaybe; + txHash_not_contains?: InputMaybe; + txHash_not_in?: InputMaybe>; + voter?: InputMaybe; + voter_contains?: InputMaybe; + voter_in?: InputMaybe>; + voter_not?: InputMaybe; + voter_not_contains?: InputMaybe; + voter_not_in?: InputMaybe>; + votes?: InputMaybe; + votes_gt?: InputMaybe; + votes_gte?: InputMaybe; + votes_in?: InputMaybe>; + votes_lt?: InputMaybe; + votes_lte?: InputMaybe; + votes_not?: InputMaybe; + votes_not_in?: InputMaybe>; +}; + +export enum Vote_OrderBy { + Id = 'id', + IsPro = 'isPro', + Proposal = 'proposal', + TxHash = 'txHash', + Voter = 'voter', + Votes = 'votes', +} + +export type XusdTransaction = { + __typename?: 'XusdTransaction'; + amount: Scalars['BigInt']; + asset: Scalars['String']; + date: Scalars['BigInt']; + event: Event; + id: Scalars['ID']; + receiver: Scalars['Bytes']; + txHash: Scalars['Bytes']; + user: Scalars['Bytes']; +}; + +export type XusdTransaction_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; + asset?: InputMaybe; + asset_contains?: InputMaybe; + asset_contains_nocase?: InputMaybe; + asset_ends_with?: InputMaybe; + asset_ends_with_nocase?: InputMaybe; + asset_gt?: InputMaybe; + asset_gte?: InputMaybe; + asset_in?: InputMaybe>; + asset_lt?: InputMaybe; + asset_lte?: InputMaybe; + asset_not?: InputMaybe; + asset_not_contains?: InputMaybe; + asset_not_contains_nocase?: InputMaybe; + asset_not_ends_with?: InputMaybe; + asset_not_ends_with_nocase?: InputMaybe; + asset_not_in?: InputMaybe>; + asset_not_starts_with?: InputMaybe; + asset_not_starts_with_nocase?: InputMaybe; + asset_starts_with?: InputMaybe; + asset_starts_with_nocase?: InputMaybe; + date?: InputMaybe; + date_gt?: InputMaybe; + date_gte?: InputMaybe; + date_in?: InputMaybe>; + date_lt?: InputMaybe; + date_lte?: InputMaybe; + date_not?: InputMaybe; + date_not_in?: InputMaybe>; + event?: InputMaybe; + event_in?: InputMaybe>; + event_not?: InputMaybe; + event_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + receiver?: InputMaybe; + receiver_contains?: InputMaybe; + receiver_in?: InputMaybe>; + receiver_not?: InputMaybe; + receiver_not_contains?: InputMaybe; + receiver_not_in?: InputMaybe>; + txHash?: InputMaybe; + txHash_contains?: InputMaybe; + txHash_in?: InputMaybe>; + txHash_not?: InputMaybe; + txHash_not_contains?: InputMaybe; + txHash_not_in?: InputMaybe>; + user?: InputMaybe; + user_contains?: InputMaybe; + user_in?: InputMaybe>; + user_not?: InputMaybe; + user_not_contains?: InputMaybe; + user_not_in?: InputMaybe>; +}; + +export enum XusdTransaction_OrderBy { + Amount = 'amount', + Asset = 'asset', + Date = 'date', + Event = 'event', + Id = 'id', + Receiver = 'receiver', + TxHash = 'txHash', + User = 'user', +} + +export type _Block_ = { + __typename?: '_Block_'; + /** The hash of the block */ + hash?: Maybe; + /** The block number */ + number: Scalars['Int']; +}; + +/** The type for the top-level _meta field */ +export type _Meta_ = { + __typename?: '_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: Scalars['String']; + /** If `true`, the subgraph encountered indexing errors at some past block */ + hasIndexingErrors: Scalars['Boolean']; +}; + +export enum _SubgraphErrorPolicy_ { + /** Data will be returned even if the subgraph has indexing errors */ + Allow = 'allow', + /** If the subgraph has indexing errors, data will be omitted. The default. */ + Deny = 'deny', +} + +export type GetPausedBassetListQueryVariables = Exact<{ [key: string]: never }>; + +export type GetPausedBassetListQuery = { + __typename?: 'Query'; + bassets: Array<{ __typename?: 'BAsset'; id: string; symbol: string }>; +}; + +export const GetPausedBassetListDocument = gql` + query getPausedBassetList { + bassets(where: { paused: true }) { + id + symbol + } + } +`; + +/** + * __useGetPausedBassetListQuery__ + * + * To run a query within a React component, call `useGetPausedBassetListQuery` and pass it any options that fit your needs. + * When your component renders, `useGetPausedBassetListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetPausedBassetListQuery({ + * variables: { + * }, + * }); + */ +export function useGetPausedBassetListQuery( + baseOptions?: Apollo.QueryHookOptions< + GetPausedBassetListQuery, + GetPausedBassetListQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetPausedBassetListQuery, + GetPausedBassetListQueryVariables + >(GetPausedBassetListDocument, options); +} +export function useGetPausedBassetListLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetPausedBassetListQuery, + GetPausedBassetListQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetPausedBassetListQuery, + GetPausedBassetListQueryVariables + >(GetPausedBassetListDocument, options); +} +export type GetPausedBassetListQueryHookResult = ReturnType< + typeof useGetPausedBassetListQuery +>; +export type GetPausedBassetListLazyQueryHookResult = ReturnType< + typeof useGetPausedBassetListLazyQuery +>; +export type GetPausedBassetListQueryResult = Apollo.QueryResult< + GetPausedBassetListQuery, + GetPausedBassetListQueryVariables +>; diff --git a/src/utils/graphql/babelfish/operations/getPausedBassetList.graphql b/src/utils/graphql/babelfish/operations/getPausedBassetList.graphql new file mode 100644 index 0000000000..d277600f35 --- /dev/null +++ b/src/utils/graphql/babelfish/operations/getPausedBassetList.graphql @@ -0,0 +1,6 @@ +query getPausedBassetList { + bassets(where: { paused: true }) { + id + symbol + } +} diff --git a/src/utils/graphql/babelfish/schema.graphql b/src/utils/graphql/babelfish/schema.graphql new file mode 100644 index 0000000000..843cfbe344 --- /dev/null +++ b/src/utils/graphql/babelfish/schema.graphql @@ -0,0 +1,1393 @@ +""" +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 + +""" +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 + +type BAsset { + decimals: Int! + global: Global! + id: ID! + name: String! + paused: Boolean! + symbol: String! +} + +input BAsset_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + decimals: Int + decimals_gt: Int + decimals_gte: Int + decimals_in: [Int!] + decimals_lt: Int + decimals_lte: Int + decimals_not: Int + decimals_not_in: [Int!] + global: String + global_: Global_filter + global_contains: String + global_contains_nocase: String + global_ends_with: String + global_ends_with_nocase: String + global_gt: String + global_gte: String + global_in: [String!] + global_lt: String + global_lte: String + global_not: String + global_not_contains: String + global_not_contains_nocase: String + global_not_ends_with: String + global_not_ends_with_nocase: String + global_not_in: [String!] + global_not_starts_with: String + global_not_starts_with_nocase: String + global_starts_with: String + global_starts_with_nocase: String + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + name: String + name_contains: String + name_contains_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_gt: String + name_gte: String + name_in: [String!] + name_lt: String + name_lte: String + name_not: String + name_not_contains: String + name_not_contains_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + name_not_in: [String!] + name_not_starts_with: String + name_not_starts_with_nocase: String + name_starts_with: String + name_starts_with_nocase: String + paused: Boolean + paused_in: [Boolean!] + paused_not: Boolean + paused_not_in: [Boolean!] + symbol: String + symbol_contains: String + symbol_contains_nocase: String + symbol_ends_with: String + symbol_ends_with_nocase: String + symbol_gt: String + symbol_gte: String + symbol_in: [String!] + symbol_lt: String + symbol_lte: String + symbol_not: String + symbol_not_contains: String + symbol_not_contains_nocase: String + symbol_not_ends_with: String + symbol_not_ends_with_nocase: String + symbol_not_in: [String!] + symbol_not_starts_with: String + symbol_not_starts_with_nocase: String + symbol_starts_with: String + symbol_starts_with_nocase: String +} + +enum BAsset_orderBy { + decimals + global + id + name + paused + symbol +} + +scalar BigDecimal + +scalar BigInt + +input BlockChangedFilter { + number_gte: Int! +} + +input Block_height { + hash: Bytes + number: Int + number_gte: Int +} + +scalar Bytes + +enum Event { + Deposit + Withdraw +} + +type Global { + assets( + first: Int = 100 + orderBy: BAsset_orderBy + orderDirection: OrderDirection + skip: Int = 0 + where: BAsset_filter + ): [BAsset!] + id: ID! +} + +input Global_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + assets_: BAsset_filter + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] +} + +enum Global_orderBy { + assets + id +} + +""" +Defines the order direction, either ascending or descending +""" +enum OrderDirection { + asc + desc +} + +type Proposal { + actions( + first: Int = 100 + orderBy: ProposalAction_orderBy + orderDirection: OrderDirection + skip: Int = 0 + where: ProposalAction_filter + ): [ProposalAction!]! + againstVotesAmount: BigInt! + contractAddress: Bytes! + createdAt: BigInt! + description: String! + endBlock: BigInt! + eta: BigInt + forVotesAmount: BigInt! + id: ID! + proposalId: BigInt! + proposer: Bytes! + startBlock: BigInt! + startDate: BigInt! + votes( + first: Int = 100 + orderBy: Vote_orderBy + orderDirection: OrderDirection + skip: Int = 0 + where: Vote_filter + ): [Vote!]! +} + +type ProposalAction { + calldata: Bytes! + contract: Bytes! + id: ID! + proposal: Proposal! + signature: String! +} + +input ProposalAction_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + calldata: Bytes + calldata_contains: Bytes + calldata_in: [Bytes!] + calldata_not: Bytes + calldata_not_contains: Bytes + calldata_not_in: [Bytes!] + contract: Bytes + contract_contains: Bytes + contract_in: [Bytes!] + contract_not: Bytes + contract_not_contains: Bytes + contract_not_in: [Bytes!] + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + proposal: String + proposal_: Proposal_filter + proposal_contains: String + proposal_contains_nocase: String + proposal_ends_with: String + proposal_ends_with_nocase: String + proposal_gt: String + proposal_gte: String + proposal_in: [String!] + proposal_lt: String + proposal_lte: String + proposal_not: String + proposal_not_contains: String + proposal_not_contains_nocase: String + proposal_not_ends_with: String + proposal_not_ends_with_nocase: String + proposal_not_in: [String!] + proposal_not_starts_with: String + proposal_not_starts_with_nocase: String + proposal_starts_with: String + proposal_starts_with_nocase: String + signature: String + signature_contains: String + signature_contains_nocase: String + signature_ends_with: String + signature_ends_with_nocase: String + signature_gt: String + signature_gte: String + signature_in: [String!] + signature_lt: String + signature_lte: String + signature_not: String + signature_not_contains: String + signature_not_contains_nocase: String + signature_not_ends_with: String + signature_not_ends_with_nocase: String + signature_not_in: [String!] + signature_not_starts_with: String + signature_not_starts_with_nocase: String + signature_starts_with: String + signature_starts_with_nocase: String +} + +enum ProposalAction_orderBy { + calldata + contract + id + proposal + signature +} + +input Proposal_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + actions_: ProposalAction_filter + againstVotesAmount: BigInt + againstVotesAmount_gt: BigInt + againstVotesAmount_gte: BigInt + againstVotesAmount_in: [BigInt!] + againstVotesAmount_lt: BigInt + againstVotesAmount_lte: BigInt + againstVotesAmount_not: BigInt + againstVotesAmount_not_in: [BigInt!] + contractAddress: Bytes + contractAddress_contains: Bytes + contractAddress_in: [Bytes!] + contractAddress_not: Bytes + contractAddress_not_contains: Bytes + contractAddress_not_in: [Bytes!] + createdAt: BigInt + createdAt_gt: BigInt + createdAt_gte: BigInt + createdAt_in: [BigInt!] + createdAt_lt: BigInt + createdAt_lte: BigInt + createdAt_not: BigInt + createdAt_not_in: [BigInt!] + description: String + description_contains: String + description_contains_nocase: String + description_ends_with: String + description_ends_with_nocase: String + description_gt: String + description_gte: String + description_in: [String!] + description_lt: String + description_lte: String + description_not: String + description_not_contains: String + description_not_contains_nocase: String + description_not_ends_with: String + description_not_ends_with_nocase: String + description_not_in: [String!] + description_not_starts_with: String + description_not_starts_with_nocase: String + description_starts_with: String + description_starts_with_nocase: String + endBlock: BigInt + endBlock_gt: BigInt + endBlock_gte: BigInt + endBlock_in: [BigInt!] + endBlock_lt: BigInt + endBlock_lte: BigInt + endBlock_not: BigInt + endBlock_not_in: [BigInt!] + eta: BigInt + eta_gt: BigInt + eta_gte: BigInt + eta_in: [BigInt!] + eta_lt: BigInt + eta_lte: BigInt + eta_not: BigInt + eta_not_in: [BigInt!] + forVotesAmount: BigInt + forVotesAmount_gt: BigInt + forVotesAmount_gte: BigInt + forVotesAmount_in: [BigInt!] + forVotesAmount_lt: BigInt + forVotesAmount_lte: BigInt + forVotesAmount_not: BigInt + forVotesAmount_not_in: [BigInt!] + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + proposalId: BigInt + proposalId_gt: BigInt + proposalId_gte: BigInt + proposalId_in: [BigInt!] + proposalId_lt: BigInt + proposalId_lte: BigInt + proposalId_not: BigInt + proposalId_not_in: [BigInt!] + proposer: Bytes + proposer_contains: Bytes + proposer_in: [Bytes!] + proposer_not: Bytes + proposer_not_contains: Bytes + proposer_not_in: [Bytes!] + startBlock: BigInt + startBlock_gt: BigInt + startBlock_gte: BigInt + startBlock_in: [BigInt!] + startBlock_lt: BigInt + startBlock_lte: BigInt + startBlock_not: BigInt + startBlock_not_in: [BigInt!] + startDate: BigInt + startDate_gt: BigInt + startDate_gte: BigInt + startDate_in: [BigInt!] + startDate_lt: BigInt + startDate_lte: BigInt + startDate_not: BigInt + startDate_not_in: [BigInt!] + votes_: Vote_filter +} + +enum Proposal_orderBy { + actions + againstVotesAmount + contractAddress + createdAt + description + endBlock + eta + forVotesAmount + id + proposalId + proposer + startBlock + startDate + votes +} + +type Query { + """ + Access to subgraph metadata + """ + _meta(block: Block_height): _Meta_ + basset( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): BAsset + bassets( + """ + 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 + first: Int = 100 + orderBy: BAsset_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: BAsset_filter + ): [BAsset!]! + global( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Global + globals( + """ + 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 + first: Int = 100 + orderBy: Global_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Global_filter + ): [Global!]! + proposal( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Proposal + proposalAction( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ProposalAction + proposalActions( + """ + 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 + first: Int = 100 + orderBy: ProposalAction_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: ProposalAction_filter + ): [ProposalAction!]! + proposals( + """ + 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 + first: Int = 100 + orderBy: Proposal_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Proposal_filter + ): [Proposal!]! + stakeEvent( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): StakeEvent + stakeEvents( + """ + 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 + first: Int = 100 + orderBy: StakeEvent_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: StakeEvent_filter + ): [StakeEvent!]! + user( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): User + users( + """ + 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 + first: Int = 100 + orderBy: User_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: User_filter + ): [User!]! + vestingContract( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): VestingContract + vestingContracts( + """ + 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 + first: Int = 100 + orderBy: VestingContract_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: VestingContract_filter + ): [VestingContract!]! + vote( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Vote + votes( + """ + 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 + first: Int = 100 + orderBy: Vote_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Vote_filter + ): [Vote!]! + xusdTransaction( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): XusdTransaction + xusdTransactions( + """ + 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 + first: Int = 100 + orderBy: XusdTransaction_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: XusdTransaction_filter + ): [XusdTransaction!]! +} + +type StakeEvent { + amount: BigInt! + blockTimestamp: BigInt! + id: ID! + lockedUntil: BigInt! + staker: Bytes! + totalStaked: BigInt! + transactionHash: Bytes! +} + +input StakeEvent_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + amount: BigInt + amount_gt: BigInt + amount_gte: BigInt + amount_in: [BigInt!] + amount_lt: BigInt + amount_lte: BigInt + amount_not: BigInt + amount_not_in: [BigInt!] + blockTimestamp: BigInt + blockTimestamp_gt: BigInt + blockTimestamp_gte: BigInt + blockTimestamp_in: [BigInt!] + blockTimestamp_lt: BigInt + blockTimestamp_lte: BigInt + blockTimestamp_not: BigInt + blockTimestamp_not_in: [BigInt!] + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + lockedUntil: BigInt + lockedUntil_gt: BigInt + lockedUntil_gte: BigInt + lockedUntil_in: [BigInt!] + lockedUntil_lt: BigInt + lockedUntil_lte: BigInt + lockedUntil_not: BigInt + lockedUntil_not_in: [BigInt!] + staker: Bytes + staker_contains: Bytes + staker_in: [Bytes!] + staker_not: Bytes + staker_not_contains: Bytes + staker_not_in: [Bytes!] + totalStaked: BigInt + totalStaked_gt: BigInt + totalStaked_gte: BigInt + totalStaked_in: [BigInt!] + totalStaked_lt: BigInt + totalStaked_lte: BigInt + totalStaked_not: BigInt + totalStaked_not_in: [BigInt!] + transactionHash: Bytes + transactionHash_contains: Bytes + transactionHash_in: [Bytes!] + transactionHash_not: Bytes + transactionHash_not_contains: Bytes + transactionHash_not_in: [Bytes!] +} + +enum StakeEvent_orderBy { + amount + blockTimestamp + id + lockedUntil + staker + totalStaked + transactionHash +} + +type Subscription { + """ + Access to subgraph metadata + """ + _meta(block: Block_height): _Meta_ + basset( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): BAsset + bassets( + """ + 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 + first: Int = 100 + orderBy: BAsset_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: BAsset_filter + ): [BAsset!]! + global( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Global + globals( + """ + 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 + first: Int = 100 + orderBy: Global_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Global_filter + ): [Global!]! + proposal( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Proposal + proposalAction( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ProposalAction + proposalActions( + """ + 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 + first: Int = 100 + orderBy: ProposalAction_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: ProposalAction_filter + ): [ProposalAction!]! + proposals( + """ + 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 + first: Int = 100 + orderBy: Proposal_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Proposal_filter + ): [Proposal!]! + stakeEvent( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): StakeEvent + stakeEvents( + """ + 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 + first: Int = 100 + orderBy: StakeEvent_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: StakeEvent_filter + ): [StakeEvent!]! + user( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): User + users( + """ + 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 + first: Int = 100 + orderBy: User_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: User_filter + ): [User!]! + vestingContract( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): VestingContract + vestingContracts( + """ + 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 + first: Int = 100 + orderBy: VestingContract_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: VestingContract_filter + ): [VestingContract!]! + vote( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Vote + votes( + """ + 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 + first: Int = 100 + orderBy: Vote_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Vote_filter + ): [Vote!]! + xusdTransaction( + """ + 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 + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): XusdTransaction + xusdTransactions( + """ + 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 + first: Int = 100 + orderBy: XusdTransaction_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: XusdTransaction_filter + ): [XusdTransaction!]! +} + +type User { + address: Bytes! + allStakes( + first: Int = 100 + orderBy: StakeEvent_orderBy + orderDirection: OrderDirection + skip: Int = 0 + where: StakeEvent_filter + ): [StakeEvent!]! + id: ID! + stakes( + first: Int = 100 + orderBy: StakeEvent_orderBy + orderDirection: OrderDirection + skip: Int = 0 + where: StakeEvent_filter + ): [StakeEvent!]! + vests( + first: Int = 100 + orderBy: VestingContract_orderBy + orderDirection: OrderDirection + skip: Int = 0 + where: VestingContract_filter + ): [VestingContract!]! +} + +input User_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + address: Bytes + address_contains: Bytes + address_in: [Bytes!] + address_not: Bytes + address_not_contains: Bytes + address_not_in: [Bytes!] + allStakes: [String!] + allStakes_: StakeEvent_filter + allStakes_contains: [String!] + allStakes_contains_nocase: [String!] + allStakes_not: [String!] + allStakes_not_contains: [String!] + allStakes_not_contains_nocase: [String!] + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + stakes: [String!] + stakes_: StakeEvent_filter + stakes_contains: [String!] + stakes_contains_nocase: [String!] + stakes_not: [String!] + stakes_not_contains: [String!] + stakes_not_contains_nocase: [String!] + vests: [String!] + vests_: VestingContract_filter + vests_contains: [String!] + vests_contains_nocase: [String!] + vests_not: [String!] + vests_not_contains: [String!] + vests_not_contains_nocase: [String!] +} + +enum User_orderBy { + address + allStakes + id + stakes + vests +} + +type VestingContract { + address: Bytes! + id: ID! + owner: Bytes! + stakes( + first: Int = 100 + orderBy: StakeEvent_orderBy + orderDirection: OrderDirection + skip: Int = 0 + where: StakeEvent_filter + ): [StakeEvent!]! + type: String! +} + +input VestingContract_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + address: Bytes + address_contains: Bytes + address_in: [Bytes!] + address_not: Bytes + address_not_contains: Bytes + address_not_in: [Bytes!] + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + owner: Bytes + owner_contains: Bytes + owner_in: [Bytes!] + owner_not: Bytes + owner_not_contains: Bytes + owner_not_in: [Bytes!] + stakes: [String!] + stakes_: StakeEvent_filter + stakes_contains: [String!] + stakes_contains_nocase: [String!] + stakes_not: [String!] + stakes_not_contains: [String!] + stakes_not_contains_nocase: [String!] + type: String + type_contains: String + type_contains_nocase: String + type_ends_with: String + type_ends_with_nocase: String + type_gt: String + type_gte: String + type_in: [String!] + type_lt: String + type_lte: String + type_not: String + type_not_contains: String + type_not_contains_nocase: String + type_not_ends_with: String + type_not_ends_with_nocase: String + type_not_in: [String!] + type_not_starts_with: String + type_not_starts_with_nocase: String + type_starts_with: String + type_starts_with_nocase: String +} + +enum VestingContract_orderBy { + address + id + owner + stakes + type +} + +type Vote { + id: ID! + isPro: Boolean! + proposal: Proposal! + txHash: Bytes! + voter: Bytes! + votes: BigInt! +} + +input Vote_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + isPro: Boolean + isPro_in: [Boolean!] + isPro_not: Boolean + isPro_not_in: [Boolean!] + proposal: String + proposal_: Proposal_filter + proposal_contains: String + proposal_contains_nocase: String + proposal_ends_with: String + proposal_ends_with_nocase: String + proposal_gt: String + proposal_gte: String + proposal_in: [String!] + proposal_lt: String + proposal_lte: String + proposal_not: String + proposal_not_contains: String + proposal_not_contains_nocase: String + proposal_not_ends_with: String + proposal_not_ends_with_nocase: String + proposal_not_in: [String!] + proposal_not_starts_with: String + proposal_not_starts_with_nocase: String + proposal_starts_with: String + proposal_starts_with_nocase: String + txHash: Bytes + txHash_contains: Bytes + txHash_in: [Bytes!] + txHash_not: Bytes + txHash_not_contains: Bytes + txHash_not_in: [Bytes!] + voter: Bytes + voter_contains: Bytes + voter_in: [Bytes!] + voter_not: Bytes + voter_not_contains: Bytes + voter_not_in: [Bytes!] + votes: BigInt + votes_gt: BigInt + votes_gte: BigInt + votes_in: [BigInt!] + votes_lt: BigInt + votes_lte: BigInt + votes_not: BigInt + votes_not_in: [BigInt!] +} + +enum Vote_orderBy { + id + isPro + proposal + txHash + voter + votes +} + +type XusdTransaction { + amount: BigInt! + asset: String! + date: BigInt! + event: Event! + id: ID! + receiver: Bytes! + txHash: Bytes! + user: Bytes! +} + +input XusdTransaction_filter { + """ + Filter for the block changed event. + """ + _change_block: BlockChangedFilter + amount: BigInt + amount_gt: BigInt + amount_gte: BigInt + amount_in: [BigInt!] + amount_lt: BigInt + amount_lte: BigInt + amount_not: BigInt + amount_not_in: [BigInt!] + asset: String + asset_contains: String + asset_contains_nocase: String + asset_ends_with: String + asset_ends_with_nocase: String + asset_gt: String + asset_gte: String + asset_in: [String!] + asset_lt: String + asset_lte: String + asset_not: String + asset_not_contains: String + asset_not_contains_nocase: String + asset_not_ends_with: String + asset_not_ends_with_nocase: String + asset_not_in: [String!] + asset_not_starts_with: String + asset_not_starts_with_nocase: String + asset_starts_with: String + asset_starts_with_nocase: String + date: BigInt + date_gt: BigInt + date_gte: BigInt + date_in: [BigInt!] + date_lt: BigInt + date_lte: BigInt + date_not: BigInt + date_not_in: [BigInt!] + event: Event + event_in: [Event!] + event_not: Event + event_not_in: [Event!] + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + receiver: Bytes + receiver_contains: Bytes + receiver_in: [Bytes!] + receiver_not: Bytes + receiver_not_contains: Bytes + receiver_not_in: [Bytes!] + txHash: Bytes + txHash_contains: Bytes + txHash_in: [Bytes!] + txHash_not: Bytes + txHash_not_contains: Bytes + txHash_not_in: [Bytes!] + user: Bytes + user_contains: Bytes + user_in: [Bytes!] + user_not: Bytes + user_not_contains: Bytes + user_not_in: [Bytes!] +} + +enum XusdTransaction_orderBy { + amount + asset + date + event + id + receiver + txHash + user +} + +type _Block_ { + """ + The hash of the block + """ + hash: Bytes + + """ + The block number + """ + number: Int! +} + +""" +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 +}