From 10bfd25a2bfce97f04d78edba11f90d4da920d6d Mon Sep 17 00:00:00 2001 From: Magic Cat <37407870+MonikaCat@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:35:32 +0700 Subject: [PATCH] fix: improve account and validator details page loading speed [web-desmos] (#1322) ## Description Closes: #XXXX [BDU-1158](https://forbole.atlassian.net/browse/BDU-1158) --- ### Author Checklist _All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues._ I have... - [x] ran linting via `yarn lint` - [x] wrote tests where necessary - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] targeted the correct branch - [x] provided a link to the relevant issue or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed - [x] added a changeset via [`yarn && yarn changeset`](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) [BDU-1158]: https://forbole.atlassian.net/browse/BDU-1158?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- .changeset/two-fireants-push.md | 36 + .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 538 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 934 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 790 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 455 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 381 +- .../components/validator_overview/index.tsx | 123 +- .../src/screens/validator_details/hooks.ts | 211 +- .../src/screens/validator_details/index.tsx | 69 +- .../src/screens/validator_details/types.ts | 18 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 630 +- .../web-desmos/src/screens/proposals/hooks.ts | 97 + apps/web-emoney/src/chain.json | 3 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../account_details/components/index.ts | 5 - .../src/screens/account_details/index.tsx | 64 - .../src/screens/validator_details/hooks.ts | 168 - .../validators/components/list/hooks.ts | 71 +- apps/web-evmos/src/chain.json | 3 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 3413 ++++-- .../account_details/components/index.ts | 5 - .../src/screens/account_details/index.tsx | 64 - .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 437 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 70 +- .../src/graphql/types/general_types.ts | 828 +- .../components/online_voting_power/hooks.ts | 54 - .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 521 +- .../components/validator_overview/index.tsx | 178 - .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 535 +- apps/web-persistence/src/chain.json | 3 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../src/screens/account_details/index.tsx | 65 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../graphql/general/validator_details.graphql | 70 +- .../src/graphql/types/general_types.ts | 326 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- .../src/screens/validator_details/hooks.ts | 165 - .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 325 +- apps/web-stride/src/chain.json | 3 +- .../src/graphql/general/params.graphql | 7 +- .../graphql/general/proposal_details.graphql | 3 +- .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 9567 +---------------- .../components/staking/hooks.ts | 4 +- .../src/screens/account_details/hooks.ts | 255 +- .../components/overview/index.tsx | 199 + .../components/overview/styles.ts | 77 + .../components/votes_graph/hooks.ts | 71 + .../src/screens/proposal_details/hooks.ts | 95 + .../src/screens/proposal_details/types.ts | 24 + .../graphql/general/validator_details.graphql | 69 +- .../src/graphql/types/general_types.ts | 383 +- .../graphql/general/validator_details.graphql | 69 +- apps/web/src/graphql/types/general_types.ts | 724 +- .../src/components/desmos_profile/index.tsx | 63 +- .../graphql/general/proposal_details.graphql | 1 + .../src/graphql/general/token_price.graphql | 1 - .../graphql/general/validator_details.graphql | 69 +- .../ui/src/graphql/types/general_types.ts | 727 +- .../ui/src/graphql/types/profile_types.ts | 184 + .../components/balance/index.tsx | 120 +- .../components/other_tokens/index.tsx | 33 +- .../__snapshots__/index.test.tsx.snap | 8 +- .../components/overview/index.test.tsx | 38 +- .../components/overview/index.tsx | 7 +- .../components/staking/hooks.ts | 2 +- .../components/staking/index.tsx | 31 +- .../components/transactions/index.tsx | 6 +- .../ui/src/screens/account_details/hooks.ts | 153 +- .../ui/src/screens/account_details/index.tsx | 65 +- .../ui/src/screens/account_details/types.ts | 21 +- .../components/online_voting_power/hooks.ts | 6 +- .../components/online_voting_power/index.tsx | 24 +- packages/ui/src/screens/proposals/hooks.ts | 4 +- .../components/blocks/index.tsx | 15 +- .../components/profile/index.test.tsx | 1 + .../components/profile/index.tsx | 109 +- .../components/validator_overview/index.tsx | 126 +- .../components/voting_power/index.tsx | 93 +- .../ui/src/screens/validator_details/hooks.ts | 231 +- .../src/screens/validator_details/index.tsx | 75 +- .../ui/src/screens/validator_details/types.ts | 18 +- 117 files changed, 17696 insertions(+), 14084 deletions(-) create mode 100644 .changeset/two-fireants-push.md create mode 100644 apps/web-desmos/src/screens/proposals/hooks.ts delete mode 100644 apps/web-emoney/src/screens/account_details/components/index.ts delete mode 100644 apps/web-emoney/src/screens/account_details/index.tsx delete mode 100644 apps/web-emoney/src/screens/validator_details/hooks.ts delete mode 100644 apps/web-evmos/src/screens/account_details/components/index.ts delete mode 100644 apps/web-evmos/src/screens/account_details/index.tsx delete mode 100644 apps/web-kyve/src/screens/home/components/hero/components/online_voting_power/hooks.ts delete mode 100644 apps/web-likecoin/src/screens/validator_details/components/validator_overview/index.tsx delete mode 100644 apps/web-regen/src/screens/validator_details/hooks.ts create mode 100644 apps/web-stride/src/screens/proposal_details/components/overview/index.tsx create mode 100644 apps/web-stride/src/screens/proposal_details/components/overview/styles.ts create mode 100644 apps/web-stride/src/screens/proposal_details/components/votes_graph/hooks.ts create mode 100644 apps/web-stride/src/screens/proposal_details/hooks.ts create mode 100644 apps/web-stride/src/screens/proposal_details/types.ts diff --git a/.changeset/two-fireants-push.md b/.changeset/two-fireants-push.md new file mode 100644 index 0000000000..d1667e4152 --- /dev/null +++ b/.changeset/two-fireants-push.md @@ -0,0 +1,36 @@ +--- +'web-assetmantle': major +'web-persistence': major +'web-quicksilver': major +'web-provenance': major +'web-crescent': major +'web-humansai': major +'web-likecoin': major +'web-wormhole': major +'web-archway': major +'web-bitsong': major +'web-gitopia': major +'web-osmosis': major +'web-agoric': major +'web-comdex': major +'web-coreum': major +'web-cosmos': major +'web-desmos': major +'web-emoney': major +'web-jackal': major +'web-quasar': major +'web-stride': major +'web-akash': major +'web-cheqd': major +'web-evmos': major +'web-nomic': major +'web-regen': major +'web-rizon': major +'web-band': major +'web-kyve': major +'web-nym': major +'ui': major +'web': major +--- + +improve account and validator details page loading speed diff --git a/apps/web-agoric/src/graphql/general/validator_details.graphql b/apps/web-agoric/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-agoric/src/graphql/general/validator_details.graphql +++ b/apps/web-agoric/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-agoric/src/graphql/types/general_types.ts b/apps/web-agoric/src/graphql/types/general_types.ts index 6bbfbeeb0b..db0479ee30 100644 --- a/apps/web-agoric/src/graphql/types/general_types.ts +++ b/apps/web-agoric/src/graphql/types/general_types.ts @@ -11890,12 +11890,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11932,11 +11974,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13384,12 +13421,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13398,11 +13431,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13410,14 +13514,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13426,40 +13657,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-akash/src/graphql/general/validator_details.graphql b/apps/web-akash/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-akash/src/graphql/general/validator_details.graphql +++ b/apps/web-akash/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-akash/src/graphql/types/general_types.ts b/apps/web-akash/src/graphql/types/general_types.ts index 8e1cfb279d..afb5128be4 100644 --- a/apps/web-akash/src/graphql/types/general_types.ts +++ b/apps/web-akash/src/graphql/types/general_types.ts @@ -13018,12 +13018,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -13060,11 +13102,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -14651,12 +14688,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -14665,11 +14698,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -14677,14 +14781,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -14693,40 +14924,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-archway/src/graphql/general/validator_details.graphql b/apps/web-archway/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-archway/src/graphql/general/validator_details.graphql +++ b/apps/web-archway/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-archway/src/graphql/types/general_types.ts b/apps/web-archway/src/graphql/types/general_types.ts index 15a88d79a6..78c4811a71 100644 --- a/apps/web-archway/src/graphql/types/general_types.ts +++ b/apps/web-archway/src/graphql/types/general_types.ts @@ -194,6 +194,8 @@ export type Account = { proposals_aggregate: Proposal_Aggregate; /** An array relationship */ validator_infos: Array; + /** An aggregate relationship */ + validator_infos_aggregate: Validator_Info_Aggregate; /** An object relationship */ vesting_account?: Maybe; /** An array relationship */ @@ -251,6 +253,16 @@ export type AccountValidator_InfosArgs = { }; +/** columns and relationships of "account" */ +export type AccountValidator_Infos_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "account" */ export type AccountVesting_AccountsArgs = { distinct_on?: InputMaybe>; @@ -2742,6 +2754,8 @@ export type Query_Root = { validator_description_by_pk?: Maybe; /** fetch data from the table: "validator_info" */ validator_info: Array; + /** fetch aggregated fields from the table: "validator_info" */ + validator_info_aggregate: Validator_Info_Aggregate; /** fetch data from the table: "validator_info" using primary key columns */ validator_info_by_pk?: Maybe; /** fetch data from the table: "validator_signing_info" */ @@ -3295,6 +3309,15 @@ export type Query_RootValidator_InfoArgs = { }; +export type Query_RootValidator_Info_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootValidator_Info_By_PkArgs = { consensus_address: Scalars['String']; }; @@ -3851,6 +3874,8 @@ export type Subscription_Root = { validator_description_by_pk?: Maybe; /** fetch data from the table: "validator_info" */ validator_info: Array; + /** fetch aggregated fields from the table: "validator_info" */ + validator_info_aggregate: Validator_Info_Aggregate; /** fetch data from the table: "validator_info" using primary key columns */ validator_info_by_pk?: Maybe; /** fetch data from the table: "validator_signing_info" */ @@ -4318,6 +4343,15 @@ export type Subscription_RootValidator_InfoArgs = { }; +export type Subscription_RootValidator_Info_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootValidator_Info_By_PkArgs = { consensus_address: Scalars['String']; }; @@ -5181,6 +5215,8 @@ export type Validator = { validator_info?: Maybe; /** An array relationship */ validator_infos: Array; + /** An aggregate relationship */ + validator_infos_aggregate: Validator_Info_Aggregate; /** An array relationship */ validator_signing_infos: Array; /** An array relationship */ @@ -5274,6 +5310,16 @@ export type ValidatorValidator_InfosArgs = { }; +/** columns and relationships of "validator" */ +export type ValidatorValidator_Infos_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "validator" */ export type ValidatorValidator_Signing_InfosArgs = { distinct_on?: InputMaybe>; @@ -5349,7 +5395,7 @@ export type Validator_Commission = { __typename?: 'validator_commission'; commission: Scalars['numeric']; height: Scalars['bigint']; - min_self_delegation: Scalars['bigint']; + min_self_delegation: Scalars['String']; /** An object relationship */ validator: Validator; validator_address: Scalars['String']; @@ -5374,7 +5420,6 @@ export type Validator_Commission_Aggregate_Order_By = { export type Validator_Commission_Avg_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** Boolean expression to filter rows from the table "validator_commission". All fields are combined with a logical 'AND'. */ @@ -5384,7 +5429,7 @@ export type Validator_Commission_Bool_Exp = { _or?: InputMaybe>; commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; + min_self_delegation?: InputMaybe; validator?: InputMaybe; validator_address?: InputMaybe; }; @@ -5430,49 +5475,42 @@ export enum Validator_Commission_Select_Column { export type Validator_Commission_Stddev_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** order by stddev_pop() on columns of table "validator_commission" */ export type Validator_Commission_Stddev_Pop_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** order by stddev_samp() on columns of table "validator_commission" */ export type Validator_Commission_Stddev_Samp_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** order by sum() on columns of table "validator_commission" */ export type Validator_Commission_Sum_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** order by var_pop() on columns of table "validator_commission" */ export type Validator_Commission_Var_Pop_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** order by var_samp() on columns of table "validator_commission" */ export type Validator_Commission_Var_Samp_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** order by variance() on columns of table "validator_commission" */ export type Validator_Commission_Variance_Order_By = { commission?: InputMaybe; height?: InputMaybe; - min_self_delegation?: InputMaybe; }; /** columns and relationships of "validator_description" */ @@ -5624,6 +5662,7 @@ export type Validator_Info = { /** An object relationship */ account?: Maybe; consensus_address: Scalars['String']; + height: Scalars['bigint']; max_change_rate: Scalars['String']; max_rate: Scalars['String']; operator_address: Scalars['String']; @@ -5632,11 +5671,60 @@ export type Validator_Info = { validator: Validator; }; +/** aggregated selection of "validator_info" */ +export type Validator_Info_Aggregate = { + __typename?: 'validator_info_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "validator_info" */ +export type Validator_Info_Aggregate_Fields = { + __typename?: 'validator_info_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "validator_info" */ +export type Validator_Info_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + /** order by aggregate values of table "validator_info" */ export type Validator_Info_Aggregate_Order_By = { + avg?: InputMaybe; count?: InputMaybe; max?: InputMaybe; min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Validator_Info_Avg_Fields = { + __typename?: 'validator_info_avg_fields'; + height?: Maybe; +}; + +/** order by avg() on columns of table "validator_info" */ +export type Validator_Info_Avg_Order_By = { + height?: InputMaybe; }; /** Boolean expression to filter rows from the table "validator_info". All fields are combined with a logical 'AND'. */ @@ -5646,6 +5734,7 @@ export type Validator_Info_Bool_Exp = { _or?: InputMaybe>; account?: InputMaybe; consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; @@ -5653,18 +5742,42 @@ export type Validator_Info_Bool_Exp = { validator?: InputMaybe; }; +/** aggregate max on columns */ +export type Validator_Info_Max_Fields = { + __typename?: 'validator_info_max_fields'; + consensus_address?: Maybe; + height?: Maybe; + max_change_rate?: Maybe; + max_rate?: Maybe; + operator_address?: Maybe; + self_delegate_address?: Maybe; +}; + /** order by max() on columns of table "validator_info" */ export type Validator_Info_Max_Order_By = { consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; self_delegate_address?: InputMaybe; }; +/** aggregate min on columns */ +export type Validator_Info_Min_Fields = { + __typename?: 'validator_info_min_fields'; + consensus_address?: Maybe; + height?: Maybe; + max_change_rate?: Maybe; + max_rate?: Maybe; + operator_address?: Maybe; + self_delegate_address?: Maybe; +}; + /** order by min() on columns of table "validator_info" */ export type Validator_Info_Min_Order_By = { consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; @@ -5675,6 +5788,7 @@ export type Validator_Info_Min_Order_By = { export type Validator_Info_Order_By = { account?: InputMaybe; consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; @@ -5687,6 +5801,8 @@ export enum Validator_Info_Select_Column { /** column name */ ConsensusAddress = 'consensus_address', /** column name */ + Height = 'height', + /** column name */ MaxChangeRate = 'max_change_rate', /** column name */ MaxRate = 'max_rate', @@ -5696,6 +5812,83 @@ export enum Validator_Info_Select_Column { SelfDelegateAddress = 'self_delegate_address' } +/** aggregate stddev on columns */ +export type Validator_Info_Stddev_Fields = { + __typename?: 'validator_info_stddev_fields'; + height?: Maybe; +}; + +/** order by stddev() on columns of table "validator_info" */ +export type Validator_Info_Stddev_Order_By = { + height?: InputMaybe; +}; + +/** aggregate stddev_pop on columns */ +export type Validator_Info_Stddev_Pop_Fields = { + __typename?: 'validator_info_stddev_pop_fields'; + height?: Maybe; +}; + +/** order by stddev_pop() on columns of table "validator_info" */ +export type Validator_Info_Stddev_Pop_Order_By = { + height?: InputMaybe; +}; + +/** aggregate stddev_samp on columns */ +export type Validator_Info_Stddev_Samp_Fields = { + __typename?: 'validator_info_stddev_samp_fields'; + height?: Maybe; +}; + +/** order by stddev_samp() on columns of table "validator_info" */ +export type Validator_Info_Stddev_Samp_Order_By = { + height?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Validator_Info_Sum_Fields = { + __typename?: 'validator_info_sum_fields'; + height?: Maybe; +}; + +/** order by sum() on columns of table "validator_info" */ +export type Validator_Info_Sum_Order_By = { + height?: InputMaybe; +}; + +/** aggregate var_pop on columns */ +export type Validator_Info_Var_Pop_Fields = { + __typename?: 'validator_info_var_pop_fields'; + height?: Maybe; +}; + +/** order by var_pop() on columns of table "validator_info" */ +export type Validator_Info_Var_Pop_Order_By = { + height?: InputMaybe; +}; + +/** aggregate var_samp on columns */ +export type Validator_Info_Var_Samp_Fields = { + __typename?: 'validator_info_var_samp_fields'; + height?: Maybe; +}; + +/** order by var_samp() on columns of table "validator_info" */ +export type Validator_Info_Var_Samp_Order_By = { + height?: InputMaybe; +}; + +/** aggregate variance on columns */ +export type Validator_Info_Variance_Fields = { + __typename?: 'validator_info_variance_fields'; + height?: Maybe; +}; + +/** order by variance() on columns of table "validator_info" */ +export type Validator_Info_Variance_Order_By = { + height?: InputMaybe; +}; + /** Ordering options when selecting data from "validator". */ export type Validator_Order_By = { blocks_aggregate?: InputMaybe; @@ -7649,12 +7842,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -7691,11 +7926,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -9142,12 +9372,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -9156,11 +9382,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -9168,14 +9465,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -9184,40 +9608,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-assetmantle/src/graphql/general/validator_details.graphql b/apps/web-assetmantle/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-assetmantle/src/graphql/general/validator_details.graphql +++ b/apps/web-assetmantle/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-assetmantle/src/graphql/types/general_types.ts b/apps/web-assetmantle/src/graphql/types/general_types.ts index bc3a82c256..437f9f181f 100644 --- a/apps/web-assetmantle/src/graphql/types/general_types.ts +++ b/apps/web-assetmantle/src/graphql/types/general_types.ts @@ -11894,12 +11894,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11936,11 +11978,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13388,12 +13425,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13402,11 +13435,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13414,14 +13518,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13430,40 +13661,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-band/src/graphql/general/validator_details.graphql b/apps/web-band/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-band/src/graphql/general/validator_details.graphql +++ b/apps/web-band/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-band/src/graphql/types/general_types.ts b/apps/web-band/src/graphql/types/general_types.ts index f1b847934f..5ccb8c3c44 100644 --- a/apps/web-band/src/graphql/types/general_types.ts +++ b/apps/web-band/src/graphql/types/general_types.ts @@ -12078,12 +12078,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -12120,11 +12162,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13575,12 +13612,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13589,11 +13622,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13601,14 +13705,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13617,40 +13848,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-bitsong/src/graphql/general/validator_details.graphql b/apps/web-bitsong/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-bitsong/src/graphql/general/validator_details.graphql +++ b/apps/web-bitsong/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-bitsong/src/graphql/types/general_types.ts b/apps/web-bitsong/src/graphql/types/general_types.ts index ae53960006..b962a26041 100644 --- a/apps/web-bitsong/src/graphql/types/general_types.ts +++ b/apps/web-bitsong/src/graphql/types/general_types.ts @@ -11894,12 +11894,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11936,11 +11978,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13388,12 +13425,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13402,11 +13435,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13414,14 +13518,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13430,40 +13661,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-cheqd/src/graphql/general/validator_details.graphql b/apps/web-cheqd/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-cheqd/src/graphql/general/validator_details.graphql +++ b/apps/web-cheqd/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-cheqd/src/graphql/types/general_types.ts b/apps/web-cheqd/src/graphql/types/general_types.ts index 5724931d22..8a5a759c72 100644 --- a/apps/web-cheqd/src/graphql/types/general_types.ts +++ b/apps/web-cheqd/src/graphql/types/general_types.ts @@ -741,42 +741,6 @@ export type Did_DocVerification_MethodArgs = { path?: InputMaybe; }; -/** aggregated selection of "did_doc" */ -export type Did_Doc_Aggregate = { - __typename?: 'did_doc_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "did_doc" */ -export type Did_Doc_Aggregate_Fields = { - __typename?: 'did_doc_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "did_doc" */ -export type Did_Doc_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Did_Doc_Avg_Fields = { - __typename?: 'did_doc_avg_fields'; - height?: Maybe; -}; - /** Boolean expression to filter rows from the table "did_doc". All fields are combined with a logical 'AND'. */ export type Did_Doc_Bool_Exp = { _and?: InputMaybe>; @@ -798,24 +762,6 @@ export type Did_Doc_Bool_Exp = { version_id?: InputMaybe; }; -/** aggregate max on columns */ -export type Did_Doc_Max_Fields = { - __typename?: 'did_doc_max_fields'; - from_address?: Maybe; - height?: Maybe; - id?: Maybe; - version_id?: Maybe; -}; - -/** aggregate min on columns */ -export type Did_Doc_Min_Fields = { - __typename?: 'did_doc_min_fields'; - from_address?: Maybe; - height?: Maybe; - id?: Maybe; - version_id?: Maybe; -}; - /** Ordering options when selecting data from "did_doc". */ export type Did_Doc_Order_By = { also_known_as?: InputMaybe; @@ -866,48 +812,6 @@ export enum Did_Doc_Select_Column { VersionId = 'version_id' } -/** aggregate stddev on columns */ -export type Did_Doc_Stddev_Fields = { - __typename?: 'did_doc_stddev_fields'; - height?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Did_Doc_Stddev_Pop_Fields = { - __typename?: 'did_doc_stddev_pop_fields'; - height?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Did_Doc_Stddev_Samp_Fields = { - __typename?: 'did_doc_stddev_samp_fields'; - height?: Maybe; -}; - -/** aggregate sum on columns */ -export type Did_Doc_Sum_Fields = { - __typename?: 'did_doc_sum_fields'; - height?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Did_Doc_Var_Pop_Fields = { - __typename?: 'did_doc_var_pop_fields'; - height?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Did_Doc_Var_Samp_Fields = { - __typename?: 'did_doc_var_samp_fields'; - height?: Maybe; -}; - -/** aggregate variance on columns */ -export type Did_Doc_Variance_Fields = { - __typename?: 'did_doc_variance_fields'; - height?: Maybe; -}; - /** columns and relationships of "distribution_params" */ export type Distribution_Params = { __typename?: 'distribution_params'; @@ -3014,8 +2918,6 @@ export type Query_Root = { community_pool: Array; /** fetch data from the table: "did_doc" */ did_doc: Array; - /** fetch aggregated fields from the table: "did_doc" */ - did_doc_aggregate: Did_Doc_Aggregate; /** fetch data from the table: "did_doc" using primary key columns */ did_doc_by_pk?: Maybe; /** fetch data from the table: "distribution_params" */ @@ -3068,8 +2970,6 @@ export type Query_Root = { proposal_vote: Array; /** fetch data from the table: "resource" */ resource: Array; - /** fetch aggregated fields from the table: "resource" */ - resource_aggregate: Resource_Aggregate; /** fetch data from the table: "resource" using primary key columns */ resource_by_pk?: Maybe; /** fetch data from the table: "slashing_params" */ @@ -3088,22 +2988,18 @@ export type Query_Root = { token: Array; /** fetch data from the table: "token_price" */ token_price: Array; + /** fetch data from the table: "token_price" using primary key columns */ + token_price_by_pk?: Maybe; /** fetch data from the table: "token_price_history" */ token_price_history: Array; /** fetch data from the table: "token_unit" */ token_unit: Array; /** fetch data from the table: "top_accounts" */ top_accounts: Array; - /** fetch aggregated fields from the table: "top_accounts" */ - top_accounts_aggregate: Top_Accounts_Aggregate; /** fetch data from the table: "top_accounts" using primary key columns */ top_accounts_by_pk?: Maybe; /** fetch data from the table: "top_accounts_params" */ top_accounts_params: Array; - /** fetch aggregated fields from the table: "top_accounts_params" */ - top_accounts_params_aggregate: Top_Accounts_Params_Aggregate; - /** fetch data from the table: "top_accounts_params" using primary key columns */ - top_accounts_params_by_pk?: Maybe; /** fetch data from the table: "transaction" */ transaction: Array; /** fetch data from the table: "validator" */ @@ -3313,15 +3209,6 @@ export type Query_RootDid_DocArgs = { }; -export type Query_RootDid_Doc_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Query_RootDid_Doc_By_PkArgs = { id: Scalars['String']; }; @@ -3537,15 +3424,6 @@ export type Query_RootResourceArgs = { }; -export type Query_RootResource_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Query_RootResource_By_PkArgs = { id: Scalars['String']; }; @@ -3623,6 +3501,11 @@ export type Query_RootToken_PriceArgs = { }; +export type Query_RootToken_Price_By_PkArgs = { + id: Scalars['Int']; +}; + + export type Query_RootToken_Price_HistoryArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -3650,15 +3533,6 @@ export type Query_RootTop_AccountsArgs = { }; -export type Query_RootTop_Accounts_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Query_RootTop_Accounts_By_PkArgs = { address: Scalars['String']; }; @@ -3673,20 +3547,6 @@ export type Query_RootTop_Accounts_ParamsArgs = { }; -export type Query_RootTop_Accounts_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootTop_Accounts_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootTransactionArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -3855,42 +3715,6 @@ export type ResourceDataArgs = { path?: InputMaybe; }; -/** aggregated selection of "resource" */ -export type Resource_Aggregate = { - __typename?: 'resource_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "resource" */ -export type Resource_Aggregate_Fields = { - __typename?: 'resource_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "resource" */ -export type Resource_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Resource_Avg_Fields = { - __typename?: 'resource_avg_fields'; - height?: Maybe; -}; - /** Boolean expression to filter rows from the table "resource". All fields are combined with a logical 'AND'. */ export type Resource_Bool_Exp = { _and?: InputMaybe>; @@ -3907,30 +3731,6 @@ export type Resource_Bool_Exp = { version?: InputMaybe; }; -/** aggregate max on columns */ -export type Resource_Max_Fields = { - __typename?: 'resource_max_fields'; - collection_id?: Maybe; - from_address?: Maybe; - height?: Maybe; - id?: Maybe; - name?: Maybe; - resource_type?: Maybe; - version?: Maybe; -}; - -/** aggregate min on columns */ -export type Resource_Min_Fields = { - __typename?: 'resource_min_fields'; - collection_id?: Maybe; - from_address?: Maybe; - height?: Maybe; - id?: Maybe; - name?: Maybe; - resource_type?: Maybe; - version?: Maybe; -}; - /** Ordering options when selecting data from "resource". */ export type Resource_Order_By = { also_known_as?: InputMaybe; @@ -3966,48 +3766,6 @@ export enum Resource_Select_Column { Version = 'version' } -/** aggregate stddev on columns */ -export type Resource_Stddev_Fields = { - __typename?: 'resource_stddev_fields'; - height?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Resource_Stddev_Pop_Fields = { - __typename?: 'resource_stddev_pop_fields'; - height?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Resource_Stddev_Samp_Fields = { - __typename?: 'resource_stddev_samp_fields'; - height?: Maybe; -}; - -/** aggregate sum on columns */ -export type Resource_Sum_Fields = { - __typename?: 'resource_sum_fields'; - height?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Resource_Var_Pop_Fields = { - __typename?: 'resource_var_pop_fields'; - height?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Resource_Var_Samp_Fields = { - __typename?: 'resource_var_samp_fields'; - height?: Maybe; -}; - -/** aggregate variance on columns */ -export type Resource_Variance_Fields = { - __typename?: 'resource_variance_fields'; - height?: Maybe; -}; - /** columns and relationships of "slashing_params" */ export type Slashing_Params = { __typename?: 'slashing_params'; @@ -4323,8 +4081,6 @@ export type Subscription_Root = { community_pool: Array; /** fetch data from the table: "did_doc" */ did_doc: Array; - /** fetch aggregated fields from the table: "did_doc" */ - did_doc_aggregate: Did_Doc_Aggregate; /** fetch data from the table: "did_doc" using primary key columns */ did_doc_by_pk?: Maybe; /** fetch data from the table: "distribution_params" */ @@ -4377,8 +4133,6 @@ export type Subscription_Root = { proposal_vote: Array; /** fetch data from the table: "resource" */ resource: Array; - /** fetch aggregated fields from the table: "resource" */ - resource_aggregate: Resource_Aggregate; /** fetch data from the table: "resource" using primary key columns */ resource_by_pk?: Maybe; /** fetch data from the table: "slashing_params" */ @@ -4397,22 +4151,18 @@ export type Subscription_Root = { token: Array; /** fetch data from the table: "token_price" */ token_price: Array; + /** fetch data from the table: "token_price" using primary key columns */ + token_price_by_pk?: Maybe; /** fetch data from the table: "token_price_history" */ token_price_history: Array; /** fetch data from the table: "token_unit" */ token_unit: Array; /** fetch data from the table: "top_accounts" */ top_accounts: Array; - /** fetch aggregated fields from the table: "top_accounts" */ - top_accounts_aggregate: Top_Accounts_Aggregate; /** fetch data from the table: "top_accounts" using primary key columns */ top_accounts_by_pk?: Maybe; /** fetch data from the table: "top_accounts_params" */ top_accounts_params: Array; - /** fetch aggregated fields from the table: "top_accounts_params" */ - top_accounts_params_aggregate: Top_Accounts_Params_Aggregate; - /** fetch data from the table: "top_accounts_params" using primary key columns */ - top_accounts_params_by_pk?: Maybe; /** fetch data from the table: "transaction" */ transaction: Array; /** fetch data from the table: "validator" */ @@ -4536,15 +4286,6 @@ export type Subscription_RootDid_DocArgs = { }; -export type Subscription_RootDid_Doc_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Subscription_RootDid_Doc_By_PkArgs = { id: Scalars['String']; }; @@ -4760,15 +4501,6 @@ export type Subscription_RootResourceArgs = { }; -export type Subscription_RootResource_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Subscription_RootResource_By_PkArgs = { id: Scalars['String']; }; @@ -4846,6 +4578,11 @@ export type Subscription_RootToken_PriceArgs = { }; +export type Subscription_RootToken_Price_By_PkArgs = { + id: Scalars['Int']; +}; + + export type Subscription_RootToken_Price_HistoryArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4873,15 +4610,6 @@ export type Subscription_RootTop_AccountsArgs = { }; -export type Subscription_RootTop_Accounts_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Subscription_RootTop_Accounts_By_PkArgs = { address: Scalars['String']; }; @@ -4896,20 +4624,6 @@ export type Subscription_RootTop_Accounts_ParamsArgs = { }; -export type Subscription_RootTop_Accounts_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootTop_Accounts_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootTransactionArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5131,6 +4845,7 @@ export type Token_Order_By = { /** columns and relationships of "token_price" */ export type Token_Price = { __typename?: 'token_price'; + id: Scalars['Int']; market_cap: Scalars['bigint']; price: Scalars['numeric']; timestamp: Scalars['timestamp']; @@ -5156,6 +4871,7 @@ export type Token_Price_Aggregate_Order_By = { /** order by avg() on columns of table "token_price" */ export type Token_Price_Avg_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -5165,6 +4881,7 @@ export type Token_Price_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -5297,6 +5014,7 @@ export type Token_Price_History_Variance_Order_By = { /** order by max() on columns of table "token_price" */ export type Token_Price_Max_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -5305,6 +5023,7 @@ export type Token_Price_Max_Order_By = { /** order by min() on columns of table "token_price" */ export type Token_Price_Min_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -5313,6 +5032,7 @@ export type Token_Price_Min_Order_By = { /** Ordering options when selecting data from "token_price". */ export type Token_Price_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -5322,6 +5042,8 @@ export type Token_Price_Order_By = { /** select columns of table "token_price" */ export enum Token_Price_Select_Column { + /** column name */ + Id = 'id', /** column name */ MarketCap = 'market_cap', /** column name */ @@ -5334,42 +5056,49 @@ export enum Token_Price_Select_Column { /** order by stddev() on columns of table "token_price" */ export type Token_Price_Stddev_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; /** order by stddev_pop() on columns of table "token_price" */ export type Token_Price_Stddev_Pop_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; /** order by stddev_samp() on columns of table "token_price" */ export type Token_Price_Stddev_Samp_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; /** order by sum() on columns of table "token_price" */ export type Token_Price_Sum_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; /** order by var_pop() on columns of table "token_price" */ export type Token_Price_Var_Pop_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; /** order by var_samp() on columns of table "token_price" */ export type Token_Price_Var_Samp_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; /** order by variance() on columns of table "token_price" */ export type Token_Price_Variance_Order_By = { + id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -5541,55 +5270,12 @@ export type Top_Accounts = { available?: Maybe; delegation?: Maybe; height: Scalars['bigint']; - redelegation?: Maybe; reward?: Maybe; sum: Scalars['bigint']; type?: Maybe; unbonding?: Maybe; }; -/** aggregated selection of "top_accounts" */ -export type Top_Accounts_Aggregate = { - __typename?: 'top_accounts_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "top_accounts" */ -export type Top_Accounts_Aggregate_Fields = { - __typename?: 'top_accounts_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "top_accounts" */ -export type Top_Accounts_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Top_Accounts_Avg_Fields = { - __typename?: 'top_accounts_avg_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - /** Boolean expression to filter rows from the table "top_accounts". All fields are combined with a logical 'AND'. */ export type Top_Accounts_Bool_Exp = { _and?: InputMaybe>; @@ -5600,41 +5286,12 @@ export type Top_Accounts_Bool_Exp = { available?: InputMaybe; delegation?: InputMaybe; height?: InputMaybe; - redelegation?: InputMaybe; reward?: InputMaybe; sum?: InputMaybe; type?: InputMaybe; unbonding?: InputMaybe; }; -/** aggregate max on columns */ -export type Top_Accounts_Max_Fields = { - __typename?: 'top_accounts_max_fields'; - address?: Maybe; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - type?: Maybe; - unbonding?: Maybe; -}; - -/** aggregate min on columns */ -export type Top_Accounts_Min_Fields = { - __typename?: 'top_accounts_min_fields'; - address?: Maybe; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - type?: Maybe; - unbonding?: Maybe; -}; - /** Ordering options when selecting data from "top_accounts". */ export type Top_Accounts_Order_By = { account?: InputMaybe; @@ -5642,7 +5299,6 @@ export type Top_Accounts_Order_By = { available?: InputMaybe; delegation?: InputMaybe; height?: InputMaybe; - redelegation?: InputMaybe; reward?: InputMaybe; sum?: InputMaybe; type?: InputMaybe; @@ -5653,76 +5309,22 @@ export type Top_Accounts_Order_By = { export type Top_Accounts_Params = { __typename?: 'top_accounts_params'; height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; total_accounts: Scalars['bigint']; }; -/** aggregated selection of "top_accounts_params" */ -export type Top_Accounts_Params_Aggregate = { - __typename?: 'top_accounts_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "top_accounts_params" */ -export type Top_Accounts_Params_Aggregate_Fields = { - __typename?: 'top_accounts_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "top_accounts_params" */ -export type Top_Accounts_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Top_Accounts_Params_Avg_Fields = { - __typename?: 'top_accounts_params_avg_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - /** Boolean expression to filter rows from the table "top_accounts_params". All fields are combined with a logical 'AND'. */ export type Top_Accounts_Params_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - one_row_id?: InputMaybe; total_accounts?: InputMaybe; }; -/** aggregate max on columns */ -export type Top_Accounts_Params_Max_Fields = { - __typename?: 'top_accounts_params_max_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** aggregate min on columns */ -export type Top_Accounts_Params_Min_Fields = { - __typename?: 'top_accounts_params_min_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** Ordering options when selecting data from "top_accounts_params". */ -export type Top_Accounts_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - total_accounts?: InputMaybe; +/** Ordering options when selecting data from "top_accounts_params". */ +export type Top_Accounts_Params_Order_By = { + height?: InputMaybe; + total_accounts?: InputMaybe; }; /** select columns of table "top_accounts_params" */ @@ -5730,60 +5332,9 @@ export enum Top_Accounts_Params_Select_Column { /** column name */ Height = 'height', /** column name */ - OneRowId = 'one_row_id', - /** column name */ TotalAccounts = 'total_accounts' } -/** aggregate stddev on columns */ -export type Top_Accounts_Params_Stddev_Fields = { - __typename?: 'top_accounts_params_stddev_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Top_Accounts_Params_Stddev_Pop_Fields = { - __typename?: 'top_accounts_params_stddev_pop_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Top_Accounts_Params_Stddev_Samp_Fields = { - __typename?: 'top_accounts_params_stddev_samp_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** aggregate sum on columns */ -export type Top_Accounts_Params_Sum_Fields = { - __typename?: 'top_accounts_params_sum_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Top_Accounts_Params_Var_Pop_Fields = { - __typename?: 'top_accounts_params_var_pop_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Top_Accounts_Params_Var_Samp_Fields = { - __typename?: 'top_accounts_params_var_samp_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - -/** aggregate variance on columns */ -export type Top_Accounts_Params_Variance_Fields = { - __typename?: 'top_accounts_params_variance_fields'; - height?: Maybe; - total_accounts?: Maybe; -}; - /** select columns of table "top_accounts" */ export enum Top_Accounts_Select_Column { /** column name */ @@ -5795,8 +5346,6 @@ export enum Top_Accounts_Select_Column { /** column name */ Height = 'height', /** column name */ - Redelegation = 'redelegation', - /** column name */ Reward = 'reward', /** column name */ Sum = 'sum', @@ -5806,90 +5355,6 @@ export enum Top_Accounts_Select_Column { Unbonding = 'unbonding' } -/** aggregate stddev on columns */ -export type Top_Accounts_Stddev_Fields = { - __typename?: 'top_accounts_stddev_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Top_Accounts_Stddev_Pop_Fields = { - __typename?: 'top_accounts_stddev_pop_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Top_Accounts_Stddev_Samp_Fields = { - __typename?: 'top_accounts_stddev_samp_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - -/** aggregate sum on columns */ -export type Top_Accounts_Sum_Fields = { - __typename?: 'top_accounts_sum_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Top_Accounts_Var_Pop_Fields = { - __typename?: 'top_accounts_var_pop_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Top_Accounts_Var_Samp_Fields = { - __typename?: 'top_accounts_var_samp_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - -/** aggregate variance on columns */ -export type Top_Accounts_Variance_Fields = { - __typename?: 'top_accounts_variance_fields'; - available?: Maybe; - delegation?: Maybe; - height?: Maybe; - redelegation?: Maybe; - reward?: Maybe; - sum?: Maybe; - unbonding?: Maybe; -}; - /** columns and relationships of "transaction" */ export type Transaction = { __typename?: 'transaction'; @@ -5904,7 +5369,7 @@ export type Transaction = { memo?: Maybe; messages: Scalars['jsonb']; /** An array relationship */ - messagesByTransactionHashPartitionId: Array; + messagesByPartitionIdTransactionHash: Array; raw_log?: Maybe; signatures: Scalars['_text']; signer_infos: Scalars['jsonb']; @@ -5931,7 +5396,7 @@ export type TransactionMessagesArgs = { /** columns and relationships of "transaction" */ -export type TransactionMessagesByTransactionHashPartitionIdArgs = { +export type TransactionMessagesByPartitionIdTransactionHashArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; offset?: InputMaybe; @@ -5981,7 +5446,7 @@ export type Transaction_Bool_Exp = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; - messagesByTransactionHashPartitionId?: InputMaybe; + messagesByPartitionIdTransactionHash?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe<_Text_Comparison_Exp>; signer_infos?: InputMaybe; @@ -6019,7 +5484,7 @@ export type Transaction_Order_By = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; - messagesByTransactionHashPartitionId_aggregate?: InputMaybe; + messagesByPartitionIdTransactionHash_aggregate?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe; signer_infos?: InputMaybe; @@ -7726,12 +7191,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -7768,11 +7275,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -9295,12 +8797,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -9309,11 +8807,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -9321,14 +8890,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -9337,40 +9033,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-comdex/src/graphql/general/validator_details.graphql b/apps/web-comdex/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-comdex/src/graphql/general/validator_details.graphql +++ b/apps/web-comdex/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-comdex/src/graphql/types/general_types.ts b/apps/web-comdex/src/graphql/types/general_types.ts index 7af7580e50..bf5cc403d6 100644 --- a/apps/web-comdex/src/graphql/types/general_types.ts +++ b/apps/web-comdex/src/graphql/types/general_types.ts @@ -13008,12 +13008,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -13050,11 +13092,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -14520,12 +14557,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -14534,11 +14567,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -14546,14 +14650,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -14562,40 +14793,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-coreum/src/graphql/general/validator_details.graphql b/apps/web-coreum/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-coreum/src/graphql/general/validator_details.graphql +++ b/apps/web-coreum/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-coreum/src/graphql/types/general_types.ts b/apps/web-coreum/src/graphql/types/general_types.ts index 1a02e8dccb..03a0d398a4 100644 --- a/apps/web-coreum/src/graphql/types/general_types.ts +++ b/apps/web-coreum/src/graphql/types/general_types.ts @@ -22,7 +22,6 @@ export type Scalars = { _dec_coin: any; _text: any; bigint: any; - bytea: any; jsonb: any; numeric: any; smallint: any; @@ -171,6 +170,10 @@ export type Account = { __typename?: 'account'; address: Scalars['String']; /** An array relationship */ + feeGrantAllowancesByGranterAddress: Array; + /** An array relationship */ + fee_grant_allowances: Array; + /** An array relationship */ proposal_deposits: Array; /** An array relationship */ proposal_votes: Array; @@ -184,6 +187,30 @@ export type Account = { vesting_account?: Maybe; /** An array relationship */ vesting_accounts: Array; + /** An array relationship */ + wasm_contracts: Array; + /** An aggregate relationship */ + wasm_contracts_aggregate: Wasm_Contract_Aggregate; +}; + + +/** columns and relationships of "account" */ +export type AccountFeeGrantAllowancesByGranterAddressArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account" */ +export type AccountFee_Grant_AllowancesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; @@ -246,29 +273,55 @@ export type AccountVesting_AccountsArgs = { where?: InputMaybe; }; + +/** columns and relationships of "account" */ +export type AccountWasm_ContractsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account" */ +export type AccountWasm_Contracts_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "account". All fields are combined with a logical 'AND'. */ export type Account_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; address?: InputMaybe; + feeGrantAllowancesByGranterAddress?: InputMaybe; + fee_grant_allowances?: InputMaybe; proposal_deposits?: InputMaybe; proposal_votes?: InputMaybe; proposals?: InputMaybe; validator_infos?: InputMaybe; vesting_account?: InputMaybe; vesting_accounts?: InputMaybe; + wasm_contracts?: InputMaybe; }; /** Ordering options when selecting data from "account". */ export type Account_Order_By = { address?: InputMaybe; + feeGrantAllowancesByGranterAddress_aggregate?: InputMaybe; + fee_grant_allowances_aggregate?: InputMaybe; proposal_deposits_aggregate?: InputMaybe; proposal_votes_aggregate?: InputMaybe; proposals_aggregate?: InputMaybe; validator_infos_aggregate?: InputMaybe; vesting_account?: InputMaybe; vesting_accounts_aggregate?: InputMaybe; + wasm_contracts_aggregate?: InputMaybe; }; /** select columns of table "account" */ @@ -649,19 +702,6 @@ export type Block_Variance_Order_By = { total_gas?: InputMaybe; }; -/** Boolean expression to compare columns of type "bytea". All fields are combined with logical 'AND'. */ -export type Bytea_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - /** columns and relationships of "community_pool" */ export type Community_Pool = { __typename?: 'community_pool'; @@ -1063,6 +1103,26 @@ export type Fee_Grant_AllowanceAllowanceArgs = { path?: InputMaybe; }; +/** order by aggregate values of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** order by avg() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Avg_Order_By = { + height?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "fee_grant_allowance". All fields are combined with a logical 'AND'. */ export type Fee_Grant_Allowance_Bool_Exp = { _and?: InputMaybe>; @@ -1076,6 +1136,20 @@ export type Fee_Grant_Allowance_Bool_Exp = { height?: InputMaybe; }; +/** order by max() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Max_Order_By = { + grantee_address?: InputMaybe; + granter_address?: InputMaybe; + height?: InputMaybe; +}; + +/** order by min() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Min_Order_By = { + grantee_address?: InputMaybe; + granter_address?: InputMaybe; + height?: InputMaybe; +}; + /** Ordering options when selecting data from "fee_grant_allowance". */ export type Fee_Grant_Allowance_Order_By = { allowance?: InputMaybe; @@ -1098,6 +1172,41 @@ export enum Fee_Grant_Allowance_Select_Column { Height = 'height' } +/** order by stddev() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Stddev_Order_By = { + height?: InputMaybe; +}; + +/** order by stddev_pop() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Stddev_Pop_Order_By = { + height?: InputMaybe; +}; + +/** order by stddev_samp() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Stddev_Samp_Order_By = { + height?: InputMaybe; +}; + +/** order by sum() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Sum_Order_By = { + height?: InputMaybe; +}; + +/** order by var_pop() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Var_Pop_Order_By = { + height?: InputMaybe; +}; + +/** order by var_samp() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Var_Samp_Order_By = { + height?: InputMaybe; +}; + +/** order by variance() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Variance_Order_By = { + height?: InputMaybe; +}; + /** columns and relationships of "genesis" */ export type Genesis = { __typename?: 'genesis'; @@ -1252,6 +1361,8 @@ export type Message = { involved_accounts_addresses: Scalars['_text']; /** An object relationship */ transaction?: Maybe; + /** An object relationship */ + transactionByPartitionIdTransactionHash?: Maybe; transaction_hash: Scalars['String']; type: Scalars['String']; value: Scalars['jsonb']; @@ -1263,6 +1374,27 @@ export type MessageValueArgs = { path?: InputMaybe; }; +/** order by aggregate values of table "message" */ +export type Message_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** order by avg() on columns of table "message" */ +export type Message_Avg_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "message". All fields are combined with a logical 'AND'. */ export type Message_Bool_Exp = { _and?: InputMaybe>; @@ -1272,17 +1404,35 @@ export type Message_Bool_Exp = { index?: InputMaybe; involved_accounts_addresses?: InputMaybe<_Text_Comparison_Exp>; transaction?: InputMaybe; + transactionByPartitionIdTransactionHash?: InputMaybe; transaction_hash?: InputMaybe; type?: InputMaybe; value?: InputMaybe; }; +/** order by max() on columns of table "message" */ +export type Message_Max_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + transaction_hash?: InputMaybe; + type?: InputMaybe; +}; + +/** order by min() on columns of table "message" */ +export type Message_Min_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + transaction_hash?: InputMaybe; + type?: InputMaybe; +}; + /** Ordering options when selecting data from "message". */ export type Message_Order_By = { height?: InputMaybe; index?: InputMaybe; involved_accounts_addresses?: InputMaybe; transaction?: InputMaybe; + transactionByPartitionIdTransactionHash?: InputMaybe; transaction_hash?: InputMaybe; type?: InputMaybe; value?: InputMaybe; @@ -1304,6 +1454,48 @@ export enum Message_Select_Column { Value = 'value' } +/** order by stddev() on columns of table "message" */ +export type Message_Stddev_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + +/** order by stddev_pop() on columns of table "message" */ +export type Message_Stddev_Pop_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + +/** order by stddev_samp() on columns of table "message" */ +export type Message_Stddev_Samp_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + +/** order by sum() on columns of table "message" */ +export type Message_Sum_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + +/** order by var_pop() on columns of table "message" */ +export type Message_Var_Pop_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + +/** order by var_samp() on columns of table "message" */ +export type Message_Var_Samp_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + +/** order by variance() on columns of table "message" */ +export type Message_Variance_Order_By = { + height?: InputMaybe; + index?: InputMaybe; +}; + export type Messages_By_Address_Args = { addresses?: InputMaybe; limit?: InputMaybe; @@ -2750,10 +2942,6 @@ export type Query_Root = { vesting_account: Array; /** fetch data from the table: "vesting_period" */ vesting_period: Array; - /** fetch data from the table: "wasm_code" */ - wasm_code: Array; - /** fetch aggregated fields from the table: "wasm_code" */ - wasm_code_aggregate: Wasm_Code_Aggregate; /** fetch data from the table: "wasm_contract" */ wasm_contract: Array; /** fetch aggregated fields from the table: "wasm_contract" */ @@ -3364,24 +3552,6 @@ export type Query_RootVesting_PeriodArgs = { }; -export type Query_RootWasm_CodeArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootWasm_Code_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Query_RootWasm_ContractArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -3859,10 +4029,6 @@ export type Subscription_Root = { vesting_account: Array; /** fetch data from the table: "vesting_period" */ vesting_period: Array; - /** fetch data from the table: "wasm_code" */ - wasm_code: Array; - /** fetch aggregated fields from the table: "wasm_code" */ - wasm_code_aggregate: Wasm_Code_Aggregate; /** fetch data from the table: "wasm_contract" */ wasm_contract: Array; /** fetch aggregated fields from the table: "wasm_contract" */ @@ -4387,24 +4553,6 @@ export type Subscription_RootVesting_PeriodArgs = { }; -export type Subscription_RootWasm_CodeArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootWasm_Code_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Subscription_RootWasm_ContractArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4956,6 +5104,8 @@ export type Transaction = { logs?: Maybe; memo?: Maybe; messages: Scalars['jsonb']; + /** An array relationship */ + messagesByPartitionIdTransactionHash: Array; raw_log?: Maybe; signatures: Scalars['_text']; signer_infos: Scalars['jsonb']; @@ -4981,6 +5131,16 @@ export type TransactionMessagesArgs = { }; +/** columns and relationships of "transaction" */ +export type TransactionMessagesByPartitionIdTransactionHashArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "transaction" */ export type TransactionSigner_InfosArgs = { path?: InputMaybe; @@ -5022,6 +5182,7 @@ export type Transaction_Bool_Exp = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; + messagesByPartitionIdTransactionHash?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe<_Text_Comparison_Exp>; signer_infos?: InputMaybe; @@ -5059,6 +5220,7 @@ export type Transaction_Order_By = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; + messagesByPartitionIdTransactionHash_aggregate?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe; signer_infos?: InputMaybe; @@ -6507,188 +6669,11 @@ export type Vesting_Period_Variance_Order_By = { period_order?: InputMaybe; }; -/** columns and relationships of "wasm_code" */ -export type Wasm_Code = { - __typename?: 'wasm_code'; - byte_code: Scalars['bytea']; - code_id: Scalars['bigint']; - height: Scalars['bigint']; - instantiate_permission?: Maybe; - sender?: Maybe; - /** An array relationship */ - wasm_contracts: Array; - /** An aggregate relationship */ - wasm_contracts_aggregate: Wasm_Contract_Aggregate; -}; - - -/** columns and relationships of "wasm_code" */ -export type Wasm_CodeInstantiate_PermissionArgs = { - path?: InputMaybe; -}; - - -/** columns and relationships of "wasm_code" */ -export type Wasm_CodeWasm_ContractsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -/** columns and relationships of "wasm_code" */ -export type Wasm_CodeWasm_Contracts_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -/** aggregated selection of "wasm_code" */ -export type Wasm_Code_Aggregate = { - __typename?: 'wasm_code_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "wasm_code" */ -export type Wasm_Code_Aggregate_Fields = { - __typename?: 'wasm_code_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "wasm_code" */ -export type Wasm_Code_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Wasm_Code_Avg_Fields = { - __typename?: 'wasm_code_avg_fields'; - code_id?: Maybe; - height?: Maybe; -}; - -/** Boolean expression to filter rows from the table "wasm_code". All fields are combined with a logical 'AND'. */ -export type Wasm_Code_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - byte_code?: InputMaybe; - code_id?: InputMaybe; - height?: InputMaybe; - instantiate_permission?: InputMaybe; - sender?: InputMaybe; - wasm_contracts?: InputMaybe; -}; - -/** aggregate max on columns */ -export type Wasm_Code_Max_Fields = { - __typename?: 'wasm_code_max_fields'; - code_id?: Maybe; - height?: Maybe; - sender?: Maybe; -}; - -/** aggregate min on columns */ -export type Wasm_Code_Min_Fields = { - __typename?: 'wasm_code_min_fields'; - code_id?: Maybe; - height?: Maybe; - sender?: Maybe; -}; - -/** Ordering options when selecting data from "wasm_code". */ -export type Wasm_Code_Order_By = { - byte_code?: InputMaybe; - code_id?: InputMaybe; - height?: InputMaybe; - instantiate_permission?: InputMaybe; - sender?: InputMaybe; - wasm_contracts_aggregate?: InputMaybe; -}; - -/** select columns of table "wasm_code" */ -export enum Wasm_Code_Select_Column { - /** column name */ - ByteCode = 'byte_code', - /** column name */ - CodeId = 'code_id', - /** column name */ - Height = 'height', - /** column name */ - InstantiatePermission = 'instantiate_permission', - /** column name */ - Sender = 'sender' -} - -/** aggregate stddev on columns */ -export type Wasm_Code_Stddev_Fields = { - __typename?: 'wasm_code_stddev_fields'; - code_id?: Maybe; - height?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Wasm_Code_Stddev_Pop_Fields = { - __typename?: 'wasm_code_stddev_pop_fields'; - code_id?: Maybe; - height?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Wasm_Code_Stddev_Samp_Fields = { - __typename?: 'wasm_code_stddev_samp_fields'; - code_id?: Maybe; - height?: Maybe; -}; - -/** aggregate sum on columns */ -export type Wasm_Code_Sum_Fields = { - __typename?: 'wasm_code_sum_fields'; - code_id?: Maybe; - height?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Wasm_Code_Var_Pop_Fields = { - __typename?: 'wasm_code_var_pop_fields'; - code_id?: Maybe; - height?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Wasm_Code_Var_Samp_Fields = { - __typename?: 'wasm_code_var_samp_fields'; - code_id?: Maybe; - height?: Maybe; -}; - -/** aggregate variance on columns */ -export type Wasm_Code_Variance_Fields = { - __typename?: 'wasm_code_variance_fields'; - code_id?: Maybe; - height?: Maybe; -}; - /** columns and relationships of "wasm_contract" */ export type Wasm_Contract = { __typename?: 'wasm_contract'; + /** An object relationship */ + account: Account; admin?: Maybe; code_id: Scalars['bigint']; contract_address: Scalars['String']; @@ -6702,8 +6687,6 @@ export type Wasm_Contract = { label?: Maybe; raw_contract_message: Scalars['jsonb']; sender?: Maybe; - /** An object relationship */ - wasm_code: Wasm_Code; /** An array relationship */ wasm_execute_contracts: Array; /** An aggregate relationship */ @@ -6805,6 +6788,7 @@ export type Wasm_Contract_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; + account?: InputMaybe; admin?: InputMaybe; code_id?: InputMaybe; contract_address?: InputMaybe; @@ -6818,7 +6802,6 @@ export type Wasm_Contract_Bool_Exp = { label?: InputMaybe; raw_contract_message?: InputMaybe; sender?: InputMaybe; - wasm_code?: InputMaybe; wasm_execute_contracts?: InputMaybe; }; @@ -6882,6 +6865,7 @@ export type Wasm_Contract_Min_Order_By = { /** Ordering options when selecting data from "wasm_contract". */ export type Wasm_Contract_Order_By = { + account?: InputMaybe; admin?: InputMaybe; code_id?: InputMaybe; contract_address?: InputMaybe; @@ -6895,7 +6879,6 @@ export type Wasm_Contract_Order_By = { label?: InputMaybe; raw_contract_message?: InputMaybe; sender?: InputMaybe; - wasm_code?: InputMaybe; wasm_execute_contracts_aggregate?: InputMaybe; }; @@ -7632,12 +7615,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -7674,11 +7699,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -9125,12 +9145,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -9139,11 +9155,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -9151,14 +9238,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -9167,40 +9381,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-cosmos/src/graphql/general/validator_details.graphql b/apps/web-cosmos/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-cosmos/src/graphql/general/validator_details.graphql +++ b/apps/web-cosmos/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-cosmos/src/graphql/types/general_types.ts b/apps/web-cosmos/src/graphql/types/general_types.ts index bc3a82c256..a697046747 100644 --- a/apps/web-cosmos/src/graphql/types/general_types.ts +++ b/apps/web-cosmos/src/graphql/types/general_types.ts @@ -3143,6 +3143,19 @@ export type Messages_By_Address_Args = { types?: InputMaybe; }; +export type Messages_By_Single_Address_Args = { + address?: InputMaybe; + apikey?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_Get_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; @@ -4615,7 +4628,7 @@ export type Proposal_Tally_Result_Variance_Order_By = { export type Proposal_Validator_Status_Snapshot = { __typename?: 'proposal_validator_status_snapshot'; height: Scalars['bigint']; - id: Scalars['Int']; + id: Scalars['bigint']; jailed: Scalars['Boolean']; /** An object relationship */ proposal?: Maybe; @@ -4697,7 +4710,7 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - id?: InputMaybe; + id?: InputMaybe; jailed?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; @@ -4711,7 +4724,7 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { export type Proposal_Validator_Status_Snapshot_Max_Fields = { __typename?: 'proposal_validator_status_snapshot_max_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4732,7 +4745,7 @@ export type Proposal_Validator_Status_Snapshot_Max_Order_By = { export type Proposal_Validator_Status_Snapshot_Min_Fields = { __typename?: 'proposal_validator_status_snapshot_min_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4841,7 +4854,7 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Samp_Order_By = { export type Proposal_Validator_Status_Snapshot_Sum_Fields = { __typename?: 'proposal_validator_status_snapshot_sum_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -5280,6 +5293,14 @@ export type Query_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -5454,12 +5475,14 @@ export type Query_RootAccount_By_PkArgs = { export type Query_RootAction_Account_BalanceArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; export type Query_RootAction_DelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5469,12 +5492,14 @@ export type Query_RootAction_DelegationArgs = { export type Query_RootAction_Delegation_RewardArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; export type Query_RootAction_Delegation_TotalArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; @@ -5486,6 +5511,7 @@ export type Query_RootAction_Delegator_Withdraw_AddressArgs = { export type Query_RootAction_RedelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5495,6 +5521,7 @@ export type Query_RootAction_RedelegationArgs = { export type Query_RootAction_Unbonding_DelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5504,6 +5531,7 @@ export type Query_RootAction_Unbonding_DelegationArgs = { export type Query_RootAction_Unbonding_Delegation_TotalArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; @@ -5835,6 +5863,46 @@ export type Query_RootMessages_By_Address_AggregateArgs = { }; +export type Query_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6005,7 +6073,7 @@ export type Query_RootProposal_Validator_Status_Snapshot_AggregateArgs = { export type Query_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; + id: Scalars['bigint']; }; @@ -7082,6 +7150,14 @@ export type Subscription_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -7551,6 +7627,46 @@ export type Subscription_RootMessages_By_Address_AggregateArgs = { }; +export type Subscription_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7721,7 +7837,7 @@ export type Subscription_RootProposal_Validator_Status_Snapshot_AggregateArgs = export type Subscription_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; + id: Scalars['bigint']; }; @@ -11894,12 +12010,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11936,11 +12094,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13388,12 +13541,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13402,11 +13551,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13414,14 +13634,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13430,40 +13777,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-crescent/src/graphql/general/validator_details.graphql b/apps/web-crescent/src/graphql/general/validator_details.graphql index 23ed1a7483..16297f508f 100644 --- a/apps/web-crescent/src/graphql/general/validator_details.graphql +++ b/apps/web-crescent/src/graphql/general/validator_details.graphql @@ -23,25 +23,39 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address @@ -50,16 +64,57 @@ query ValidatorDetails($address: String) { validatorLiquidStaking: validator_statuses(order_by: {height: desc}, limit: 1) { liquidStaking: liquid_validator } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-crescent/src/graphql/types/general_types.ts b/apps/web-crescent/src/graphql/types/general_types.ts index c143504c50..b681919b52 100644 --- a/apps/web-crescent/src/graphql/types/general_types.ts +++ b/apps/web-crescent/src/graphql/types/general_types.ts @@ -3405,6 +3405,14 @@ export type Messages_By_Address_Args = { types?: InputMaybe; }; +export type Messages_By_Single_Address_Args = { + address?: InputMaybe; + apikey?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; @@ -5554,6 +5562,10 @@ export type Query_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -6155,6 +6167,26 @@ export type Query_RootMessages_By_Address_AggregateArgs = { }; +export type Query_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7414,6 +7446,10 @@ export type Subscription_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -7929,6 +7965,26 @@ export type Subscription_RootMessages_By_Address_AggregateArgs = { }; +export type Subscription_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -12277,12 +12333,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorLiquidStaking: Array<{ __typename?: 'validator_status', liquidStaking: boolean }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorLiquidStaking: Array<{ __typename?: 'validator_status', liquidStaking: boolean }>, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -12319,11 +12417,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorLiquidStaking: Array<{ __typename?: 'validator_status', liquidStaking: boolean }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13774,12 +13867,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13788,11 +13877,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13800,6 +13960,40 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address @@ -13808,9 +14002,102 @@ export const ValidatorDetailsDocument = gql` validatorLiquidStaking: validator_statuses(order_by: {height: desc}, limit: 1) { liquidStaking: liquid_validator } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13819,40 +14106,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-crescent/src/screens/validator_details/components/validator_overview/index.tsx b/apps/web-crescent/src/screens/validator_details/components/validator_overview/index.tsx index a8b5191f65..cb6b2ad699 100644 --- a/apps/web-crescent/src/screens/validator_details/components/validator_overview/index.tsx +++ b/apps/web-crescent/src/screens/validator_details/components/validator_overview/index.tsx @@ -1,12 +1,10 @@ import Box from '@/components/box'; import ConditionExplanation from '@/components/condition_explanation'; import InfoPopover from '@/components/info_popover'; -import LiquidStakingExplanation from '@/components/liquid_staking_explanation'; import Tag from '@/components/tag'; import { useAddress } from '@/screens/validator_details/components/validator_overview/hooks'; import useStyles from '@/screens/validator_details/components/validator_overview/styles'; import { getCondition } from '@/screens/validator_details/components/validator_overview/utils'; -import type { OverviewType, StatusType } from '@/screens/validator_details/types'; import { useDisplayStyles } from '@/styles/useSharedStyles'; import { getMiddleEllipsis } from '@/utils/get_middle_ellipsis'; import { getValidatorStatus } from '@/utils/get_validator_status'; @@ -19,21 +17,29 @@ import Link from 'next/link'; import numeral from 'numeral'; import { FC } from 'react'; import CopyIcon from 'shared-utils/assets/icon-copy.svg'; +import Loading from '@/components/loading'; +import type { OverviewType, StatusType } from '@/screens/validator_details/types'; import LiquidStakingFalseIcon from 'shared-utils/assets/liquid-staking-false.svg'; import LiquidStakingTrueIcon from 'shared-utils/assets/liquid-staking-true.svg'; +import LiquidStakingExplanation from '@/components/liquid_staking_explanation'; type ValidatorOverviewProps = { className?: string; status: StatusType; overview: OverviewType; + loading: boolean; }; -const ValidatorOverview: FC = ({ status, overview, className }) => { +const ValidatorOverview: FC = ({ + status, + overview, + className, + loading, +}) => { const { classes, cx } = useStyles(); const display = useDisplayStyles().classes; const { t } = useAppTranslation('validators'); const { handleCopyToClipboard } = useAddress(t); - const statusTheme = getValidatorStatus(status.status, status.jailed, status.tombstoned); const condition = getCondition(status.condition, status.status); const { liquidStaking } = status; @@ -132,58 +138,69 @@ const ValidatorOverview: FC = ({ status, overview, class return ( -
-
- - {t('operatorAddress')} - -
- handleCopyToClipboard(overview.operatorAddress)} - className={classes.actionIcons} - /> - - {overview.operatorAddress} - - {getMiddleEllipsis(overview.operatorAddress, { - beginning: 15, - ending: 5, - })} - - -
-
+ {loading ? ( + + ) : ( + <> +
+
+ + {t('operatorAddress')} + +
+ handleCopyToClipboard(overview.operatorAddress)} + className={classes.actionIcons} + /> + + {overview.operatorAddress} + + {getMiddleEllipsis(overview.operatorAddress, { + beginning: 15, + ending: 5, + })} + + +
+
-
- - {t('selfDelegateAddress')} - -
- handleCopyToClipboard(overview.selfDelegateAddress)} - /> - - {overview.selfDelegateAddress} - - {getMiddleEllipsis(overview.selfDelegateAddress, { - beginning: 15, - ending: 5, - })} - - +
+ + {t('selfDelegateAddress')} + +
+ handleCopyToClipboard(overview.selfDelegateAddress)} + /> + + {overview.selfDelegateAddress} + + {getMiddleEllipsis(overview.selfDelegateAddress, { + beginning: 15, + ending: 5, + })} + + +
+
-
-
- -
- {statusItems.map((x) => ( -
- {x.key} - {x.value} + +
+ {statusItems.map((x) => ( +
+ {x.key} + {x.value} +
+ ))}
- ))} -
+ + )} ); }; diff --git a/apps/web-crescent/src/screens/validator_details/hooks.ts b/apps/web-crescent/src/screens/validator_details/hooks.ts index eeaad3d3cf..0312626805 100644 --- a/apps/web-crescent/src/screens/validator_details/hooks.ts +++ b/apps/web-crescent/src/screens/validator_details/hooks.ts @@ -2,10 +2,22 @@ import { useRouter } from 'next/router'; import * as R from 'ramda'; import { useCallback, useEffect, useState } from 'react'; import chainConfig from '@/chainConfig'; -import { useValidatorDetailsQuery, ValidatorDetailsQuery } from '@/graphql/types/general_types'; +import { + useValidatorVotingPowersQuery, + ValidatorVotingPowersQuery, + useValidatorInfoQuery, + ValidatorInfoQuery, + ValidatorAddressQuery, + useValidatorAddressQuery, +} from '@/graphql/types/general_types'; import { useDesmosProfile } from '@/hooks/use_desmos_profile'; import { SlashingParams } from '@/models'; -import type { ValidatorDetailsState } from '@/screens/validator_details/types'; +import { + StatusType, + ValidatorVPState, + ValidatorProfileState, + ValidatorOverviewState, +} from '@/screens/validator_details/types'; import { formatToken } from '@/utils/format_token'; import { getValidatorCondition } from '@/utils/get_validator_condition'; @@ -18,9 +30,18 @@ const initialTokenDenom: TokenUnit = { exponent: 0, }; -const initialState: ValidatorDetailsState = { +const initialVotingPowerState: ValidatorVPState = { + validatorVPExists: true, + votingPower: { + height: 0, + overall: initialTokenDenom, + self: 0, + validatorStatus: 0, + }, +}; + +const initialValidatorOverviewState: ValidatorOverviewState = { exists: true, - desmosProfile: null, overview: { validator: '', operatorAddress: '', @@ -39,19 +60,79 @@ const initialState: ValidatorDetailsState = { signedBlockWindow: 0, maxRate: '0', }, - votingPower: { - height: 0, - overall: initialTokenDenom, - self: 0, - }, }; -export const useValidatorDetails = () => { +const initialValidatorProfileState: ValidatorProfileState = { + exists: true, + desmosProfile: null, + operatorAddress: '', + selfDelegateAddress: '', +}; + +export const useValidatorVotingPowerDetails = () => { + const router = useRouter(); + const [state, setState] = useState(initialVotingPowerState); + + const handleSetState = useCallback( + (stateChange: (prevState: ValidatorVPState) => ValidatorVPState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + + // ========================== + // Fetch Data + // ========================== + const { loading } = useValidatorVotingPowersQuery({ + variables: { + address: router.query.address as string, + }, + onCompleted: (data) => { + handleSetState((prevState) => ({ ...prevState, ...formatValidatorVotingPower(data) })); + }, + }); + + return { state, loading }; +}; + +export const useValidatorOverviewDetails = () => { + const router = useRouter(); + const [state, setState] = useState(initialValidatorOverviewState); + + const handleSetState = useCallback( + (stateChange: (prevState: ValidatorOverviewState) => ValidatorOverviewState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + + // ========================== + // Fetch Data + // ========================== + const { loading } = useValidatorInfoQuery({ + variables: { + address: router.query.address as string, + }, + onCompleted: (data) => { + handleSetState((prevState) => ({ ...prevState, ...formatValidatorOverview(data) })); + }, + }); + + return { state, loading }; +}; + +export const useValidatorProfileDetails = () => { + const [state, setState] = useState(initialValidatorProfileState); const router = useRouter(); - const [state, setState] = useState(initialState); const handleSetState = useCallback( - (stateChange: (prevState: ValidatorDetailsState) => ValidatorDetailsState) => { + (stateChange: (prevState: ValidatorProfileState) => ValidatorProfileState) => { setState((prevState) => { const newState = stateChange(prevState); return R.equals(prevState, newState) ? prevState : newState; @@ -63,12 +144,12 @@ export const useValidatorDetails = () => { // ========================== // Fetch Data // ========================== - const { loading } = useValidatorDetailsQuery({ + const { loading } = useValidatorAddressQuery({ variables: { address: router.query.address as string, }, onCompleted: (data) => { - handleSetState((prevState) => ({ ...prevState, ...formatAccountQuery(data) })); + handleSetState((prevState) => ({ ...prevState, ...formatValidatorAddress(data) })); }, }); @@ -76,8 +157,8 @@ export const useValidatorDetails = () => { // Desmos Profile // ========================== const { data: dataDesmosProfile, loading: loadingDesmosProfile } = useDesmosProfile({ - addresses: [state.overview.selfDelegateAddress], - skip: !extra.profile || !state.overview.selfDelegateAddress, + addresses: [state.selfDelegateAddress], + skip: !extra.profile || !state.selfDelegateAddress, }); useEffect( () => @@ -88,17 +169,58 @@ export const useValidatorDetails = () => { })), [dataDesmosProfile, loadingDesmosProfile] ); - return { state, loading }; }; -// ============================ -// overview -// ============================ -const formatOverview = (data: ValidatorDetailsQuery) => { +function formatValidatorAddress(data: ValidatorAddressQuery): Partial { + const stateChange: Partial = {}; + if (!data.validator.length) { + stateChange.exists = false; + return stateChange; + } + + const operatorAddress = data?.validator?.[0]?.validatorInfo?.operatorAddress ?? ''; + const selfDelegateAddress = data?.validator?.[0]?.validatorInfo?.selfDelegateAddress ?? ''; + + stateChange.operatorAddress = operatorAddress; + stateChange.selfDelegateAddress = selfDelegateAddress; + return stateChange; +} + +function formatValidatorVotingPower(data: ValidatorVotingPowersQuery): Partial { + const stateChange: Partial = {}; + if (!data.validator.length) { + stateChange.validatorVPExists = false; + return stateChange; + } + + const selfVotingPower = + (data.validator[0]?.validatorVotingPowers?.[0]?.votingPower ?? 0) / + 10 ** (extra.votingPowerExponent ?? 0); + + const votingPower = { + self: selfVotingPower, + overall: formatToken(data?.stakingPool?.[0]?.bonded ?? 0, votingPowerTokenUnit), + height: data.validator[0]?.validatorVotingPowers?.[0]?.height ?? 0, + validatorStatus: data.validator[0]?.validatorStatuses[0]?.status, + }; + + stateChange.votingPower = votingPower; + stateChange.validatorVPExists = true; + + return stateChange; +} + +function formatValidatorOverview(data: ValidatorInfoQuery): Partial { + const stateChange: Partial = {}; + if (!data.validator.length) { + stateChange.exists = false; + return stateChange; + } + const operatorAddress = data?.validator?.[0]?.validatorInfo?.operatorAddress ?? ''; const selfDelegateAddress = data?.validator?.[0]?.validatorInfo?.selfDelegateAddress ?? ''; - const profile = { + const overview = { validator: operatorAddress, operatorAddress, selfDelegateAddress, @@ -106,13 +228,6 @@ const formatOverview = (data: ValidatorDetailsQuery) => { website: data.validator[0]?.validatorDescriptions?.[0]?.website ?? '', }; - return profile; -}; - -// ============================ -// status -// ============================ -const formatStatus = (data: ValidatorDetailsQuery) => { const slashingParams = SlashingParams.fromJson(data?.slashingParams?.[0]?.params ?? {}); const missedBlockCounter = data.validator[0]?.validatorSigningInfos?.[0]?.missedBlocksCounter ?? 0; @@ -129,7 +244,7 @@ const formatStatus = (data: ValidatorDetailsQuery) => { } } - const profile = { + const status: StatusType = { status: data.validator[0]?.validatorStatuses?.[0]?.status ?? 3, jailed: data.validator[0]?.validatorStatuses?.[0]?.jailed ?? false, tombstoned: data.validator[0]?.validatorSigningInfos?.[0]?.tombstoned ?? false, @@ -141,38 +256,8 @@ const formatStatus = (data: ValidatorDetailsQuery) => { maxRate: data?.validator?.[0]?.validatorInfo?.maxRate ?? '0', }; - return profile; -}; - -// ============================ -// votingPower -// ============================ -const formatVotingPower = (data: ValidatorDetailsQuery) => { - const selfVotingPower = - (data.validator[0]?.validatorVotingPowers?.[0]?.votingPower ?? 0) / - 10 ** (extra.votingPowerExponent ?? 0); - - const votingPower = { - self: selfVotingPower, - overall: formatToken(data?.stakingPool?.[0]?.bonded ?? 0, votingPowerTokenUnit), - height: data.validator[0]?.validatorVotingPowers?.[0]?.height ?? 0, - }; - - return votingPower; -}; - -function formatAccountQuery(data: ValidatorDetailsQuery) { - const stateChange: Partial = {}; - - if (!data.validator.length) { - stateChange.exists = false; - return stateChange; - } - - stateChange.overview = formatOverview(data); - - stateChange.status = formatStatus(data); - stateChange.votingPower = formatVotingPower(data); - + stateChange.exists = true; + stateChange.overview = overview; + stateChange.status = status; return stateChange; } diff --git a/apps/web-crescent/src/screens/validator_details/index.tsx b/apps/web-crescent/src/screens/validator_details/index.tsx index a096f375db..1fd9c6513b 100644 --- a/apps/web-crescent/src/screens/validator_details/index.tsx +++ b/apps/web-crescent/src/screens/validator_details/index.tsx @@ -2,21 +2,28 @@ import { NextSeo } from 'next-seo'; import useAppTranslation from '@/hooks/useAppTranslation'; import DesmosProfile from '@/components/desmos_profile'; import Layout from '@/components/layout'; -import LoadAndExist from '@/components/load_and_exist'; import Blocks from '@/screens/validator_details/components/blocks'; import Profile from '@/screens/validator_details/components/profile'; import Staking from '@/screens/validator_details/components/staking'; import Transactions from '@/screens/validator_details/components/transactions'; import ValidatorOverview from '@/screens/validator_details/components/validator_overview'; import VotingPower from '@/screens/validator_details/components/voting_power'; -import { useValidatorDetails } from '@/screens/validator_details/hooks'; +import { + useValidatorProfileDetails, + useValidatorOverviewDetails, + useValidatorVotingPowerDetails, +} from '@/screens/validator_details/hooks'; import useStyles from '@/screens/validator_details/styles'; +import LoadAndExist from '@/components/load_and_exist'; const ValidatorDetails = () => { const { t } = useAppTranslation('validators'); const { classes } = useStyles(); - const { state, loading } = useValidatorDetails(); - const { desmosProfile, exists, overview, status, votingPower } = state; + const { state, loading } = useValidatorProfileDetails(); + const { exists, desmosProfile, operatorAddress } = state; + const { state: validatorOverviewState, loading: validatorOverviewLoading } = + useValidatorOverviewDetails(); + const { state: validatorVPState, loading: validatorVPLoading } = useValidatorVotingPowerDetails(); return ( <> @@ -27,23 +34,43 @@ const ValidatorDetails = () => { }} /> - - - {desmosProfile ? ( - - ) : ( - - )} - - - - - - + +
+ + {exists && desmosProfile ? ( + + ) : ( + + )} + {!loading ? ( + <> + + + + ) : null} + {!loading && !validatorOverviewLoading && !validatorVPLoading ? ( + <> + + + + + ) : null} + +
diff --git a/apps/web-crescent/src/screens/validator_details/types.ts b/apps/web-crescent/src/screens/validator_details/types.ts index ba63199222..45b7d15962 100644 --- a/apps/web-crescent/src/screens/validator_details/types.ts +++ b/apps/web-crescent/src/screens/validator_details/types.ts @@ -8,6 +8,7 @@ export interface OverviewType { export interface StatusType { status: number; + inActiveSet?: string; jailed: boolean; tombstoned: boolean; condition: number; @@ -22,12 +23,23 @@ export interface VotingPowerType { height: number; overall: TokenUnit; self: number; + validatorStatus: number; } -export interface ValidatorDetailsState { +export interface ValidatorVPState { + validatorVPExists: boolean; + votingPower: VotingPowerType; +} + +export interface ValidatorOverviewState { exists: boolean; - desmosProfile: DesmosProfile | null; overview: OverviewType; status: StatusType; - votingPower: VotingPowerType; +} + +export interface ValidatorProfileState { + exists: boolean; + desmosProfile: DesmosProfile | null; + operatorAddress: string; + selfDelegateAddress: string; } diff --git a/apps/web-desmos/src/graphql/general/validator_details.graphql b/apps/web-desmos/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-desmos/src/graphql/general/validator_details.graphql +++ b/apps/web-desmos/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-desmos/src/graphql/types/general_types.ts b/apps/web-desmos/src/graphql/types/general_types.ts index 5e016833be..236a972489 100644 --- a/apps/web-desmos/src/graphql/types/general_types.ts +++ b/apps/web-desmos/src/graphql/types/general_types.ts @@ -3069,6 +3069,142 @@ export type Message_Sum_Order_By = { partition_id?: InputMaybe; }; +/** columns and relationships of "message_type" */ +export type Message_Type = { + __typename?: 'message_type'; + height: Scalars['bigint']; + label: Scalars['String']; + module: Scalars['String']; + type: Scalars['String']; +}; + +/** aggregated selection of "message_type" */ +export type Message_Type_Aggregate = { + __typename?: 'message_type_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "message_type" */ +export type Message_Type_Aggregate_Fields = { + __typename?: 'message_type_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "message_type" */ +export type Message_Type_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Message_Type_Avg_Fields = { + __typename?: 'message_type_avg_fields'; + height?: Maybe; +}; + +/** Boolean expression to filter rows from the table "message_type". All fields are combined with a logical 'AND'. */ +export type Message_Type_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + height?: InputMaybe; + label?: InputMaybe; + module?: InputMaybe; + type?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Message_Type_Max_Fields = { + __typename?: 'message_type_max_fields'; + height?: Maybe; + label?: Maybe; + module?: Maybe; + type?: Maybe; +}; + +/** aggregate min on columns */ +export type Message_Type_Min_Fields = { + __typename?: 'message_type_min_fields'; + height?: Maybe; + label?: Maybe; + module?: Maybe; + type?: Maybe; +}; + +/** Ordering options when selecting data from "message_type". */ +export type Message_Type_Order_By = { + height?: InputMaybe; + label?: InputMaybe; + module?: InputMaybe; + type?: InputMaybe; +}; + +/** select columns of table "message_type" */ +export enum Message_Type_Select_Column { + /** column name */ + Height = 'height', + /** column name */ + Label = 'label', + /** column name */ + Module = 'module', + /** column name */ + Type = 'type' +} + +/** aggregate stddev on columns */ +export type Message_Type_Stddev_Fields = { + __typename?: 'message_type_stddev_fields'; + height?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Message_Type_Stddev_Pop_Fields = { + __typename?: 'message_type_stddev_pop_fields'; + height?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Message_Type_Stddev_Samp_Fields = { + __typename?: 'message_type_stddev_samp_fields'; + height?: Maybe; +}; + +/** aggregate sum on columns */ +export type Message_Type_Sum_Fields = { + __typename?: 'message_type_sum_fields'; + height?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Message_Type_Var_Pop_Fields = { + __typename?: 'message_type_var_pop_fields'; + height?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Message_Type_Var_Samp_Fields = { + __typename?: 'message_type_var_samp_fields'; + height?: Maybe; +}; + +/** aggregate variance on columns */ +export type Message_Type_Variance_Fields = { + __typename?: 'message_type_variance_fields'; + height?: Maybe; +}; + /** aggregate var_pop on columns */ export type Message_Var_Pop_Fields = { __typename?: 'message_var_pop_fields'; @@ -3121,6 +3257,18 @@ export type Messages_By_Address_Args = { types?: InputMaybe; }; +export type Messages_By_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_Types_By_Address_Args = { + addresses?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; @@ -3728,9 +3876,9 @@ export type Proposal = { __typename?: 'proposal'; content: Scalars['jsonb']; deposit_end_time?: Maybe; - description: Scalars['String']; + description?: Maybe; id: Scalars['Int']; - metadata: Scalars['String']; + metadata?: Maybe; /** An array relationship */ proposal_deposits: Array; /** An aggregate relationship */ @@ -3752,6 +3900,7 @@ export type Proposal = { staking_pool_snapshot?: Maybe; status?: Maybe; submit_time: Scalars['timestamp']; + summary?: Maybe; title: Scalars['String']; /** An array relationship */ validator_status_snapshots: Array; @@ -3922,6 +4071,7 @@ export type Proposal_Bool_Exp = { staking_pool_snapshot?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; validator_status_snapshots?: InputMaybe; voting_end_time?: InputMaybe; @@ -4178,6 +4328,7 @@ export type Proposal_Max_Fields = { proposer_address?: Maybe; status?: Maybe; submit_time?: Maybe; + summary?: Maybe; title?: Maybe; voting_end_time?: Maybe; voting_start_time?: Maybe; @@ -4192,6 +4343,7 @@ export type Proposal_Max_Order_By = { proposer_address?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; voting_end_time?: InputMaybe; voting_start_time?: InputMaybe; @@ -4207,6 +4359,7 @@ export type Proposal_Min_Fields = { proposer_address?: Maybe; status?: Maybe; submit_time?: Maybe; + summary?: Maybe; title?: Maybe; voting_end_time?: Maybe; voting_start_time?: Maybe; @@ -4221,6 +4374,7 @@ export type Proposal_Min_Order_By = { proposer_address?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; voting_end_time?: InputMaybe; voting_start_time?: InputMaybe; @@ -4242,6 +4396,7 @@ export type Proposal_Order_By = { staking_pool_snapshot?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; validator_status_snapshots_aggregate?: InputMaybe; voting_end_time?: InputMaybe; @@ -4267,6 +4422,8 @@ export enum Proposal_Select_Column { /** column name */ SubmitTime = 'submit_time', /** column name */ + Summary = 'summary', + /** column name */ Title = 'title', /** column name */ VotingEndTime = 'voting_end_time', @@ -5388,10 +5545,22 @@ export type Query_Root = { message: Array; /** fetch aggregated fields from the table: "message" */ message_aggregate: Message_Aggregate; + /** fetch data from the table: "message_type" */ + message_type: Array; + /** fetch aggregated fields from the table: "message_type" */ + message_type_aggregate: Message_Type_Aggregate; /** execute function "messages_by_address" which returns "message" */ messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_by_types" and query aggregates on result of table type "message" */ + messages_by_types_aggregate: Message_Aggregate; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; + /** execute function "messages_types_by_address" and query aggregates on result of table type "message" */ + messages_types_by_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -5933,6 +6102,24 @@ export type Query_RootMessage_AggregateArgs = { }; +export type Query_RootMessage_TypeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessage_Type_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMessages_By_AddressArgs = { args: Messages_By_Address_Args; distinct_on?: InputMaybe>; @@ -5953,6 +6140,46 @@ export type Query_RootMessages_By_Address_AggregateArgs = { }; +export type Query_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Types_AggregateArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Types_By_Address_AggregateArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7235,10 +7462,22 @@ export type Subscription_Root = { message: Array; /** fetch aggregated fields from the table: "message" */ message_aggregate: Message_Aggregate; + /** fetch data from the table: "message_type" */ + message_type: Array; + /** fetch aggregated fields from the table: "message_type" */ + message_type_aggregate: Message_Type_Aggregate; /** execute function "messages_by_address" which returns "message" */ messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_by_types" and query aggregates on result of table type "message" */ + messages_by_types_aggregate: Message_Aggregate; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; + /** execute function "messages_types_by_address" and query aggregates on result of table type "message" */ + messages_types_by_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -7694,6 +7933,24 @@ export type Subscription_RootMessage_AggregateArgs = { }; +export type Subscription_RootMessage_TypeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessage_Type_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMessages_By_AddressArgs = { args: Messages_By_Address_Args; distinct_on?: InputMaybe>; @@ -7714,6 +7971,46 @@ export type Subscription_RootMessages_By_Address_AggregateArgs = { }; +export type Subscription_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Types_AggregateArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Types_By_Address_AggregateArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -11992,7 +12289,7 @@ export type ProposalDetailsQueryVariables = Exact<{ }>; -export type ProposalDetailsQuery = { proposal: Array<{ __typename?: 'proposal', title: string, description: string, status?: string | null, content: any, proposer: string, proposalId: number, submitTime: any, depositEndTime?: any | null, votingStartTime?: any | null, votingEndTime?: any | null }> }; +export type ProposalDetailsQuery = { proposal: Array<{ __typename?: 'proposal', title: string, description?: string | null, status?: string | null, content: any, proposer: string, proposalId: number, submitTime: any, depositEndTime?: any | null, votingStartTime?: any | null, votingEndTime?: any | null }> }; export type ProposalDetailsTallyQueryVariables = Exact<{ proposalId?: InputMaybe; @@ -12021,7 +12318,7 @@ export type ProposalsQueryVariables = Exact<{ }>; -export type ProposalsQuery = { proposals: Array<{ __typename?: 'proposal', title: string, status?: string | null, description: string, proposalId: number }>, total: { __typename?: 'proposal_aggregate', aggregate?: { __typename?: 'proposal_aggregate_fields', count: number } | null } }; +export type ProposalsQuery = { proposals: Array<{ __typename?: 'proposal', title: string, status?: string | null, description?: string | null, proposalId: number }>, total: { __typename?: 'proposal_aggregate', aggregate?: { __typename?: 'proposal_aggregate_fields', count: number } | null } }; export type TokenPriceListenerSubscriptionVariables = Exact<{ denom?: InputMaybe; @@ -12080,12 +12377,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: any }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: any }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -12122,11 +12461,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: any }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13573,12 +13907,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13587,11 +13917,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13599,14 +14000,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13615,40 +14143,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-desmos/src/screens/proposals/hooks.ts b/apps/web-desmos/src/screens/proposals/hooks.ts new file mode 100644 index 0000000000..b9b5cfcff5 --- /dev/null +++ b/apps/web-desmos/src/screens/proposals/hooks.ts @@ -0,0 +1,97 @@ +import { ProposalsQuery, useProposalsQuery } from '@/graphql/types/general_types'; +import type { ProposalsState, ProposalType } from '@/screens/proposals/types'; +import * as R from 'ramda'; +import { useCallback, useState } from 'react'; +import xss from 'xss'; + +const formatProposals = (data: ProposalsQuery) => + data?.proposals.map((x): ProposalType => { + let description = ''; + if (x?.description) { + description = xss(x.description.replace(/\\n\s?/g, '
')); + } + return { + description, + id: x.proposalId, + title: x.title, + status: x.status ?? '', + }; + }); + +export const useProposals = () => { + const [state, setState] = useState({ + loading: true, + exists: true, + items: [], + hasNextPage: false, + isNextPageLoading: true, + rawDataTotal: 0, + }); + + const handleSetState = useCallback( + (stateChange: (prevState: ProposalsState) => ProposalsState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + + // ================================ + // proposals query + // ================================ + + const proposalQuery = useProposalsQuery({ + variables: { + limit: 50, + offset: 0, + }, + onCompleted: (data) => { + const newItems = R.uniq([...state.items, ...formatProposals(data)]); + handleSetState((prevState) => ({ + ...prevState, + loading: false, + items: newItems, + hasNextPage: newItems.length < (data.total?.aggregate?.count ?? 0), + isNextPageLoading: false, + rawDataTotal: data.total?.aggregate?.count ?? prevState.rawDataTotal, + })); + }, + }); + + const loadNextPage = async () => { + handleSetState((prevState) => ({ ...prevState, isNextPageLoading: true })); + // refetch query + await proposalQuery + .fetchMore({ + variables: { + offset: state.items.length, + limit: 50, + }, + }) + .then(({ data }) => { + const newItems = R.uniq([...state.items, ...formatProposals(data)]); + // set new state + handleSetState((prevState) => ({ + ...prevState, + items: newItems, + isNextPageLoading: false, + hasNextPage: newItems.length < (data.total?.aggregate?.count ?? 0), + rawDataTotal: data.total?.aggregate?.count ?? prevState.rawDataTotal, + })); + }); + }; + + const itemCount = state.hasNextPage ? state.items.length + 1 : state.items.length; + const loadMoreItems = state.isNextPageLoading ? () => null : loadNextPage; + const isItemLoaded = (index: number) => !state.hasNextPage || index < state.items.length; + + return { + state, + loadNextPage, + itemCount, + loadMoreItems, + isItemLoaded, + }; +}; diff --git a/apps/web-emoney/src/chain.json b/apps/web-emoney/src/chain.json index 830a847cc0..48632e3f18 100644 --- a/apps/web-emoney/src/chain.json +++ b/apps/web-emoney/src/chain.json @@ -3,7 +3,8 @@ "title": "e-Money Block Explorer", "extra": { "profile": true, - "graphqlWs": true + "graphqlWs": true, + "votingPowerExponent": 6 }, "previewImage": "https://s3.bigdipper.live/emoney.png", "themes": { diff --git a/apps/web-emoney/src/graphql/general/validator_details.graphql b/apps/web-emoney/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-emoney/src/graphql/general/validator_details.graphql +++ b/apps/web-emoney/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-emoney/src/graphql/types/general_types.ts b/apps/web-emoney/src/graphql/types/general_types.ts index 77a521cbd5..5aa0b5e4d2 100644 --- a/apps/web-emoney/src/graphql/types/general_types.ts +++ b/apps/web-emoney/src/graphql/types/general_types.ts @@ -11785,12 +11785,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11827,11 +11869,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13285,12 +13322,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13299,11 +13332,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13311,14 +13415,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13327,40 +13558,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-emoney/src/screens/account_details/components/index.ts b/apps/web-emoney/src/screens/account_details/components/index.ts deleted file mode 100644 index 6947bf7a0a..0000000000 --- a/apps/web-emoney/src/screens/account_details/components/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as Balance } from '@/screens/account_details/components/balance'; -export { default as OtherTokens } from '@/screens/account_details/components/other_tokens'; -export { default as Overview } from '@/screens/account_details/components/overview'; -export { default as Staking } from '@/screens/account_details/components/staking'; -export { default as Transactions } from '@/screens/account_details/components/transactions'; diff --git a/apps/web-emoney/src/screens/account_details/index.tsx b/apps/web-emoney/src/screens/account_details/index.tsx deleted file mode 100644 index 6d28e31fd3..0000000000 --- a/apps/web-emoney/src/screens/account_details/index.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { NextSeo } from 'next-seo'; -import useAppTranslation from '@/hooks/useAppTranslation'; -import DesmosProfile from '@/components/desmos_profile'; -import Layout from '@/components/layout'; -import LoadAndExist from '@/components/load_and_exist'; -import Balance from '@/screens/account_details/components/balance'; -import OtherTokens from '@/screens/account_details/components/other_tokens'; -import Overview from '@/screens/account_details/components/overview'; -import Staking from '@/screens/account_details/components/staking'; -import Transactions from '@/screens/account_details/components/transactions'; -import { useAccountDetails } from '@/screens/account_details/hooks'; -import useStyles from '@/screens/account_details/styles'; - -const AccountDetails = () => { - const { t } = useAppTranslation('accounts'); - const { classes } = useStyles(); - const { state } = useAccountDetails(); - - return ( - <> - - - - - {!!state.desmosProfile && ( - - )} - - - - - - - - - - ); -}; - -export default AccountDetails; diff --git a/apps/web-emoney/src/screens/validator_details/hooks.ts b/apps/web-emoney/src/screens/validator_details/hooks.ts deleted file mode 100644 index a32bb84e1d..0000000000 --- a/apps/web-emoney/src/screens/validator_details/hooks.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { useRouter } from 'next/router'; -import * as R from 'ramda'; -import { useCallback, useEffect, useState } from 'react'; -import chainConfig from '@/chainConfig'; -import { useValidatorDetailsQuery, ValidatorDetailsQuery } from '@/graphql/types/general_types'; -import { useDesmosProfile } from '@/hooks/use_desmos_profile'; -import { SlashingParams } from '@/models'; -import type { ValidatorDetailsState } from '@/screens/validator_details/types'; -import { formatToken } from '@/utils/format_token'; -import { getValidatorCondition } from '@/utils/get_validator_condition'; - -const { extra, votingPowerTokenUnit } = chainConfig(); - -const initialTokenDenom: TokenUnit = { - value: '0', - displayDenom: '', - baseDenom: '', - exponent: 0, -}; - -const initialState: ValidatorDetailsState = { - exists: true, - desmosProfile: null, - overview: { - validator: '', - operatorAddress: '', - selfDelegateAddress: '', - description: '', - website: '', - }, - status: { - status: 0, - jailed: false, - tombstoned: false, - condition: 0, - commission: 0, - missedBlockCounter: 0, - signedBlockWindow: 0, - maxRate: '0', - }, - votingPower: { - height: 0, - overall: initialTokenDenom, - self: 0, - }, -}; - -export const useValidatorDetails = () => { - const router = useRouter(); - const [state, setState] = useState(initialState); - - const handleSetState = useCallback( - (stateChange: (prevState: ValidatorDetailsState) => ValidatorDetailsState) => { - setState((prevState) => { - const newState = stateChange(prevState); - return R.equals(prevState, newState) ? prevState : newState; - }); - }, - [] - ); - - // ========================== - // Fetch Data - // ========================== - const { loading } = useValidatorDetailsQuery({ - variables: { - address: router.query.address as string, - }, - onCompleted: (data) => { - handleSetState((prevState) => ({ ...prevState, ...formatAccountQuery(data) })); - }, - onError: () => handleSetState((prevState) => ({ ...prevState, loading: false })), - }); - - // ========================== - // Desmos Profile - // ========================== - const { data: dataDesmosProfile, loading: loadingDesmosProfile } = useDesmosProfile({ - addresses: [state.overview.selfDelegateAddress], - skip: !extra.profile || !state.overview.selfDelegateAddress, - }); - useEffect( - () => - setState((prevState) => ({ - ...prevState, - desmosProfile: dataDesmosProfile?.[0], - loading: loadingDesmosProfile, - })), - [dataDesmosProfile, loadingDesmosProfile] - ); - - return { state, loading }; -}; - -// ============================ -// overview -// ============================ -const formatOverview = (data: ValidatorDetailsQuery) => { - const operatorAddress = data?.validator?.[0]?.validatorInfo?.operatorAddress ?? ''; - const selfDelegateAddress = data?.validator?.[0]?.validatorInfo?.selfDelegateAddress ?? ''; - const profile = { - validator: operatorAddress, - operatorAddress, - selfDelegateAddress, - description: data.validator[0]?.validatorDescriptions?.[0]?.details ?? '', - website: data.validator[0]?.validatorDescriptions?.[0]?.website ?? '', - }; - - return profile; -}; - -// ============================ -// status -// ============================ -const formatStatus = (data: ValidatorDetailsQuery) => { - const slashingParams = SlashingParams.fromJson(data?.slashingParams?.[0]?.params ?? {}); - const missedBlockCounter = - data.validator[0]?.validatorSigningInfos?.[0]?.missedBlocksCounter ?? 0; - const { signedBlockWindow } = slashingParams; - const condition = getValidatorCondition(signedBlockWindow, missedBlockCounter); - - const profile = { - status: data.validator[0]?.validatorStatuses?.[0]?.status ?? 3, - jailed: data.validator[0]?.validatorStatuses?.[0]?.jailed ?? false, - tombstoned: data.validator[0]?.validatorSigningInfos?.[0]?.tombstoned ?? false, - commission: data.validator[0]?.validatorCommissions?.[0]?.commission ?? 0, - condition, - missedBlockCounter, - signedBlockWindow, - maxRate: data?.validator?.[0]?.validatorInfo?.maxRate ?? '0', - }; - - return profile; -}; - -// ============================ -// votingPower -// ============================ -const formatVotingPower = (data: ValidatorDetailsQuery) => { - const selfVotingPower = formatToken( - data.validator[0]?.validatorVotingPowers?.[0]?.votingPower ?? 0, - votingPowerTokenUnit - ).value; - - const votingPower = { - self: parseFloat(selfVotingPower), - overall: formatToken(data?.stakingPool?.[0]?.bonded ?? 0, votingPowerTokenUnit), - height: data.validator[0]?.validatorVotingPowers?.[0]?.height ?? 0, - }; - - return votingPower; -}; - -function formatAccountQuery(data: ValidatorDetailsQuery) { - const stateChange: Partial = {}; - - if (!data.validator.length) { - stateChange.exists = false; - return stateChange; - } - - stateChange.overview = formatOverview(data); - - stateChange.status = formatStatus(data); - stateChange.votingPower = formatVotingPower(data); - - return stateChange; -} diff --git a/apps/web-emoney/src/screens/validators/components/list/hooks.ts b/apps/web-emoney/src/screens/validators/components/list/hooks.ts index 5e4e3e9b27..2dfae48220 100644 --- a/apps/web-emoney/src/screens/validators/components/list/hooks.ts +++ b/apps/web-emoney/src/screens/validators/components/list/hooks.ts @@ -13,12 +13,12 @@ import type { import { formatToken } from '@/utils/format_token'; import { getValidatorCondition } from '@/utils/get_validator_condition'; -const { votingPowerTokenUnit } = chainConfig(); +const { extra, votingPowerTokenUnit } = chainConfig(); // ========================== // Parse data // ========================== -const formatValidators = (data: ValidatorsQuery) => { +const formatValidators = (data: ValidatorsQuery): Partial => { const slashingParams = SlashingParams.fromJson(data?.slashingParams?.[0]?.params ?? {}); const votingPowerOverall = numeral( @@ -31,10 +31,10 @@ const formatValidators = (data: ValidatorsQuery) => { .filter((x) => x.validatorInfo) .map((x) => { const votingPower = - numeral( - formatToken(x?.validatorVotingPowers?.[0]?.votingPower ?? 0, votingPowerTokenUnit).value - ).value() ?? 0; - const votingPowerPercent = numeral((votingPower / (votingPowerOverall ?? 0)) * 100).value(); + (x?.validatorVotingPowers?.[0]?.votingPower ?? 0) / 10 ** (extra.votingPowerExponent ?? 0); + const votingPowerPercent = votingPowerOverall + ? numeral((votingPower / votingPowerOverall) * 100).value() + : 0; const missedBlockCounter = x?.validatorSigningInfos?.[0]?.missedBlocksCounter ?? 0; const condition = getValidatorCondition(signedBlockWindow, missedBlockCounter); @@ -112,7 +112,13 @@ export const useValidators = () => { ...formatValidators(data), })); }, - onError: () => handleSetState((prevState) => ({ ...prevState, loading: false })), + onError: () => { + handleSetState((prevState) => ({ + ...prevState, + loading: false, + exists: false, + })); + }, }); const handleTabChange = useCallback( @@ -125,20 +131,27 @@ export const useValidators = () => { [] ); - const handleSort = (key: string) => { - if (key === state.sortKey) { - setState((prevState) => ({ - ...prevState, - sortDirection: prevState.sortDirection === 'asc' ? 'desc' : 'asc', - })); - } else { - setState((prevState) => ({ - ...prevState, - sortKey: key, - sortDirection: 'asc', // new key so we start the sort by asc - })); - } - }; + const handleSort = useCallback( + (key: string) => { + if (key === state.sortKey) { + setState((prevState) => ({ + ...prevState, + sortDirection: prevState.sortDirection === 'asc' ? 'desc' : 'asc', + })); + } else { + setState((prevState) => ({ + ...prevState, + sortKey: key, + sortDirection: 'asc', // new key so we start the sort by asc + })); + } + }, + [state.sortKey] + ); + + const handleSearch = useCallback((value: string) => { + setSearch(value); + }, []); const sortItems = useCallback( (items: ItemType[]) => { @@ -152,6 +165,16 @@ export const useValidators = () => { sorted = sorted.filter((x) => x.status !== 3); } + if (search) { + sorted = sorted.filter((x) => { + const formattedSearch = search.toLowerCase().replace(/ /g, ''); + return ( + x.validator.name.toLowerCase().replace(/ /g, '').includes(formattedSearch) || + x.validator.address.toLowerCase().includes(formattedSearch) + ); + }); + } + if (state.sortKey && state.sortDirection) { sorted.sort((a, b) => { let compareA = R.pathOr('', [...state.sortKey.split('.')], a); @@ -174,13 +197,9 @@ export const useValidators = () => { return sorted; }, - [state.sortDirection, state.sortKey, state.tab] + [search, state.sortDirection, state.sortKey, state.tab] ); - const handleSearch = useCallback((value: string) => { - setSearch(value); - }, []); - return { state, handleTabChange, diff --git a/apps/web-evmos/src/chain.json b/apps/web-evmos/src/chain.json index 4ae7f80f87..09892f9146 100644 --- a/apps/web-evmos/src/chain.json +++ b/apps/web-evmos/src/chain.json @@ -3,7 +3,8 @@ "title": "Evmos Block Explorer", "extra": { "profile": false, - "graphqlWs": true + "graphqlWs": true, + "votingPowerExponent": 18 }, "previewImage": "https://s3.bigdipper.live/evmos.png", "themes": { diff --git a/apps/web-evmos/src/graphql/general/validator_details.graphql b/apps/web-evmos/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-evmos/src/graphql/general/validator_details.graphql +++ b/apps/web-evmos/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-evmos/src/graphql/types/general_types.ts b/apps/web-evmos/src/graphql/types/general_types.ts index 90dc327195..a28a9708c9 100644 --- a/apps/web-evmos/src/graphql/types/general_types.ts +++ b/apps/web-evmos/src/graphql/types/general_types.ts @@ -21,11 +21,14 @@ export type Scalars = { _coin: any; _dec_coin: any; _text: any; + access_config: any; bigint: any; + bytea: any; jsonb: any; numeric: any; smallint: any; timestamp: any; + timestamptz: any; }; export type ActionAddress = { @@ -56,6 +59,14 @@ export type ActionRedelegationResponse = { redelegations?: Maybe>>; }; +export type ActionSuperfluidDelegationResponse = { + __typename?: 'ActionSuperfluidDelegationResponse'; + delegation_amount?: Maybe; + delegator_address: Scalars['String']; + equivalent_staked_amount?: Maybe; + validator_address: Scalars['String']; +}; + export type ActionUnbondingDelegationResponse = { __typename?: 'ActionUnbondingDelegationResponse'; pagination?: Maybe; @@ -165,11 +176,32 @@ export type _Text_Comparison_Exp = { _nin?: InputMaybe>; }; +/** Boolean expression to compare columns of type "access_config". All fields are combined with logical 'AND'. */ +export type Access_Config_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + /** columns and relationships of "account" */ export type Account = { __typename?: 'account'; address: Scalars['String']; /** An array relationship */ + feeGrantAllowancesByGranterAddress: Array; + /** An aggregate relationship */ + feeGrantAllowancesByGranterAddress_aggregate: Fee_Grant_Allowance_Aggregate; + /** An array relationship */ + fee_grant_allowances: Array; + /** An aggregate relationship */ + fee_grant_allowances_aggregate: Fee_Grant_Allowance_Aggregate; + /** An array relationship */ proposal_deposits: Array; /** An aggregate relationship */ proposal_deposits_aggregate: Proposal_Deposit_Aggregate; @@ -191,6 +223,50 @@ export type Account = { vesting_accounts: Array; /** An aggregate relationship */ vesting_accounts_aggregate: Vesting_Account_Aggregate; + /** An array relationship */ + wasm_contracts: Array; + /** An aggregate relationship */ + wasm_contracts_aggregate: Wasm_Contract_Aggregate; +}; + + +/** columns and relationships of "account" */ +export type AccountFeeGrantAllowancesByGranterAddressArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account" */ +export type AccountFeeGrantAllowancesByGranterAddress_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account" */ +export type AccountFee_Grant_AllowancesArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account" */ +export type AccountFee_Grant_Allowances_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; @@ -293,6 +369,26 @@ export type AccountVesting_Accounts_AggregateArgs = { where?: InputMaybe; }; + +/** columns and relationships of "account" */ +export type AccountWasm_ContractsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "account" */ +export type AccountWasm_Contracts_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + /** aggregated selection of "account" */ export type Account_Aggregate = { __typename?: 'account_aggregate'; @@ -321,12 +417,15 @@ export type Account_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; address?: InputMaybe; + feeGrantAllowancesByGranterAddress?: InputMaybe; + fee_grant_allowances?: InputMaybe; proposal_deposits?: InputMaybe; proposal_votes?: InputMaybe; proposals?: InputMaybe; validator_infos?: InputMaybe; vesting_account?: InputMaybe; vesting_accounts?: InputMaybe; + wasm_contracts?: InputMaybe; }; /** aggregate max on columns */ @@ -344,12 +443,15 @@ export type Account_Min_Fields = { /** Ordering options when selecting data from "account". */ export type Account_Order_By = { address?: InputMaybe; + feeGrantAllowancesByGranterAddress_aggregate?: InputMaybe; + fee_grant_allowances_aggregate?: InputMaybe; proposal_deposits_aggregate?: InputMaybe; proposal_votes_aggregate?: InputMaybe; proposals_aggregate?: InputMaybe; validator_infos_aggregate?: InputMaybe; vesting_account?: InputMaybe; vesting_accounts_aggregate?: InputMaybe; + wasm_contracts_aggregate?: InputMaybe; }; /** select columns of table "account" */ @@ -1282,6 +1384,19 @@ export type Block_Variance_Order_By = { total_gas?: InputMaybe; }; +/** Boolean expression to compare columns of type "bytea". All fields are combined with logical 'AND'. */ +export type Bytea_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + /** columns and relationships of "community_pool" */ export type Community_Pool = { __typename?: 'community_pool'; @@ -1406,7 +1521,6 @@ export type Community_Pool_Variance_Fields = { export type Distribution_Params = { __typename?: 'distribution_params'; height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; params: Scalars['jsonb']; }; @@ -1458,7 +1572,6 @@ export type Distribution_Params_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -1477,7 +1590,6 @@ export type Distribution_Params_Min_Fields = { /** Ordering options when selecting data from "distribution_params". */ export type Distribution_Params_Order_By = { height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -1486,8 +1598,6 @@ export enum Distribution_Params_Select_Column { /** column name */ Height = 'height', /** column name */ - OneRowId = 'one_row_id', - /** column name */ Params = 'params' } @@ -1784,7 +1894,6 @@ export type Double_Sign_Vote = { /** An aggregate relationship */ double_sign_evidences_aggregate: Double_Sign_Evidence_Aggregate; height: Scalars['bigint']; - id: Scalars['Int']; round: Scalars['Int']; signature: Scalars['String']; type: Scalars['smallint']; @@ -1883,7 +1992,6 @@ export type Double_Sign_Vote_Aggregate_Order_By = { export type Double_Sign_Vote_Avg_Fields = { __typename?: 'double_sign_vote_avg_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -1892,7 +2000,6 @@ export type Double_Sign_Vote_Avg_Fields = { /** order by avg() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Avg_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; @@ -1907,7 +2014,6 @@ export type Double_Sign_Vote_Bool_Exp = { doubleSignEvidencesByVoteBId?: InputMaybe; double_sign_evidences?: InputMaybe; height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; signature?: InputMaybe; type?: InputMaybe; @@ -1921,7 +2027,6 @@ export type Double_Sign_Vote_Max_Fields = { __typename?: 'double_sign_vote_max_fields'; block_id?: Maybe; height?: Maybe; - id?: Maybe; round?: Maybe; signature?: Maybe; type?: Maybe; @@ -1933,7 +2038,6 @@ export type Double_Sign_Vote_Max_Fields = { export type Double_Sign_Vote_Max_Order_By = { block_id?: InputMaybe; height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; signature?: InputMaybe; type?: InputMaybe; @@ -1946,7 +2050,6 @@ export type Double_Sign_Vote_Min_Fields = { __typename?: 'double_sign_vote_min_fields'; block_id?: Maybe; height?: Maybe; - id?: Maybe; round?: Maybe; signature?: Maybe; type?: Maybe; @@ -1958,7 +2061,6 @@ export type Double_Sign_Vote_Min_Fields = { export type Double_Sign_Vote_Min_Order_By = { block_id?: InputMaybe; height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; signature?: InputMaybe; type?: InputMaybe; @@ -1972,7 +2074,6 @@ export type Double_Sign_Vote_Order_By = { doubleSignEvidencesByVoteBId_aggregate?: InputMaybe; double_sign_evidences_aggregate?: InputMaybe; height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; signature?: InputMaybe; type?: InputMaybe; @@ -1988,8 +2089,6 @@ export enum Double_Sign_Vote_Select_Column { /** column name */ Height = 'height', /** column name */ - Id = 'id', - /** column name */ Round = 'round', /** column name */ Signature = 'signature', @@ -2005,7 +2104,6 @@ export enum Double_Sign_Vote_Select_Column { export type Double_Sign_Vote_Stddev_Fields = { __typename?: 'double_sign_vote_stddev_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -2014,7 +2112,6 @@ export type Double_Sign_Vote_Stddev_Fields = { /** order by stddev() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Stddev_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; @@ -2024,7 +2121,6 @@ export type Double_Sign_Vote_Stddev_Order_By = { export type Double_Sign_Vote_Stddev_Pop_Fields = { __typename?: 'double_sign_vote_stddev_pop_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -2033,7 +2129,6 @@ export type Double_Sign_Vote_Stddev_Pop_Fields = { /** order by stddev_pop() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Stddev_Pop_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; @@ -2043,7 +2138,6 @@ export type Double_Sign_Vote_Stddev_Pop_Order_By = { export type Double_Sign_Vote_Stddev_Samp_Fields = { __typename?: 'double_sign_vote_stddev_samp_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -2052,7 +2146,6 @@ export type Double_Sign_Vote_Stddev_Samp_Fields = { /** order by stddev_samp() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Stddev_Samp_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; @@ -2062,7 +2155,6 @@ export type Double_Sign_Vote_Stddev_Samp_Order_By = { export type Double_Sign_Vote_Sum_Fields = { __typename?: 'double_sign_vote_sum_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -2071,7 +2163,6 @@ export type Double_Sign_Vote_Sum_Fields = { /** order by sum() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Sum_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; @@ -2081,7 +2172,6 @@ export type Double_Sign_Vote_Sum_Order_By = { export type Double_Sign_Vote_Var_Pop_Fields = { __typename?: 'double_sign_vote_var_pop_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -2090,7 +2180,6 @@ export type Double_Sign_Vote_Var_Pop_Fields = { /** order by var_pop() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Var_Pop_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; @@ -2100,7 +2189,6 @@ export type Double_Sign_Vote_Var_Pop_Order_By = { export type Double_Sign_Vote_Var_Samp_Fields = { __typename?: 'double_sign_vote_var_samp_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -2109,7 +2197,6 @@ export type Double_Sign_Vote_Var_Samp_Fields = { /** order by var_samp() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Var_Samp_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; @@ -2119,7 +2206,6 @@ export type Double_Sign_Vote_Var_Samp_Order_By = { export type Double_Sign_Vote_Variance_Fields = { __typename?: 'double_sign_vote_variance_fields'; height?: Maybe; - id?: Maybe; round?: Maybe; type?: Maybe; validator_index?: Maybe; @@ -2128,313 +2214,11 @@ export type Double_Sign_Vote_Variance_Fields = { /** order by variance() on columns of table "double_sign_vote" */ export type Double_Sign_Vote_Variance_Order_By = { height?: InputMaybe; - id?: InputMaybe; round?: InputMaybe; type?: InputMaybe; validator_index?: InputMaybe; }; -/** columns and relationships of "evmos_inflation_data" */ -export type Evmos_Inflation_Data = { - __typename?: 'evmos_inflation_data'; - circulating_supply: Scalars['_dec_coin']; - height: Scalars['bigint']; - inflation_period: Scalars['Int']; - inflation_rate: Scalars['numeric']; - one_row_id: Scalars['Boolean']; - skipped_epochs: Scalars['Int']; -}; - -/** aggregated selection of "evmos_inflation_data" */ -export type Evmos_Inflation_Data_Aggregate = { - __typename?: 'evmos_inflation_data_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "evmos_inflation_data" */ -export type Evmos_Inflation_Data_Aggregate_Fields = { - __typename?: 'evmos_inflation_data_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "evmos_inflation_data" */ -export type Evmos_Inflation_Data_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Evmos_Inflation_Data_Avg_Fields = { - __typename?: 'evmos_inflation_data_avg_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** Boolean expression to filter rows from the table "evmos_inflation_data". All fields are combined with a logical 'AND'. */ -export type Evmos_Inflation_Data_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - circulating_supply?: InputMaybe<_Dec_Coin_Comparison_Exp>; - height?: InputMaybe; - inflation_period?: InputMaybe; - inflation_rate?: InputMaybe; - one_row_id?: InputMaybe; - skipped_epochs?: InputMaybe; -}; - -/** aggregate max on columns */ -export type Evmos_Inflation_Data_Max_Fields = { - __typename?: 'evmos_inflation_data_max_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** aggregate min on columns */ -export type Evmos_Inflation_Data_Min_Fields = { - __typename?: 'evmos_inflation_data_min_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** Ordering options when selecting data from "evmos_inflation_data". */ -export type Evmos_Inflation_Data_Order_By = { - circulating_supply?: InputMaybe; - height?: InputMaybe; - inflation_period?: InputMaybe; - inflation_rate?: InputMaybe; - one_row_id?: InputMaybe; - skipped_epochs?: InputMaybe; -}; - -/** select columns of table "evmos_inflation_data" */ -export enum Evmos_Inflation_Data_Select_Column { - /** column name */ - CirculatingSupply = 'circulating_supply', - /** column name */ - Height = 'height', - /** column name */ - InflationPeriod = 'inflation_period', - /** column name */ - InflationRate = 'inflation_rate', - /** column name */ - OneRowId = 'one_row_id', - /** column name */ - SkippedEpochs = 'skipped_epochs' -} - -/** aggregate stddev on columns */ -export type Evmos_Inflation_Data_Stddev_Fields = { - __typename?: 'evmos_inflation_data_stddev_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Evmos_Inflation_Data_Stddev_Pop_Fields = { - __typename?: 'evmos_inflation_data_stddev_pop_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Evmos_Inflation_Data_Stddev_Samp_Fields = { - __typename?: 'evmos_inflation_data_stddev_samp_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** aggregate sum on columns */ -export type Evmos_Inflation_Data_Sum_Fields = { - __typename?: 'evmos_inflation_data_sum_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Evmos_Inflation_Data_Var_Pop_Fields = { - __typename?: 'evmos_inflation_data_var_pop_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Evmos_Inflation_Data_Var_Samp_Fields = { - __typename?: 'evmos_inflation_data_var_samp_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** aggregate variance on columns */ -export type Evmos_Inflation_Data_Variance_Fields = { - __typename?: 'evmos_inflation_data_variance_fields'; - height?: Maybe; - inflation_period?: Maybe; - inflation_rate?: Maybe; - skipped_epochs?: Maybe; -}; - -/** columns and relationships of "evmos_inflation_params" */ -export type Evmos_Inflation_Params = { - __typename?: 'evmos_inflation_params'; - height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; - params: Scalars['jsonb']; -}; - - -/** columns and relationships of "evmos_inflation_params" */ -export type Evmos_Inflation_ParamsParamsArgs = { - path?: InputMaybe; -}; - -/** aggregated selection of "evmos_inflation_params" */ -export type Evmos_Inflation_Params_Aggregate = { - __typename?: 'evmos_inflation_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "evmos_inflation_params" */ -export type Evmos_Inflation_Params_Aggregate_Fields = { - __typename?: 'evmos_inflation_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "evmos_inflation_params" */ -export type Evmos_Inflation_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Evmos_Inflation_Params_Avg_Fields = { - __typename?: 'evmos_inflation_params_avg_fields'; - height?: Maybe; -}; - -/** Boolean expression to filter rows from the table "evmos_inflation_params". All fields are combined with a logical 'AND'. */ -export type Evmos_Inflation_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -/** aggregate max on columns */ -export type Evmos_Inflation_Params_Max_Fields = { - __typename?: 'evmos_inflation_params_max_fields'; - height?: Maybe; -}; - -/** aggregate min on columns */ -export type Evmos_Inflation_Params_Min_Fields = { - __typename?: 'evmos_inflation_params_min_fields'; - height?: Maybe; -}; - -/** Ordering options when selecting data from "evmos_inflation_params". */ -export type Evmos_Inflation_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -/** select columns of table "evmos_inflation_params" */ -export enum Evmos_Inflation_Params_Select_Column { - /** column name */ - Height = 'height', - /** column name */ - OneRowId = 'one_row_id', - /** column name */ - Params = 'params' -} - -/** aggregate stddev on columns */ -export type Evmos_Inflation_Params_Stddev_Fields = { - __typename?: 'evmos_inflation_params_stddev_fields'; - height?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Evmos_Inflation_Params_Stddev_Pop_Fields = { - __typename?: 'evmos_inflation_params_stddev_pop_fields'; - height?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Evmos_Inflation_Params_Stddev_Samp_Fields = { - __typename?: 'evmos_inflation_params_stddev_samp_fields'; - height?: Maybe; -}; - -/** aggregate sum on columns */ -export type Evmos_Inflation_Params_Sum_Fields = { - __typename?: 'evmos_inflation_params_sum_fields'; - height?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Evmos_Inflation_Params_Var_Pop_Fields = { - __typename?: 'evmos_inflation_params_var_pop_fields'; - height?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Evmos_Inflation_Params_Var_Samp_Fields = { - __typename?: 'evmos_inflation_params_var_samp_fields'; - height?: Maybe; -}; - -/** aggregate variance on columns */ -export type Evmos_Inflation_Params_Variance_Fields = { - __typename?: 'evmos_inflation_params_variance_fields'; - height?: Maybe; -}; - /** columns and relationships of "fee_grant_allowance" */ export type Fee_Grant_Allowance = { __typename?: 'fee_grant_allowance'; @@ -2446,7 +2230,6 @@ export type Fee_Grant_Allowance = { granter: Account; granter_address: Scalars['String']; height: Scalars['bigint']; - id: Scalars['Int']; }; @@ -2485,11 +2268,30 @@ export type Fee_Grant_Allowance_Aggregate_FieldsCountArgs = { distinct?: InputMaybe; }; +/** order by aggregate values of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + /** aggregate avg on columns */ export type Fee_Grant_Allowance_Avg_Fields = { __typename?: 'fee_grant_allowance_avg_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by avg() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Avg_Order_By = { + height?: InputMaybe; }; /** Boolean expression to filter rows from the table "fee_grant_allowance". All fields are combined with a logical 'AND'. */ @@ -2503,7 +2305,6 @@ export type Fee_Grant_Allowance_Bool_Exp = { granter?: InputMaybe; granter_address?: InputMaybe; height?: InputMaybe; - id?: InputMaybe; }; /** aggregate max on columns */ @@ -2512,7 +2313,13 @@ export type Fee_Grant_Allowance_Max_Fields = { grantee_address?: Maybe; granter_address?: Maybe; height?: Maybe; - id?: Maybe; +}; + +/** order by max() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Max_Order_By = { + grantee_address?: InputMaybe; + granter_address?: InputMaybe; + height?: InputMaybe; }; /** aggregate min on columns */ @@ -2521,18 +2328,23 @@ export type Fee_Grant_Allowance_Min_Fields = { grantee_address?: Maybe; granter_address?: Maybe; height?: Maybe; - id?: Maybe; }; -/** Ordering options when selecting data from "fee_grant_allowance". */ -export type Fee_Grant_Allowance_Order_By = { - allowance?: InputMaybe; +/** order by min() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Min_Order_By = { + grantee_address?: InputMaybe; + granter_address?: InputMaybe; + height?: InputMaybe; +}; + +/** Ordering options when selecting data from "fee_grant_allowance". */ +export type Fee_Grant_Allowance_Order_By = { + allowance?: InputMaybe; grantee?: InputMaybe; grantee_address?: InputMaybe; granter?: InputMaybe; granter_address?: InputMaybe; height?: InputMaybe; - id?: InputMaybe; }; /** select columns of table "fee_grant_allowance" */ @@ -2544,58 +2356,84 @@ export enum Fee_Grant_Allowance_Select_Column { /** column name */ GranterAddress = 'granter_address', /** column name */ - Height = 'height', - /** column name */ - Id = 'id' + Height = 'height' } /** aggregate stddev on columns */ export type Fee_Grant_Allowance_Stddev_Fields = { __typename?: 'fee_grant_allowance_stddev_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by stddev() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Stddev_Order_By = { + height?: InputMaybe; }; /** aggregate stddev_pop on columns */ export type Fee_Grant_Allowance_Stddev_Pop_Fields = { __typename?: 'fee_grant_allowance_stddev_pop_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by stddev_pop() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Stddev_Pop_Order_By = { + height?: InputMaybe; }; /** aggregate stddev_samp on columns */ export type Fee_Grant_Allowance_Stddev_Samp_Fields = { __typename?: 'fee_grant_allowance_stddev_samp_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by stddev_samp() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Stddev_Samp_Order_By = { + height?: InputMaybe; }; /** aggregate sum on columns */ export type Fee_Grant_Allowance_Sum_Fields = { __typename?: 'fee_grant_allowance_sum_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by sum() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Sum_Order_By = { + height?: InputMaybe; }; /** aggregate var_pop on columns */ export type Fee_Grant_Allowance_Var_Pop_Fields = { __typename?: 'fee_grant_allowance_var_pop_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by var_pop() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Var_Pop_Order_By = { + height?: InputMaybe; }; /** aggregate var_samp on columns */ export type Fee_Grant_Allowance_Var_Samp_Fields = { __typename?: 'fee_grant_allowance_var_samp_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by var_samp() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Var_Samp_Order_By = { + height?: InputMaybe; }; /** aggregate variance on columns */ export type Fee_Grant_Allowance_Variance_Fields = { __typename?: 'fee_grant_allowance_variance_fields'; height?: Maybe; - id?: Maybe; +}; + +/** order by variance() on columns of table "fee_grant_allowance" */ +export type Fee_Grant_Allowance_Variance_Order_By = { + height?: InputMaybe; }; /** columns and relationships of "genesis" */ @@ -2730,28 +2568,13 @@ export type Genesis_Variance_Fields = { /** columns and relationships of "gov_params" */ export type Gov_Params = { __typename?: 'gov_params'; - deposit_params: Scalars['jsonb']; height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; - tally_params: Scalars['jsonb']; - voting_params: Scalars['jsonb']; -}; - - -/** columns and relationships of "gov_params" */ -export type Gov_ParamsDeposit_ParamsArgs = { - path?: InputMaybe; -}; - - -/** columns and relationships of "gov_params" */ -export type Gov_ParamsTally_ParamsArgs = { - path?: InputMaybe; + params: Scalars['jsonb']; }; /** columns and relationships of "gov_params" */ -export type Gov_ParamsVoting_ParamsArgs = { +export type Gov_ParamsParamsArgs = { path?: InputMaybe; }; @@ -2796,11 +2619,8 @@ export type Gov_Params_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - deposit_params?: InputMaybe; height?: InputMaybe; - one_row_id?: InputMaybe; - tally_params?: InputMaybe; - voting_params?: InputMaybe; + params?: InputMaybe; }; /** aggregate max on columns */ @@ -2817,25 +2637,16 @@ export type Gov_Params_Min_Fields = { /** Ordering options when selecting data from "gov_params". */ export type Gov_Params_Order_By = { - deposit_params?: InputMaybe; height?: InputMaybe; - one_row_id?: InputMaybe; - tally_params?: InputMaybe; - voting_params?: InputMaybe; + params?: InputMaybe; }; /** select columns of table "gov_params" */ export enum Gov_Params_Select_Column { - /** column name */ - DepositParams = 'deposit_params', /** column name */ Height = 'height', /** column name */ - OneRowId = 'one_row_id', - /** column name */ - TallyParams = 'tally_params', - /** column name */ - VotingParams = 'voting_params' + Params = 'params' } /** aggregate stddev on columns */ @@ -2884,7 +2695,7 @@ export type Gov_Params_Variance_Fields = { export type Inflation = { __typename?: 'inflation'; height: Scalars['bigint']; - value: Scalars['numeric']; + value: Scalars['String']; }; /** aggregated selection of "inflation" */ @@ -2921,7 +2732,6 @@ export type Inflation_Aggregate_FieldsCountArgs = { export type Inflation_Avg_Fields = { __typename?: 'inflation_avg_fields'; height?: Maybe; - value?: Maybe; }; /** Boolean expression to filter rows from the table "inflation". All fields are combined with a logical 'AND'. */ @@ -2930,21 +2740,21 @@ export type Inflation_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - value?: InputMaybe; + value?: InputMaybe; }; /** aggregate max on columns */ export type Inflation_Max_Fields = { __typename?: 'inflation_max_fields'; height?: Maybe; - value?: Maybe; + value?: Maybe; }; /** aggregate min on columns */ export type Inflation_Min_Fields = { __typename?: 'inflation_min_fields'; height?: Maybe; - value?: Maybe; + value?: Maybe; }; /** Ordering options when selecting data from "inflation". */ @@ -2965,49 +2775,42 @@ export enum Inflation_Select_Column { export type Inflation_Stddev_Fields = { __typename?: 'inflation_stddev_fields'; height?: Maybe; - value?: Maybe; }; /** aggregate stddev_pop on columns */ export type Inflation_Stddev_Pop_Fields = { __typename?: 'inflation_stddev_pop_fields'; height?: Maybe; - value?: Maybe; }; /** aggregate stddev_samp on columns */ export type Inflation_Stddev_Samp_Fields = { __typename?: 'inflation_stddev_samp_fields'; height?: Maybe; - value?: Maybe; }; /** aggregate sum on columns */ export type Inflation_Sum_Fields = { __typename?: 'inflation_sum_fields'; height?: Maybe; - value?: Maybe; }; /** aggregate var_pop on columns */ export type Inflation_Var_Pop_Fields = { __typename?: 'inflation_var_pop_fields'; height?: Maybe; - value?: Maybe; }; /** aggregate var_samp on columns */ export type Inflation_Var_Samp_Fields = { __typename?: 'inflation_var_samp_fields'; height?: Maybe; - value?: Maybe; }; /** aggregate variance on columns */ export type Inflation_Variance_Fields = { __typename?: 'inflation_variance_fields'; height?: Maybe; - value?: Maybe; }; /** Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'. */ @@ -3039,9 +2842,10 @@ export type Message = { height: Scalars['bigint']; index: Scalars['bigint']; involved_accounts_addresses: Scalars['_text']; - partition_id: Scalars['bigint']; /** An object relationship */ transaction?: Maybe; + /** An object relationship */ + transactionByPartitionIdTransactionHash?: Maybe; transaction_hash: Scalars['String']; type: Scalars['String']; value: Scalars['jsonb']; @@ -3083,12 +2887,32 @@ export type Message_Aggregate_FieldsCountArgs = { distinct?: InputMaybe; }; +/** order by aggregate values of table "message" */ +export type Message_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + /** aggregate avg on columns */ export type Message_Avg_Fields = { __typename?: 'message_avg_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by avg() on columns of table "message" */ +export type Message_Avg_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; /** Boolean expression to filter rows from the table "message". All fields are combined with a logical 'AND'. */ @@ -3099,8 +2923,8 @@ export type Message_Bool_Exp = { height?: InputMaybe; index?: InputMaybe; involved_accounts_addresses?: InputMaybe<_Text_Comparison_Exp>; - partition_id?: InputMaybe; transaction?: InputMaybe; + transactionByPartitionIdTransactionHash?: InputMaybe; transaction_hash?: InputMaybe; type?: InputMaybe; value?: InputMaybe; @@ -3111,28 +2935,42 @@ export type Message_Max_Fields = { __typename?: 'message_max_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; transaction_hash?: Maybe; type?: Maybe; }; +/** order by max() on columns of table "message" */ +export type Message_Max_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + transaction_hash?: InputMaybe; + type?: InputMaybe; +}; + /** aggregate min on columns */ export type Message_Min_Fields = { __typename?: 'message_min_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; transaction_hash?: Maybe; type?: Maybe; }; +/** order by min() on columns of table "message" */ +export type Message_Min_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + transaction_hash?: InputMaybe; + type?: InputMaybe; +}; + /** Ordering options when selecting data from "message". */ export type Message_Order_By = { height?: InputMaybe; index?: InputMaybe; involved_accounts_addresses?: InputMaybe; - partition_id?: InputMaybe; transaction?: InputMaybe; + transactionByPartitionIdTransactionHash?: InputMaybe; transaction_hash?: InputMaybe; type?: InputMaybe; value?: InputMaybe; @@ -3147,8 +2985,6 @@ export enum Message_Select_Column { /** column name */ InvolvedAccountsAddresses = 'involved_accounts_addresses', /** column name */ - PartitionId = 'partition_id', - /** column name */ TransactionHash = 'transaction_hash', /** column name */ Type = 'type', @@ -3161,7 +2997,12 @@ export type Message_Stddev_Fields = { __typename?: 'message_stddev_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by stddev() on columns of table "message" */ +export type Message_Stddev_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; /** aggregate stddev_pop on columns */ @@ -3169,7 +3010,12 @@ export type Message_Stddev_Pop_Fields = { __typename?: 'message_stddev_pop_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by stddev_pop() on columns of table "message" */ +export type Message_Stddev_Pop_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; /** aggregate stddev_samp on columns */ @@ -3177,7 +3023,12 @@ export type Message_Stddev_Samp_Fields = { __typename?: 'message_stddev_samp_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by stddev_samp() on columns of table "message" */ +export type Message_Stddev_Samp_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; /** aggregate sum on columns */ @@ -3185,7 +3036,12 @@ export type Message_Sum_Fields = { __typename?: 'message_sum_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by sum() on columns of table "message" */ +export type Message_Sum_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; /** aggregate var_pop on columns */ @@ -3193,7 +3049,12 @@ export type Message_Var_Pop_Fields = { __typename?: 'message_var_pop_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by var_pop() on columns of table "message" */ +export type Message_Var_Pop_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; /** aggregate var_samp on columns */ @@ -3201,7 +3062,12 @@ export type Message_Var_Samp_Fields = { __typename?: 'message_var_samp_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by var_samp() on columns of table "message" */ +export type Message_Var_Samp_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; /** aggregate variance on columns */ @@ -3209,7 +3075,12 @@ export type Message_Variance_Fields = { __typename?: 'message_variance_fields'; height?: Maybe; index?: Maybe; - partition_id?: Maybe; +}; + +/** order by variance() on columns of table "message" */ +export type Message_Variance_Order_By = { + height?: InputMaybe; + index?: InputMaybe; }; export type Messages_By_Address_Args = { @@ -3219,11 +3090,41 @@ export type Messages_By_Address_Args = { types?: InputMaybe; }; +export type Messages_By_Single_Address_Args = { + address?: InputMaybe; + apikey?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_By_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_Get_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; +}; + +export type Messages_Get_Types_New_Args = { + addresses?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; +}; + +export type Messages_Types_By_Address_Args = { + addresses?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; params: Scalars['jsonb']; }; @@ -3275,7 +3176,6 @@ export type Mint_Params_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -3294,7 +3194,6 @@ export type Mint_Params_Min_Fields = { /** Ordering options when selecting data from "mint_params". */ export type Mint_Params_Order_By = { height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -3303,8 +3202,6 @@ export enum Mint_Params_Select_Column { /** column name */ Height = 'height', /** column name */ - OneRowId = 'one_row_id', - /** column name */ Params = 'params' } @@ -3356,28 +3253,6 @@ export type Modules = { module_name: Scalars['String']; }; -/** aggregated selection of "modules" */ -export type Modules_Aggregate = { - __typename?: 'modules_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "modules" */ -export type Modules_Aggregate_Fields = { - __typename?: 'modules_aggregate_fields'; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; -}; - - -/** aggregate fields of "modules" */ -export type Modules_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - /** Boolean expression to filter rows from the table "modules". All fields are combined with a logical 'AND'. */ export type Modules_Bool_Exp = { _and?: InputMaybe>; @@ -3386,18 +3261,6 @@ export type Modules_Bool_Exp = { module_name?: InputMaybe; }; -/** aggregate max on columns */ -export type Modules_Max_Fields = { - __typename?: 'modules_max_fields'; - module_name?: Maybe; -}; - -/** aggregate min on columns */ -export type Modules_Min_Fields = { - __typename?: 'modules_min_fields'; - module_name?: Maybe; -}; - /** Ordering options when selecting data from "modules". */ export type Modules_Order_By = { module_name?: InputMaybe; @@ -3697,18 +3560,17 @@ export type Proposal = { deposit_end_time?: Maybe; description: Scalars['String']; id: Scalars['Int']; + metadata?: Maybe; /** An array relationship */ proposal_deposits: Array; /** An aggregate relationship */ proposal_deposits_aggregate: Proposal_Deposit_Aggregate; - proposal_route: Scalars['String']; /** An object relationship */ proposal_tally_result?: Maybe; /** An array relationship */ proposal_tally_results: Array; /** An aggregate relationship */ proposal_tally_results_aggregate: Proposal_Tally_Result_Aggregate; - proposal_type: Scalars['String']; /** An array relationship */ proposal_votes: Array; /** An aggregate relationship */ @@ -3720,6 +3582,7 @@ export type Proposal = { staking_pool_snapshot?: Maybe; status?: Maybe; submit_time: Scalars['timestamp']; + summary?: Maybe; title: Scalars['String']; /** An array relationship */ validator_status_snapshots: Array; @@ -3880,17 +3743,17 @@ export type Proposal_Bool_Exp = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; + metadata?: InputMaybe; proposal_deposits?: InputMaybe; - proposal_route?: InputMaybe; proposal_tally_result?: InputMaybe; proposal_tally_results?: InputMaybe; - proposal_type?: InputMaybe; proposal_votes?: InputMaybe; proposer?: InputMaybe; proposer_address?: InputMaybe; staking_pool_snapshot?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; validator_status_snapshots?: InputMaybe; voting_end_time?: InputMaybe; @@ -3906,10 +3769,12 @@ export type Proposal_Deposit = { /** An object relationship */ depositor?: Maybe; depositor_address?: Maybe; - height?: Maybe; + height: Scalars['bigint']; /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; + timestamp?: Maybe; + transaction_hash: Scalars['String']; }; /** aggregated selection of "proposal_deposit" */ @@ -3982,6 +3847,8 @@ export type Proposal_Deposit_Bool_Exp = { height?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; + transaction_hash?: InputMaybe; }; /** aggregate max on columns */ @@ -3990,6 +3857,8 @@ export type Proposal_Deposit_Max_Fields = { depositor_address?: Maybe; height?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; + transaction_hash?: Maybe; }; /** order by max() on columns of table "proposal_deposit" */ @@ -3997,6 +3866,8 @@ export type Proposal_Deposit_Max_Order_By = { depositor_address?: InputMaybe; height?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; + transaction_hash?: InputMaybe; }; /** aggregate min on columns */ @@ -4005,6 +3876,8 @@ export type Proposal_Deposit_Min_Fields = { depositor_address?: Maybe; height?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; + transaction_hash?: Maybe; }; /** order by min() on columns of table "proposal_deposit" */ @@ -4012,6 +3885,8 @@ export type Proposal_Deposit_Min_Order_By = { depositor_address?: InputMaybe; height?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; + transaction_hash?: InputMaybe; }; /** Ordering options when selecting data from "proposal_deposit". */ @@ -4023,6 +3898,8 @@ export type Proposal_Deposit_Order_By = { height?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; + transaction_hash?: InputMaybe; }; /** select columns of table "proposal_deposit" */ @@ -4034,7 +3911,11 @@ export enum Proposal_Deposit_Select_Column { /** column name */ Height = 'height', /** column name */ - ProposalId = 'proposal_id' + ProposalId = 'proposal_id', + /** column name */ + Timestamp = 'timestamp', + /** column name */ + TransactionHash = 'transaction_hash' } /** aggregate stddev on columns */ @@ -4134,11 +4015,11 @@ export type Proposal_Max_Fields = { deposit_end_time?: Maybe; description?: Maybe; id?: Maybe; - proposal_route?: Maybe; - proposal_type?: Maybe; + metadata?: Maybe; proposer_address?: Maybe; status?: Maybe; submit_time?: Maybe; + summary?: Maybe; title?: Maybe; voting_end_time?: Maybe; voting_start_time?: Maybe; @@ -4149,11 +4030,11 @@ export type Proposal_Max_Order_By = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; - proposal_route?: InputMaybe; - proposal_type?: InputMaybe; + metadata?: InputMaybe; proposer_address?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; voting_end_time?: InputMaybe; voting_start_time?: InputMaybe; @@ -4165,11 +4046,11 @@ export type Proposal_Min_Fields = { deposit_end_time?: Maybe; description?: Maybe; id?: Maybe; - proposal_route?: Maybe; - proposal_type?: Maybe; + metadata?: Maybe; proposer_address?: Maybe; status?: Maybe; submit_time?: Maybe; + summary?: Maybe; title?: Maybe; voting_end_time?: Maybe; voting_start_time?: Maybe; @@ -4180,11 +4061,11 @@ export type Proposal_Min_Order_By = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; - proposal_route?: InputMaybe; - proposal_type?: InputMaybe; + metadata?: InputMaybe; proposer_address?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; voting_end_time?: InputMaybe; voting_start_time?: InputMaybe; @@ -4196,17 +4077,17 @@ export type Proposal_Order_By = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; + metadata?: InputMaybe; proposal_deposits_aggregate?: InputMaybe; - proposal_route?: InputMaybe; proposal_tally_result?: InputMaybe; proposal_tally_results_aggregate?: InputMaybe; - proposal_type?: InputMaybe; proposal_votes_aggregate?: InputMaybe; proposer?: InputMaybe; proposer_address?: InputMaybe; staking_pool_snapshot?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; + summary?: InputMaybe; title?: InputMaybe; validator_status_snapshots_aggregate?: InputMaybe; voting_end_time?: InputMaybe; @@ -4682,7 +4563,6 @@ export type Proposal_Tally_Result_Variance_Order_By = { export type Proposal_Validator_Status_Snapshot = { __typename?: 'proposal_validator_status_snapshot'; height: Scalars['bigint']; - id: Scalars['Int']; jailed: Scalars['Boolean']; /** An object relationship */ proposal?: Maybe; @@ -4743,7 +4623,6 @@ export type Proposal_Validator_Status_Snapshot_Aggregate_Order_By = { export type Proposal_Validator_Status_Snapshot_Avg_Fields = { __typename?: 'proposal_validator_status_snapshot_avg_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4752,7 +4631,6 @@ export type Proposal_Validator_Status_Snapshot_Avg_Fields = { /** order by avg() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Avg_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -4764,7 +4642,6 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - id?: InputMaybe; jailed?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; @@ -4778,7 +4655,6 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { export type Proposal_Validator_Status_Snapshot_Max_Fields = { __typename?: 'proposal_validator_status_snapshot_max_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4788,7 +4664,6 @@ export type Proposal_Validator_Status_Snapshot_Max_Fields = { /** order by max() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Max_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; validator_address?: InputMaybe; @@ -4799,7 +4674,6 @@ export type Proposal_Validator_Status_Snapshot_Max_Order_By = { export type Proposal_Validator_Status_Snapshot_Min_Fields = { __typename?: 'proposal_validator_status_snapshot_min_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4809,7 +4683,6 @@ export type Proposal_Validator_Status_Snapshot_Min_Fields = { /** order by min() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Min_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; validator_address?: InputMaybe; @@ -4819,7 +4692,6 @@ export type Proposal_Validator_Status_Snapshot_Min_Order_By = { /** Ordering options when selecting data from "proposal_validator_status_snapshot". */ export type Proposal_Validator_Status_Snapshot_Order_By = { height?: InputMaybe; - id?: InputMaybe; jailed?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; @@ -4834,8 +4706,6 @@ export enum Proposal_Validator_Status_Snapshot_Select_Column { /** column name */ Height = 'height', /** column name */ - Id = 'id', - /** column name */ Jailed = 'jailed', /** column name */ ProposalId = 'proposal_id', @@ -4851,7 +4721,6 @@ export enum Proposal_Validator_Status_Snapshot_Select_Column { export type Proposal_Validator_Status_Snapshot_Stddev_Fields = { __typename?: 'proposal_validator_status_snapshot_stddev_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4860,7 +4729,6 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Fields = { /** order by stddev() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Stddev_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -4870,7 +4738,6 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Order_By = { export type Proposal_Validator_Status_Snapshot_Stddev_Pop_Fields = { __typename?: 'proposal_validator_status_snapshot_stddev_pop_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4879,7 +4746,6 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Pop_Fields = { /** order by stddev_pop() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Stddev_Pop_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -4889,7 +4755,6 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Pop_Order_By = { export type Proposal_Validator_Status_Snapshot_Stddev_Samp_Fields = { __typename?: 'proposal_validator_status_snapshot_stddev_samp_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4898,7 +4763,6 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Samp_Fields = { /** order by stddev_samp() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Stddev_Samp_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -4908,7 +4772,6 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Samp_Order_By = { export type Proposal_Validator_Status_Snapshot_Sum_Fields = { __typename?: 'proposal_validator_status_snapshot_sum_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4917,7 +4780,6 @@ export type Proposal_Validator_Status_Snapshot_Sum_Fields = { /** order by sum() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Sum_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -4927,7 +4789,6 @@ export type Proposal_Validator_Status_Snapshot_Sum_Order_By = { export type Proposal_Validator_Status_Snapshot_Var_Pop_Fields = { __typename?: 'proposal_validator_status_snapshot_var_pop_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4936,7 +4797,6 @@ export type Proposal_Validator_Status_Snapshot_Var_Pop_Fields = { /** order by var_pop() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Var_Pop_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -4946,7 +4806,6 @@ export type Proposal_Validator_Status_Snapshot_Var_Pop_Order_By = { export type Proposal_Validator_Status_Snapshot_Var_Samp_Fields = { __typename?: 'proposal_validator_status_snapshot_var_samp_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4955,7 +4814,6 @@ export type Proposal_Validator_Status_Snapshot_Var_Samp_Fields = { /** order by var_samp() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Var_Samp_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -4965,7 +4823,6 @@ export type Proposal_Validator_Status_Snapshot_Var_Samp_Order_By = { export type Proposal_Validator_Status_Snapshot_Variance_Fields = { __typename?: 'proposal_validator_status_snapshot_variance_fields'; height?: Maybe; - id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -4974,7 +4831,6 @@ export type Proposal_Validator_Status_Snapshot_Variance_Fields = { /** order by variance() on columns of table "proposal_validator_status_snapshot" */ export type Proposal_Validator_Status_Snapshot_Variance_Order_By = { height?: InputMaybe; - id?: InputMaybe; proposal_id?: InputMaybe; status?: InputMaybe; voting_power?: InputMaybe; @@ -5019,12 +4875,13 @@ export type Proposal_Vote = { /** An object relationship */ account: Account; /** An object relationship */ - block: Block; + block?: Maybe; height: Scalars['bigint']; option: Scalars['String']; /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; + timestamp?: Maybe; voter_address: Scalars['String']; }; @@ -5097,6 +4954,7 @@ export type Proposal_Vote_Bool_Exp = { option?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -5106,6 +4964,7 @@ export type Proposal_Vote_Max_Fields = { height?: Maybe; option?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; voter_address?: Maybe; }; @@ -5114,6 +4973,7 @@ export type Proposal_Vote_Max_Order_By = { height?: InputMaybe; option?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -5123,6 +4983,7 @@ export type Proposal_Vote_Min_Fields = { height?: Maybe; option?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; voter_address?: Maybe; }; @@ -5131,6 +4992,7 @@ export type Proposal_Vote_Min_Order_By = { height?: InputMaybe; option?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -5142,6 +5004,7 @@ export type Proposal_Vote_Order_By = { option?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -5154,6 +5017,8 @@ export enum Proposal_Vote_Select_Column { /** column name */ ProposalId = 'proposal_id', /** column name */ + Timestamp = 'timestamp', + /** column name */ VoterAddress = 'voter_address' } @@ -5262,6 +5127,8 @@ export type Query_Root = { action_delegation_total?: Maybe; action_delegator_withdraw_address: ActionAddress; action_redelegation?: Maybe; + action_superfluid_delegation?: Maybe>>; + action_superfluid_delegation_total?: Maybe; action_unbonding_delegation?: Maybe; action_unbonding_delegation_total?: Maybe; action_validator_commission_amount?: Maybe; @@ -5298,8 +5165,6 @@ export type Query_Root = { distribution_params: Array; /** fetch aggregated fields from the table: "distribution_params" */ distribution_params_aggregate: Distribution_Params_Aggregate; - /** fetch data from the table: "distribution_params" using primary key columns */ - distribution_params_by_pk?: Maybe; /** fetch data from the table: "double_sign_evidence" */ double_sign_evidence: Array; /** fetch aggregated fields from the table: "double_sign_evidence" */ @@ -5308,26 +5173,10 @@ export type Query_Root = { double_sign_vote: Array; /** fetch aggregated fields from the table: "double_sign_vote" */ double_sign_vote_aggregate: Double_Sign_Vote_Aggregate; - /** fetch data from the table: "double_sign_vote" using primary key columns */ - double_sign_vote_by_pk?: Maybe; - /** fetch data from the table: "evmos_inflation_data" */ - evmos_inflation_data: Array; - /** fetch aggregated fields from the table: "evmos_inflation_data" */ - evmos_inflation_data_aggregate: Evmos_Inflation_Data_Aggregate; - /** fetch data from the table: "evmos_inflation_data" using primary key columns */ - evmos_inflation_data_by_pk?: Maybe; - /** fetch data from the table: "evmos_inflation_params" */ - evmos_inflation_params: Array; - /** fetch aggregated fields from the table: "evmos_inflation_params" */ - evmos_inflation_params_aggregate: Evmos_Inflation_Params_Aggregate; - /** fetch data from the table: "evmos_inflation_params" using primary key columns */ - evmos_inflation_params_by_pk?: Maybe; /** fetch data from the table: "fee_grant_allowance" */ fee_grant_allowance: Array; /** fetch aggregated fields from the table: "fee_grant_allowance" */ fee_grant_allowance_aggregate: Fee_Grant_Allowance_Aggregate; - /** fetch data from the table: "fee_grant_allowance" using primary key columns */ - fee_grant_allowance_by_pk?: Maybe; /** fetch data from the table: "genesis" */ genesis: Array; /** fetch aggregated fields from the table: "genesis" */ @@ -5336,8 +5185,6 @@ export type Query_Root = { gov_params: Array; /** fetch aggregated fields from the table: "gov_params" */ gov_params_aggregate: Gov_Params_Aggregate; - /** fetch data from the table: "gov_params" using primary key columns */ - gov_params_by_pk?: Maybe; /** fetch data from the table: "inflation" */ inflation: Array; /** fetch aggregated fields from the table: "inflation" */ @@ -5350,16 +5197,32 @@ export type Query_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_by_types" and query aggregates on result of table type "message" */ + messages_by_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types_new" which returns "message" */ + messages_get_types_new: Array; + /** execute function "messages_get_types_new" and query aggregates on result of table type "message" */ + messages_get_types_new_aggregate: Message_Aggregate; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; + /** execute function "messages_types_by_address" and query aggregates on result of table type "message" */ + messages_types_by_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ mint_params_aggregate: Mint_Params_Aggregate; - /** fetch data from the table: "mint_params" using primary key columns */ - mint_params_by_pk?: Maybe; /** fetch data from the table: "modules" */ modules: Array; - /** fetch aggregated fields from the table: "modules" */ - modules_aggregate: Modules_Aggregate; /** fetch data from the table: "modules" using primary key columns */ modules_by_pk?: Maybe; /** fetch data from the table: "pre_commit" */ @@ -5392,8 +5255,6 @@ export type Query_Root = { proposal_validator_status_snapshot: Array; /** fetch aggregated fields from the table: "proposal_validator_status_snapshot" */ proposal_validator_status_snapshot_aggregate: Proposal_Validator_Status_Snapshot_Aggregate; - /** fetch data from the table: "proposal_validator_status_snapshot" using primary key columns */ - proposal_validator_status_snapshot_by_pk?: Maybe; /** fetch data from the table: "proposal_vote" */ proposal_vote: Array; /** fetch aggregated fields from the table: "proposal_vote" */ @@ -5402,14 +5263,14 @@ export type Query_Root = { slashing_params: Array; /** fetch aggregated fields from the table: "slashing_params" */ slashing_params_aggregate: Slashing_Params_Aggregate; - /** fetch data from the table: "slashing_params" using primary key columns */ - slashing_params_by_pk?: Maybe; + /** fetch data from the table: "software_upgrade_plan" */ + software_upgrade_plan: Array; + /** fetch aggregated fields from the table: "software_upgrade_plan" */ + software_upgrade_plan_aggregate: Software_Upgrade_Plan_Aggregate; /** fetch data from the table: "staking_params" */ staking_params: Array; /** fetch aggregated fields from the table: "staking_params" */ staking_params_aggregate: Staking_Params_Aggregate; - /** fetch data from the table: "staking_params" using primary key columns */ - staking_params_by_pk?: Maybe; /** fetch data from the table: "staking_pool" */ staking_pool: Array; /** fetch aggregated fields from the table: "staking_pool" */ @@ -5418,6 +5279,7 @@ export type Query_Root = { supply: Array; /** fetch aggregated fields from the table: "supply" */ supply_aggregate: Supply_Aggregate; + test_action_account_balance?: Maybe; /** fetch data from the table: "token" */ token: Array; /** fetch aggregated fields from the table: "token" */ @@ -5426,8 +5288,6 @@ export type Query_Root = { token_price: Array; /** fetch aggregated fields from the table: "token_price" */ token_price_aggregate: Token_Price_Aggregate; - /** fetch data from the table: "token_price" using primary key columns */ - token_price_by_pk?: Maybe; /** fetch data from the table: "token_price_history" */ token_price_history: Array; /** fetch aggregated fields from the table: "token_price_history" */ @@ -5486,12 +5346,28 @@ export type Query_Root = { vesting_account: Array; /** fetch aggregated fields from the table: "vesting_account" */ vesting_account_aggregate: Vesting_Account_Aggregate; - /** fetch data from the table: "vesting_account" using primary key columns */ - vesting_account_by_pk?: Maybe; /** fetch data from the table: "vesting_period" */ vesting_period: Array; /** fetch aggregated fields from the table: "vesting_period" */ vesting_period_aggregate: Vesting_Period_Aggregate; + /** fetch data from the table: "wasm_code" */ + wasm_code: Array; + /** fetch aggregated fields from the table: "wasm_code" */ + wasm_code_aggregate: Wasm_Code_Aggregate; + /** fetch data from the table: "wasm_contract" */ + wasm_contract: Array; + /** fetch aggregated fields from the table: "wasm_contract" */ + wasm_contract_aggregate: Wasm_Contract_Aggregate; + /** fetch data from the table: "wasm_execute_contract" */ + wasm_execute_contract: Array; + /** fetch aggregated fields from the table: "wasm_execute_contract" */ + wasm_execute_contract_aggregate: Wasm_Execute_Contract_Aggregate; + /** fetch data from the table: "wasm_params" */ + wasm_params: Array; + /** fetch aggregated fields from the table: "wasm_params" */ + wasm_params_aggregate: Wasm_Params_Aggregate; + /** fetch data from the table: "wasm_params" using primary key columns */ + wasm_params_by_pk?: Maybe; }; @@ -5559,6 +5435,18 @@ export type Query_RootAction_RedelegationArgs = { }; +export type Query_RootAction_Superfluid_DelegationArgs = { + address: Scalars['String']; + height?: InputMaybe; +}; + + +export type Query_RootAction_Superfluid_Delegation_TotalArgs = { + address: Scalars['String']; + height?: InputMaybe; +}; + + export type Query_RootAction_Unbonding_DelegationArgs = { address: Scalars['String']; count_total?: InputMaybe; @@ -5735,11 +5623,6 @@ export type Query_RootDistribution_Params_AggregateArgs = { }; -export type Query_RootDistribution_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootDouble_Sign_EvidenceArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5776,57 +5659,6 @@ export type Query_RootDouble_Sign_Vote_AggregateArgs = { }; -export type Query_RootDouble_Sign_Vote_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Query_RootEvmos_Inflation_DataArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootEvmos_Inflation_Data_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootEvmos_Inflation_Data_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - -export type Query_RootEvmos_Inflation_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootEvmos_Inflation_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootEvmos_Inflation_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootFee_Grant_AllowanceArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5845,11 +5677,6 @@ export type Query_RootFee_Grant_Allowance_AggregateArgs = { }; -export type Query_RootFee_Grant_Allowance_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Query_RootGenesisArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5886,11 +5713,6 @@ export type Query_RootGov_Params_AggregateArgs = { }; -export type Query_RootGov_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootInflationArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5947,6 +5769,106 @@ export type Query_RootMessages_By_Address_AggregateArgs = { }; +export type Query_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Types_AggregateArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_NewArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_New_AggregateArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Types_By_Address_AggregateArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5965,11 +5887,6 @@ export type Query_RootMint_Params_AggregateArgs = { }; -export type Query_RootMint_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootModulesArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5979,15 +5896,6 @@ export type Query_RootModulesArgs = { }; -export type Query_RootModules_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Query_RootModules_By_PkArgs = { module_name: Scalars['String']; }; @@ -6116,11 +6024,6 @@ export type Query_RootProposal_Validator_Status_Snapshot_AggregateArgs = { }; -export type Query_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Query_RootProposal_VoteArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6157,8 +6060,21 @@ export type Query_RootSlashing_Params_AggregateArgs = { }; -export type Query_RootSlashing_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; +export type Query_RootSoftware_Upgrade_PlanArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootSoftware_Upgrade_Plan_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; @@ -6180,11 +6096,6 @@ export type Query_RootStaking_Params_AggregateArgs = { }; -export type Query_RootStaking_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootStaking_PoolArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6221,6 +6132,13 @@ export type Query_RootSupply_AggregateArgs = { }; +export type Query_RootTest_Action_Account_BalanceArgs = { + address: Scalars['String']; + apikey?: InputMaybe; + height?: InputMaybe; +}; + + export type Query_RootTokenArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6257,11 +6175,6 @@ export type Query_RootToken_Price_AggregateArgs = { }; -export type Query_RootToken_Price_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Query_RootToken_Price_HistoryArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6495,11 +6408,6 @@ export type Query_RootVesting_Account_AggregateArgs = { }; -export type Query_RootVesting_Account_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Query_RootVesting_PeriodArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6517,11 +6425,87 @@ export type Query_RootVesting_Period_AggregateArgs = { where?: InputMaybe; }; + +export type Query_RootWasm_CodeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_Code_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_ContractArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_Contract_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_Execute_ContractArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_Execute_Contract_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_ParamsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_Params_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootWasm_Params_By_PkArgs = { + one_row_id: Scalars['Boolean']; +}; + /** columns and relationships of "slashing_params" */ export type Slashing_Params = { __typename?: 'slashing_params'; height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; params: Scalars['jsonb']; }; @@ -6573,7 +6557,6 @@ export type Slashing_Params_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -6592,7 +6575,6 @@ export type Slashing_Params_Min_Fields = { /** Ordering options when selecting data from "slashing_params". */ export type Slashing_Params_Order_By = { height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -6601,8 +6583,6 @@ export enum Slashing_Params_Select_Column { /** column name */ Height = 'height', /** column name */ - OneRowId = 'one_row_id', - /** column name */ Params = 'params' } @@ -6661,11 +6641,173 @@ export type Smallint_Comparison_Exp = { _nin?: InputMaybe>; }; +/** columns and relationships of "software_upgrade_plan" */ +export type Software_Upgrade_Plan = { + __typename?: 'software_upgrade_plan'; + height: Scalars['bigint']; + info: Scalars['String']; + plan_name: Scalars['String']; + /** An object relationship */ + proposal?: Maybe; + proposal_id?: Maybe; + upgrade_height: Scalars['bigint']; +}; + +/** aggregated selection of "software_upgrade_plan" */ +export type Software_Upgrade_Plan_Aggregate = { + __typename?: 'software_upgrade_plan_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "software_upgrade_plan" */ +export type Software_Upgrade_Plan_Aggregate_Fields = { + __typename?: 'software_upgrade_plan_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "software_upgrade_plan" */ +export type Software_Upgrade_Plan_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Software_Upgrade_Plan_Avg_Fields = { + __typename?: 'software_upgrade_plan_avg_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** Boolean expression to filter rows from the table "software_upgrade_plan". All fields are combined with a logical 'AND'. */ +export type Software_Upgrade_Plan_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + height?: InputMaybe; + info?: InputMaybe; + plan_name?: InputMaybe; + proposal?: InputMaybe; + proposal_id?: InputMaybe; + upgrade_height?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Software_Upgrade_Plan_Max_Fields = { + __typename?: 'software_upgrade_plan_max_fields'; + height?: Maybe; + info?: Maybe; + plan_name?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** aggregate min on columns */ +export type Software_Upgrade_Plan_Min_Fields = { + __typename?: 'software_upgrade_plan_min_fields'; + height?: Maybe; + info?: Maybe; + plan_name?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** Ordering options when selecting data from "software_upgrade_plan". */ +export type Software_Upgrade_Plan_Order_By = { + height?: InputMaybe; + info?: InputMaybe; + plan_name?: InputMaybe; + proposal?: InputMaybe; + proposal_id?: InputMaybe; + upgrade_height?: InputMaybe; +}; + +/** select columns of table "software_upgrade_plan" */ +export enum Software_Upgrade_Plan_Select_Column { + /** column name */ + Height = 'height', + /** column name */ + Info = 'info', + /** column name */ + PlanName = 'plan_name', + /** column name */ + ProposalId = 'proposal_id', + /** column name */ + UpgradeHeight = 'upgrade_height' +} + +/** aggregate stddev on columns */ +export type Software_Upgrade_Plan_Stddev_Fields = { + __typename?: 'software_upgrade_plan_stddev_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Software_Upgrade_Plan_Stddev_Pop_Fields = { + __typename?: 'software_upgrade_plan_stddev_pop_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Software_Upgrade_Plan_Stddev_Samp_Fields = { + __typename?: 'software_upgrade_plan_stddev_samp_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** aggregate sum on columns */ +export type Software_Upgrade_Plan_Sum_Fields = { + __typename?: 'software_upgrade_plan_sum_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Software_Upgrade_Plan_Var_Pop_Fields = { + __typename?: 'software_upgrade_plan_var_pop_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Software_Upgrade_Plan_Var_Samp_Fields = { + __typename?: 'software_upgrade_plan_var_samp_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + +/** aggregate variance on columns */ +export type Software_Upgrade_Plan_Variance_Fields = { + __typename?: 'software_upgrade_plan_variance_fields'; + height?: Maybe; + proposal_id?: Maybe; + upgrade_height?: Maybe; +}; + /** columns and relationships of "staking_params" */ export type Staking_Params = { __typename?: 'staking_params'; height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; params: Scalars['jsonb']; }; @@ -6717,7 +6859,6 @@ export type Staking_Params_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -6736,7 +6877,6 @@ export type Staking_Params_Min_Fields = { /** Ordering options when selecting data from "staking_params". */ export type Staking_Params_Order_By = { height?: InputMaybe; - one_row_id?: InputMaybe; params?: InputMaybe; }; @@ -6745,8 +6885,6 @@ export enum Staking_Params_Select_Column { /** column name */ Height = 'height', /** column name */ - OneRowId = 'one_row_id', - /** column name */ Params = 'params' } @@ -6798,6 +6936,8 @@ export type Staking_Pool = { bonded_tokens: Scalars['String']; height: Scalars['bigint']; not_bonded_tokens: Scalars['String']; + staked_not_bonded_tokens?: Maybe; + unbonding_tokens?: Maybe; }; /** aggregated selection of "staking_pool" */ @@ -6844,6 +6984,8 @@ export type Staking_Pool_Bool_Exp = { bonded_tokens?: InputMaybe; height?: InputMaybe; not_bonded_tokens?: InputMaybe; + staked_not_bonded_tokens?: InputMaybe; + unbonding_tokens?: InputMaybe; }; /** aggregate max on columns */ @@ -6852,6 +6994,8 @@ export type Staking_Pool_Max_Fields = { bonded_tokens?: Maybe; height?: Maybe; not_bonded_tokens?: Maybe; + staked_not_bonded_tokens?: Maybe; + unbonding_tokens?: Maybe; }; /** aggregate min on columns */ @@ -6860,6 +7004,8 @@ export type Staking_Pool_Min_Fields = { bonded_tokens?: Maybe; height?: Maybe; not_bonded_tokens?: Maybe; + staked_not_bonded_tokens?: Maybe; + unbonding_tokens?: Maybe; }; /** Ordering options when selecting data from "staking_pool". */ @@ -6867,6 +7013,8 @@ export type Staking_Pool_Order_By = { bonded_tokens?: InputMaybe; height?: InputMaybe; not_bonded_tokens?: InputMaybe; + staked_not_bonded_tokens?: InputMaybe; + unbonding_tokens?: InputMaybe; }; /** select columns of table "staking_pool" */ @@ -6876,7 +7024,11 @@ export enum Staking_Pool_Select_Column { /** column name */ Height = 'height', /** column name */ - NotBondedTokens = 'not_bonded_tokens' + NotBondedTokens = 'not_bonded_tokens', + /** column name */ + StakedNotBondedTokens = 'staked_not_bonded_tokens', + /** column name */ + UnbondingTokens = 'unbonding_tokens' } /** aggregate stddev on columns */ @@ -6959,8 +7111,6 @@ export type Subscription_Root = { distribution_params: Array; /** fetch aggregated fields from the table: "distribution_params" */ distribution_params_aggregate: Distribution_Params_Aggregate; - /** fetch data from the table: "distribution_params" using primary key columns */ - distribution_params_by_pk?: Maybe; /** fetch data from the table: "double_sign_evidence" */ double_sign_evidence: Array; /** fetch aggregated fields from the table: "double_sign_evidence" */ @@ -6969,26 +7119,10 @@ export type Subscription_Root = { double_sign_vote: Array; /** fetch aggregated fields from the table: "double_sign_vote" */ double_sign_vote_aggregate: Double_Sign_Vote_Aggregate; - /** fetch data from the table: "double_sign_vote" using primary key columns */ - double_sign_vote_by_pk?: Maybe; - /** fetch data from the table: "evmos_inflation_data" */ - evmos_inflation_data: Array; - /** fetch aggregated fields from the table: "evmos_inflation_data" */ - evmos_inflation_data_aggregate: Evmos_Inflation_Data_Aggregate; - /** fetch data from the table: "evmos_inflation_data" using primary key columns */ - evmos_inflation_data_by_pk?: Maybe; - /** fetch data from the table: "evmos_inflation_params" */ - evmos_inflation_params: Array; - /** fetch aggregated fields from the table: "evmos_inflation_params" */ - evmos_inflation_params_aggregate: Evmos_Inflation_Params_Aggregate; - /** fetch data from the table: "evmos_inflation_params" using primary key columns */ - evmos_inflation_params_by_pk?: Maybe; /** fetch data from the table: "fee_grant_allowance" */ fee_grant_allowance: Array; /** fetch aggregated fields from the table: "fee_grant_allowance" */ fee_grant_allowance_aggregate: Fee_Grant_Allowance_Aggregate; - /** fetch data from the table: "fee_grant_allowance" using primary key columns */ - fee_grant_allowance_by_pk?: Maybe; /** fetch data from the table: "genesis" */ genesis: Array; /** fetch aggregated fields from the table: "genesis" */ @@ -6997,8 +7131,6 @@ export type Subscription_Root = { gov_params: Array; /** fetch aggregated fields from the table: "gov_params" */ gov_params_aggregate: Gov_Params_Aggregate; - /** fetch data from the table: "gov_params" using primary key columns */ - gov_params_by_pk?: Maybe; /** fetch data from the table: "inflation" */ inflation: Array; /** fetch aggregated fields from the table: "inflation" */ @@ -7011,16 +7143,32 @@ export type Subscription_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_by_types" and query aggregates on result of table type "message" */ + messages_by_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types_new" which returns "message" */ + messages_get_types_new: Array; + /** execute function "messages_get_types_new" and query aggregates on result of table type "message" */ + messages_get_types_new_aggregate: Message_Aggregate; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; + /** execute function "messages_types_by_address" and query aggregates on result of table type "message" */ + messages_types_by_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ mint_params_aggregate: Mint_Params_Aggregate; - /** fetch data from the table: "mint_params" using primary key columns */ - mint_params_by_pk?: Maybe; /** fetch data from the table: "modules" */ modules: Array; - /** fetch aggregated fields from the table: "modules" */ - modules_aggregate: Modules_Aggregate; /** fetch data from the table: "modules" using primary key columns */ modules_by_pk?: Maybe; /** fetch data from the table: "pre_commit" */ @@ -7053,8 +7201,6 @@ export type Subscription_Root = { proposal_validator_status_snapshot: Array; /** fetch aggregated fields from the table: "proposal_validator_status_snapshot" */ proposal_validator_status_snapshot_aggregate: Proposal_Validator_Status_Snapshot_Aggregate; - /** fetch data from the table: "proposal_validator_status_snapshot" using primary key columns */ - proposal_validator_status_snapshot_by_pk?: Maybe; /** fetch data from the table: "proposal_vote" */ proposal_vote: Array; /** fetch aggregated fields from the table: "proposal_vote" */ @@ -7063,14 +7209,14 @@ export type Subscription_Root = { slashing_params: Array; /** fetch aggregated fields from the table: "slashing_params" */ slashing_params_aggregate: Slashing_Params_Aggregate; - /** fetch data from the table: "slashing_params" using primary key columns */ - slashing_params_by_pk?: Maybe; + /** fetch data from the table: "software_upgrade_plan" */ + software_upgrade_plan: Array; + /** fetch aggregated fields from the table: "software_upgrade_plan" */ + software_upgrade_plan_aggregate: Software_Upgrade_Plan_Aggregate; /** fetch data from the table: "staking_params" */ staking_params: Array; /** fetch aggregated fields from the table: "staking_params" */ staking_params_aggregate: Staking_Params_Aggregate; - /** fetch data from the table: "staking_params" using primary key columns */ - staking_params_by_pk?: Maybe; /** fetch data from the table: "staking_pool" */ staking_pool: Array; /** fetch aggregated fields from the table: "staking_pool" */ @@ -7087,8 +7233,6 @@ export type Subscription_Root = { token_price: Array; /** fetch aggregated fields from the table: "token_price" */ token_price_aggregate: Token_Price_Aggregate; - /** fetch data from the table: "token_price" using primary key columns */ - token_price_by_pk?: Maybe; /** fetch data from the table: "token_price_history" */ token_price_history: Array; /** fetch aggregated fields from the table: "token_price_history" */ @@ -7147,12 +7291,28 @@ export type Subscription_Root = { vesting_account: Array; /** fetch aggregated fields from the table: "vesting_account" */ vesting_account_aggregate: Vesting_Account_Aggregate; - /** fetch data from the table: "vesting_account" using primary key columns */ - vesting_account_by_pk?: Maybe; /** fetch data from the table: "vesting_period" */ vesting_period: Array; /** fetch aggregated fields from the table: "vesting_period" */ vesting_period_aggregate: Vesting_Period_Aggregate; + /** fetch data from the table: "wasm_code" */ + wasm_code: Array; + /** fetch aggregated fields from the table: "wasm_code" */ + wasm_code_aggregate: Wasm_Code_Aggregate; + /** fetch data from the table: "wasm_contract" */ + wasm_contract: Array; + /** fetch aggregated fields from the table: "wasm_contract" */ + wasm_contract_aggregate: Wasm_Contract_Aggregate; + /** fetch data from the table: "wasm_execute_contract" */ + wasm_execute_contract: Array; + /** fetch aggregated fields from the table: "wasm_execute_contract" */ + wasm_execute_contract_aggregate: Wasm_Execute_Contract_Aggregate; + /** fetch data from the table: "wasm_params" */ + wasm_params: Array; + /** fetch aggregated fields from the table: "wasm_params" */ + wasm_params_aggregate: Wasm_Params_Aggregate; + /** fetch data from the table: "wasm_params" using primary key columns */ + wasm_params_by_pk?: Maybe; }; @@ -7310,11 +7470,6 @@ export type Subscription_RootDistribution_Params_AggregateArgs = { }; -export type Subscription_RootDistribution_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootDouble_Sign_EvidenceArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7351,57 +7506,6 @@ export type Subscription_RootDouble_Sign_Vote_AggregateArgs = { }; -export type Subscription_RootDouble_Sign_Vote_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Subscription_RootEvmos_Inflation_DataArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootEvmos_Inflation_Data_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootEvmos_Inflation_Data_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - -export type Subscription_RootEvmos_Inflation_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootEvmos_Inflation_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootEvmos_Inflation_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootFee_Grant_AllowanceArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7420,11 +7524,6 @@ export type Subscription_RootFee_Grant_Allowance_AggregateArgs = { }; -export type Subscription_RootFee_Grant_Allowance_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Subscription_RootGenesisArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7461,11 +7560,6 @@ export type Subscription_RootGov_Params_AggregateArgs = { }; -export type Subscription_RootGov_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootInflationArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7522,6 +7616,106 @@ export type Subscription_RootMessages_By_Address_AggregateArgs = { }; +export type Subscription_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Types_AggregateArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_NewArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_New_AggregateArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Types_By_Address_AggregateArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7540,11 +7734,6 @@ export type Subscription_RootMint_Params_AggregateArgs = { }; -export type Subscription_RootMint_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootModulesArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7554,15 +7743,6 @@ export type Subscription_RootModulesArgs = { }; -export type Subscription_RootModules_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - export type Subscription_RootModules_By_PkArgs = { module_name: Scalars['String']; }; @@ -7691,11 +7871,6 @@ export type Subscription_RootProposal_Validator_Status_Snapshot_AggregateArgs = }; -export type Subscription_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Subscription_RootProposal_VoteArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7732,8 +7907,21 @@ export type Subscription_RootSlashing_Params_AggregateArgs = { }; -export type Subscription_RootSlashing_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; +export type Subscription_RootSoftware_Upgrade_PlanArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootSoftware_Upgrade_Plan_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; }; @@ -7755,11 +7943,6 @@ export type Subscription_RootStaking_Params_AggregateArgs = { }; -export type Subscription_RootStaking_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootStaking_PoolArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7832,11 +8015,6 @@ export type Subscription_RootToken_Price_AggregateArgs = { }; -export type Subscription_RootToken_Price_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Subscription_RootToken_Price_HistoryArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -8070,11 +8248,6 @@ export type Subscription_RootVesting_Account_AggregateArgs = { }; -export type Subscription_RootVesting_Account_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Subscription_RootVesting_PeriodArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -8092,6 +8265,83 @@ export type Subscription_RootVesting_Period_AggregateArgs = { where?: InputMaybe; }; + +export type Subscription_RootWasm_CodeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_Code_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_ContractArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_Contract_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_Execute_ContractArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_Execute_Contract_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_ParamsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_Params_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootWasm_Params_By_PkArgs = { + one_row_id: Scalars['Boolean']; +}; + /** columns and relationships of "supply" */ export type Supply = { __typename?: 'supply'; @@ -8225,6 +8475,19 @@ export type Timestamp_Comparison_Exp = { _nin?: InputMaybe>; }; +/** Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'. */ +export type Timestamptz_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + /** columns and relationships of "token" */ export type Token = { __typename?: 'token'; @@ -8307,7 +8570,6 @@ export type Token_Order_By = { /** columns and relationships of "token_price" */ export type Token_Price = { __typename?: 'token_price'; - id: Scalars['Int']; market_cap: Scalars['bigint']; price: Scalars['numeric']; timestamp: Scalars['timestamp']; @@ -8364,14 +8626,12 @@ export type Token_Price_Aggregate_Order_By = { /** aggregate avg on columns */ export type Token_Price_Avg_Fields = { __typename?: 'token_price_avg_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by avg() on columns of table "token_price" */ export type Token_Price_Avg_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -8381,7 +8641,6 @@ export type Token_Price_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -8619,7 +8878,6 @@ export type Token_Price_History_Variance_Order_By = { /** aggregate max on columns */ export type Token_Price_Max_Fields = { __typename?: 'token_price_max_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; timestamp?: Maybe; @@ -8628,7 +8886,6 @@ export type Token_Price_Max_Fields = { /** order by max() on columns of table "token_price" */ export type Token_Price_Max_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -8638,7 +8895,6 @@ export type Token_Price_Max_Order_By = { /** aggregate min on columns */ export type Token_Price_Min_Fields = { __typename?: 'token_price_min_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; timestamp?: Maybe; @@ -8647,7 +8903,6 @@ export type Token_Price_Min_Fields = { /** order by min() on columns of table "token_price" */ export type Token_Price_Min_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -8656,7 +8911,6 @@ export type Token_Price_Min_Order_By = { /** Ordering options when selecting data from "token_price". */ export type Token_Price_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; timestamp?: InputMaybe; @@ -8666,8 +8920,6 @@ export type Token_Price_Order_By = { /** select columns of table "token_price" */ export enum Token_Price_Select_Column { - /** column name */ - Id = 'id', /** column name */ MarketCap = 'market_cap', /** column name */ @@ -8681,14 +8933,12 @@ export enum Token_Price_Select_Column { /** aggregate stddev on columns */ export type Token_Price_Stddev_Fields = { __typename?: 'token_price_stddev_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by stddev() on columns of table "token_price" */ export type Token_Price_Stddev_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -8696,14 +8946,12 @@ export type Token_Price_Stddev_Order_By = { /** aggregate stddev_pop on columns */ export type Token_Price_Stddev_Pop_Fields = { __typename?: 'token_price_stddev_pop_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by stddev_pop() on columns of table "token_price" */ export type Token_Price_Stddev_Pop_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -8711,14 +8959,12 @@ export type Token_Price_Stddev_Pop_Order_By = { /** aggregate stddev_samp on columns */ export type Token_Price_Stddev_Samp_Fields = { __typename?: 'token_price_stddev_samp_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by stddev_samp() on columns of table "token_price" */ export type Token_Price_Stddev_Samp_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -8726,14 +8972,12 @@ export type Token_Price_Stddev_Samp_Order_By = { /** aggregate sum on columns */ export type Token_Price_Sum_Fields = { __typename?: 'token_price_sum_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by sum() on columns of table "token_price" */ export type Token_Price_Sum_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -8741,14 +8985,12 @@ export type Token_Price_Sum_Order_By = { /** aggregate var_pop on columns */ export type Token_Price_Var_Pop_Fields = { __typename?: 'token_price_var_pop_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by var_pop() on columns of table "token_price" */ export type Token_Price_Var_Pop_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -8756,14 +8998,12 @@ export type Token_Price_Var_Pop_Order_By = { /** aggregate var_samp on columns */ export type Token_Price_Var_Samp_Fields = { __typename?: 'token_price_var_samp_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by var_samp() on columns of table "token_price" */ export type Token_Price_Var_Samp_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -8771,14 +9011,12 @@ export type Token_Price_Var_Samp_Order_By = { /** aggregate variance on columns */ export type Token_Price_Variance_Fields = { __typename?: 'token_price_variance_fields'; - id?: Maybe; market_cap?: Maybe; price?: Maybe; }; /** order by variance() on columns of table "token_price" */ export type Token_Price_Variance_Order_By = { - id?: InputMaybe; market_cap?: InputMaybe; price?: InputMaybe; }; @@ -9074,7 +9312,10 @@ export type Transaction = { logs?: Maybe; memo?: Maybe; messages: Scalars['jsonb']; - partition_id: Scalars['bigint']; + /** An array relationship */ + messagesByTransactionHashPartitionId: Array; + /** An aggregate relationship */ + messagesByTransactionHashPartitionId_aggregate: Message_Aggregate; raw_log?: Maybe; signatures: Scalars['_text']; signer_infos: Scalars['jsonb']; @@ -9100,6 +9341,26 @@ export type TransactionMessagesArgs = { }; +/** columns and relationships of "transaction" */ +export type TransactionMessagesByTransactionHashPartitionIdArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "transaction" */ +export type TransactionMessagesByTransactionHashPartitionId_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "transaction" */ export type TransactionSigner_InfosArgs = { path?: InputMaybe; @@ -9156,7 +9417,6 @@ export type Transaction_Avg_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by avg() on columns of table "transaction" */ @@ -9164,7 +9424,6 @@ export type Transaction_Avg_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** Boolean expression to filter rows from the table "transaction". All fields are combined with a logical 'AND'. */ @@ -9181,7 +9440,7 @@ export type Transaction_Bool_Exp = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; - partition_id?: InputMaybe; + messagesByTransactionHashPartitionId?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe<_Text_Comparison_Exp>; signer_infos?: InputMaybe; @@ -9196,7 +9455,6 @@ export type Transaction_Max_Fields = { hash?: Maybe; height?: Maybe; memo?: Maybe; - partition_id?: Maybe; raw_log?: Maybe; }; @@ -9207,7 +9465,6 @@ export type Transaction_Max_Order_By = { hash?: InputMaybe; height?: InputMaybe; memo?: InputMaybe; - partition_id?: InputMaybe; raw_log?: InputMaybe; }; @@ -9219,7 +9476,6 @@ export type Transaction_Min_Fields = { hash?: Maybe; height?: Maybe; memo?: Maybe; - partition_id?: Maybe; raw_log?: Maybe; }; @@ -9230,7 +9486,6 @@ export type Transaction_Min_Order_By = { hash?: InputMaybe; height?: InputMaybe; memo?: InputMaybe; - partition_id?: InputMaybe; raw_log?: InputMaybe; }; @@ -9245,7 +9500,7 @@ export type Transaction_Order_By = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; - partition_id?: InputMaybe; + messagesByTransactionHashPartitionId_aggregate?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe; signer_infos?: InputMaybe; @@ -9271,8 +9526,6 @@ export enum Transaction_Select_Column { /** column name */ Messages = 'messages', /** column name */ - PartitionId = 'partition_id', - /** column name */ RawLog = 'raw_log', /** column name */ Signatures = 'signatures', @@ -9288,7 +9541,6 @@ export type Transaction_Stddev_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by stddev() on columns of table "transaction" */ @@ -9296,7 +9548,6 @@ export type Transaction_Stddev_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** aggregate stddev_pop on columns */ @@ -9305,7 +9556,6 @@ export type Transaction_Stddev_Pop_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by stddev_pop() on columns of table "transaction" */ @@ -9313,7 +9563,6 @@ export type Transaction_Stddev_Pop_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** aggregate stddev_samp on columns */ @@ -9322,7 +9571,6 @@ export type Transaction_Stddev_Samp_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by stddev_samp() on columns of table "transaction" */ @@ -9330,7 +9578,6 @@ export type Transaction_Stddev_Samp_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** aggregate sum on columns */ @@ -9339,7 +9586,6 @@ export type Transaction_Sum_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by sum() on columns of table "transaction" */ @@ -9347,7 +9593,6 @@ export type Transaction_Sum_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** aggregate var_pop on columns */ @@ -9356,7 +9601,6 @@ export type Transaction_Var_Pop_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by var_pop() on columns of table "transaction" */ @@ -9364,7 +9608,6 @@ export type Transaction_Var_Pop_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** aggregate var_samp on columns */ @@ -9373,7 +9616,6 @@ export type Transaction_Var_Samp_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by var_samp() on columns of table "transaction" */ @@ -9381,7 +9623,6 @@ export type Transaction_Var_Samp_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** aggregate variance on columns */ @@ -9390,7 +9631,6 @@ export type Transaction_Variance_Fields = { gas_used?: Maybe; gas_wanted?: Maybe; height?: Maybe; - partition_id?: Maybe; }; /** order by variance() on columns of table "transaction" */ @@ -9398,7 +9638,6 @@ export type Transaction_Variance_Order_By = { gas_used?: InputMaybe; gas_wanted?: InputMaybe; height?: InputMaybe; - partition_id?: InputMaybe; }; /** columns and relationships of "validator" */ @@ -10191,6 +10430,7 @@ export type Validator_Info = { /** An object relationship */ account?: Maybe; consensus_address: Scalars['String']; + height: Scalars['bigint']; max_change_rate: Scalars['String']; max_rate: Scalars['String']; operator_address: Scalars['String']; @@ -10209,9 +10449,17 @@ export type Validator_Info_Aggregate = { /** aggregate fields of "validator_info" */ export type Validator_Info_Aggregate_Fields = { __typename?: 'validator_info_aggregate_fields'; + avg?: Maybe; count: Scalars['Int']; max?: Maybe; min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; @@ -10223,9 +10471,28 @@ export type Validator_Info_Aggregate_FieldsCountArgs = { /** order by aggregate values of table "validator_info" */ export type Validator_Info_Aggregate_Order_By = { + avg?: InputMaybe; count?: InputMaybe; max?: InputMaybe; min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Validator_Info_Avg_Fields = { + __typename?: 'validator_info_avg_fields'; + height?: Maybe; +}; + +/** order by avg() on columns of table "validator_info" */ +export type Validator_Info_Avg_Order_By = { + height?: InputMaybe; }; /** Boolean expression to filter rows from the table "validator_info". All fields are combined with a logical 'AND'. */ @@ -10235,6 +10502,7 @@ export type Validator_Info_Bool_Exp = { _or?: InputMaybe>; account?: InputMaybe; consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; @@ -10246,6 +10514,7 @@ export type Validator_Info_Bool_Exp = { export type Validator_Info_Max_Fields = { __typename?: 'validator_info_max_fields'; consensus_address?: Maybe; + height?: Maybe; max_change_rate?: Maybe; max_rate?: Maybe; operator_address?: Maybe; @@ -10255,6 +10524,7 @@ export type Validator_Info_Max_Fields = { /** order by max() on columns of table "validator_info" */ export type Validator_Info_Max_Order_By = { consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; @@ -10265,6 +10535,7 @@ export type Validator_Info_Max_Order_By = { export type Validator_Info_Min_Fields = { __typename?: 'validator_info_min_fields'; consensus_address?: Maybe; + height?: Maybe; max_change_rate?: Maybe; max_rate?: Maybe; operator_address?: Maybe; @@ -10274,6 +10545,7 @@ export type Validator_Info_Min_Fields = { /** order by min() on columns of table "validator_info" */ export type Validator_Info_Min_Order_By = { consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; @@ -10284,6 +10556,7 @@ export type Validator_Info_Min_Order_By = { export type Validator_Info_Order_By = { account?: InputMaybe; consensus_address?: InputMaybe; + height?: InputMaybe; max_change_rate?: InputMaybe; max_rate?: InputMaybe; operator_address?: InputMaybe; @@ -10296,6 +10569,8 @@ export enum Validator_Info_Select_Column { /** column name */ ConsensusAddress = 'consensus_address', /** column name */ + Height = 'height', + /** column name */ MaxChangeRate = 'max_change_rate', /** column name */ MaxRate = 'max_rate', @@ -10305,6 +10580,83 @@ export enum Validator_Info_Select_Column { SelfDelegateAddress = 'self_delegate_address' } +/** aggregate stddev on columns */ +export type Validator_Info_Stddev_Fields = { + __typename?: 'validator_info_stddev_fields'; + height?: Maybe; +}; + +/** order by stddev() on columns of table "validator_info" */ +export type Validator_Info_Stddev_Order_By = { + height?: InputMaybe; +}; + +/** aggregate stddev_pop on columns */ +export type Validator_Info_Stddev_Pop_Fields = { + __typename?: 'validator_info_stddev_pop_fields'; + height?: Maybe; +}; + +/** order by stddev_pop() on columns of table "validator_info" */ +export type Validator_Info_Stddev_Pop_Order_By = { + height?: InputMaybe; +}; + +/** aggregate stddev_samp on columns */ +export type Validator_Info_Stddev_Samp_Fields = { + __typename?: 'validator_info_stddev_samp_fields'; + height?: Maybe; +}; + +/** order by stddev_samp() on columns of table "validator_info" */ +export type Validator_Info_Stddev_Samp_Order_By = { + height?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Validator_Info_Sum_Fields = { + __typename?: 'validator_info_sum_fields'; + height?: Maybe; +}; + +/** order by sum() on columns of table "validator_info" */ +export type Validator_Info_Sum_Order_By = { + height?: InputMaybe; +}; + +/** aggregate var_pop on columns */ +export type Validator_Info_Var_Pop_Fields = { + __typename?: 'validator_info_var_pop_fields'; + height?: Maybe; +}; + +/** order by var_pop() on columns of table "validator_info" */ +export type Validator_Info_Var_Pop_Order_By = { + height?: InputMaybe; +}; + +/** aggregate var_samp on columns */ +export type Validator_Info_Var_Samp_Fields = { + __typename?: 'validator_info_var_samp_fields'; + height?: Maybe; +}; + +/** order by var_samp() on columns of table "validator_info" */ +export type Validator_Info_Var_Samp_Order_By = { + height?: InputMaybe; +}; + +/** aggregate variance on columns */ +export type Validator_Info_Variance_Fields = { + __typename?: 'validator_info_variance_fields'; + height?: Maybe; +}; + +/** order by variance() on columns of table "validator_info" */ +export type Validator_Info_Variance_Order_By = { + height?: InputMaybe; +}; + /** aggregate max on columns */ export type Validator_Max_Fields = { __typename?: 'validator_max_fields'; @@ -11080,7 +11432,6 @@ export type Vesting_Account = { account: Account; address: Scalars['String']; end_time: Scalars['timestamp']; - id: Scalars['Int']; original_vesting: Scalars['_coin']; start_time?: Maybe; type: Scalars['String']; @@ -11120,17 +11471,9 @@ export type Vesting_Account_Aggregate = { /** aggregate fields of "vesting_account" */ export type Vesting_Account_Aggregate_Fields = { __typename?: 'vesting_account_aggregate_fields'; - avg?: Maybe; count: Scalars['Int']; max?: Maybe; min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; }; @@ -11142,28 +11485,9 @@ export type Vesting_Account_Aggregate_FieldsCountArgs = { /** order by aggregate values of table "vesting_account" */ export type Vesting_Account_Aggregate_Order_By = { - avg?: InputMaybe; count?: InputMaybe; max?: InputMaybe; min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Vesting_Account_Avg_Fields = { - __typename?: 'vesting_account_avg_fields'; - id?: Maybe; -}; - -/** order by avg() on columns of table "vesting_account" */ -export type Vesting_Account_Avg_Order_By = { - id?: InputMaybe; }; /** Boolean expression to filter rows from the table "vesting_account". All fields are combined with a logical 'AND'. */ @@ -11174,7 +11498,6 @@ export type Vesting_Account_Bool_Exp = { account?: InputMaybe; address?: InputMaybe; end_time?: InputMaybe; - id?: InputMaybe; original_vesting?: InputMaybe<_Coin_Comparison_Exp>; start_time?: InputMaybe; type?: InputMaybe; @@ -11186,7 +11509,6 @@ export type Vesting_Account_Max_Fields = { __typename?: 'vesting_account_max_fields'; address?: Maybe; end_time?: Maybe; - id?: Maybe; start_time?: Maybe; type?: Maybe; }; @@ -11195,7 +11517,6 @@ export type Vesting_Account_Max_Fields = { export type Vesting_Account_Max_Order_By = { address?: InputMaybe; end_time?: InputMaybe; - id?: InputMaybe; start_time?: InputMaybe; type?: InputMaybe; }; @@ -11205,7 +11526,6 @@ export type Vesting_Account_Min_Fields = { __typename?: 'vesting_account_min_fields'; address?: Maybe; end_time?: Maybe; - id?: Maybe; start_time?: Maybe; type?: Maybe; }; @@ -11214,7 +11534,6 @@ export type Vesting_Account_Min_Fields = { export type Vesting_Account_Min_Order_By = { address?: InputMaybe; end_time?: InputMaybe; - id?: InputMaybe; start_time?: InputMaybe; type?: InputMaybe; }; @@ -11224,7 +11543,6 @@ export type Vesting_Account_Order_By = { account?: InputMaybe; address?: InputMaybe; end_time?: InputMaybe; - id?: InputMaybe; original_vesting?: InputMaybe; start_time?: InputMaybe; type?: InputMaybe; @@ -11238,8 +11556,6 @@ export enum Vesting_Account_Select_Column { /** column name */ EndTime = 'end_time', /** column name */ - Id = 'id', - /** column name */ OriginalVesting = 'original_vesting', /** column name */ StartTime = 'start_time', @@ -11247,83 +11563,6 @@ export enum Vesting_Account_Select_Column { Type = 'type' } -/** aggregate stddev on columns */ -export type Vesting_Account_Stddev_Fields = { - __typename?: 'vesting_account_stddev_fields'; - id?: Maybe; -}; - -/** order by stddev() on columns of table "vesting_account" */ -export type Vesting_Account_Stddev_Order_By = { - id?: InputMaybe; -}; - -/** aggregate stddev_pop on columns */ -export type Vesting_Account_Stddev_Pop_Fields = { - __typename?: 'vesting_account_stddev_pop_fields'; - id?: Maybe; -}; - -/** order by stddev_pop() on columns of table "vesting_account" */ -export type Vesting_Account_Stddev_Pop_Order_By = { - id?: InputMaybe; -}; - -/** aggregate stddev_samp on columns */ -export type Vesting_Account_Stddev_Samp_Fields = { - __typename?: 'vesting_account_stddev_samp_fields'; - id?: Maybe; -}; - -/** order by stddev_samp() on columns of table "vesting_account" */ -export type Vesting_Account_Stddev_Samp_Order_By = { - id?: InputMaybe; -}; - -/** aggregate sum on columns */ -export type Vesting_Account_Sum_Fields = { - __typename?: 'vesting_account_sum_fields'; - id?: Maybe; -}; - -/** order by sum() on columns of table "vesting_account" */ -export type Vesting_Account_Sum_Order_By = { - id?: InputMaybe; -}; - -/** aggregate var_pop on columns */ -export type Vesting_Account_Var_Pop_Fields = { - __typename?: 'vesting_account_var_pop_fields'; - id?: Maybe; -}; - -/** order by var_pop() on columns of table "vesting_account" */ -export type Vesting_Account_Var_Pop_Order_By = { - id?: InputMaybe; -}; - -/** aggregate var_samp on columns */ -export type Vesting_Account_Var_Samp_Fields = { - __typename?: 'vesting_account_var_samp_fields'; - id?: Maybe; -}; - -/** order by var_samp() on columns of table "vesting_account" */ -export type Vesting_Account_Var_Samp_Order_By = { - id?: InputMaybe; -}; - -/** aggregate variance on columns */ -export type Vesting_Account_Variance_Fields = { - __typename?: 'vesting_account_variance_fields'; - id?: Maybe; -}; - -/** order by variance() on columns of table "vesting_account" */ -export type Vesting_Account_Variance_Order_By = { - id?: InputMaybe; -}; - /** columns and relationships of "vesting_period" */ export type Vesting_Period = { __typename?: 'vesting_period'; @@ -11511,56 +11750,943 @@ export type Vesting_Period_Sum_Fields = { vesting_account_id?: Maybe; }; -/** order by sum() on columns of table "vesting_period" */ -export type Vesting_Period_Sum_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; +/** order by sum() on columns of table "vesting_period" */ +export type Vesting_Period_Sum_Order_By = { + length?: InputMaybe; + period_order?: InputMaybe; + vesting_account_id?: InputMaybe; +}; + +/** aggregate var_pop on columns */ +export type Vesting_Period_Var_Pop_Fields = { + __typename?: 'vesting_period_var_pop_fields'; + length?: Maybe; + period_order?: Maybe; + vesting_account_id?: Maybe; +}; + +/** order by var_pop() on columns of table "vesting_period" */ +export type Vesting_Period_Var_Pop_Order_By = { + length?: InputMaybe; + period_order?: InputMaybe; + vesting_account_id?: InputMaybe; +}; + +/** aggregate var_samp on columns */ +export type Vesting_Period_Var_Samp_Fields = { + __typename?: 'vesting_period_var_samp_fields'; + length?: Maybe; + period_order?: Maybe; + vesting_account_id?: Maybe; +}; + +/** order by var_samp() on columns of table "vesting_period" */ +export type Vesting_Period_Var_Samp_Order_By = { + length?: InputMaybe; + period_order?: InputMaybe; + vesting_account_id?: InputMaybe; +}; + +/** aggregate variance on columns */ +export type Vesting_Period_Variance_Fields = { + __typename?: 'vesting_period_variance_fields'; + length?: Maybe; + period_order?: Maybe; + vesting_account_id?: Maybe; +}; + +/** order by variance() on columns of table "vesting_period" */ +export type Vesting_Period_Variance_Order_By = { + length?: InputMaybe; + period_order?: InputMaybe; + vesting_account_id?: InputMaybe; +}; + +/** columns and relationships of "wasm_code" */ +export type Wasm_Code = { + __typename?: 'wasm_code'; + byte_code: Scalars['bytea']; + code_id: Scalars['bigint']; + height: Scalars['bigint']; + instantiate_permission?: Maybe; + sender?: Maybe; + /** An array relationship */ + wasm_contracts: Array; + /** An aggregate relationship */ + wasm_contracts_aggregate: Wasm_Contract_Aggregate; +}; + + +/** columns and relationships of "wasm_code" */ +export type Wasm_CodeWasm_ContractsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "wasm_code" */ +export type Wasm_CodeWasm_Contracts_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +/** aggregated selection of "wasm_code" */ +export type Wasm_Code_Aggregate = { + __typename?: 'wasm_code_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "wasm_code" */ +export type Wasm_Code_Aggregate_Fields = { + __typename?: 'wasm_code_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "wasm_code" */ +export type Wasm_Code_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Wasm_Code_Avg_Fields = { + __typename?: 'wasm_code_avg_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** Boolean expression to filter rows from the table "wasm_code". All fields are combined with a logical 'AND'. */ +export type Wasm_Code_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + byte_code?: InputMaybe; + code_id?: InputMaybe; + height?: InputMaybe; + instantiate_permission?: InputMaybe; + sender?: InputMaybe; + wasm_contracts?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Wasm_Code_Max_Fields = { + __typename?: 'wasm_code_max_fields'; + code_id?: Maybe; + height?: Maybe; + sender?: Maybe; +}; + +/** aggregate min on columns */ +export type Wasm_Code_Min_Fields = { + __typename?: 'wasm_code_min_fields'; + code_id?: Maybe; + height?: Maybe; + sender?: Maybe; +}; + +/** Ordering options when selecting data from "wasm_code". */ +export type Wasm_Code_Order_By = { + byte_code?: InputMaybe; + code_id?: InputMaybe; + height?: InputMaybe; + instantiate_permission?: InputMaybe; + sender?: InputMaybe; + wasm_contracts_aggregate?: InputMaybe; +}; + +/** select columns of table "wasm_code" */ +export enum Wasm_Code_Select_Column { + /** column name */ + ByteCode = 'byte_code', + /** column name */ + CodeId = 'code_id', + /** column name */ + Height = 'height', + /** column name */ + InstantiatePermission = 'instantiate_permission', + /** column name */ + Sender = 'sender' +} + +/** aggregate stddev on columns */ +export type Wasm_Code_Stddev_Fields = { + __typename?: 'wasm_code_stddev_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Wasm_Code_Stddev_Pop_Fields = { + __typename?: 'wasm_code_stddev_pop_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Wasm_Code_Stddev_Samp_Fields = { + __typename?: 'wasm_code_stddev_samp_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** aggregate sum on columns */ +export type Wasm_Code_Sum_Fields = { + __typename?: 'wasm_code_sum_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Wasm_Code_Var_Pop_Fields = { + __typename?: 'wasm_code_var_pop_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Wasm_Code_Var_Samp_Fields = { + __typename?: 'wasm_code_var_samp_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** aggregate variance on columns */ +export type Wasm_Code_Variance_Fields = { + __typename?: 'wasm_code_variance_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** columns and relationships of "wasm_contract" */ +export type Wasm_Contract = { + __typename?: 'wasm_contract'; + /** An object relationship */ + account: Account; + admin?: Maybe; + code_id: Scalars['bigint']; + contract_address: Scalars['String']; + contract_info_extension?: Maybe; + contract_states: Scalars['jsonb']; + creator: Scalars['String']; + data?: Maybe; + funds: Scalars['_coin']; + height: Scalars['bigint']; + instantiated_at: Scalars['timestamp']; + label?: Maybe; + raw_contract_message: Scalars['jsonb']; + sender?: Maybe; + /** An object relationship */ + wasm_code: Wasm_Code; + /** An array relationship */ + wasm_execute_contracts: Array; + /** An aggregate relationship */ + wasm_execute_contracts_aggregate: Wasm_Execute_Contract_Aggregate; +}; + + +/** columns and relationships of "wasm_contract" */ +export type Wasm_ContractContract_StatesArgs = { + path?: InputMaybe; +}; + + +/** columns and relationships of "wasm_contract" */ +export type Wasm_ContractRaw_Contract_MessageArgs = { + path?: InputMaybe; +}; + + +/** columns and relationships of "wasm_contract" */ +export type Wasm_ContractWasm_Execute_ContractsArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "wasm_contract" */ +export type Wasm_ContractWasm_Execute_Contracts_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + +/** aggregated selection of "wasm_contract" */ +export type Wasm_Contract_Aggregate = { + __typename?: 'wasm_contract_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "wasm_contract" */ +export type Wasm_Contract_Aggregate_Fields = { + __typename?: 'wasm_contract_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "wasm_contract" */ +export type Wasm_Contract_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** order by aggregate values of table "wasm_contract" */ +export type Wasm_Contract_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Wasm_Contract_Avg_Fields = { + __typename?: 'wasm_contract_avg_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by avg() on columns of table "wasm_contract" */ +export type Wasm_Contract_Avg_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** Boolean expression to filter rows from the table "wasm_contract". All fields are combined with a logical 'AND'. */ +export type Wasm_Contract_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + account?: InputMaybe; + admin?: InputMaybe; + code_id?: InputMaybe; + contract_address?: InputMaybe; + contract_info_extension?: InputMaybe; + contract_states?: InputMaybe; + creator?: InputMaybe; + data?: InputMaybe; + funds?: InputMaybe<_Coin_Comparison_Exp>; + height?: InputMaybe; + instantiated_at?: InputMaybe; + label?: InputMaybe; + raw_contract_message?: InputMaybe; + sender?: InputMaybe; + wasm_code?: InputMaybe; + wasm_execute_contracts?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Wasm_Contract_Max_Fields = { + __typename?: 'wasm_contract_max_fields'; + admin?: Maybe; + code_id?: Maybe; + contract_address?: Maybe; + contract_info_extension?: Maybe; + creator?: Maybe; + data?: Maybe; + height?: Maybe; + instantiated_at?: Maybe; + label?: Maybe; + sender?: Maybe; +}; + +/** order by max() on columns of table "wasm_contract" */ +export type Wasm_Contract_Max_Order_By = { + admin?: InputMaybe; + code_id?: InputMaybe; + contract_address?: InputMaybe; + contract_info_extension?: InputMaybe; + creator?: InputMaybe; + data?: InputMaybe; + height?: InputMaybe; + instantiated_at?: InputMaybe; + label?: InputMaybe; + sender?: InputMaybe; +}; + +/** aggregate min on columns */ +export type Wasm_Contract_Min_Fields = { + __typename?: 'wasm_contract_min_fields'; + admin?: Maybe; + code_id?: Maybe; + contract_address?: Maybe; + contract_info_extension?: Maybe; + creator?: Maybe; + data?: Maybe; + height?: Maybe; + instantiated_at?: Maybe; + label?: Maybe; + sender?: Maybe; +}; + +/** order by min() on columns of table "wasm_contract" */ +export type Wasm_Contract_Min_Order_By = { + admin?: InputMaybe; + code_id?: InputMaybe; + contract_address?: InputMaybe; + contract_info_extension?: InputMaybe; + creator?: InputMaybe; + data?: InputMaybe; + height?: InputMaybe; + instantiated_at?: InputMaybe; + label?: InputMaybe; + sender?: InputMaybe; +}; + +/** Ordering options when selecting data from "wasm_contract". */ +export type Wasm_Contract_Order_By = { + account?: InputMaybe; + admin?: InputMaybe; + code_id?: InputMaybe; + contract_address?: InputMaybe; + contract_info_extension?: InputMaybe; + contract_states?: InputMaybe; + creator?: InputMaybe; + data?: InputMaybe; + funds?: InputMaybe; + height?: InputMaybe; + instantiated_at?: InputMaybe; + label?: InputMaybe; + raw_contract_message?: InputMaybe; + sender?: InputMaybe; + wasm_code?: InputMaybe; + wasm_execute_contracts_aggregate?: InputMaybe; +}; + +/** select columns of table "wasm_contract" */ +export enum Wasm_Contract_Select_Column { + /** column name */ + Admin = 'admin', + /** column name */ + CodeId = 'code_id', + /** column name */ + ContractAddress = 'contract_address', + /** column name */ + ContractInfoExtension = 'contract_info_extension', + /** column name */ + ContractStates = 'contract_states', + /** column name */ + Creator = 'creator', + /** column name */ + Data = 'data', + /** column name */ + Funds = 'funds', + /** column name */ + Height = 'height', + /** column name */ + InstantiatedAt = 'instantiated_at', + /** column name */ + Label = 'label', + /** column name */ + RawContractMessage = 'raw_contract_message', + /** column name */ + Sender = 'sender' +} + +/** aggregate stddev on columns */ +export type Wasm_Contract_Stddev_Fields = { + __typename?: 'wasm_contract_stddev_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by stddev() on columns of table "wasm_contract" */ +export type Wasm_Contract_Stddev_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** aggregate stddev_pop on columns */ +export type Wasm_Contract_Stddev_Pop_Fields = { + __typename?: 'wasm_contract_stddev_pop_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by stddev_pop() on columns of table "wasm_contract" */ +export type Wasm_Contract_Stddev_Pop_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** aggregate stddev_samp on columns */ +export type Wasm_Contract_Stddev_Samp_Fields = { + __typename?: 'wasm_contract_stddev_samp_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by stddev_samp() on columns of table "wasm_contract" */ +export type Wasm_Contract_Stddev_Samp_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Wasm_Contract_Sum_Fields = { + __typename?: 'wasm_contract_sum_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by sum() on columns of table "wasm_contract" */ +export type Wasm_Contract_Sum_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** aggregate var_pop on columns */ +export type Wasm_Contract_Var_Pop_Fields = { + __typename?: 'wasm_contract_var_pop_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by var_pop() on columns of table "wasm_contract" */ +export type Wasm_Contract_Var_Pop_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** aggregate var_samp on columns */ +export type Wasm_Contract_Var_Samp_Fields = { + __typename?: 'wasm_contract_var_samp_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by var_samp() on columns of table "wasm_contract" */ +export type Wasm_Contract_Var_Samp_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** aggregate variance on columns */ +export type Wasm_Contract_Variance_Fields = { + __typename?: 'wasm_contract_variance_fields'; + code_id?: Maybe; + height?: Maybe; +}; + +/** order by variance() on columns of table "wasm_contract" */ +export type Wasm_Contract_Variance_Order_By = { + code_id?: InputMaybe; + height?: InputMaybe; +}; + +/** columns and relationships of "wasm_execute_contract" */ +export type Wasm_Execute_Contract = { + __typename?: 'wasm_execute_contract'; + contract_address: Scalars['String']; + data?: Maybe; + executed_at: Scalars['timestamp']; + funds: Scalars['_coin']; + height: Scalars['bigint']; + raw_contract_message: Scalars['jsonb']; + sender: Scalars['String']; + /** An object relationship */ + wasm_contract: Wasm_Contract; +}; + + +/** columns and relationships of "wasm_execute_contract" */ +export type Wasm_Execute_ContractRaw_Contract_MessageArgs = { + path?: InputMaybe; +}; + +/** aggregated selection of "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Aggregate = { + __typename?: 'wasm_execute_contract_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Aggregate_Fields = { + __typename?: 'wasm_execute_contract_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** order by aggregate values of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Wasm_Execute_Contract_Avg_Fields = { + __typename?: 'wasm_execute_contract_avg_fields'; + height?: Maybe; +}; + +/** order by avg() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Avg_Order_By = { + height?: InputMaybe; +}; + +/** Boolean expression to filter rows from the table "wasm_execute_contract". All fields are combined with a logical 'AND'. */ +export type Wasm_Execute_Contract_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + contract_address?: InputMaybe; + data?: InputMaybe; + executed_at?: InputMaybe; + funds?: InputMaybe<_Coin_Comparison_Exp>; + height?: InputMaybe; + raw_contract_message?: InputMaybe; + sender?: InputMaybe; + wasm_contract?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Wasm_Execute_Contract_Max_Fields = { + __typename?: 'wasm_execute_contract_max_fields'; + contract_address?: Maybe; + data?: Maybe; + executed_at?: Maybe; + height?: Maybe; + sender?: Maybe; +}; + +/** order by max() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Max_Order_By = { + contract_address?: InputMaybe; + data?: InputMaybe; + executed_at?: InputMaybe; + height?: InputMaybe; + sender?: InputMaybe; +}; + +/** aggregate min on columns */ +export type Wasm_Execute_Contract_Min_Fields = { + __typename?: 'wasm_execute_contract_min_fields'; + contract_address?: Maybe; + data?: Maybe; + executed_at?: Maybe; + height?: Maybe; + sender?: Maybe; +}; + +/** order by min() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Min_Order_By = { + contract_address?: InputMaybe; + data?: InputMaybe; + executed_at?: InputMaybe; + height?: InputMaybe; + sender?: InputMaybe; +}; + +/** Ordering options when selecting data from "wasm_execute_contract". */ +export type Wasm_Execute_Contract_Order_By = { + contract_address?: InputMaybe; + data?: InputMaybe; + executed_at?: InputMaybe; + funds?: InputMaybe; + height?: InputMaybe; + raw_contract_message?: InputMaybe; + sender?: InputMaybe; + wasm_contract?: InputMaybe; +}; + +/** select columns of table "wasm_execute_contract" */ +export enum Wasm_Execute_Contract_Select_Column { + /** column name */ + ContractAddress = 'contract_address', + /** column name */ + Data = 'data', + /** column name */ + ExecutedAt = 'executed_at', + /** column name */ + Funds = 'funds', + /** column name */ + Height = 'height', + /** column name */ + RawContractMessage = 'raw_contract_message', + /** column name */ + Sender = 'sender' +} + +/** aggregate stddev on columns */ +export type Wasm_Execute_Contract_Stddev_Fields = { + __typename?: 'wasm_execute_contract_stddev_fields'; + height?: Maybe; +}; + +/** order by stddev() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Stddev_Order_By = { + height?: InputMaybe; +}; + +/** aggregate stddev_pop on columns */ +export type Wasm_Execute_Contract_Stddev_Pop_Fields = { + __typename?: 'wasm_execute_contract_stddev_pop_fields'; + height?: Maybe; +}; + +/** order by stddev_pop() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Stddev_Pop_Order_By = { + height?: InputMaybe; +}; + +/** aggregate stddev_samp on columns */ +export type Wasm_Execute_Contract_Stddev_Samp_Fields = { + __typename?: 'wasm_execute_contract_stddev_samp_fields'; + height?: Maybe; +}; + +/** order by stddev_samp() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Stddev_Samp_Order_By = { + height?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Wasm_Execute_Contract_Sum_Fields = { + __typename?: 'wasm_execute_contract_sum_fields'; + height?: Maybe; +}; + +/** order by sum() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Sum_Order_By = { + height?: InputMaybe; +}; + +/** aggregate var_pop on columns */ +export type Wasm_Execute_Contract_Var_Pop_Fields = { + __typename?: 'wasm_execute_contract_var_pop_fields'; + height?: Maybe; +}; + +/** order by var_pop() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Var_Pop_Order_By = { + height?: InputMaybe; +}; + +/** aggregate var_samp on columns */ +export type Wasm_Execute_Contract_Var_Samp_Fields = { + __typename?: 'wasm_execute_contract_var_samp_fields'; + height?: Maybe; +}; + +/** order by var_samp() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Var_Samp_Order_By = { + height?: InputMaybe; +}; + +/** aggregate variance on columns */ +export type Wasm_Execute_Contract_Variance_Fields = { + __typename?: 'wasm_execute_contract_variance_fields'; + height?: Maybe; +}; + +/** order by variance() on columns of table "wasm_execute_contract" */ +export type Wasm_Execute_Contract_Variance_Order_By = { + height?: InputMaybe; +}; + +/** columns and relationships of "wasm_params" */ +export type Wasm_Params = { + __typename?: 'wasm_params'; + code_upload_access: Scalars['access_config']; + height: Scalars['bigint']; + instantiate_default_permission: Scalars['Int']; + one_row_id: Scalars['Boolean']; +}; + +/** aggregated selection of "wasm_params" */ +export type Wasm_Params_Aggregate = { + __typename?: 'wasm_params_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "wasm_params" */ +export type Wasm_Params_Aggregate_Fields = { + __typename?: 'wasm_params_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "wasm_params" */ +export type Wasm_Params_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Wasm_Params_Avg_Fields = { + __typename?: 'wasm_params_avg_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; +}; + +/** Boolean expression to filter rows from the table "wasm_params". All fields are combined with a logical 'AND'. */ +export type Wasm_Params_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + code_upload_access?: InputMaybe; + height?: InputMaybe; + instantiate_default_permission?: InputMaybe; + one_row_id?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Wasm_Params_Max_Fields = { + __typename?: 'wasm_params_max_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; +}; + +/** aggregate min on columns */ +export type Wasm_Params_Min_Fields = { + __typename?: 'wasm_params_min_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; +}; + +/** Ordering options when selecting data from "wasm_params". */ +export type Wasm_Params_Order_By = { + code_upload_access?: InputMaybe; + height?: InputMaybe; + instantiate_default_permission?: InputMaybe; + one_row_id?: InputMaybe; +}; + +/** select columns of table "wasm_params" */ +export enum Wasm_Params_Select_Column { + /** column name */ + CodeUploadAccess = 'code_upload_access', + /** column name */ + Height = 'height', + /** column name */ + InstantiateDefaultPermission = 'instantiate_default_permission', + /** column name */ + OneRowId = 'one_row_id' +} + +/** aggregate stddev on columns */ +export type Wasm_Params_Stddev_Fields = { + __typename?: 'wasm_params_stddev_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Wasm_Params_Stddev_Pop_Fields = { + __typename?: 'wasm_params_stddev_pop_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; }; -/** aggregate var_pop on columns */ -export type Vesting_Period_Var_Pop_Fields = { - __typename?: 'vesting_period_var_pop_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; +/** aggregate stddev_samp on columns */ +export type Wasm_Params_Stddev_Samp_Fields = { + __typename?: 'wasm_params_stddev_samp_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; }; -/** order by var_pop() on columns of table "vesting_period" */ -export type Vesting_Period_Var_Pop_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; +/** aggregate sum on columns */ +export type Wasm_Params_Sum_Fields = { + __typename?: 'wasm_params_sum_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; }; -/** aggregate var_samp on columns */ -export type Vesting_Period_Var_Samp_Fields = { - __typename?: 'vesting_period_var_samp_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; +/** aggregate var_pop on columns */ +export type Wasm_Params_Var_Pop_Fields = { + __typename?: 'wasm_params_var_pop_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; }; -/** order by var_samp() on columns of table "vesting_period" */ -export type Vesting_Period_Var_Samp_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; +/** aggregate var_samp on columns */ +export type Wasm_Params_Var_Samp_Fields = { + __typename?: 'wasm_params_var_samp_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; }; /** aggregate variance on columns */ -export type Vesting_Period_Variance_Fields = { - __typename?: 'vesting_period_variance_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -/** order by variance() on columns of table "vesting_period" */ -export type Vesting_Period_Variance_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; +export type Wasm_Params_Variance_Fields = { + __typename?: 'wasm_params_variance_fields'; + height?: Maybe; + instantiate_default_permission?: Maybe; }; export type AccountCommissionQueryVariables = Exact<{ @@ -11713,7 +12839,7 @@ export type OnlineVotingPowerQuery = { activeTotal: { __typename?: 'validator_st export type ParamsQueryVariables = Exact<{ [key: string]: never; }>; -export type ParamsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }>, mintParams: Array<{ __typename?: 'mint_params', params: any }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }>, govParams: Array<{ __typename?: 'gov_params', depositParams: any, tallyParams: any, votingParams: any }> }; +export type ParamsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }>, mintParams: Array<{ __typename?: 'mint_params', params: any }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }>, govParams: Array<{ __typename?: 'gov_params', params: any, height: any }> }; export type ProposalDetailsQueryVariables = Exact<{ proposalId?: InputMaybe; @@ -11756,7 +12882,7 @@ export type TokenPriceListenerSubscriptionVariables = Exact<{ }>; -export type TokenPriceListenerSubscription = { tokenPrice: Array<{ __typename?: 'token_price', id: number, price: any, timestamp: any, marketCap: any, unitName: string }> }; +export type TokenPriceListenerSubscription = { tokenPrice: Array<{ __typename?: 'token_price', price: any, timestamp: any, marketCap: any, unitName: string }> }; export type TokenPriceHistoryQueryVariables = Exact<{ denom?: InputMaybe; @@ -11808,12 +12934,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11850,11 +13018,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -12719,9 +13882,8 @@ export const ParamsDocument = gql` params } govParams: gov_params(limit: 1, order_by: {height: desc}) { - depositParams: deposit_params - tallyParams: tally_params - votingParams: voting_params + params + height } } `; @@ -12813,7 +13975,7 @@ export const ProposalDetailsTallyDocument = gql` bondedTokens: bonded_tokens } quorum: gov_params(limit: 1, order_by: {height: desc}) { - tallyParams: tally_params + tallyParams: params } } `; @@ -12982,7 +14144,6 @@ export type ProposalsQueryResult = Apollo.QueryResult; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13323,11 +14480,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13335,14 +14563,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13351,40 +14706,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-evmos/src/screens/account_details/components/index.ts b/apps/web-evmos/src/screens/account_details/components/index.ts deleted file mode 100644 index 6947bf7a0a..0000000000 --- a/apps/web-evmos/src/screens/account_details/components/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as Balance } from '@/screens/account_details/components/balance'; -export { default as OtherTokens } from '@/screens/account_details/components/other_tokens'; -export { default as Overview } from '@/screens/account_details/components/overview'; -export { default as Staking } from '@/screens/account_details/components/staking'; -export { default as Transactions } from '@/screens/account_details/components/transactions'; diff --git a/apps/web-evmos/src/screens/account_details/index.tsx b/apps/web-evmos/src/screens/account_details/index.tsx deleted file mode 100644 index 6d28e31fd3..0000000000 --- a/apps/web-evmos/src/screens/account_details/index.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { NextSeo } from 'next-seo'; -import useAppTranslation from '@/hooks/useAppTranslation'; -import DesmosProfile from '@/components/desmos_profile'; -import Layout from '@/components/layout'; -import LoadAndExist from '@/components/load_and_exist'; -import Balance from '@/screens/account_details/components/balance'; -import OtherTokens from '@/screens/account_details/components/other_tokens'; -import Overview from '@/screens/account_details/components/overview'; -import Staking from '@/screens/account_details/components/staking'; -import Transactions from '@/screens/account_details/components/transactions'; -import { useAccountDetails } from '@/screens/account_details/hooks'; -import useStyles from '@/screens/account_details/styles'; - -const AccountDetails = () => { - const { t } = useAppTranslation('accounts'); - const { classes } = useStyles(); - const { state } = useAccountDetails(); - - return ( - <> - - - - - {!!state.desmosProfile && ( - - )} - - - - - - - - - - ); -}; - -export default AccountDetails; diff --git a/apps/web-gitopia/src/graphql/general/validator_details.graphql b/apps/web-gitopia/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-gitopia/src/graphql/general/validator_details.graphql +++ b/apps/web-gitopia/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-gitopia/src/graphql/types/general_types.ts b/apps/web-gitopia/src/graphql/types/general_types.ts index b80678c141..7ccad12ff5 100644 --- a/apps/web-gitopia/src/graphql/types/general_types.ts +++ b/apps/web-gitopia/src/graphql/types/general_types.ts @@ -6548,12 +6548,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -6590,11 +6632,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -8041,12 +8078,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -8055,11 +8088,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -8067,14 +8171,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -8083,40 +8314,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-humansai/src/graphql/general/validator_details.graphql b/apps/web-humansai/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-humansai/src/graphql/general/validator_details.graphql +++ b/apps/web-humansai/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-humansai/src/graphql/types/general_types.ts b/apps/web-humansai/src/graphql/types/general_types.ts index b80678c141..801b6378e3 100644 --- a/apps/web-humansai/src/graphql/types/general_types.ts +++ b/apps/web-humansai/src/graphql/types/general_types.ts @@ -2686,6 +2686,8 @@ export type Query_Root = { software_upgrade_plan_aggregate: Software_Upgrade_Plan_Aggregate; /** fetch data from the table: "staking_params" */ staking_params: Array; + /** fetch aggregated fields from the table: "staking_params" */ + staking_params_aggregate: Staking_Params_Aggregate; /** fetch data from the table: "staking_pool" */ staking_pool: Array; /** fetch data from the table: "supply" */ @@ -3135,6 +3137,15 @@ export type Query_RootStaking_ParamsArgs = { }; +export type Query_RootStaking_Params_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootStaking_PoolArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -3556,6 +3567,42 @@ export type Staking_ParamsParamsArgs = { path?: InputMaybe; }; +/** aggregated selection of "staking_params" */ +export type Staking_Params_Aggregate = { + __typename?: 'staking_params_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "staking_params" */ +export type Staking_Params_Aggregate_Fields = { + __typename?: 'staking_params_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "staking_params" */ +export type Staking_Params_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Staking_Params_Avg_Fields = { + __typename?: 'staking_params_avg_fields'; + height?: Maybe; +}; + /** Boolean expression to filter rows from the table "staking_params". All fields are combined with a logical 'AND'. */ export type Staking_Params_Bool_Exp = { _and?: InputMaybe>; @@ -3565,6 +3612,18 @@ export type Staking_Params_Bool_Exp = { params?: InputMaybe; }; +/** aggregate max on columns */ +export type Staking_Params_Max_Fields = { + __typename?: 'staking_params_max_fields'; + height?: Maybe; +}; + +/** aggregate min on columns */ +export type Staking_Params_Min_Fields = { + __typename?: 'staking_params_min_fields'; + height?: Maybe; +}; + /** Ordering options when selecting data from "staking_params". */ export type Staking_Params_Order_By = { height?: InputMaybe; @@ -3579,6 +3638,48 @@ export enum Staking_Params_Select_Column { Params = 'params' } +/** aggregate stddev on columns */ +export type Staking_Params_Stddev_Fields = { + __typename?: 'staking_params_stddev_fields'; + height?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Staking_Params_Stddev_Pop_Fields = { + __typename?: 'staking_params_stddev_pop_fields'; + height?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Staking_Params_Stddev_Samp_Fields = { + __typename?: 'staking_params_stddev_samp_fields'; + height?: Maybe; +}; + +/** aggregate sum on columns */ +export type Staking_Params_Sum_Fields = { + __typename?: 'staking_params_sum_fields'; + height?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Staking_Params_Var_Pop_Fields = { + __typename?: 'staking_params_var_pop_fields'; + height?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Staking_Params_Var_Samp_Fields = { + __typename?: 'staking_params_var_samp_fields'; + height?: Maybe; +}; + +/** aggregate variance on columns */ +export type Staking_Params_Variance_Fields = { + __typename?: 'staking_params_variance_fields'; + height?: Maybe; +}; + /** columns and relationships of "staking_pool" */ export type Staking_Pool = { __typename?: 'staking_pool'; @@ -3700,6 +3801,8 @@ export type Subscription_Root = { software_upgrade_plan_aggregate: Software_Upgrade_Plan_Aggregate; /** fetch data from the table: "staking_params" */ staking_params: Array; + /** fetch aggregated fields from the table: "staking_params" */ + staking_params_aggregate: Staking_Params_Aggregate; /** fetch data from the table: "staking_pool" */ staking_pool: Array; /** fetch data from the table: "supply" */ @@ -4063,6 +4166,15 @@ export type Subscription_RootStaking_ParamsArgs = { }; +export type Subscription_RootStaking_Params_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootStaking_PoolArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6548,12 +6660,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -6590,11 +6744,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -8041,12 +8190,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -8055,11 +8200,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -8067,14 +8283,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -8083,40 +8426,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-jackal/src/graphql/general/validator_details.graphql b/apps/web-jackal/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-jackal/src/graphql/general/validator_details.graphql +++ b/apps/web-jackal/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-jackal/src/graphql/types/general_types.ts b/apps/web-jackal/src/graphql/types/general_types.ts index b47802f0b5..bf594e1057 100644 --- a/apps/web-jackal/src/graphql/types/general_types.ts +++ b/apps/web-jackal/src/graphql/types/general_types.ts @@ -6742,12 +6742,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -6784,11 +6826,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -8235,12 +8272,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -8249,11 +8282,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -8261,14 +8365,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -8277,40 +8508,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-kyve/src/graphql/general/validator_details.graphql b/apps/web-kyve/src/graphql/general/validator_details.graphql index cc501f82f6..7f249941a6 100644 --- a/apps/web-kyve/src/graphql/general/validator_details.graphql +++ b/apps/web-kyve/src/graphql/general/validator_details.graphql @@ -23,41 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address - consensusAddress: consensus_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-kyve/src/graphql/types/general_types.ts b/apps/web-kyve/src/graphql/types/general_types.ts index 9c047ab4ee..dbb14a003c 100644 --- a/apps/web-kyve/src/graphql/types/general_types.ts +++ b/apps/web-kyve/src/graphql/types/general_types.ts @@ -1538,6 +1538,142 @@ export type Message_Sum_Order_By = { index?: InputMaybe; }; +/** columns and relationships of "message_type" */ +export type Message_Type = { + __typename?: 'message_type'; + height: Scalars['bigint']; + label: Scalars['String']; + module: Scalars['String']; + type: Scalars['String']; +}; + +/** aggregated selection of "message_type" */ +export type Message_Type_Aggregate = { + __typename?: 'message_type_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "message_type" */ +export type Message_Type_Aggregate_Fields = { + __typename?: 'message_type_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "message_type" */ +export type Message_Type_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Message_Type_Avg_Fields = { + __typename?: 'message_type_avg_fields'; + height?: Maybe; +}; + +/** Boolean expression to filter rows from the table "message_type". All fields are combined with a logical 'AND'. */ +export type Message_Type_Bool_Exp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + height?: InputMaybe; + label?: InputMaybe; + module?: InputMaybe; + type?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Message_Type_Max_Fields = { + __typename?: 'message_type_max_fields'; + height?: Maybe; + label?: Maybe; + module?: Maybe; + type?: Maybe; +}; + +/** aggregate min on columns */ +export type Message_Type_Min_Fields = { + __typename?: 'message_type_min_fields'; + height?: Maybe; + label?: Maybe; + module?: Maybe; + type?: Maybe; +}; + +/** Ordering options when selecting data from "message_type". */ +export type Message_Type_Order_By = { + height?: InputMaybe; + label?: InputMaybe; + module?: InputMaybe; + type?: InputMaybe; +}; + +/** select columns of table "message_type" */ +export enum Message_Type_Select_Column { + /** column name */ + Height = 'height', + /** column name */ + Label = 'label', + /** column name */ + Module = 'module', + /** column name */ + Type = 'type' +} + +/** aggregate stddev on columns */ +export type Message_Type_Stddev_Fields = { + __typename?: 'message_type_stddev_fields'; + height?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Message_Type_Stddev_Pop_Fields = { + __typename?: 'message_type_stddev_pop_fields'; + height?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Message_Type_Stddev_Samp_Fields = { + __typename?: 'message_type_stddev_samp_fields'; + height?: Maybe; +}; + +/** aggregate sum on columns */ +export type Message_Type_Sum_Fields = { + __typename?: 'message_type_sum_fields'; + height?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Message_Type_Var_Pop_Fields = { + __typename?: 'message_type_var_pop_fields'; + height?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Message_Type_Var_Samp_Fields = { + __typename?: 'message_type_var_samp_fields'; + height?: Maybe; +}; + +/** aggregate variance on columns */ +export type Message_Type_Variance_Fields = { + __typename?: 'message_type_variance_fields'; + height?: Maybe; +}; + /** order by var_pop() on columns of table "message" */ export type Message_Var_Pop_Order_By = { height?: InputMaybe; @@ -1563,6 +1699,24 @@ export type Messages_By_Address_Args = { types?: InputMaybe; }; +export type Messages_By_Type_Args = { + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_By_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_Types_By_Address_Args = { + addresses?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; @@ -1653,168 +1807,6 @@ export enum Order_By { DescNullsLast = 'desc_nulls_last' } -/** columns and relationships of "pool" */ -export type Pool = { - __typename?: 'pool'; - config: Scalars['String']; - current_compression_id: Scalars['String']; - current_index: Scalars['String']; - current_key: Scalars['String']; - current_storage_provider_id: Scalars['String']; - current_summary: Scalars['String']; - disabled: Scalars['Boolean']; - funders: Scalars['jsonb']; - height: Scalars['bigint']; - id: Scalars['Int']; - logo: Scalars['String']; - max_bundle_size: Scalars['String']; - min_delegation: Scalars['String']; - name: Scalars['String']; - operating_cost: Scalars['String']; - protocol: Scalars['jsonb']; - /** An array relationship */ - protocol_validator_pools: Array; - runtime: Scalars['String']; - start_key: Scalars['String']; - total_bundles: Scalars['String']; - total_funds: Scalars['String']; - upgrade_plan: Scalars['jsonb']; - upload_interval: Scalars['String']; -}; - - -/** columns and relationships of "pool" */ -export type PoolFundersArgs = { - path?: InputMaybe; -}; - - -/** columns and relationships of "pool" */ -export type PoolProtocolArgs = { - path?: InputMaybe; -}; - - -/** columns and relationships of "pool" */ -export type PoolProtocol_Validator_PoolsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -/** columns and relationships of "pool" */ -export type PoolUpgrade_PlanArgs = { - path?: InputMaybe; -}; - -/** Boolean expression to filter rows from the table "pool". All fields are combined with a logical 'AND'. */ -export type Pool_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - config?: InputMaybe; - current_compression_id?: InputMaybe; - current_index?: InputMaybe; - current_key?: InputMaybe; - current_storage_provider_id?: InputMaybe; - current_summary?: InputMaybe; - disabled?: InputMaybe; - funders?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - logo?: InputMaybe; - max_bundle_size?: InputMaybe; - min_delegation?: InputMaybe; - name?: InputMaybe; - operating_cost?: InputMaybe; - protocol?: InputMaybe; - protocol_validator_pools?: InputMaybe; - runtime?: InputMaybe; - start_key?: InputMaybe; - total_bundles?: InputMaybe; - total_funds?: InputMaybe; - upgrade_plan?: InputMaybe; - upload_interval?: InputMaybe; -}; - -/** Ordering options when selecting data from "pool". */ -export type Pool_Order_By = { - config?: InputMaybe; - current_compression_id?: InputMaybe; - current_index?: InputMaybe; - current_key?: InputMaybe; - current_storage_provider_id?: InputMaybe; - current_summary?: InputMaybe; - disabled?: InputMaybe; - funders?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - logo?: InputMaybe; - max_bundle_size?: InputMaybe; - min_delegation?: InputMaybe; - name?: InputMaybe; - operating_cost?: InputMaybe; - protocol?: InputMaybe; - protocol_validator_pools_aggregate?: InputMaybe; - runtime?: InputMaybe; - start_key?: InputMaybe; - total_bundles?: InputMaybe; - total_funds?: InputMaybe; - upgrade_plan?: InputMaybe; - upload_interval?: InputMaybe; -}; - -/** select columns of table "pool" */ -export enum Pool_Select_Column { - /** column name */ - Config = 'config', - /** column name */ - CurrentCompressionId = 'current_compression_id', - /** column name */ - CurrentIndex = 'current_index', - /** column name */ - CurrentKey = 'current_key', - /** column name */ - CurrentStorageProviderId = 'current_storage_provider_id', - /** column name */ - CurrentSummary = 'current_summary', - /** column name */ - Disabled = 'disabled', - /** column name */ - Funders = 'funders', - /** column name */ - Height = 'height', - /** column name */ - Id = 'id', - /** column name */ - Logo = 'logo', - /** column name */ - MaxBundleSize = 'max_bundle_size', - /** column name */ - MinDelegation = 'min_delegation', - /** column name */ - Name = 'name', - /** column name */ - OperatingCost = 'operating_cost', - /** column name */ - Protocol = 'protocol', - /** column name */ - Runtime = 'runtime', - /** column name */ - StartKey = 'start_key', - /** column name */ - TotalBundles = 'total_bundles', - /** column name */ - TotalFunds = 'total_funds', - /** column name */ - UpgradePlan = 'upgrade_plan', - /** column name */ - UploadInterval = 'upload_interval' -} - /** columns and relationships of "pre_commit" */ export type Pre_Commit = { __typename?: 'pre_commit'; @@ -3248,8 +3240,6 @@ export type Protocol_Validator_Pool = { pool: Scalars['String']; /** An object relationship */ protocol_validator?: Maybe; - /** An object relationship */ - stakers_pool: Pool; validator_address: Scalars['String']; }; @@ -3286,7 +3276,6 @@ export type Protocol_Validator_Pool_Bool_Exp = { id?: InputMaybe; pool?: InputMaybe; protocol_validator?: InputMaybe; - stakers_pool?: InputMaybe; validator_address?: InputMaybe; }; @@ -3318,7 +3307,6 @@ export type Protocol_Validator_Pool_Order_By = { id?: InputMaybe; pool?: InputMaybe; protocol_validator?: InputMaybe; - stakers_pool?: InputMaybe; validator_address?: InputMaybe; }; @@ -3447,18 +3435,24 @@ export type Query_Root = { inflation: Array; /** fetch data from the table: "message" */ message: Array; + /** fetch data from the table: "message_type" */ + message_type: Array; + /** fetch aggregated fields from the table: "message_type" */ + message_type_aggregate: Message_Type_Aggregate; /** execute function "messages_by_address" which returns "message" */ messages_by_address: Array; + /** execute function "messages_by_type" which returns "message" */ + messages_by_type: Array; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch data from the table: "modules" */ modules: Array; /** fetch data from the table: "modules" using primary key columns */ modules_by_pk?: Maybe; - /** fetch data from the table: "pool" */ - pool: Array; - /** fetch data from the table: "pool" using primary key columns */ - pool_by_pk?: Maybe; /** fetch data from the table: "pre_commit" */ pre_commit: Array; /** fetch aggregated fields from the table: "pre_commit" */ @@ -3527,6 +3521,8 @@ export type Query_Root = { token_unit: Array; /** fetch data from the table: "transaction" */ transaction: Array; + /** execute function "transactions_by_type" which returns "message" */ + transactions_by_type: Array; /** fetch data from the table: "validator" */ validator: Array; /** fetch data from the table: "validator" using primary key columns */ @@ -3815,6 +3811,24 @@ export type Query_RootMessageArgs = { }; +export type Query_RootMessage_TypeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessage_Type_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMessages_By_AddressArgs = { args: Messages_By_Address_Args; distinct_on?: InputMaybe>; @@ -3825,6 +3839,36 @@ export type Query_RootMessages_By_AddressArgs = { }; +export type Query_RootMessages_By_TypeArgs = { + args: Messages_By_Type_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -3848,20 +3892,6 @@ export type Query_RootModules_By_PkArgs = { }; -export type Query_RootPoolArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootPool_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Query_RootPre_CommitArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4136,6 +4166,16 @@ export type Query_RootTransactionArgs = { }; +export type Query_RootTransactions_By_TypeArgs = { + args: Transactions_By_Type_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootValidatorArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4638,18 +4678,24 @@ export type Subscription_Root = { inflation: Array; /** fetch data from the table: "message" */ message: Array; + /** fetch data from the table: "message_type" */ + message_type: Array; + /** fetch aggregated fields from the table: "message_type" */ + message_type_aggregate: Message_Type_Aggregate; /** execute function "messages_by_address" which returns "message" */ messages_by_address: Array; + /** execute function "messages_by_type" which returns "message" */ + messages_by_type: Array; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch data from the table: "modules" */ modules: Array; /** fetch data from the table: "modules" using primary key columns */ modules_by_pk?: Maybe; - /** fetch data from the table: "pool" */ - pool: Array; - /** fetch data from the table: "pool" using primary key columns */ - pool_by_pk?: Maybe; /** fetch data from the table: "pre_commit" */ pre_commit: Array; /** fetch aggregated fields from the table: "pre_commit" */ @@ -4718,6 +4764,8 @@ export type Subscription_Root = { token_unit: Array; /** fetch data from the table: "transaction" */ transaction: Array; + /** execute function "transactions_by_type" which returns "message" */ + transactions_by_type: Array; /** fetch data from the table: "validator" */ validator: Array; /** fetch data from the table: "validator" using primary key columns */ @@ -4920,6 +4968,24 @@ export type Subscription_RootMessageArgs = { }; +export type Subscription_RootMessage_TypeArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessage_Type_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMessages_By_AddressArgs = { args: Messages_By_Address_Args; distinct_on?: InputMaybe>; @@ -4930,6 +4996,36 @@ export type Subscription_RootMessages_By_AddressArgs = { }; +export type Subscription_RootMessages_By_TypeArgs = { + args: Messages_By_Type_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4953,20 +5049,6 @@ export type Subscription_RootModules_By_PkArgs = { }; -export type Subscription_RootPoolArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootPool_By_PkArgs = { - id: Scalars['Int']; -}; - - export type Subscription_RootPre_CommitArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -5241,6 +5323,16 @@ export type Subscription_RootTransactionArgs = { }; +export type Subscription_RootTransactions_By_TypeArgs = { + args: Transactions_By_Type_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootValidatorArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6067,6 +6159,12 @@ export type Transaction_Variance_Order_By = { height?: InputMaybe; }; +export type Transactions_By_Type_Args = { + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + /** columns and relationships of "validator" */ export type Validator = { __typename?: 'validator'; @@ -7677,12 +7775,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -7726,11 +7866,6 @@ export type CustomValidatorQueryVariables = Exact<{ export type CustomValidatorQuery = { validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, avatar_url?: string | null, validator_address: string, website?: string | null, details?: string | null }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -9180,12 +9315,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -9194,11 +9325,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -9206,15 +9408,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address - consensusAddress: consensus_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -9223,40 +9551,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-kyve/src/screens/home/components/hero/components/online_voting_power/hooks.ts b/apps/web-kyve/src/screens/home/components/hero/components/online_voting_power/hooks.ts deleted file mode 100644 index 4858cde565..0000000000 --- a/apps/web-kyve/src/screens/home/components/hero/components/online_voting_power/hooks.ts +++ /dev/null @@ -1,54 +0,0 @@ -import * as R from 'ramda'; -import { useCallback, useState } from 'react'; -import { OnlineVotingPowerQuery, useOnlineVotingPowerQuery } from '@/graphql/types/general_types'; - -type OnlineVotingPowerState = { - votingPower: number; - totalVotingPower: number; - activeValidators: number; -}; - -const initialState: OnlineVotingPowerState = { - votingPower: 0, - totalVotingPower: 0, - activeValidators: 0, -}; - -const formatOnlineVotingPower = (data: OnlineVotingPowerQuery) => { - const votingPower = data?.validatorVotingPowerAggregate?.aggregate?.sum?.votingPower ?? 0; - const bonded = data?.stakingPool?.[0]?.bonded ?? 0; - const activeValidators = data?.activeTotal?.aggregate?.count ?? 0; - - return { - activeValidators, - votingPower, - totalVotingPower: Number(bonded), - }; -}; - -export const useOnlineVotingPower = () => { - const [state, setState] = useState(initialState); - - const handleSetState = useCallback( - (stateChange: (prevState: OnlineVotingPowerState) => OnlineVotingPowerState) => { - setState(prevState => { - const newState = stateChange(prevState); - return R.equals(prevState, newState) ? prevState : newState; - }); - }, - [] - ); - - useOnlineVotingPowerQuery({ - onCompleted: data => { - handleSetState(prevState => ({ - ...prevState, - ...formatOnlineVotingPower(data), - })); - }, - }); - - return { - state, - }; -}; diff --git a/apps/web-likecoin/src/graphql/general/validator_details.graphql b/apps/web-likecoin/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-likecoin/src/graphql/general/validator_details.graphql +++ b/apps/web-likecoin/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-likecoin/src/graphql/types/general_types.ts b/apps/web-likecoin/src/graphql/types/general_types.ts index c977dd880a..f0489638f5 100644 --- a/apps/web-likecoin/src/graphql/types/general_types.ts +++ b/apps/web-likecoin/src/graphql/types/general_types.ts @@ -26,6 +26,7 @@ export type Scalars = { numeric: any; smallint: any; timestamp: any; + timestamptz: any; }; export type ActionAddress = { @@ -2871,6 +2872,8 @@ export type Message = { partition_id: Scalars['bigint']; /** An object relationship */ transaction?: Maybe; + /** An object relationship */ + transactionByPartitionIdTransactionHash?: Maybe; transaction_hash: Scalars['String']; type: Scalars['String']; value: Scalars['jsonb']; @@ -2912,6 +2915,21 @@ export type Message_Aggregate_FieldsCountArgs = { distinct?: InputMaybe; }; +/** order by aggregate values of table "message" */ +export type Message_Aggregate_Order_By = { + avg?: InputMaybe; + count?: InputMaybe; + max?: InputMaybe; + min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; +}; + /** aggregate avg on columns */ export type Message_Avg_Fields = { __typename?: 'message_avg_fields'; @@ -2920,6 +2938,13 @@ export type Message_Avg_Fields = { partition_id?: Maybe; }; +/** order by avg() on columns of table "message" */ +export type Message_Avg_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "message". All fields are combined with a logical 'AND'. */ export type Message_Bool_Exp = { _and?: InputMaybe>; @@ -2930,6 +2955,7 @@ export type Message_Bool_Exp = { involved_accounts_addresses?: InputMaybe<_Text_Comparison_Exp>; partition_id?: InputMaybe; transaction?: InputMaybe; + transactionByPartitionIdTransactionHash?: InputMaybe; transaction_hash?: InputMaybe; type?: InputMaybe; value?: InputMaybe; @@ -2945,6 +2971,15 @@ export type Message_Max_Fields = { type?: Maybe; }; +/** order by max() on columns of table "message" */ +export type Message_Max_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; + transaction_hash?: InputMaybe; + type?: InputMaybe; +}; + /** aggregate min on columns */ export type Message_Min_Fields = { __typename?: 'message_min_fields'; @@ -2955,6 +2990,15 @@ export type Message_Min_Fields = { type?: Maybe; }; +/** order by min() on columns of table "message" */ +export type Message_Min_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; + transaction_hash?: InputMaybe; + type?: InputMaybe; +}; + /** Ordering options when selecting data from "message". */ export type Message_Order_By = { height?: InputMaybe; @@ -2962,6 +3006,7 @@ export type Message_Order_By = { involved_accounts_addresses?: InputMaybe; partition_id?: InputMaybe; transaction?: InputMaybe; + transactionByPartitionIdTransactionHash?: InputMaybe; transaction_hash?: InputMaybe; type?: InputMaybe; value?: InputMaybe; @@ -2993,6 +3038,13 @@ export type Message_Stddev_Fields = { partition_id?: Maybe; }; +/** order by stddev() on columns of table "message" */ +export type Message_Stddev_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + /** aggregate stddev_pop on columns */ export type Message_Stddev_Pop_Fields = { __typename?: 'message_stddev_pop_fields'; @@ -3001,6 +3053,13 @@ export type Message_Stddev_Pop_Fields = { partition_id?: Maybe; }; +/** order by stddev_pop() on columns of table "message" */ +export type Message_Stddev_Pop_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + /** aggregate stddev_samp on columns */ export type Message_Stddev_Samp_Fields = { __typename?: 'message_stddev_samp_fields'; @@ -3009,6 +3068,13 @@ export type Message_Stddev_Samp_Fields = { partition_id?: Maybe; }; +/** order by stddev_samp() on columns of table "message" */ +export type Message_Stddev_Samp_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + /** aggregate sum on columns */ export type Message_Sum_Fields = { __typename?: 'message_sum_fields'; @@ -3017,6 +3083,13 @@ export type Message_Sum_Fields = { partition_id?: Maybe; }; +/** order by sum() on columns of table "message" */ +export type Message_Sum_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + /** aggregate var_pop on columns */ export type Message_Var_Pop_Fields = { __typename?: 'message_var_pop_fields'; @@ -3025,6 +3098,13 @@ export type Message_Var_Pop_Fields = { partition_id?: Maybe; }; +/** order by var_pop() on columns of table "message" */ +export type Message_Var_Pop_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + /** aggregate var_samp on columns */ export type Message_Var_Samp_Fields = { __typename?: 'message_var_samp_fields'; @@ -3033,6 +3113,13 @@ export type Message_Var_Samp_Fields = { partition_id?: Maybe; }; +/** order by var_samp() on columns of table "message" */ +export type Message_Var_Samp_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + /** aggregate variance on columns */ export type Message_Variance_Fields = { __typename?: 'message_variance_fields'; @@ -3041,6 +3128,13 @@ export type Message_Variance_Fields = { partition_id?: Maybe; }; +/** order by variance() on columns of table "message" */ +export type Message_Variance_Order_By = { + height?: InputMaybe; + index?: InputMaybe; + partition_id?: InputMaybe; +}; + export type Messages_By_Address_Args = { addresses?: InputMaybe; limit?: InputMaybe; @@ -3739,6 +3833,7 @@ export type Proposal_Deposit = { /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; + timestamp?: Maybe; }; /** aggregated selection of "proposal_deposit" */ @@ -3811,6 +3906,7 @@ export type Proposal_Deposit_Bool_Exp = { height?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; }; /** aggregate max on columns */ @@ -3819,6 +3915,7 @@ export type Proposal_Deposit_Max_Fields = { depositor_address?: Maybe; height?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; }; /** order by max() on columns of table "proposal_deposit" */ @@ -3826,6 +3923,7 @@ export type Proposal_Deposit_Max_Order_By = { depositor_address?: InputMaybe; height?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; }; /** aggregate min on columns */ @@ -3834,6 +3932,7 @@ export type Proposal_Deposit_Min_Fields = { depositor_address?: Maybe; height?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; }; /** order by min() on columns of table "proposal_deposit" */ @@ -3841,6 +3940,7 @@ export type Proposal_Deposit_Min_Order_By = { depositor_address?: InputMaybe; height?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; }; /** Ordering options when selecting data from "proposal_deposit". */ @@ -3852,6 +3952,7 @@ export type Proposal_Deposit_Order_By = { height?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; }; /** select columns of table "proposal_deposit" */ @@ -3863,7 +3964,9 @@ export enum Proposal_Deposit_Select_Column { /** column name */ Height = 'height', /** column name */ - ProposalId = 'proposal_id' + ProposalId = 'proposal_id', + /** column name */ + Timestamp = 'timestamp' } /** aggregate stddev on columns */ @@ -4854,6 +4957,7 @@ export type Proposal_Vote = { /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; + timestamp?: Maybe; voter_address: Scalars['String']; }; @@ -4926,6 +5030,7 @@ export type Proposal_Vote_Bool_Exp = { option?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -4935,6 +5040,7 @@ export type Proposal_Vote_Max_Fields = { height?: Maybe; option?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; voter_address?: Maybe; }; @@ -4943,6 +5049,7 @@ export type Proposal_Vote_Max_Order_By = { height?: InputMaybe; option?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -4952,6 +5059,7 @@ export type Proposal_Vote_Min_Fields = { height?: Maybe; option?: Maybe; proposal_id?: Maybe; + timestamp?: Maybe; voter_address?: Maybe; }; @@ -4960,6 +5068,7 @@ export type Proposal_Vote_Min_Order_By = { height?: InputMaybe; option?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -4971,6 +5080,7 @@ export type Proposal_Vote_Order_By = { option?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; + timestamp?: InputMaybe; voter_address?: InputMaybe; }; @@ -4983,6 +5093,8 @@ export enum Proposal_Vote_Select_Column { /** column name */ ProposalId = 'proposal_id', /** column name */ + Timestamp = 'timestamp', + /** column name */ VoterAddress = 'voter_address' } @@ -5241,6 +5353,8 @@ export type Query_Root = { supply: Array; /** fetch aggregated fields from the table: "supply" */ supply_aggregate: Supply_Aggregate; + /** fetch data from the table: "supply" using primary key columns */ + supply_by_pk?: Maybe; /** fetch data from the table: "token" */ token: Array; /** fetch aggregated fields from the table: "token" */ @@ -6021,6 +6135,11 @@ export type Query_RootSupply_AggregateArgs = { }; +export type Query_RootSupply_By_PkArgs = { + one_row_id: Scalars['Boolean']; +}; + + export type Query_RootTokenArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6598,6 +6717,8 @@ export type Staking_Pool = { bonded_tokens: Scalars['String']; height: Scalars['bigint']; not_bonded_tokens: Scalars['String']; + staked_not_bonded_tokens?: Maybe; + unbonding_tokens?: Maybe; }; /** aggregated selection of "staking_pool" */ @@ -6644,6 +6765,8 @@ export type Staking_Pool_Bool_Exp = { bonded_tokens?: InputMaybe; height?: InputMaybe; not_bonded_tokens?: InputMaybe; + staked_not_bonded_tokens?: InputMaybe; + unbonding_tokens?: InputMaybe; }; /** aggregate max on columns */ @@ -6652,6 +6775,8 @@ export type Staking_Pool_Max_Fields = { bonded_tokens?: Maybe; height?: Maybe; not_bonded_tokens?: Maybe; + staked_not_bonded_tokens?: Maybe; + unbonding_tokens?: Maybe; }; /** aggregate min on columns */ @@ -6660,6 +6785,8 @@ export type Staking_Pool_Min_Fields = { bonded_tokens?: Maybe; height?: Maybe; not_bonded_tokens?: Maybe; + staked_not_bonded_tokens?: Maybe; + unbonding_tokens?: Maybe; }; /** Ordering options when selecting data from "staking_pool". */ @@ -6667,6 +6794,8 @@ export type Staking_Pool_Order_By = { bonded_tokens?: InputMaybe; height?: InputMaybe; not_bonded_tokens?: InputMaybe; + staked_not_bonded_tokens?: InputMaybe; + unbonding_tokens?: InputMaybe; }; /** select columns of table "staking_pool" */ @@ -6676,7 +6805,11 @@ export enum Staking_Pool_Select_Column { /** column name */ Height = 'height', /** column name */ - NotBondedTokens = 'not_bonded_tokens' + NotBondedTokens = 'not_bonded_tokens', + /** column name */ + StakedNotBondedTokens = 'staked_not_bonded_tokens', + /** column name */ + UnbondingTokens = 'unbonding_tokens' } /** aggregate stddev on columns */ @@ -6873,6 +7006,8 @@ export type Subscription_Root = { supply: Array; /** fetch aggregated fields from the table: "supply" */ supply_aggregate: Supply_Aggregate; + /** fetch data from the table: "supply" using primary key columns */ + supply_by_pk?: Maybe; /** fetch data from the table: "token" */ token: Array; /** fetch aggregated fields from the table: "token" */ @@ -7567,6 +7702,11 @@ export type Subscription_RootSupply_AggregateArgs = { }; +export type Subscription_RootSupply_By_PkArgs = { + one_row_id: Scalars['Boolean']; +}; + + export type Subscription_RootTokenArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7866,8 +8006,9 @@ export type Subscription_RootVesting_Period_AggregateArgs = { /** columns and relationships of "supply" */ export type Supply = { __typename?: 'supply'; - coins: Scalars['_coin']; + coins?: Maybe; height: Scalars['bigint']; + one_row_id: Scalars['Boolean']; }; /** aggregated selection of "supply" */ @@ -7913,6 +8054,7 @@ export type Supply_Bool_Exp = { _or?: InputMaybe>; coins?: InputMaybe<_Coin_Comparison_Exp>; height?: InputMaybe; + one_row_id?: InputMaybe; }; /** aggregate max on columns */ @@ -7931,6 +8073,7 @@ export type Supply_Min_Fields = { export type Supply_Order_By = { coins?: InputMaybe; height?: InputMaybe; + one_row_id?: InputMaybe; }; /** select columns of table "supply" */ @@ -7938,7 +8081,9 @@ export enum Supply_Select_Column { /** column name */ Coins = 'coins', /** column name */ - Height = 'height' + Height = 'height', + /** column name */ + OneRowId = 'one_row_id' } /** aggregate stddev on columns */ @@ -7996,6 +8141,19 @@ export type Timestamp_Comparison_Exp = { _nin?: InputMaybe>; }; +/** Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'. */ +export type Timestamptz_Comparison_Exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + /** columns and relationships of "token" */ export type Token = { __typename?: 'token'; @@ -8845,6 +9003,10 @@ export type Transaction = { logs?: Maybe; memo?: Maybe; messages: Scalars['jsonb']; + /** An array relationship */ + messagesByTransactionHashPartitionId: Array; + /** An aggregate relationship */ + messagesByTransactionHashPartitionId_aggregate: Message_Aggregate; partition_id: Scalars['bigint']; raw_log?: Maybe; signatures: Scalars['_text']; @@ -8871,6 +9033,26 @@ export type TransactionMessagesArgs = { }; +/** columns and relationships of "transaction" */ +export type TransactionMessagesByTransactionHashPartitionIdArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +/** columns and relationships of "transaction" */ +export type TransactionMessagesByTransactionHashPartitionId_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + /** columns and relationships of "transaction" */ export type TransactionSigner_InfosArgs = { path?: InputMaybe; @@ -8952,6 +9134,7 @@ export type Transaction_Bool_Exp = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; + messagesByTransactionHashPartitionId?: InputMaybe; partition_id?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe<_Text_Comparison_Exp>; @@ -9016,6 +9199,7 @@ export type Transaction_Order_By = { logs?: InputMaybe; memo?: InputMaybe; messages?: InputMaybe; + messagesByTransactionHashPartitionId_aggregate?: InputMaybe; partition_id?: InputMaybe; raw_log?: InputMaybe; signatures?: InputMaybe; @@ -11464,7 +11648,7 @@ export type MarketDataQueryVariables = Exact<{ }>; -export type MarketDataQuery = { communityPool: Array<{ __typename?: 'community_pool', coins: any }>, inflation: Array<{ __typename?: 'inflation', value: any }>, tokenPrice: Array<{ __typename?: 'token_price', price: any, marketCap: any }>, supply: Array<{ __typename?: 'supply', coins: any }>, bondedTokens: Array<{ __typename?: 'staking_pool', bonded_tokens: string }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }> }; +export type MarketDataQuery = { communityPool: Array<{ __typename?: 'community_pool', coins: any }>, inflation: Array<{ __typename?: 'inflation', value: any }>, tokenPrice: Array<{ __typename?: 'token_price', price: any, marketCap: any }>, supply: Array<{ __typename?: 'supply', coins?: any | null }>, bondedTokens: Array<{ __typename?: 'staking_pool', bonded_tokens: string }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }> }; export type GetMessagesByAddressQueryVariables = Exact<{ address?: InputMaybe; @@ -11540,7 +11724,7 @@ export type TokenPriceHistoryQuery = { tokenPrice: Array<{ __typename?: 'token_p export type TokenomicsQueryVariables = Exact<{ [key: string]: never; }>; -export type TokenomicsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, stakingPool: Array<{ __typename?: 'staking_pool', bonded: string, unbonded: string }>, supply: Array<{ __typename?: 'supply', coins: any }> }; +export type TokenomicsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, stakingPool: Array<{ __typename?: 'staking_pool', bonded: string, unbonded: string }>, supply: Array<{ __typename?: 'supply', coins?: any | null }> }; export type TransactionDetailsQueryVariables = Exact<{ hash?: InputMaybe; @@ -11579,12 +11763,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11621,11 +11847,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13076,12 +13297,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13090,11 +13307,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13102,14 +13390,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13118,40 +13533,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-likecoin/src/screens/validator_details/components/validator_overview/index.tsx b/apps/web-likecoin/src/screens/validator_details/components/validator_overview/index.tsx deleted file mode 100644 index 6eb6cc9050..0000000000 --- a/apps/web-likecoin/src/screens/validator_details/components/validator_overview/index.tsx +++ /dev/null @@ -1,178 +0,0 @@ -import Box from '@/components/box'; -import ConditionExplanation from '@/components/condition_explanation'; -import InfoPopover from '@/components/info_popover'; -import Tag from '@/components/tag'; -import { useAddress } from '@/screens/validator_details/components/validator_overview/hooks'; -import useStyles from '@/screens/validator_details/components/validator_overview/styles'; -import { getCondition } from '@/screens/validator_details/components/validator_overview/utils'; -import type { OverviewType, StatusType } from '@/screens/validator_details/types'; -import { useDisplayStyles } from '@/styles/useSharedStyles'; -import { getMiddleEllipsis } from '@/utils/get_middle_ellipsis'; -import { getValidatorStatus } from '@/utils/get_validator_status'; -import { ACCOUNT_DETAILS } from '@/utils/go_to_page'; -import Divider from '@mui/material/Divider'; -import Typography from '@mui/material/Typography'; -import Big from 'big.js'; -import useAppTranslation from '@/hooks/useAppTranslation'; -import Link from 'next/link'; -import numeral from 'numeral'; -import { FC } from 'react'; -import CopyIcon from 'shared-utils/assets/icon-copy.svg'; - -type ValidatorOverviewProps = { - className?: string; - status: StatusType; - overview: OverviewType; -}; - -const ValidatorOverview: FC = ({ status, overview, className }) => { - const { classes, cx } = useStyles(); - const display = useDisplayStyles().classes; - const { t } = useAppTranslation('validators'); - const { handleCopyToClipboard } = useAddress(t); - - const statusTheme = getValidatorStatus(status.status, status.jailed, status.tombstoned); - const condition = getCondition(status.condition, status.status); - - const statusItems = [ - { - key: 'status', - name: ( - - {t('status')} - - ), - value: ( - - ), - }, - { - key: 'commission', - name: ( - - {t('commission')} - - ), - value: ( - - {`${numeral(status.commission * 100).format('0.00')}%`} - - ), - }, - { - key: 'condition', - name: ( - - {t('condition')} - } /> - - ), - value: - status.status === 3 ? ( -
- - - {t('missedBlockCounter', { - amount: numeral(status.missedBlockCounter).format('0,0'), - })} - - - {t('signedBlockWindow', { - amount: numeral(status.signedBlockWindow).format('0,0'), - })} - - - } - display={ - - {t(condition)} - - } - /> -
- ) : ( - - {t(condition)} - - ), - }, - { - key: 'maxRate', - name: ( - - {t('maxRate')} - - ), - value: ( - - {Big(status.maxRate)?.times(100).toFixed(2)}% - - ), - }, - ]; - - return ( - -
-
- - {t('operatorAddress')} - -
- handleCopyToClipboard(overview.operatorAddress)} - className={classes.actionIcons} - /> - - {overview.operatorAddress} - - {getMiddleEllipsis(overview.operatorAddress, { - beginning: 15, - ending: 5, - })} - - -
-
- -
- - {t('selfDelegateAddress')} - -
- handleCopyToClipboard(overview.selfDelegateAddress)} - /> - - {overview.selfDelegateAddress} - - {getMiddleEllipsis(overview.selfDelegateAddress, { - beginning: 15, - ending: 5, - })} - - -
-
-
- -
- {statusItems.map((x) => ( -
- {x.name} - {x.value} -
- ))} -
-
- ); -}; - -export default ValidatorOverview; diff --git a/apps/web-nym/src/graphql/general/validator_details.graphql b/apps/web-nym/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-nym/src/graphql/general/validator_details.graphql +++ b/apps/web-nym/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-nym/src/graphql/types/general_types.ts b/apps/web-nym/src/graphql/types/general_types.ts index a13260a0a4..f7cc157d19 100644 --- a/apps/web-nym/src/graphql/types/general_types.ts +++ b/apps/web-nym/src/graphql/types/general_types.ts @@ -12088,12 +12088,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -12130,11 +12172,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13579,12 +13616,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13593,11 +13626,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13605,14 +13709,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13621,40 +13852,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-osmosis/src/graphql/general/validator_details.graphql b/apps/web-osmosis/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-osmosis/src/graphql/general/validator_details.graphql +++ b/apps/web-osmosis/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-osmosis/src/graphql/types/general_types.ts b/apps/web-osmosis/src/graphql/types/general_types.ts index aca260939f..de9da2e3ee 100644 --- a/apps/web-osmosis/src/graphql/types/general_types.ts +++ b/apps/web-osmosis/src/graphql/types/general_types.ts @@ -3098,6 +3098,29 @@ export type Messages_By_Single_Address_Args = { types?: InputMaybe; }; +export type Messages_By_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_Get_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; +}; + +export type Messages_Get_Types_New_Args = { + addresses?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; +}; + +export type Messages_Types_By_Address_Args = { + addresses?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; @@ -5178,6 +5201,22 @@ export type Query_Root = { messages_by_single_address: Array; /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_by_types" and query aggregates on result of table type "message" */ + messages_by_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types_new" which returns "message" */ + messages_get_types_new: Array; + /** execute function "messages_get_types_new" and query aggregates on result of table type "message" */ + messages_get_types_new_aggregate: Message_Aggregate; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; + /** execute function "messages_types_by_address" and query aggregates on result of table type "message" */ + messages_types_by_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -5750,6 +5789,86 @@ export type Query_RootMessages_By_Single_Address_AggregateArgs = { }; +export type Query_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Types_AggregateArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_NewArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_New_AggregateArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Types_By_Address_AggregateArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7028,6 +7147,22 @@ export type Subscription_Root = { messages_by_single_address: Array; /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_by_types" which returns "message" */ + messages_by_types: Array; + /** execute function "messages_by_types" and query aggregates on result of table type "message" */ + messages_by_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; + /** execute function "messages_get_types_new" which returns "message" */ + messages_get_types_new: Array; + /** execute function "messages_get_types_new" and query aggregates on result of table type "message" */ + messages_get_types_new_aggregate: Message_Aggregate; + /** execute function "messages_types_by_address" which returns "message" */ + messages_types_by_address: Array; + /** execute function "messages_types_by_address" and query aggregates on result of table type "message" */ + messages_types_by_address_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -7501,6 +7636,86 @@ export type Subscription_RootMessages_By_Single_Address_AggregateArgs = { }; +export type Subscription_RootMessages_By_TypesArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Types_AggregateArgs = { + args: Messages_By_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_NewArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_New_AggregateArgs = { + args: Messages_Get_Types_New_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Types_By_AddressArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Types_By_Address_AggregateArgs = { + args: Messages_Types_By_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -12719,12 +12934,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -14210,12 +14467,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -14224,11 +14477,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -14236,14 +14560,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -14252,40 +14703,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-persistence/src/chain.json b/apps/web-persistence/src/chain.json index 2f610c62b8..b14f05b612 100644 --- a/apps/web-persistence/src/chain.json +++ b/apps/web-persistence/src/chain.json @@ -3,7 +3,8 @@ "title": "Persistence Block Explorer", "extra": { "profile": true, - "graphqlWs": true + "graphqlWs": true, + "votingPowerExponent": 6 }, "previewImage": "https://s3.bigdipper.live/persistence.png", "themes": { diff --git a/apps/web-persistence/src/graphql/general/validator_details.graphql b/apps/web-persistence/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-persistence/src/graphql/general/validator_details.graphql +++ b/apps/web-persistence/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-persistence/src/graphql/types/general_types.ts b/apps/web-persistence/src/graphql/types/general_types.ts index 3217092227..56ec61993d 100644 --- a/apps/web-persistence/src/graphql/types/general_types.ts +++ b/apps/web-persistence/src/graphql/types/general_types.ts @@ -7873,12 +7873,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -7915,11 +7957,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -9384,12 +9421,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -9398,11 +9431,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -9410,14 +9514,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -9426,40 +9657,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-persistence/src/screens/account_details/index.tsx b/apps/web-persistence/src/screens/account_details/index.tsx index 6d28e31fd3..04930635f5 100644 --- a/apps/web-persistence/src/screens/account_details/index.tsx +++ b/apps/web-persistence/src/screens/account_details/index.tsx @@ -8,13 +8,15 @@ import OtherTokens from '@/screens/account_details/components/other_tokens'; import Overview from '@/screens/account_details/components/overview'; import Staking from '@/screens/account_details/components/staking'; import Transactions from '@/screens/account_details/components/transactions'; -import { useAccountDetails } from '@/screens/account_details/hooks'; +import { useAccountProfileDetails, useAccountBalance } from '@/screens/account_details/hooks'; import useStyles from '@/screens/account_details/styles'; const AccountDetails = () => { const { t } = useAppTranslation('accounts'); const { classes } = useStyles(); - const { state } = useAccountDetails(); + const { profileState } = useAccountProfileDetails(); + const accountBalance = useAccountBalance(); + const { state: accountBalanceState } = accountBalance; return ( <> @@ -25,35 +27,44 @@ const AccountDetails = () => { }} /> - + - {!!state.desmosProfile && ( + {!!profileState.desmosProfile && ( )} - - - - - + + {!profileState.loading ? ( + <> + + + + ) : null} + {!profileState.loading && !accountBalanceState.loading ? ( + <> + + + + ) : null} diff --git a/apps/web-provenance/src/graphql/general/validator_details.graphql b/apps/web-provenance/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-provenance/src/graphql/general/validator_details.graphql +++ b/apps/web-provenance/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-provenance/src/graphql/types/general_types.ts b/apps/web-provenance/src/graphql/types/general_types.ts index 3adc17a032..22e4c746ad 100644 --- a/apps/web-provenance/src/graphql/types/general_types.ts +++ b/apps/web-provenance/src/graphql/types/general_types.ts @@ -12099,12 +12099,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -12141,11 +12183,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13645,12 +13682,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13659,11 +13692,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13671,14 +13775,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13687,40 +13918,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-quasar/src/graphql/general/validator_details.graphql b/apps/web-quasar/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-quasar/src/graphql/general/validator_details.graphql +++ b/apps/web-quasar/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-quasar/src/graphql/types/general_types.ts b/apps/web-quasar/src/graphql/types/general_types.ts index 15a88d79a6..3fbacc0582 100644 --- a/apps/web-quasar/src/graphql/types/general_types.ts +++ b/apps/web-quasar/src/graphql/types/general_types.ts @@ -7649,12 +7649,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -7691,11 +7733,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -9142,12 +9179,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -9156,11 +9189,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -9168,14 +9272,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -9184,40 +9415,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-quicksilver/src/graphql/general/validator_details.graphql b/apps/web-quicksilver/src/graphql/general/validator_details.graphql index cc501f82f6..7f249941a6 100644 --- a/apps/web-quicksilver/src/graphql/general/validator_details.graphql +++ b/apps/web-quicksilver/src/graphql/general/validator_details.graphql @@ -23,41 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address - consensusAddress: consensus_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-quicksilver/src/graphql/types/general_types.ts b/apps/web-quicksilver/src/graphql/types/general_types.ts index 9c1a60b9ce..4b99e411ce 100644 --- a/apps/web-quicksilver/src/graphql/types/general_types.ts +++ b/apps/web-quicksilver/src/graphql/types/general_types.ts @@ -7632,12 +7632,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -7681,11 +7723,6 @@ export type CustomValidatorQueryVariables = Exact<{ export type CustomValidatorQuery = { validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, avatar_url?: string | null, validator_address: string, website?: string | null, details?: string | null }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -9132,12 +9169,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -9146,11 +9179,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -9158,15 +9262,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address - consensusAddress: consensus_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -9175,40 +9405,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-regen/src/graphql/general/validator_details.graphql b/apps/web-regen/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-regen/src/graphql/general/validator_details.graphql +++ b/apps/web-regen/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-regen/src/graphql/types/general_types.ts b/apps/web-regen/src/graphql/types/general_types.ts index 725e55c53c..b8e7d251ae 100644 --- a/apps/web-regen/src/graphql/types/general_types.ts +++ b/apps/web-regen/src/graphql/types/general_types.ts @@ -11876,12 +11876,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11918,11 +11960,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13370,12 +13407,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13384,11 +13417,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13396,14 +13500,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13412,40 +13643,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-regen/src/screens/validator_details/hooks.ts b/apps/web-regen/src/screens/validator_details/hooks.ts deleted file mode 100644 index 5455230e9f..0000000000 --- a/apps/web-regen/src/screens/validator_details/hooks.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { useRouter } from 'next/router'; -import * as R from 'ramda'; -import { useCallback, useEffect, useState } from 'react'; -import chainConfig from '@/chainConfig'; -import { useValidatorDetailsQuery, ValidatorDetailsQuery } from '@/graphql/types/general_types'; -import { useDesmosProfile } from '@/hooks/use_desmos_profile'; -import { SlashingParams } from '@/models'; -import type { ValidatorDetailsState } from '@/screens/validator_details/types'; -import { formatToken } from '@/utils/format_token'; -import { getValidatorCondition } from '@/utils/get_validator_condition'; - -const { extra, votingPowerTokenUnit } = chainConfig(); - -const initialTokenDenom: TokenUnit = { - value: '0', - displayDenom: '', - baseDenom: '', - exponent: 0, -}; - -const initialState: ValidatorDetailsState = { - exists: true, - desmosProfile: null, - overview: { - validator: '', - operatorAddress: '', - selfDelegateAddress: '', - description: '', - website: '', - }, - status: { - status: 0, - jailed: false, - tombstoned: false, - condition: 0, - commission: 0, - missedBlockCounter: 0, - signedBlockWindow: 0, - maxRate: '0', - }, - votingPower: { - height: 0, - overall: initialTokenDenom, - self: 0, - }, -}; - -export const useValidatorDetails = () => { - const router = useRouter(); - const [state, setState] = useState(initialState); - - const handleSetState = useCallback( - (stateChange: (prevState: ValidatorDetailsState) => ValidatorDetailsState) => { - setState((prevState) => { - const newState = stateChange(prevState); - return R.equals(prevState, newState) ? prevState : newState; - }); - }, - [] - ); - - // ========================== - // Fetch Data - // ========================== - const { loading } = useValidatorDetailsQuery({ - variables: { - address: router.query.address as string, - }, - onCompleted: (data) => { - handleSetState((prevState) => ({ ...prevState, ...formatAccountQuery(data) })); - }, - }); - - // ========================== - // Desmos Profile - // ========================== - const { data: dataDesmosProfile, loading: loadingDesmosProfile } = useDesmosProfile({ - addresses: [state.overview.selfDelegateAddress], - skip: !extra.profile || !state.overview.selfDelegateAddress, - }); - useEffect( - () => - setState((prevState) => ({ - ...prevState, - desmosProfile: dataDesmosProfile?.[0], - loading: loadingDesmosProfile, - })), - [dataDesmosProfile, loadingDesmosProfile] - ); - - return { state, loading }; -}; - -// ============================ -// overview -// ============================ -const formatOverview = (data: ValidatorDetailsQuery) => { - const operatorAddress = data?.validator?.[0]?.validatorInfo?.operatorAddress ?? ''; - const selfDelegateAddress = data?.validator?.[0]?.validatorInfo?.selfDelegateAddress ?? ''; - const profile = { - validator: operatorAddress, - operatorAddress, - selfDelegateAddress, - description: data.validator[0]?.validatorDescriptions?.[0]?.details ?? '', - website: data.validator[0]?.validatorDescriptions?.[0]?.website ?? '', - }; - - return profile; -}; - -// ============================ -// status -// ============================ -const formatStatus = (data: ValidatorDetailsQuery) => { - const slashingParams = SlashingParams.fromJson(data?.slashingParams?.[0]?.params ?? {}); - const missedBlockCounter = - data.validator[0]?.validatorSigningInfos?.[0]?.missedBlocksCounter ?? 0; - const { signedBlockWindow } = slashingParams; - const condition = getValidatorCondition(signedBlockWindow, missedBlockCounter); - - const profile = { - status: data.validator[0]?.validatorStatuses?.[0]?.status ?? 3, - jailed: data.validator[0]?.validatorStatuses?.[0]?.jailed ?? false, - tombstoned: data.validator[0]?.validatorSigningInfos?.[0]?.tombstoned ?? false, - commission: data.validator[0]?.validatorCommissions?.[0]?.commission ?? 0, - condition, - missedBlockCounter, - signedBlockWindow, - maxRate: data?.validator?.[0]?.validatorInfo?.maxRate ?? '0', - }; - - return profile; -}; - -// ============================ -// votingPower -// ============================ -const formatVotingPower = (data: ValidatorDetailsQuery) => { - const selfVotingPower = - (data.validator[0]?.validatorVotingPowers?.[0]?.votingPower ?? 0) / - 10 ** (extra.votingPowerExponent ?? 0); - - const votingPower = { - self: selfVotingPower, - overall: formatToken(data?.stakingPool?.[0]?.bonded ?? 0, votingPowerTokenUnit), - height: data.validator[0]?.validatorVotingPowers?.[0]?.height ?? 0, - }; - - return votingPower; -}; - -function formatAccountQuery(data: ValidatorDetailsQuery) { - const stateChange: Partial = {}; - - if (!data.validator.length) { - stateChange.exists = false; - return stateChange; - } - - stateChange.overview = formatOverview(data); - stateChange.status = formatStatus(data); - stateChange.votingPower = formatVotingPower(data); - - return stateChange; -} diff --git a/apps/web-rizon/src/graphql/general/validator_details.graphql b/apps/web-rizon/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-rizon/src/graphql/general/validator_details.graphql +++ b/apps/web-rizon/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-rizon/src/graphql/types/general_types.ts b/apps/web-rizon/src/graphql/types/general_types.ts index 1cb0027360..4f9b1f2b37 100644 --- a/apps/web-rizon/src/graphql/types/general_types.ts +++ b/apps/web-rizon/src/graphql/types/general_types.ts @@ -11391,12 +11391,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -11433,11 +11475,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -12885,12 +12922,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -12899,11 +12932,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -12911,14 +13015,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -12927,40 +13158,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-stride/src/chain.json b/apps/web-stride/src/chain.json index 346ebb5f52..281a616d98 100644 --- a/apps/web-stride/src/chain.json +++ b/apps/web-stride/src/chain.json @@ -3,7 +3,8 @@ "title": "Stride Block Explorer", "extra": { "profile": true, - "graphqlWs": false + "graphqlWs": false, + "votingPowerExponent": 6 }, "previewImage": "https://s3.bigdipper.live/stride.png", "themes": { diff --git a/apps/web-stride/src/graphql/general/params.graphql b/apps/web-stride/src/graphql/general/params.graphql index b5415d40e3..322ead5a1f 100644 --- a/apps/web-stride/src/graphql/general/params.graphql +++ b/apps/web-stride/src/graphql/general/params.graphql @@ -11,9 +11,8 @@ query Params { distributionParams: distribution_params(limit: 1, order_by: {height: desc}) { params } - govParams: gov_params (limit: 1, order_by: {height: desc}) { - depositParams: deposit_params - tallyParams: tally_params - votingParams: voting_params + govParams: gov_params(limit: 1, order_by: {height: desc}) { + params + height } } diff --git a/apps/web-stride/src/graphql/general/proposal_details.graphql b/apps/web-stride/src/graphql/general/proposal_details.graphql index 82ddef911b..2f810101ee 100644 --- a/apps/web-stride/src/graphql/general/proposal_details.graphql +++ b/apps/web-stride/src/graphql/general/proposal_details.graphql @@ -7,7 +7,6 @@ query ProposalDetails($proposalId: Int) { content proposalId: id submitTime: submit_time - proposalType: proposal_type depositEndTime: deposit_end_time votingStartTime: voting_start_time votingEndTime: voting_end_time @@ -25,7 +24,7 @@ query ProposalDetailsTally($proposalId: Int) { bondedTokens: bonded_tokens } quorum: gov_params (limit: 1, order_by: {height: desc}) { - tallyParams: tally_params + tallyParams: params } } diff --git a/apps/web-stride/src/graphql/general/validator_details.graphql b/apps/web-stride/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-stride/src/graphql/general/validator_details.graphql +++ b/apps/web-stride/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-stride/src/graphql/types/general_types.ts b/apps/web-stride/src/graphql/types/general_types.ts index 9297126614..506f95f92f 100644 --- a/apps/web-stride/src/graphql/types/general_types.ts +++ b/apps/web-stride/src/graphql/types/general_types.ts @@ -21,20 +21,6 @@ export type Scalars = { _coin: any; _dec_coin: any; _text: any; - bdjuno_provider_ActionCoin: any; - bdjuno_provider_ActionDelegation: any; - bdjuno_provider_ActionPagination: any; - bdjuno_provider_ActionRedelegation: any; - bdjuno_provider_ActionUnbondingDelegation: any; - bdjuno_provider__coin: any; - bdjuno_provider__dec_coin: any; - bdjuno_provider__text: any; - bdjuno_provider_bigint: any; - bdjuno_provider_jsonb: any; - bdjuno_provider_numeric: any; - bdjuno_provider_smallint: any; - bdjuno_provider_timestamp: any; - bdjuno_provider_timestamptz: any; bigint: any; jsonb: any; numeric: any; @@ -509,9033 +495,6 @@ export type Average_Block_Time_Per_Minute_Stream_Cursor_Value_Input = { height?: InputMaybe; }; -export type Bdjuno_Provider_ActionAddress = { - __typename?: 'bdjuno_provider_ActionAddress'; - address: Scalars['String']; -}; - -export type Bdjuno_Provider_ActionBalance = { - __typename?: 'bdjuno_provider_ActionBalance'; - coins?: Maybe>>; -}; - -export type Bdjuno_Provider_ActionDelegationResponse = { - __typename?: 'bdjuno_provider_ActionDelegationResponse'; - delegations?: Maybe>>; - pagination?: Maybe; -}; - -export type Bdjuno_Provider_ActionDelegationReward = { - __typename?: 'bdjuno_provider_ActionDelegationReward'; - coins?: Maybe>>; - validator_address: Scalars['String']; -}; - -export type Bdjuno_Provider_ActionRedelegationResponse = { - __typename?: 'bdjuno_provider_ActionRedelegationResponse'; - pagination?: Maybe; - redelegations?: Maybe>>; -}; - -export type Bdjuno_Provider_ActionUnbondingDelegationResponse = { - __typename?: 'bdjuno_provider_ActionUnbondingDelegationResponse'; - pagination?: Maybe; - unbonding_delegations?: Maybe>>; -}; - -export type Bdjuno_Provider_ActionValidatorCommissionAmount = { - __typename?: 'bdjuno_provider_ActionValidatorCommissionAmount'; - coins?: Maybe>>; -}; - -export type Bdjuno_Provider_Boolean_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_Int_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_String_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _ilike?: InputMaybe; - _in?: InputMaybe>; - _iregex?: InputMaybe; - _is_null?: InputMaybe; - _like?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nilike?: InputMaybe; - _nin?: InputMaybe>; - _niregex?: InputMaybe; - _nlike?: InputMaybe; - _nregex?: InputMaybe; - _nsimilar?: InputMaybe; - _regex?: InputMaybe; - _similar?: InputMaybe; -}; - -export type Bdjuno_Provider__Coin_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider__Dec_Coin_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider__Text_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_Account = { - __typename?: 'bdjuno_provider_account'; - address: Scalars['String']; - feeGrantAllowancesByGranterAddress: Array; - feeGrantAllowancesByGranterAddress_aggregate: Bdjuno_Provider_Fee_Grant_Allowance_Aggregate; - fee_grant_allowances: Array; - fee_grant_allowances_aggregate: Bdjuno_Provider_Fee_Grant_Allowance_Aggregate; - proposal_deposits: Array; - proposal_deposits_aggregate: Bdjuno_Provider_Proposal_Deposit_Aggregate; - proposal_votes: Array; - proposal_votes_aggregate: Bdjuno_Provider_Proposal_Vote_Aggregate; - proposals: Array; - proposals_aggregate: Bdjuno_Provider_Proposal_Aggregate; - validator_infos: Array; - validator_infos_aggregate: Bdjuno_Provider_Validator_Info_Aggregate; - vesting_account?: Maybe; - vesting_accounts: Array; - vesting_accounts_aggregate: Bdjuno_Provider_Vesting_Account_Aggregate; -}; - - -export type Bdjuno_Provider_AccountFeeGrantAllowancesByGranterAddressArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountFeeGrantAllowancesByGranterAddress_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountFee_Grant_AllowancesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountFee_Grant_Allowances_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountProposal_DepositsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountProposal_Deposits_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountProposal_VotesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountProposal_Votes_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountProposalsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountProposals_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountValidator_InfosArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountValidator_Infos_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountVesting_AccountsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_AccountVesting_Accounts_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Account_Aggregate = { - __typename?: 'bdjuno_provider_account_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Account_Aggregate_Fields = { - __typename?: 'bdjuno_provider_account_aggregate_fields'; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; -}; - - -export type Bdjuno_Provider_Account_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Account_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - address?: InputMaybe; - feeGrantAllowancesByGranterAddress?: InputMaybe; - fee_grant_allowances?: InputMaybe; - proposal_deposits?: InputMaybe; - proposal_votes?: InputMaybe; - proposals?: InputMaybe; - validator_infos?: InputMaybe; - vesting_account?: InputMaybe; - vesting_accounts?: InputMaybe; -}; - -export type Bdjuno_Provider_Account_Max_Fields = { - __typename?: 'bdjuno_provider_account_max_fields'; - address?: Maybe; -}; - -export type Bdjuno_Provider_Account_Min_Fields = { - __typename?: 'bdjuno_provider_account_min_fields'; - address?: Maybe; -}; - -export type Bdjuno_Provider_Account_Order_By = { - address?: InputMaybe; - feeGrantAllowancesByGranterAddress_aggregate?: InputMaybe; - fee_grant_allowances_aggregate?: InputMaybe; - proposal_deposits_aggregate?: InputMaybe; - proposal_votes_aggregate?: InputMaybe; - proposals_aggregate?: InputMaybe; - validator_infos_aggregate?: InputMaybe; - vesting_account?: InputMaybe; - vesting_accounts_aggregate?: InputMaybe; -}; - -export enum Bdjuno_Provider_Account_Select_Column { - Address = 'address' -} - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis'; - average_time: Scalars['bdjuno_provider_numeric']; - height: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Aggregate = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Aggregate_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Avg_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_avg_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Max_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_max_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Min_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_min_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Order_By = { - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export enum Bdjuno_Provider_Average_Block_Time_From_Genesis_Select_Column { - AverageTime = 'average_time', - Height = 'height' -} - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Stddev_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_stddev_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_stddev_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_stddev_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Sum_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_sum_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_var_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_var_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_From_Genesis_Variance_Fields = { - __typename?: 'bdjuno_provider_average_block_time_from_genesis_variance_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day = { - __typename?: 'bdjuno_provider_average_block_time_per_day'; - average_time: Scalars['bdjuno_provider_numeric']; - height: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Aggregate = { - __typename?: 'bdjuno_provider_average_block_time_per_day_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Aggregate_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Avg_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_avg_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Max_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_max_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Min_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_min_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Order_By = { - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export enum Bdjuno_Provider_Average_Block_Time_Per_Day_Select_Column { - AverageTime = 'average_time', - Height = 'height' -} - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Stddev_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_stddev_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_stddev_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_stddev_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Sum_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_sum_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_var_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_var_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Day_Variance_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_day_variance_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour = { - __typename?: 'bdjuno_provider_average_block_time_per_hour'; - average_time: Scalars['bdjuno_provider_numeric']; - height: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Aggregate = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Aggregate_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Avg_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_avg_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Max_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_max_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Min_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_min_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Order_By = { - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export enum Bdjuno_Provider_Average_Block_Time_Per_Hour_Select_Column { - AverageTime = 'average_time', - Height = 'height' -} - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Stddev_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_stddev_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_stddev_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_stddev_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Sum_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_sum_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_var_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_var_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Hour_Variance_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_hour_variance_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute = { - __typename?: 'bdjuno_provider_average_block_time_per_minute'; - average_time: Scalars['bdjuno_provider_numeric']; - height: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Aggregate = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Aggregate_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Avg_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_avg_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Max_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_max_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Min_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_min_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Order_By = { - average_time?: InputMaybe; - height?: InputMaybe; -}; - -export enum Bdjuno_Provider_Average_Block_Time_Per_Minute_Select_Column { - AverageTime = 'average_time', - Height = 'height' -} - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Stddev_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_stddev_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_stddev_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_stddev_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Sum_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_sum_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_var_pop_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_var_samp_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Average_Block_Time_Per_Minute_Variance_Fields = { - __typename?: 'bdjuno_provider_average_block_time_per_minute_variance_fields'; - average_time?: Maybe; - height?: Maybe; -}; - -export type Bdjuno_Provider_Bigint_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_Block = { - __typename?: 'bdjuno_provider_block'; - hash: Scalars['String']; - height: Scalars['bdjuno_provider_bigint']; - num_txs?: Maybe; - pre_commits: Array; - pre_commits_aggregate: Bdjuno_Provider_Pre_Commit_Aggregate; - proposal_deposits: Array; - proposal_deposits_aggregate: Bdjuno_Provider_Proposal_Deposit_Aggregate; - proposal_votes: Array; - proposal_votes_aggregate: Bdjuno_Provider_Proposal_Vote_Aggregate; - proposer_address?: Maybe; - timestamp: Scalars['bdjuno_provider_timestamp']; - total_gas?: Maybe; - transactions: Array; - transactions_aggregate: Bdjuno_Provider_Transaction_Aggregate; - validator?: Maybe; - validator_voting_powers: Array; - validator_voting_powers_aggregate: Bdjuno_Provider_Validator_Voting_Power_Aggregate; -}; - - -export type Bdjuno_Provider_BlockPre_CommitsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockPre_Commits_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockProposal_DepositsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockProposal_Deposits_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockProposal_VotesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockProposal_Votes_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockTransactionsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockTransactions_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockValidator_Voting_PowersArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_BlockValidator_Voting_Powers_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Aggregate = { - __typename?: 'bdjuno_provider_block_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Block_Aggregate_Fields = { - __typename?: 'bdjuno_provider_block_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Block_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Avg_Fields = { - __typename?: 'bdjuno_provider_block_avg_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Avg_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - hash?: InputMaybe; - height?: InputMaybe; - num_txs?: InputMaybe; - pre_commits?: InputMaybe; - proposal_deposits?: InputMaybe; - proposal_votes?: InputMaybe; - proposer_address?: InputMaybe; - timestamp?: InputMaybe; - total_gas?: InputMaybe; - transactions?: InputMaybe; - validator?: InputMaybe; - validator_voting_powers?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Max_Fields = { - __typename?: 'bdjuno_provider_block_max_fields'; - hash?: Maybe; - height?: Maybe; - num_txs?: Maybe; - proposer_address?: Maybe; - timestamp?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Max_Order_By = { - hash?: InputMaybe; - height?: InputMaybe; - num_txs?: InputMaybe; - proposer_address?: InputMaybe; - timestamp?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Min_Fields = { - __typename?: 'bdjuno_provider_block_min_fields'; - hash?: Maybe; - height?: Maybe; - num_txs?: Maybe; - proposer_address?: Maybe; - timestamp?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Min_Order_By = { - hash?: InputMaybe; - height?: InputMaybe; - num_txs?: InputMaybe; - proposer_address?: InputMaybe; - timestamp?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Order_By = { - hash?: InputMaybe; - height?: InputMaybe; - num_txs?: InputMaybe; - pre_commits_aggregate?: InputMaybe; - proposal_deposits_aggregate?: InputMaybe; - proposal_votes_aggregate?: InputMaybe; - proposer_address?: InputMaybe; - timestamp?: InputMaybe; - total_gas?: InputMaybe; - transactions_aggregate?: InputMaybe; - validator?: InputMaybe; - validator_voting_powers_aggregate?: InputMaybe; -}; - -export enum Bdjuno_Provider_Block_Select_Column { - Hash = 'hash', - Height = 'height', - NumTxs = 'num_txs', - ProposerAddress = 'proposer_address', - Timestamp = 'timestamp', - TotalGas = 'total_gas' -} - -export type Bdjuno_Provider_Block_Stddev_Fields = { - __typename?: 'bdjuno_provider_block_stddev_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Stddev_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_block_stddev_pop_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Stddev_Pop_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_block_stddev_samp_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Stddev_Samp_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Sum_Fields = { - __typename?: 'bdjuno_provider_block_sum_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Sum_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_block_var_pop_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Var_Pop_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_block_var_samp_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Var_Samp_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Block_Variance_Fields = { - __typename?: 'bdjuno_provider_block_variance_fields'; - height?: Maybe; - num_txs?: Maybe; - total_gas?: Maybe; -}; - -export type Bdjuno_Provider_Block_Variance_Order_By = { - height?: InputMaybe; - num_txs?: InputMaybe; - total_gas?: InputMaybe; -}; - -export type Bdjuno_Provider_Community_Pool = { - __typename?: 'bdjuno_provider_community_pool'; - coins: Scalars['bdjuno_provider__dec_coin']; - height: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Community_Pool_Aggregate = { - __typename?: 'bdjuno_provider_community_pool_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Community_Pool_Aggregate_Fields = { - __typename?: 'bdjuno_provider_community_pool_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Community_Pool_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Community_Pool_Avg_Fields = { - __typename?: 'bdjuno_provider_community_pool_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - coins?: InputMaybe; - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Community_Pool_Max_Fields = { - __typename?: 'bdjuno_provider_community_pool_max_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Min_Fields = { - __typename?: 'bdjuno_provider_community_pool_min_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Order_By = { - coins?: InputMaybe; - height?: InputMaybe; -}; - -export enum Bdjuno_Provider_Community_Pool_Select_Column { - Coins = 'coins', - Height = 'height' -} - -export type Bdjuno_Provider_Community_Pool_Stddev_Fields = { - __typename?: 'bdjuno_provider_community_pool_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_community_pool_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_community_pool_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Sum_Fields = { - __typename?: 'bdjuno_provider_community_pool_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_community_pool_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_community_pool_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Community_Pool_Variance_Fields = { - __typename?: 'bdjuno_provider_community_pool_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params = { - __typename?: 'bdjuno_provider_distribution_params'; - height: Scalars['bdjuno_provider_bigint']; - one_row_id: Scalars['Boolean']; - params: Scalars['bdjuno_provider_jsonb']; -}; - - -export type Bdjuno_Provider_Distribution_ParamsParamsArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Aggregate = { - __typename?: 'bdjuno_provider_distribution_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Distribution_Params_Aggregate_Fields = { - __typename?: 'bdjuno_provider_distribution_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Distribution_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Avg_Fields = { - __typename?: 'bdjuno_provider_distribution_params_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Max_Fields = { - __typename?: 'bdjuno_provider_distribution_params_max_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Min_Fields = { - __typename?: 'bdjuno_provider_distribution_params_min_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export enum Bdjuno_Provider_Distribution_Params_Select_Column { - Height = 'height', - OneRowId = 'one_row_id', - Params = 'params' -} - -export type Bdjuno_Provider_Distribution_Params_Stddev_Fields = { - __typename?: 'bdjuno_provider_distribution_params_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_distribution_params_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_distribution_params_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Sum_Fields = { - __typename?: 'bdjuno_provider_distribution_params_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_distribution_params_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_distribution_params_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Distribution_Params_Variance_Fields = { - __typename?: 'bdjuno_provider_distribution_params_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence = { - __typename?: 'bdjuno_provider_double_sign_evidence'; - doubleSignVoteByVoteAId: Bdjuno_Provider_Double_Sign_Vote; - double_sign_vote: Bdjuno_Provider_Double_Sign_Vote; - height: Scalars['bdjuno_provider_bigint']; - vote_a_id: Scalars['bdjuno_provider_bigint']; - vote_b_id: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Aggregate = { - __typename?: 'bdjuno_provider_double_sign_evidence_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Aggregate_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Double_Sign_Evidence_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Avg_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_avg_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Avg_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - doubleSignVoteByVoteAId?: InputMaybe; - double_sign_vote?: InputMaybe; - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Max_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_max_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Max_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Min_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_min_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Min_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Order_By = { - doubleSignVoteByVoteAId?: InputMaybe; - double_sign_vote?: InputMaybe; - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export enum Bdjuno_Provider_Double_Sign_Evidence_Select_Column { - Height = 'height', - VoteAId = 'vote_a_id', - VoteBId = 'vote_b_id' -} - -export type Bdjuno_Provider_Double_Sign_Evidence_Stddev_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_stddev_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Stddev_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_stddev_pop_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Stddev_Pop_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_stddev_samp_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Stddev_Samp_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Sum_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_sum_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Sum_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_var_pop_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Var_Pop_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_var_samp_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Var_Samp_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Variance_Fields = { - __typename?: 'bdjuno_provider_double_sign_evidence_variance_fields'; - height?: Maybe; - vote_a_id?: Maybe; - vote_b_id?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Evidence_Variance_Order_By = { - height?: InputMaybe; - vote_a_id?: InputMaybe; - vote_b_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote = { - __typename?: 'bdjuno_provider_double_sign_vote'; - block_id: Scalars['String']; - doubleSignEvidencesByVoteBId: Array; - doubleSignEvidencesByVoteBId_aggregate: Bdjuno_Provider_Double_Sign_Evidence_Aggregate; - double_sign_evidences: Array; - double_sign_evidences_aggregate: Bdjuno_Provider_Double_Sign_Evidence_Aggregate; - height: Scalars['bdjuno_provider_bigint']; - id: Scalars['Int']; - round: Scalars['Int']; - signature: Scalars['String']; - type: Scalars['bdjuno_provider_smallint']; - validator: Bdjuno_Provider_Validator; - validator_address: Scalars['String']; - validator_index: Scalars['Int']; -}; - - -export type Bdjuno_Provider_Double_Sign_VoteDoubleSignEvidencesByVoteBIdArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_Double_Sign_VoteDoubleSignEvidencesByVoteBId_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_Double_Sign_VoteDouble_Sign_EvidencesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_Double_Sign_VoteDouble_Sign_Evidences_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Aggregate = { - __typename?: 'bdjuno_provider_double_sign_vote_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Aggregate_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Double_Sign_Vote_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Avg_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_avg_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Avg_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - block_id?: InputMaybe; - doubleSignEvidencesByVoteBId?: InputMaybe; - double_sign_evidences?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - signature?: InputMaybe; - type?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Max_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_max_fields'; - block_id?: Maybe; - height?: Maybe; - id?: Maybe; - round?: Maybe; - signature?: Maybe; - type?: Maybe; - validator_address?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Max_Order_By = { - block_id?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - signature?: InputMaybe; - type?: InputMaybe; - validator_address?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Min_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_min_fields'; - block_id?: Maybe; - height?: Maybe; - id?: Maybe; - round?: Maybe; - signature?: Maybe; - type?: Maybe; - validator_address?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Min_Order_By = { - block_id?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - signature?: InputMaybe; - type?: InputMaybe; - validator_address?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Order_By = { - block_id?: InputMaybe; - doubleSignEvidencesByVoteBId_aggregate?: InputMaybe; - double_sign_evidences_aggregate?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - signature?: InputMaybe; - type?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - validator_index?: InputMaybe; -}; - -export enum Bdjuno_Provider_Double_Sign_Vote_Select_Column { - BlockId = 'block_id', - Height = 'height', - Id = 'id', - Round = 'round', - Signature = 'signature', - Type = 'type', - ValidatorAddress = 'validator_address', - ValidatorIndex = 'validator_index' -} - -export type Bdjuno_Provider_Double_Sign_Vote_Stddev_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_stddev_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Stddev_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_stddev_pop_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Stddev_Pop_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_stddev_samp_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Stddev_Samp_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Sum_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_sum_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Sum_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_var_pop_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Var_Pop_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_var_samp_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Var_Samp_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Variance_Fields = { - __typename?: 'bdjuno_provider_double_sign_vote_variance_fields'; - height?: Maybe; - id?: Maybe; - round?: Maybe; - type?: Maybe; - validator_index?: Maybe; -}; - -export type Bdjuno_Provider_Double_Sign_Vote_Variance_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - round?: InputMaybe; - type?: InputMaybe; - validator_index?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance = { - __typename?: 'bdjuno_provider_fee_grant_allowance'; - allowance: Scalars['bdjuno_provider_jsonb']; - grantee: Bdjuno_Provider_Account; - grantee_address: Scalars['String']; - granter: Bdjuno_Provider_Account; - granter_address: Scalars['String']; - height: Scalars['bdjuno_provider_bigint']; - id: Scalars['Int']; -}; - - -export type Bdjuno_Provider_Fee_Grant_AllowanceAllowanceArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Aggregate = { - __typename?: 'bdjuno_provider_fee_grant_allowance_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Aggregate_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Fee_Grant_Allowance_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Avg_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_avg_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Avg_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - allowance?: InputMaybe; - grantee?: InputMaybe; - grantee_address?: InputMaybe; - granter?: InputMaybe; - granter_address?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Max_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_max_fields'; - grantee_address?: Maybe; - granter_address?: Maybe; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Max_Order_By = { - grantee_address?: InputMaybe; - granter_address?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Min_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_min_fields'; - grantee_address?: Maybe; - granter_address?: Maybe; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Min_Order_By = { - grantee_address?: InputMaybe; - granter_address?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Order_By = { - allowance?: InputMaybe; - grantee?: InputMaybe; - grantee_address?: InputMaybe; - granter?: InputMaybe; - granter_address?: InputMaybe; - height?: InputMaybe; - id?: InputMaybe; -}; - -export enum Bdjuno_Provider_Fee_Grant_Allowance_Select_Column { - Allowance = 'allowance', - GranteeAddress = 'grantee_address', - GranterAddress = 'granter_address', - Height = 'height', - Id = 'id' -} - -export type Bdjuno_Provider_Fee_Grant_Allowance_Stddev_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_stddev_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Stddev_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_stddev_pop_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Stddev_Pop_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_stddev_samp_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Stddev_Samp_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Sum_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_sum_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Sum_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_var_pop_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Var_Pop_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_var_samp_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Var_Samp_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Variance_Fields = { - __typename?: 'bdjuno_provider_fee_grant_allowance_variance_fields'; - height?: Maybe; - id?: Maybe; -}; - -export type Bdjuno_Provider_Fee_Grant_Allowance_Variance_Order_By = { - height?: InputMaybe; - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Genesis = { - __typename?: 'bdjuno_provider_genesis'; - chain_id: Scalars['String']; - initial_height: Scalars['bdjuno_provider_bigint']; - time: Scalars['bdjuno_provider_timestamp']; -}; - -export type Bdjuno_Provider_Genesis_Aggregate = { - __typename?: 'bdjuno_provider_genesis_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Genesis_Aggregate_Fields = { - __typename?: 'bdjuno_provider_genesis_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Genesis_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Genesis_Avg_Fields = { - __typename?: 'bdjuno_provider_genesis_avg_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - chain_id?: InputMaybe; - initial_height?: InputMaybe; - time?: InputMaybe; -}; - -export type Bdjuno_Provider_Genesis_Max_Fields = { - __typename?: 'bdjuno_provider_genesis_max_fields'; - chain_id?: Maybe; - initial_height?: Maybe; - time?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Min_Fields = { - __typename?: 'bdjuno_provider_genesis_min_fields'; - chain_id?: Maybe; - initial_height?: Maybe; - time?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Order_By = { - chain_id?: InputMaybe; - initial_height?: InputMaybe; - time?: InputMaybe; -}; - -export enum Bdjuno_Provider_Genesis_Select_Column { - ChainId = 'chain_id', - InitialHeight = 'initial_height', - Time = 'time' -} - -export type Bdjuno_Provider_Genesis_Stddev_Fields = { - __typename?: 'bdjuno_provider_genesis_stddev_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_genesis_stddev_pop_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_genesis_stddev_samp_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Sum_Fields = { - __typename?: 'bdjuno_provider_genesis_sum_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_genesis_var_pop_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_genesis_var_samp_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Genesis_Variance_Fields = { - __typename?: 'bdjuno_provider_genesis_variance_fields'; - initial_height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params = { - __typename?: 'bdjuno_provider_gov_params'; - deposit_params: Scalars['bdjuno_provider_jsonb']; - height: Scalars['bdjuno_provider_bigint']; - one_row_id: Scalars['Boolean']; - tally_params: Scalars['bdjuno_provider_jsonb']; - voting_params: Scalars['bdjuno_provider_jsonb']; -}; - - -export type Bdjuno_Provider_Gov_ParamsDeposit_ParamsArgs = { - path?: InputMaybe; -}; - - -export type Bdjuno_Provider_Gov_ParamsTally_ParamsArgs = { - path?: InputMaybe; -}; - - -export type Bdjuno_Provider_Gov_ParamsVoting_ParamsArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Gov_Params_Aggregate = { - __typename?: 'bdjuno_provider_gov_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Gov_Params_Aggregate_Fields = { - __typename?: 'bdjuno_provider_gov_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Gov_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Gov_Params_Avg_Fields = { - __typename?: 'bdjuno_provider_gov_params_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - deposit_params?: InputMaybe; - height?: InputMaybe; - one_row_id?: InputMaybe; - tally_params?: InputMaybe; - voting_params?: InputMaybe; -}; - -export type Bdjuno_Provider_Gov_Params_Max_Fields = { - __typename?: 'bdjuno_provider_gov_params_max_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Min_Fields = { - __typename?: 'bdjuno_provider_gov_params_min_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Order_By = { - deposit_params?: InputMaybe; - height?: InputMaybe; - one_row_id?: InputMaybe; - tally_params?: InputMaybe; - voting_params?: InputMaybe; -}; - -export enum Bdjuno_Provider_Gov_Params_Select_Column { - DepositParams = 'deposit_params', - Height = 'height', - OneRowId = 'one_row_id', - TallyParams = 'tally_params', - VotingParams = 'voting_params' -} - -export type Bdjuno_Provider_Gov_Params_Stddev_Fields = { - __typename?: 'bdjuno_provider_gov_params_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_gov_params_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_gov_params_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Sum_Fields = { - __typename?: 'bdjuno_provider_gov_params_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_gov_params_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_gov_params_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Gov_Params_Variance_Fields = { - __typename?: 'bdjuno_provider_gov_params_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Inflation = { - __typename?: 'bdjuno_provider_inflation'; - height: Scalars['bdjuno_provider_bigint']; - value: Scalars['bdjuno_provider_numeric']; -}; - -export type Bdjuno_Provider_Inflation_Aggregate = { - __typename?: 'bdjuno_provider_inflation_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Inflation_Aggregate_Fields = { - __typename?: 'bdjuno_provider_inflation_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Inflation_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Inflation_Avg_Fields = { - __typename?: 'bdjuno_provider_inflation_avg_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - value?: InputMaybe; -}; - -export type Bdjuno_Provider_Inflation_Max_Fields = { - __typename?: 'bdjuno_provider_inflation_max_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Min_Fields = { - __typename?: 'bdjuno_provider_inflation_min_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Order_By = { - height?: InputMaybe; - value?: InputMaybe; -}; - -export enum Bdjuno_Provider_Inflation_Select_Column { - Height = 'height', - Value = 'value' -} - -export type Bdjuno_Provider_Inflation_Stddev_Fields = { - __typename?: 'bdjuno_provider_inflation_stddev_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_inflation_stddev_pop_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_inflation_stddev_samp_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Sum_Fields = { - __typename?: 'bdjuno_provider_inflation_sum_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_inflation_var_pop_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_inflation_var_samp_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Inflation_Variance_Fields = { - __typename?: 'bdjuno_provider_inflation_variance_fields'; - height?: Maybe; - value?: Maybe; -}; - -export type Bdjuno_Provider_Jsonb_Comparison_Exp = { - _contained_in?: InputMaybe; - _contains?: InputMaybe; - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _has_key?: InputMaybe; - _has_keys_all?: InputMaybe>; - _has_keys_any?: InputMaybe>; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_Message = { - __typename?: 'bdjuno_provider_message'; - height: Scalars['bdjuno_provider_bigint']; - index: Scalars['bdjuno_provider_bigint']; - involved_accounts_addresses: Scalars['bdjuno_provider__text']; - partition_id: Scalars['bdjuno_provider_bigint']; - transaction?: Maybe; - transactionByPartitionIdTransactionHash?: Maybe; - transaction_hash: Scalars['String']; - type: Scalars['String']; - value: Scalars['bdjuno_provider_jsonb']; -}; - - -export type Bdjuno_Provider_MessageValueArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Aggregate = { - __typename?: 'bdjuno_provider_message_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Message_Aggregate_Fields = { - __typename?: 'bdjuno_provider_message_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Message_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Avg_Fields = { - __typename?: 'bdjuno_provider_message_avg_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Avg_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - index?: InputMaybe; - involved_accounts_addresses?: InputMaybe; - partition_id?: InputMaybe; - transaction?: InputMaybe; - transactionByPartitionIdTransactionHash?: InputMaybe; - transaction_hash?: InputMaybe; - type?: InputMaybe; - value?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Max_Fields = { - __typename?: 'bdjuno_provider_message_max_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; - transaction_hash?: Maybe; - type?: Maybe; -}; - -export type Bdjuno_Provider_Message_Max_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; - transaction_hash?: InputMaybe; - type?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Min_Fields = { - __typename?: 'bdjuno_provider_message_min_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; - transaction_hash?: Maybe; - type?: Maybe; -}; - -export type Bdjuno_Provider_Message_Min_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; - transaction_hash?: InputMaybe; - type?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - involved_accounts_addresses?: InputMaybe; - partition_id?: InputMaybe; - transaction?: InputMaybe; - transactionByPartitionIdTransactionHash?: InputMaybe; - transaction_hash?: InputMaybe; - type?: InputMaybe; - value?: InputMaybe; -}; - -export enum Bdjuno_Provider_Message_Select_Column { - Height = 'height', - Index = 'index', - InvolvedAccountsAddresses = 'involved_accounts_addresses', - PartitionId = 'partition_id', - TransactionHash = 'transaction_hash', - Type = 'type', - Value = 'value' -} - -export type Bdjuno_Provider_Message_Stddev_Fields = { - __typename?: 'bdjuno_provider_message_stddev_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Stddev_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_message_stddev_pop_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Stddev_Pop_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_message_stddev_samp_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Stddev_Samp_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Sum_Fields = { - __typename?: 'bdjuno_provider_message_sum_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Sum_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_message_var_pop_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Var_Pop_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_message_var_samp_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Var_Samp_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Message_Variance_Fields = { - __typename?: 'bdjuno_provider_message_variance_fields'; - height?: Maybe; - index?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Message_Variance_Order_By = { - height?: InputMaybe; - index?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Messages_By_Address_Args = { - addresses?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; - types?: InputMaybe; -}; - -export type Bdjuno_Provider_Mint_Params = { - __typename?: 'bdjuno_provider_mint_params'; - height: Scalars['bdjuno_provider_bigint']; - one_row_id: Scalars['Boolean']; - params: Scalars['bdjuno_provider_jsonb']; -}; - - -export type Bdjuno_Provider_Mint_ParamsParamsArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Mint_Params_Aggregate = { - __typename?: 'bdjuno_provider_mint_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Mint_Params_Aggregate_Fields = { - __typename?: 'bdjuno_provider_mint_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Mint_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Mint_Params_Avg_Fields = { - __typename?: 'bdjuno_provider_mint_params_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export type Bdjuno_Provider_Mint_Params_Max_Fields = { - __typename?: 'bdjuno_provider_mint_params_max_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Min_Fields = { - __typename?: 'bdjuno_provider_mint_params_min_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export enum Bdjuno_Provider_Mint_Params_Select_Column { - Height = 'height', - OneRowId = 'one_row_id', - Params = 'params' -} - -export type Bdjuno_Provider_Mint_Params_Stddev_Fields = { - __typename?: 'bdjuno_provider_mint_params_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_mint_params_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_mint_params_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Sum_Fields = { - __typename?: 'bdjuno_provider_mint_params_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_mint_params_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_mint_params_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Mint_Params_Variance_Fields = { - __typename?: 'bdjuno_provider_mint_params_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Modules = { - __typename?: 'bdjuno_provider_modules'; - module_name: Scalars['String']; -}; - -export type Bdjuno_Provider_Modules_Aggregate = { - __typename?: 'bdjuno_provider_modules_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Modules_Aggregate_Fields = { - __typename?: 'bdjuno_provider_modules_aggregate_fields'; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; -}; - - -export type Bdjuno_Provider_Modules_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Modules_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - module_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Modules_Max_Fields = { - __typename?: 'bdjuno_provider_modules_max_fields'; - module_name?: Maybe; -}; - -export type Bdjuno_Provider_Modules_Min_Fields = { - __typename?: 'bdjuno_provider_modules_min_fields'; - module_name?: Maybe; -}; - -export type Bdjuno_Provider_Modules_Order_By = { - module_name?: InputMaybe; -}; - -export enum Bdjuno_Provider_Modules_Select_Column { - ModuleName = 'module_name' -} - -export type Bdjuno_Provider_Numeric_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export enum Bdjuno_Provider_Order_By { - Asc = 'asc', - AscNullsFirst = 'asc_nulls_first', - AscNullsLast = 'asc_nulls_last', - Desc = 'desc', - DescNullsFirst = 'desc_nulls_first', - DescNullsLast = 'desc_nulls_last' -} - -export type Bdjuno_Provider_Pre_Commit = { - __typename?: 'bdjuno_provider_pre_commit'; - height: Scalars['bdjuno_provider_bigint']; - proposer_priority: Scalars['bdjuno_provider_bigint']; - timestamp: Scalars['bdjuno_provider_timestamp']; - validator: Bdjuno_Provider_Validator; - validator_address: Scalars['String']; - voting_power: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Pre_Commit_Aggregate = { - __typename?: 'bdjuno_provider_pre_commit_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Pre_Commit_Aggregate_Fields = { - __typename?: 'bdjuno_provider_pre_commit_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Pre_Commit_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Avg_Fields = { - __typename?: 'bdjuno_provider_pre_commit_avg_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Avg_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - proposer_priority?: InputMaybe; - timestamp?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Max_Fields = { - __typename?: 'bdjuno_provider_pre_commit_max_fields'; - height?: Maybe; - proposer_priority?: Maybe; - timestamp?: Maybe; - validator_address?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Max_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - timestamp?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Min_Fields = { - __typename?: 'bdjuno_provider_pre_commit_min_fields'; - height?: Maybe; - proposer_priority?: Maybe; - timestamp?: Maybe; - validator_address?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Min_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - timestamp?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - timestamp?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export enum Bdjuno_Provider_Pre_Commit_Select_Column { - Height = 'height', - ProposerPriority = 'proposer_priority', - Timestamp = 'timestamp', - ValidatorAddress = 'validator_address', - VotingPower = 'voting_power' -} - -export type Bdjuno_Provider_Pre_Commit_Stddev_Fields = { - __typename?: 'bdjuno_provider_pre_commit_stddev_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Stddev_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_pre_commit_stddev_pop_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Stddev_Pop_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_pre_commit_stddev_samp_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Stddev_Samp_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Sum_Fields = { - __typename?: 'bdjuno_provider_pre_commit_sum_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Sum_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_pre_commit_var_pop_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Var_Pop_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_pre_commit_var_samp_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Var_Samp_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Variance_Fields = { - __typename?: 'bdjuno_provider_pre_commit_variance_fields'; - height?: Maybe; - proposer_priority?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Pre_Commit_Variance_Order_By = { - height?: InputMaybe; - proposer_priority?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal = { - __typename?: 'bdjuno_provider_proposal'; - content: Scalars['bdjuno_provider_jsonb']; - deposit_end_time?: Maybe; - description: Scalars['String']; - id: Scalars['Int']; - proposal_deposits: Array; - proposal_deposits_aggregate: Bdjuno_Provider_Proposal_Deposit_Aggregate; - proposal_route: Scalars['String']; - proposal_tally_result?: Maybe; - proposal_tally_results: Array; - proposal_tally_results_aggregate: Bdjuno_Provider_Proposal_Tally_Result_Aggregate; - proposal_type: Scalars['String']; - proposal_votes: Array; - proposal_votes_aggregate: Bdjuno_Provider_Proposal_Vote_Aggregate; - proposer: Bdjuno_Provider_Account; - proposer_address: Scalars['String']; - staking_pool_snapshot?: Maybe; - status?: Maybe; - submit_time: Scalars['bdjuno_provider_timestamp']; - title: Scalars['String']; - validator_status_snapshots: Array; - validator_status_snapshots_aggregate: Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Aggregate; - voting_end_time?: Maybe; - voting_start_time?: Maybe; -}; - - -export type Bdjuno_Provider_ProposalContentArgs = { - path?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalProposal_DepositsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalProposal_Deposits_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalProposal_Tally_ResultsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalProposal_Tally_Results_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalProposal_VotesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalProposal_Votes_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalValidator_Status_SnapshotsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ProposalValidator_Status_Snapshots_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Aggregate = { - __typename?: 'bdjuno_provider_proposal_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Proposal_Aggregate_Fields = { - __typename?: 'bdjuno_provider_proposal_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Proposal_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Avg_Fields = { - __typename?: 'bdjuno_provider_proposal_avg_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Avg_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - content?: InputMaybe; - deposit_end_time?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - proposal_deposits?: InputMaybe; - proposal_route?: InputMaybe; - proposal_tally_result?: InputMaybe; - proposal_tally_results?: InputMaybe; - proposal_type?: InputMaybe; - proposal_votes?: InputMaybe; - proposer?: InputMaybe; - proposer_address?: InputMaybe; - staking_pool_snapshot?: InputMaybe; - status?: InputMaybe; - submit_time?: InputMaybe; - title?: InputMaybe; - validator_status_snapshots?: InputMaybe; - voting_end_time?: InputMaybe; - voting_start_time?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit = { - __typename?: 'bdjuno_provider_proposal_deposit'; - amount?: Maybe; - block?: Maybe; - depositor?: Maybe; - depositor_address?: Maybe; - height: Scalars['bdjuno_provider_bigint']; - proposal: Bdjuno_Provider_Proposal; - proposal_id: Scalars['Int']; - timestamp?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Aggregate = { - __typename?: 'bdjuno_provider_proposal_deposit_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Aggregate_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Proposal_Deposit_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Avg_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_avg_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Avg_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - amount?: InputMaybe; - block?: InputMaybe; - depositor?: InputMaybe; - depositor_address?: InputMaybe; - height?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Max_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_max_fields'; - depositor_address?: Maybe; - height?: Maybe; - proposal_id?: Maybe; - timestamp?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Max_Order_By = { - depositor_address?: InputMaybe; - height?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Min_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_min_fields'; - depositor_address?: Maybe; - height?: Maybe; - proposal_id?: Maybe; - timestamp?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Min_Order_By = { - depositor_address?: InputMaybe; - height?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Order_By = { - amount?: InputMaybe; - block?: InputMaybe; - depositor?: InputMaybe; - depositor_address?: InputMaybe; - height?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; -}; - -export enum Bdjuno_Provider_Proposal_Deposit_Select_Column { - Amount = 'amount', - DepositorAddress = 'depositor_address', - Height = 'height', - ProposalId = 'proposal_id', - Timestamp = 'timestamp' -} - -export type Bdjuno_Provider_Proposal_Deposit_Stddev_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_stddev_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Stddev_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_stddev_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Stddev_Pop_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_stddev_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Stddev_Samp_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Sum_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_sum_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Sum_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_var_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Var_Pop_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_var_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Var_Samp_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Variance_Fields = { - __typename?: 'bdjuno_provider_proposal_deposit_variance_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Deposit_Variance_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Max_Fields = { - __typename?: 'bdjuno_provider_proposal_max_fields'; - deposit_end_time?: Maybe; - description?: Maybe; - id?: Maybe; - proposal_route?: Maybe; - proposal_type?: Maybe; - proposer_address?: Maybe; - status?: Maybe; - submit_time?: Maybe; - title?: Maybe; - voting_end_time?: Maybe; - voting_start_time?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Max_Order_By = { - deposit_end_time?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - proposal_route?: InputMaybe; - proposal_type?: InputMaybe; - proposer_address?: InputMaybe; - status?: InputMaybe; - submit_time?: InputMaybe; - title?: InputMaybe; - voting_end_time?: InputMaybe; - voting_start_time?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Min_Fields = { - __typename?: 'bdjuno_provider_proposal_min_fields'; - deposit_end_time?: Maybe; - description?: Maybe; - id?: Maybe; - proposal_route?: Maybe; - proposal_type?: Maybe; - proposer_address?: Maybe; - status?: Maybe; - submit_time?: Maybe; - title?: Maybe; - voting_end_time?: Maybe; - voting_start_time?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Min_Order_By = { - deposit_end_time?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - proposal_route?: InputMaybe; - proposal_type?: InputMaybe; - proposer_address?: InputMaybe; - status?: InputMaybe; - submit_time?: InputMaybe; - title?: InputMaybe; - voting_end_time?: InputMaybe; - voting_start_time?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Order_By = { - content?: InputMaybe; - deposit_end_time?: InputMaybe; - description?: InputMaybe; - id?: InputMaybe; - proposal_deposits_aggregate?: InputMaybe; - proposal_route?: InputMaybe; - proposal_tally_result?: InputMaybe; - proposal_tally_results_aggregate?: InputMaybe; - proposal_type?: InputMaybe; - proposal_votes_aggregate?: InputMaybe; - proposer?: InputMaybe; - proposer_address?: InputMaybe; - staking_pool_snapshot?: InputMaybe; - status?: InputMaybe; - submit_time?: InputMaybe; - title?: InputMaybe; - validator_status_snapshots_aggregate?: InputMaybe; - voting_end_time?: InputMaybe; - voting_start_time?: InputMaybe; -}; - -export enum Bdjuno_Provider_Proposal_Select_Column { - Content = 'content', - DepositEndTime = 'deposit_end_time', - Description = 'description', - Id = 'id', - ProposalRoute = 'proposal_route', - ProposalType = 'proposal_type', - ProposerAddress = 'proposer_address', - Status = 'status', - SubmitTime = 'submit_time', - Title = 'title', - VotingEndTime = 'voting_end_time', - VotingStartTime = 'voting_start_time' -} - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot'; - bonded_tokens: Scalars['String']; - height: Scalars['bdjuno_provider_bigint']; - not_bonded_tokens: Scalars['String']; - proposal: Bdjuno_Provider_Proposal; - proposal_id: Scalars['Int']; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Aggregate = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Aggregate_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Avg_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_avg_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - bonded_tokens?: InputMaybe; - height?: InputMaybe; - not_bonded_tokens?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Max_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_max_fields'; - bonded_tokens?: Maybe; - height?: Maybe; - not_bonded_tokens?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Min_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_min_fields'; - bonded_tokens?: Maybe; - height?: Maybe; - not_bonded_tokens?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Order_By = { - bonded_tokens?: InputMaybe; - height?: InputMaybe; - not_bonded_tokens?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export enum Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Select_Column { - BondedTokens = 'bonded_tokens', - Height = 'height', - NotBondedTokens = 'not_bonded_tokens', - ProposalId = 'proposal_id' -} - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Stddev_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_stddev_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_stddev_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_stddev_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Sum_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_sum_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_var_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_var_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Variance_Fields = { - __typename?: 'bdjuno_provider_proposal_staking_pool_snapshot_variance_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Stddev_Fields = { - __typename?: 'bdjuno_provider_proposal_stddev_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Stddev_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_stddev_pop_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Stddev_Pop_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_stddev_samp_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Stddev_Samp_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Sum_Fields = { - __typename?: 'bdjuno_provider_proposal_sum_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Sum_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result = { - __typename?: 'bdjuno_provider_proposal_tally_result'; - abstain: Scalars['String']; - height: Scalars['bdjuno_provider_bigint']; - no: Scalars['String']; - no_with_veto: Scalars['String']; - proposal: Bdjuno_Provider_Proposal; - proposal_id: Scalars['Int']; - yes: Scalars['String']; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Aggregate = { - __typename?: 'bdjuno_provider_proposal_tally_result_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Aggregate_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Proposal_Tally_Result_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Avg_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_avg_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Avg_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - abstain?: InputMaybe; - height?: InputMaybe; - no?: InputMaybe; - no_with_veto?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - yes?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Max_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_max_fields'; - abstain?: Maybe; - height?: Maybe; - no?: Maybe; - no_with_veto?: Maybe; - proposal_id?: Maybe; - yes?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Max_Order_By = { - abstain?: InputMaybe; - height?: InputMaybe; - no?: InputMaybe; - no_with_veto?: InputMaybe; - proposal_id?: InputMaybe; - yes?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Min_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_min_fields'; - abstain?: Maybe; - height?: Maybe; - no?: Maybe; - no_with_veto?: Maybe; - proposal_id?: Maybe; - yes?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Min_Order_By = { - abstain?: InputMaybe; - height?: InputMaybe; - no?: InputMaybe; - no_with_veto?: InputMaybe; - proposal_id?: InputMaybe; - yes?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Order_By = { - abstain?: InputMaybe; - height?: InputMaybe; - no?: InputMaybe; - no_with_veto?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - yes?: InputMaybe; -}; - -export enum Bdjuno_Provider_Proposal_Tally_Result_Select_Column { - Abstain = 'abstain', - Height = 'height', - No = 'no', - NoWithVeto = 'no_with_veto', - ProposalId = 'proposal_id', - Yes = 'yes' -} - -export type Bdjuno_Provider_Proposal_Tally_Result_Stddev_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_stddev_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Stddev_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_stddev_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Stddev_Pop_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_stddev_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Stddev_Samp_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Sum_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_sum_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Sum_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_var_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Var_Pop_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_var_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Var_Samp_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Variance_Fields = { - __typename?: 'bdjuno_provider_proposal_tally_result_variance_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Tally_Result_Variance_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot'; - height: Scalars['bdjuno_provider_bigint']; - id: Scalars['Int']; - jailed: Scalars['Boolean']; - proposal?: Maybe; - proposal_id?: Maybe; - status: Scalars['Int']; - validator: Bdjuno_Provider_Validator; - validator_address: Scalars['String']; - voting_power: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Aggregate = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Aggregate_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Avg_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_avg_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Avg_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - id?: InputMaybe; - jailed?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Max_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_max_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - validator_address?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Max_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Min_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_min_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - validator_address?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Min_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - jailed?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export enum Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Select_Column { - Height = 'height', - Id = 'id', - Jailed = 'jailed', - ProposalId = 'proposal_id', - Status = 'status', - ValidatorAddress = 'validator_address', - VotingPower = 'voting_power' -} - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Stddev_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_stddev_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Stddev_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_stddev_pop_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Stddev_Pop_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_stddev_samp_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Stddev_Samp_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Sum_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_sum_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Sum_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_var_pop_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Var_Pop_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_var_samp_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Var_Samp_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Variance_Fields = { - __typename?: 'bdjuno_provider_proposal_validator_status_snapshot_variance_fields'; - height?: Maybe; - id?: Maybe; - proposal_id?: Maybe; - status?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Variance_Order_By = { - height?: InputMaybe; - id?: InputMaybe; - proposal_id?: InputMaybe; - status?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_var_pop_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Var_Pop_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_var_samp_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Var_Samp_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Variance_Fields = { - __typename?: 'bdjuno_provider_proposal_variance_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Variance_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote = { - __typename?: 'bdjuno_provider_proposal_vote'; - account: Bdjuno_Provider_Account; - block: Bdjuno_Provider_Block; - height: Scalars['bdjuno_provider_bigint']; - option: Scalars['String']; - proposal: Bdjuno_Provider_Proposal; - proposal_id: Scalars['Int']; - timestamp?: Maybe; - voter_address: Scalars['String']; -}; - -export type Bdjuno_Provider_Proposal_Vote_Aggregate = { - __typename?: 'bdjuno_provider_proposal_vote_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Proposal_Vote_Aggregate_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Proposal_Vote_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Avg_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_avg_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Avg_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - account?: InputMaybe; - block?: InputMaybe; - height?: InputMaybe; - option?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; - voter_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Max_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_max_fields'; - height?: Maybe; - option?: Maybe; - proposal_id?: Maybe; - timestamp?: Maybe; - voter_address?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Max_Order_By = { - height?: InputMaybe; - option?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; - voter_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Min_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_min_fields'; - height?: Maybe; - option?: Maybe; - proposal_id?: Maybe; - timestamp?: Maybe; - voter_address?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Min_Order_By = { - height?: InputMaybe; - option?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; - voter_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Order_By = { - account?: InputMaybe; - block?: InputMaybe; - height?: InputMaybe; - option?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - timestamp?: InputMaybe; - voter_address?: InputMaybe; -}; - -export enum Bdjuno_Provider_Proposal_Vote_Select_Column { - Height = 'height', - Option = 'option', - ProposalId = 'proposal_id', - Timestamp = 'timestamp', - VoterAddress = 'voter_address' -} - -export type Bdjuno_Provider_Proposal_Vote_Stddev_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_stddev_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Stddev_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_stddev_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Stddev_Pop_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_stddev_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Stddev_Samp_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Sum_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_sum_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Sum_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_var_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Var_Pop_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_var_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Var_Samp_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Variance_Fields = { - __typename?: 'bdjuno_provider_proposal_vote_variance_fields'; - height?: Maybe; - proposal_id?: Maybe; -}; - -export type Bdjuno_Provider_Proposal_Vote_Variance_Order_By = { - height?: InputMaybe; - proposal_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Slashing_Params = { - __typename?: 'bdjuno_provider_slashing_params'; - height: Scalars['bdjuno_provider_bigint']; - one_row_id: Scalars['Boolean']; - params: Scalars['bdjuno_provider_jsonb']; -}; - - -export type Bdjuno_Provider_Slashing_ParamsParamsArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Aggregate = { - __typename?: 'bdjuno_provider_slashing_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Slashing_Params_Aggregate_Fields = { - __typename?: 'bdjuno_provider_slashing_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Slashing_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Avg_Fields = { - __typename?: 'bdjuno_provider_slashing_params_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Max_Fields = { - __typename?: 'bdjuno_provider_slashing_params_max_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Min_Fields = { - __typename?: 'bdjuno_provider_slashing_params_min_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export enum Bdjuno_Provider_Slashing_Params_Select_Column { - Height = 'height', - OneRowId = 'one_row_id', - Params = 'params' -} - -export type Bdjuno_Provider_Slashing_Params_Stddev_Fields = { - __typename?: 'bdjuno_provider_slashing_params_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_slashing_params_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_slashing_params_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Sum_Fields = { - __typename?: 'bdjuno_provider_slashing_params_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_slashing_params_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_slashing_params_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Slashing_Params_Variance_Fields = { - __typename?: 'bdjuno_provider_slashing_params_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Smallint_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan = { - __typename?: 'bdjuno_provider_software_upgrade_plan'; - height: Scalars['bdjuno_provider_bigint']; - info: Scalars['String']; - plan_name: Scalars['String']; - proposal?: Maybe; - proposal_id?: Maybe; - upgrade_height: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Aggregate = { - __typename?: 'bdjuno_provider_software_upgrade_plan_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Aggregate_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Software_Upgrade_Plan_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Avg_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_avg_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - info?: InputMaybe; - plan_name?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - upgrade_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Max_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_max_fields'; - height?: Maybe; - info?: Maybe; - plan_name?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Min_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_min_fields'; - height?: Maybe; - info?: Maybe; - plan_name?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Order_By = { - height?: InputMaybe; - info?: InputMaybe; - plan_name?: InputMaybe; - proposal?: InputMaybe; - proposal_id?: InputMaybe; - upgrade_height?: InputMaybe; -}; - -export enum Bdjuno_Provider_Software_Upgrade_Plan_Select_Column { - Height = 'height', - Info = 'info', - PlanName = 'plan_name', - ProposalId = 'proposal_id', - UpgradeHeight = 'upgrade_height' -} - -export type Bdjuno_Provider_Software_Upgrade_Plan_Stddev_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_stddev_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_stddev_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_stddev_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Sum_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_sum_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_var_pop_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_var_samp_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Software_Upgrade_Plan_Variance_Fields = { - __typename?: 'bdjuno_provider_software_upgrade_plan_variance_fields'; - height?: Maybe; - proposal_id?: Maybe; - upgrade_height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params = { - __typename?: 'bdjuno_provider_staking_params'; - height: Scalars['bdjuno_provider_bigint']; - one_row_id: Scalars['Boolean']; - params: Scalars['bdjuno_provider_jsonb']; -}; - - -export type Bdjuno_Provider_Staking_ParamsParamsArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Staking_Params_Aggregate = { - __typename?: 'bdjuno_provider_staking_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Staking_Params_Aggregate_Fields = { - __typename?: 'bdjuno_provider_staking_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Staking_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Staking_Params_Avg_Fields = { - __typename?: 'bdjuno_provider_staking_params_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export type Bdjuno_Provider_Staking_Params_Max_Fields = { - __typename?: 'bdjuno_provider_staking_params_max_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Min_Fields = { - __typename?: 'bdjuno_provider_staking_params_min_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -export enum Bdjuno_Provider_Staking_Params_Select_Column { - Height = 'height', - OneRowId = 'one_row_id', - Params = 'params' -} - -export type Bdjuno_Provider_Staking_Params_Stddev_Fields = { - __typename?: 'bdjuno_provider_staking_params_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_staking_params_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_staking_params_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Sum_Fields = { - __typename?: 'bdjuno_provider_staking_params_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_staking_params_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_staking_params_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Params_Variance_Fields = { - __typename?: 'bdjuno_provider_staking_params_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool = { - __typename?: 'bdjuno_provider_staking_pool'; - bonded_tokens: Scalars['String']; - height: Scalars['bdjuno_provider_bigint']; - not_bonded_tokens: Scalars['String']; - staked_not_bonded_tokens?: Maybe; - unbonding_tokens?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Aggregate = { - __typename?: 'bdjuno_provider_staking_pool_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Staking_Pool_Aggregate_Fields = { - __typename?: 'bdjuno_provider_staking_pool_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Staking_Pool_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Avg_Fields = { - __typename?: 'bdjuno_provider_staking_pool_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - bonded_tokens?: InputMaybe; - height?: InputMaybe; - not_bonded_tokens?: InputMaybe; - staked_not_bonded_tokens?: InputMaybe; - unbonding_tokens?: InputMaybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Max_Fields = { - __typename?: 'bdjuno_provider_staking_pool_max_fields'; - bonded_tokens?: Maybe; - height?: Maybe; - not_bonded_tokens?: Maybe; - staked_not_bonded_tokens?: Maybe; - unbonding_tokens?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Min_Fields = { - __typename?: 'bdjuno_provider_staking_pool_min_fields'; - bonded_tokens?: Maybe; - height?: Maybe; - not_bonded_tokens?: Maybe; - staked_not_bonded_tokens?: Maybe; - unbonding_tokens?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Order_By = { - bonded_tokens?: InputMaybe; - height?: InputMaybe; - not_bonded_tokens?: InputMaybe; - staked_not_bonded_tokens?: InputMaybe; - unbonding_tokens?: InputMaybe; -}; - -export enum Bdjuno_Provider_Staking_Pool_Select_Column { - BondedTokens = 'bonded_tokens', - Height = 'height', - NotBondedTokens = 'not_bonded_tokens', - StakedNotBondedTokens = 'staked_not_bonded_tokens', - UnbondingTokens = 'unbonding_tokens' -} - -export type Bdjuno_Provider_Staking_Pool_Stddev_Fields = { - __typename?: 'bdjuno_provider_staking_pool_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_staking_pool_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_staking_pool_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Sum_Fields = { - __typename?: 'bdjuno_provider_staking_pool_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_staking_pool_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_staking_pool_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Staking_Pool_Variance_Fields = { - __typename?: 'bdjuno_provider_staking_pool_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply = { - __typename?: 'bdjuno_provider_supply'; - coins: Scalars['bdjuno_provider__coin']; - height: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Supply_Aggregate = { - __typename?: 'bdjuno_provider_supply_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Supply_Aggregate_Fields = { - __typename?: 'bdjuno_provider_supply_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Supply_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Supply_Avg_Fields = { - __typename?: 'bdjuno_provider_supply_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - coins?: InputMaybe; - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Supply_Max_Fields = { - __typename?: 'bdjuno_provider_supply_max_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Min_Fields = { - __typename?: 'bdjuno_provider_supply_min_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Order_By = { - coins?: InputMaybe; - height?: InputMaybe; -}; - -export enum Bdjuno_Provider_Supply_Select_Column { - Coins = 'coins', - Height = 'height' -} - -export type Bdjuno_Provider_Supply_Stddev_Fields = { - __typename?: 'bdjuno_provider_supply_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_supply_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_supply_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Sum_Fields = { - __typename?: 'bdjuno_provider_supply_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_supply_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_supply_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Supply_Variance_Fields = { - __typename?: 'bdjuno_provider_supply_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Timestamp_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_Timestamptz_Comparison_Exp = { - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - -export type Bdjuno_Provider_Token = { - __typename?: 'bdjuno_provider_token'; - name: Scalars['String']; - token_units: Array; - token_units_aggregate: Bdjuno_Provider_Token_Unit_Aggregate; -}; - - -export type Bdjuno_Provider_TokenToken_UnitsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_TokenToken_Units_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Aggregate = { - __typename?: 'bdjuno_provider_token_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Token_Aggregate_Fields = { - __typename?: 'bdjuno_provider_token_aggregate_fields'; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; -}; - - -export type Bdjuno_Provider_Token_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - name?: InputMaybe; - token_units?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Max_Fields = { - __typename?: 'bdjuno_provider_token_max_fields'; - name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Min_Fields = { - __typename?: 'bdjuno_provider_token_min_fields'; - name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Order_By = { - name?: InputMaybe; - token_units_aggregate?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price = { - __typename?: 'bdjuno_provider_token_price'; - id: Scalars['Int']; - market_cap: Scalars['bdjuno_provider_bigint']; - price: Scalars['bdjuno_provider_numeric']; - timestamp: Scalars['bdjuno_provider_timestamp']; - token_unit: Bdjuno_Provider_Token_Unit; - unit_name: Scalars['String']; -}; - -export type Bdjuno_Provider_Token_Price_Aggregate = { - __typename?: 'bdjuno_provider_token_price_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Token_Price_Aggregate_Fields = { - __typename?: 'bdjuno_provider_token_price_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Token_Price_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Avg_Fields = { - __typename?: 'bdjuno_provider_token_price_avg_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Avg_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - token_unit?: InputMaybe; - unit_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History = { - __typename?: 'bdjuno_provider_token_price_history'; - market_cap: Scalars['bdjuno_provider_bigint']; - price: Scalars['bdjuno_provider_numeric']; - timestamp: Scalars['bdjuno_provider_timestamp']; - token_unit: Bdjuno_Provider_Token_Unit; - unit_name: Scalars['String']; -}; - -export type Bdjuno_Provider_Token_Price_History_Aggregate = { - __typename?: 'bdjuno_provider_token_price_history_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Token_Price_History_Aggregate_Fields = { - __typename?: 'bdjuno_provider_token_price_history_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Token_Price_History_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Avg_Fields = { - __typename?: 'bdjuno_provider_token_price_history_avg_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Avg_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - token_unit?: InputMaybe; - unit_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Max_Fields = { - __typename?: 'bdjuno_provider_token_price_history_max_fields'; - market_cap?: Maybe; - price?: Maybe; - timestamp?: Maybe; - unit_name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Max_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - unit_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Min_Fields = { - __typename?: 'bdjuno_provider_token_price_history_min_fields'; - market_cap?: Maybe; - price?: Maybe; - timestamp?: Maybe; - unit_name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Min_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - unit_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - token_unit?: InputMaybe; - unit_name?: InputMaybe; -}; - -export enum Bdjuno_Provider_Token_Price_History_Select_Column { - MarketCap = 'market_cap', - Price = 'price', - Timestamp = 'timestamp', - UnitName = 'unit_name' -} - -export type Bdjuno_Provider_Token_Price_History_Stddev_Fields = { - __typename?: 'bdjuno_provider_token_price_history_stddev_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Stddev_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_token_price_history_stddev_pop_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Stddev_Pop_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_token_price_history_stddev_samp_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Stddev_Samp_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Sum_Fields = { - __typename?: 'bdjuno_provider_token_price_history_sum_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Sum_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_token_price_history_var_pop_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Var_Pop_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_token_price_history_var_samp_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Var_Samp_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Variance_Fields = { - __typename?: 'bdjuno_provider_token_price_history_variance_fields'; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_History_Variance_Order_By = { - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Max_Fields = { - __typename?: 'bdjuno_provider_token_price_max_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; - timestamp?: Maybe; - unit_name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Max_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - unit_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Min_Fields = { - __typename?: 'bdjuno_provider_token_price_min_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; - timestamp?: Maybe; - unit_name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Min_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - unit_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; - timestamp?: InputMaybe; - token_unit?: InputMaybe; - unit_name?: InputMaybe; -}; - -export enum Bdjuno_Provider_Token_Price_Select_Column { - Id = 'id', - MarketCap = 'market_cap', - Price = 'price', - Timestamp = 'timestamp', - UnitName = 'unit_name' -} - -export type Bdjuno_Provider_Token_Price_Stddev_Fields = { - __typename?: 'bdjuno_provider_token_price_stddev_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Stddev_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_token_price_stddev_pop_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Stddev_Pop_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_token_price_stddev_samp_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Stddev_Samp_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Sum_Fields = { - __typename?: 'bdjuno_provider_token_price_sum_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Sum_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_token_price_var_pop_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Var_Pop_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_token_price_var_samp_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Var_Samp_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Price_Variance_Fields = { - __typename?: 'bdjuno_provider_token_price_variance_fields'; - id?: Maybe; - market_cap?: Maybe; - price?: Maybe; -}; - -export type Bdjuno_Provider_Token_Price_Variance_Order_By = { - id?: InputMaybe; - market_cap?: InputMaybe; - price?: InputMaybe; -}; - -export enum Bdjuno_Provider_Token_Select_Column { - Name = 'name' -} - -export type Bdjuno_Provider_Token_Unit = { - __typename?: 'bdjuno_provider_token_unit'; - aliases?: Maybe; - denom: Scalars['String']; - exponent: Scalars['Int']; - price_id?: Maybe; - token: Bdjuno_Provider_Token; - token_name: Scalars['String']; - token_price?: Maybe; - token_price_histories: Array; - token_price_histories_aggregate: Bdjuno_Provider_Token_Price_History_Aggregate; - token_prices: Array; - token_prices_aggregate: Bdjuno_Provider_Token_Price_Aggregate; -}; - - -export type Bdjuno_Provider_Token_UnitToken_Price_HistoriesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_Token_UnitToken_Price_Histories_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_Token_UnitToken_PricesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_Token_UnitToken_Prices_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Aggregate = { - __typename?: 'bdjuno_provider_token_unit_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Token_Unit_Aggregate_Fields = { - __typename?: 'bdjuno_provider_token_unit_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Token_Unit_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Avg_Fields = { - __typename?: 'bdjuno_provider_token_unit_avg_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Avg_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - aliases?: InputMaybe; - denom?: InputMaybe; - exponent?: InputMaybe; - price_id?: InputMaybe; - token?: InputMaybe; - token_name?: InputMaybe; - token_price?: InputMaybe; - token_price_histories?: InputMaybe; - token_prices?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Max_Fields = { - __typename?: 'bdjuno_provider_token_unit_max_fields'; - denom?: Maybe; - exponent?: Maybe; - price_id?: Maybe; - token_name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Max_Order_By = { - denom?: InputMaybe; - exponent?: InputMaybe; - price_id?: InputMaybe; - token_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Min_Fields = { - __typename?: 'bdjuno_provider_token_unit_min_fields'; - denom?: Maybe; - exponent?: Maybe; - price_id?: Maybe; - token_name?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Min_Order_By = { - denom?: InputMaybe; - exponent?: InputMaybe; - price_id?: InputMaybe; - token_name?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Order_By = { - aliases?: InputMaybe; - denom?: InputMaybe; - exponent?: InputMaybe; - price_id?: InputMaybe; - token?: InputMaybe; - token_name?: InputMaybe; - token_price?: InputMaybe; - token_price_histories_aggregate?: InputMaybe; - token_prices_aggregate?: InputMaybe; -}; - -export enum Bdjuno_Provider_Token_Unit_Select_Column { - Aliases = 'aliases', - Denom = 'denom', - Exponent = 'exponent', - PriceId = 'price_id', - TokenName = 'token_name' -} - -export type Bdjuno_Provider_Token_Unit_Stddev_Fields = { - __typename?: 'bdjuno_provider_token_unit_stddev_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Stddev_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_token_unit_stddev_pop_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Stddev_Pop_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_token_unit_stddev_samp_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Stddev_Samp_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Sum_Fields = { - __typename?: 'bdjuno_provider_token_unit_sum_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Sum_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_token_unit_var_pop_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Var_Pop_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_token_unit_var_samp_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Var_Samp_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Token_Unit_Variance_Fields = { - __typename?: 'bdjuno_provider_token_unit_variance_fields'; - exponent?: Maybe; -}; - -export type Bdjuno_Provider_Token_Unit_Variance_Order_By = { - exponent?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction = { - __typename?: 'bdjuno_provider_transaction'; - block: Bdjuno_Provider_Block; - fee: Scalars['bdjuno_provider_jsonb']; - gas_used?: Maybe; - gas_wanted?: Maybe; - hash: Scalars['String']; - height: Scalars['bdjuno_provider_bigint']; - logs?: Maybe; - memo?: Maybe; - messages: Scalars['bdjuno_provider_jsonb']; - messagesByTransactionHashPartitionId: Array; - messagesByTransactionHashPartitionId_aggregate: Bdjuno_Provider_Message_Aggregate; - partition_id: Scalars['bdjuno_provider_bigint']; - raw_log?: Maybe; - signatures: Scalars['bdjuno_provider__text']; - signer_infos: Scalars['bdjuno_provider_jsonb']; - success: Scalars['Boolean']; -}; - - -export type Bdjuno_Provider_TransactionFeeArgs = { - path?: InputMaybe; -}; - - -export type Bdjuno_Provider_TransactionLogsArgs = { - path?: InputMaybe; -}; - - -export type Bdjuno_Provider_TransactionMessagesArgs = { - path?: InputMaybe; -}; - - -export type Bdjuno_Provider_TransactionMessagesByTransactionHashPartitionIdArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_TransactionMessagesByTransactionHashPartitionId_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_TransactionSigner_InfosArgs = { - path?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Aggregate = { - __typename?: 'bdjuno_provider_transaction_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Transaction_Aggregate_Fields = { - __typename?: 'bdjuno_provider_transaction_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Transaction_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Avg_Fields = { - __typename?: 'bdjuno_provider_transaction_avg_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Avg_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - block?: InputMaybe; - fee?: InputMaybe; - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - hash?: InputMaybe; - height?: InputMaybe; - logs?: InputMaybe; - memo?: InputMaybe; - messages?: InputMaybe; - messagesByTransactionHashPartitionId?: InputMaybe; - partition_id?: InputMaybe; - raw_log?: InputMaybe; - signatures?: InputMaybe; - signer_infos?: InputMaybe; - success?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Max_Fields = { - __typename?: 'bdjuno_provider_transaction_max_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - hash?: Maybe; - height?: Maybe; - memo?: Maybe; - partition_id?: Maybe; - raw_log?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Max_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - hash?: InputMaybe; - height?: InputMaybe; - memo?: InputMaybe; - partition_id?: InputMaybe; - raw_log?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Min_Fields = { - __typename?: 'bdjuno_provider_transaction_min_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - hash?: Maybe; - height?: Maybe; - memo?: Maybe; - partition_id?: Maybe; - raw_log?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Min_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - hash?: InputMaybe; - height?: InputMaybe; - memo?: InputMaybe; - partition_id?: InputMaybe; - raw_log?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Order_By = { - block?: InputMaybe; - fee?: InputMaybe; - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - hash?: InputMaybe; - height?: InputMaybe; - logs?: InputMaybe; - memo?: InputMaybe; - messages?: InputMaybe; - messagesByTransactionHashPartitionId_aggregate?: InputMaybe; - partition_id?: InputMaybe; - raw_log?: InputMaybe; - signatures?: InputMaybe; - signer_infos?: InputMaybe; - success?: InputMaybe; -}; - -export enum Bdjuno_Provider_Transaction_Select_Column { - Fee = 'fee', - GasUsed = 'gas_used', - GasWanted = 'gas_wanted', - Hash = 'hash', - Height = 'height', - Logs = 'logs', - Memo = 'memo', - Messages = 'messages', - PartitionId = 'partition_id', - RawLog = 'raw_log', - Signatures = 'signatures', - SignerInfos = 'signer_infos', - Success = 'success' -} - -export type Bdjuno_Provider_Transaction_Stddev_Fields = { - __typename?: 'bdjuno_provider_transaction_stddev_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Stddev_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_transaction_stddev_pop_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Stddev_Pop_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_transaction_stddev_samp_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Stddev_Samp_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Sum_Fields = { - __typename?: 'bdjuno_provider_transaction_sum_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Sum_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_transaction_var_pop_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Var_Pop_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_transaction_var_samp_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Var_Samp_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Transaction_Variance_Fields = { - __typename?: 'bdjuno_provider_transaction_variance_fields'; - gas_used?: Maybe; - gas_wanted?: Maybe; - height?: Maybe; - partition_id?: Maybe; -}; - -export type Bdjuno_Provider_Transaction_Variance_Order_By = { - gas_used?: InputMaybe; - gas_wanted?: InputMaybe; - height?: InputMaybe; - partition_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator = { - __typename?: 'bdjuno_provider_validator'; - blocks: Array; - blocks_aggregate: Bdjuno_Provider_Block_Aggregate; - consensus_address: Scalars['String']; - consensus_pubkey: Scalars['String']; - double_sign_votes: Array; - double_sign_votes_aggregate: Bdjuno_Provider_Double_Sign_Vote_Aggregate; - pre_commits: Array; - pre_commits_aggregate: Bdjuno_Provider_Pre_Commit_Aggregate; - proposal_validator_status_snapshot?: Maybe; - proposal_validator_status_snapshots: Array; - proposal_validator_status_snapshots_aggregate: Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Aggregate; - validator_commissions: Array; - validator_commissions_aggregate: Bdjuno_Provider_Validator_Commission_Aggregate; - validator_descriptions: Array; - validator_descriptions_aggregate: Bdjuno_Provider_Validator_Description_Aggregate; - validator_info?: Maybe; - validator_infos: Array; - validator_infos_aggregate: Bdjuno_Provider_Validator_Info_Aggregate; - validator_signing_infos: Array; - validator_signing_infos_aggregate: Bdjuno_Provider_Validator_Signing_Info_Aggregate; - validator_statuses: Array; - validator_statuses_aggregate: Bdjuno_Provider_Validator_Status_Aggregate; - validator_voting_powers: Array; - validator_voting_powers_aggregate: Bdjuno_Provider_Validator_Voting_Power_Aggregate; -}; - - -export type Bdjuno_Provider_ValidatorBlocksArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorBlocks_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorDouble_Sign_VotesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorDouble_Sign_Votes_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorPre_CommitsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorPre_Commits_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorProposal_Validator_Status_SnapshotsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorProposal_Validator_Status_Snapshots_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_CommissionsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Commissions_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_DescriptionsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Descriptions_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_InfosArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Infos_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Signing_InfosArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Signing_Infos_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_StatusesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Statuses_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Voting_PowersArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_ValidatorValidator_Voting_Powers_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Aggregate = { - __typename?: 'bdjuno_provider_validator_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Validator_Aggregate_Fields = { - __typename?: 'bdjuno_provider_validator_aggregate_fields'; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; -}; - - -export type Bdjuno_Provider_Validator_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - blocks?: InputMaybe; - consensus_address?: InputMaybe; - consensus_pubkey?: InputMaybe; - double_sign_votes?: InputMaybe; - pre_commits?: InputMaybe; - proposal_validator_status_snapshot?: InputMaybe; - proposal_validator_status_snapshots?: InputMaybe; - validator_commissions?: InputMaybe; - validator_descriptions?: InputMaybe; - validator_info?: InputMaybe; - validator_infos?: InputMaybe; - validator_signing_infos?: InputMaybe; - validator_statuses?: InputMaybe; - validator_voting_powers?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission = { - __typename?: 'bdjuno_provider_validator_commission'; - commission: Scalars['bdjuno_provider_numeric']; - height: Scalars['bdjuno_provider_bigint']; - min_self_delegation: Scalars['bdjuno_provider_bigint']; - validator: Bdjuno_Provider_Validator; - validator_address: Scalars['String']; -}; - -export type Bdjuno_Provider_Validator_Commission_Aggregate = { - __typename?: 'bdjuno_provider_validator_commission_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Validator_Commission_Aggregate_Fields = { - __typename?: 'bdjuno_provider_validator_commission_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Validator_Commission_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Avg_Fields = { - __typename?: 'bdjuno_provider_validator_commission_avg_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Avg_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Max_Fields = { - __typename?: 'bdjuno_provider_validator_commission_max_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; - validator_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Max_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Min_Fields = { - __typename?: 'bdjuno_provider_validator_commission_min_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; - validator_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Min_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; -}; - -export enum Bdjuno_Provider_Validator_Commission_Select_Column { - Commission = 'commission', - Height = 'height', - MinSelfDelegation = 'min_self_delegation', - ValidatorAddress = 'validator_address' -} - -export type Bdjuno_Provider_Validator_Commission_Stddev_Fields = { - __typename?: 'bdjuno_provider_validator_commission_stddev_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Stddev_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_commission_stddev_pop_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Stddev_Pop_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_commission_stddev_samp_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Stddev_Samp_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Sum_Fields = { - __typename?: 'bdjuno_provider_validator_commission_sum_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Sum_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_commission_var_pop_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Var_Pop_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_commission_var_samp_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Var_Samp_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Variance_Fields = { - __typename?: 'bdjuno_provider_validator_commission_variance_fields'; - commission?: Maybe; - height?: Maybe; - min_self_delegation?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Commission_Variance_Order_By = { - commission?: InputMaybe; - height?: InputMaybe; - min_self_delegation?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description = { - __typename?: 'bdjuno_provider_validator_description'; - avatar_url?: Maybe; - details?: Maybe; - height: Scalars['bdjuno_provider_bigint']; - identity?: Maybe; - moniker?: Maybe; - security_contact?: Maybe; - validator: Bdjuno_Provider_Validator; - validator_address: Scalars['String']; - website?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Aggregate = { - __typename?: 'bdjuno_provider_validator_description_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Validator_Description_Aggregate_Fields = { - __typename?: 'bdjuno_provider_validator_description_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Validator_Description_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Avg_Fields = { - __typename?: 'bdjuno_provider_validator_description_avg_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Avg_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - avatar_url?: InputMaybe; - details?: InputMaybe; - height?: InputMaybe; - identity?: InputMaybe; - moniker?: InputMaybe; - security_contact?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - website?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Max_Fields = { - __typename?: 'bdjuno_provider_validator_description_max_fields'; - avatar_url?: Maybe; - details?: Maybe; - height?: Maybe; - identity?: Maybe; - moniker?: Maybe; - security_contact?: Maybe; - validator_address?: Maybe; - website?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Max_Order_By = { - avatar_url?: InputMaybe; - details?: InputMaybe; - height?: InputMaybe; - identity?: InputMaybe; - moniker?: InputMaybe; - security_contact?: InputMaybe; - validator_address?: InputMaybe; - website?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Min_Fields = { - __typename?: 'bdjuno_provider_validator_description_min_fields'; - avatar_url?: Maybe; - details?: Maybe; - height?: Maybe; - identity?: Maybe; - moniker?: Maybe; - security_contact?: Maybe; - validator_address?: Maybe; - website?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Min_Order_By = { - avatar_url?: InputMaybe; - details?: InputMaybe; - height?: InputMaybe; - identity?: InputMaybe; - moniker?: InputMaybe; - security_contact?: InputMaybe; - validator_address?: InputMaybe; - website?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Order_By = { - avatar_url?: InputMaybe; - details?: InputMaybe; - height?: InputMaybe; - identity?: InputMaybe; - moniker?: InputMaybe; - security_contact?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - website?: InputMaybe; -}; - -export enum Bdjuno_Provider_Validator_Description_Select_Column { - AvatarUrl = 'avatar_url', - Details = 'details', - Height = 'height', - Identity = 'identity', - Moniker = 'moniker', - SecurityContact = 'security_contact', - ValidatorAddress = 'validator_address', - Website = 'website' -} - -export type Bdjuno_Provider_Validator_Description_Stddev_Fields = { - __typename?: 'bdjuno_provider_validator_description_stddev_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Stddev_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_description_stddev_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Stddev_Pop_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_description_stddev_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Stddev_Samp_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Sum_Fields = { - __typename?: 'bdjuno_provider_validator_description_sum_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Sum_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_description_var_pop_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Var_Pop_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_description_var_samp_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Var_Samp_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Description_Variance_Fields = { - __typename?: 'bdjuno_provider_validator_description_variance_fields'; - height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Description_Variance_Order_By = { - height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Info = { - __typename?: 'bdjuno_provider_validator_info'; - account?: Maybe; - consensus_address: Scalars['String']; - max_change_rate: Scalars['String']; - max_rate: Scalars['String']; - operator_address: Scalars['String']; - self_delegate_address?: Maybe; - validator: Bdjuno_Provider_Validator; -}; - -export type Bdjuno_Provider_Validator_Info_Aggregate = { - __typename?: 'bdjuno_provider_validator_info_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Validator_Info_Aggregate_Fields = { - __typename?: 'bdjuno_provider_validator_info_aggregate_fields'; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; -}; - - -export type Bdjuno_Provider_Validator_Info_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Info_Aggregate_Order_By = { - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Info_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - account?: InputMaybe; - consensus_address?: InputMaybe; - max_change_rate?: InputMaybe; - max_rate?: InputMaybe; - operator_address?: InputMaybe; - self_delegate_address?: InputMaybe; - validator?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Info_Max_Fields = { - __typename?: 'bdjuno_provider_validator_info_max_fields'; - consensus_address?: Maybe; - max_change_rate?: Maybe; - max_rate?: Maybe; - operator_address?: Maybe; - self_delegate_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Info_Max_Order_By = { - consensus_address?: InputMaybe; - max_change_rate?: InputMaybe; - max_rate?: InputMaybe; - operator_address?: InputMaybe; - self_delegate_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Info_Min_Fields = { - __typename?: 'bdjuno_provider_validator_info_min_fields'; - consensus_address?: Maybe; - max_change_rate?: Maybe; - max_rate?: Maybe; - operator_address?: Maybe; - self_delegate_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Info_Min_Order_By = { - consensus_address?: InputMaybe; - max_change_rate?: InputMaybe; - max_rate?: InputMaybe; - operator_address?: InputMaybe; - self_delegate_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Info_Order_By = { - account?: InputMaybe; - consensus_address?: InputMaybe; - max_change_rate?: InputMaybe; - max_rate?: InputMaybe; - operator_address?: InputMaybe; - self_delegate_address?: InputMaybe; - validator?: InputMaybe; -}; - -export enum Bdjuno_Provider_Validator_Info_Select_Column { - ConsensusAddress = 'consensus_address', - MaxChangeRate = 'max_change_rate', - MaxRate = 'max_rate', - OperatorAddress = 'operator_address', - SelfDelegateAddress = 'self_delegate_address' -} - -export type Bdjuno_Provider_Validator_Max_Fields = { - __typename?: 'bdjuno_provider_validator_max_fields'; - consensus_address?: Maybe; - consensus_pubkey?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Min_Fields = { - __typename?: 'bdjuno_provider_validator_min_fields'; - consensus_address?: Maybe; - consensus_pubkey?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Order_By = { - blocks_aggregate?: InputMaybe; - consensus_address?: InputMaybe; - consensus_pubkey?: InputMaybe; - double_sign_votes_aggregate?: InputMaybe; - pre_commits_aggregate?: InputMaybe; - proposal_validator_status_snapshot?: InputMaybe; - proposal_validator_status_snapshots_aggregate?: InputMaybe; - validator_commissions_aggregate?: InputMaybe; - validator_descriptions_aggregate?: InputMaybe; - validator_info?: InputMaybe; - validator_infos_aggregate?: InputMaybe; - validator_signing_infos_aggregate?: InputMaybe; - validator_statuses_aggregate?: InputMaybe; - validator_voting_powers_aggregate?: InputMaybe; -}; - -export enum Bdjuno_Provider_Validator_Select_Column { - ConsensusAddress = 'consensus_address', - ConsensusPubkey = 'consensus_pubkey' -} - -export type Bdjuno_Provider_Validator_Signing_Info = { - __typename?: 'bdjuno_provider_validator_signing_info'; - height: Scalars['bdjuno_provider_bigint']; - index_offset: Scalars['bdjuno_provider_bigint']; - jailed_until: Scalars['bdjuno_provider_timestamp']; - missed_blocks_counter: Scalars['bdjuno_provider_bigint']; - start_height: Scalars['bdjuno_provider_bigint']; - tombstoned: Scalars['Boolean']; - validator_address: Scalars['String']; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Aggregate = { - __typename?: 'bdjuno_provider_validator_signing_info_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Aggregate_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Validator_Signing_Info_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Avg_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_avg_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Avg_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - index_offset?: InputMaybe; - jailed_until?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; - tombstoned?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Max_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_max_fields'; - height?: Maybe; - index_offset?: Maybe; - jailed_until?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; - validator_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Max_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - jailed_until?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Min_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_min_fields'; - height?: Maybe; - index_offset?: Maybe; - jailed_until?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; - validator_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Min_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - jailed_until?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - jailed_until?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; - tombstoned?: InputMaybe; - validator_address?: InputMaybe; -}; - -export enum Bdjuno_Provider_Validator_Signing_Info_Select_Column { - Height = 'height', - IndexOffset = 'index_offset', - JailedUntil = 'jailed_until', - MissedBlocksCounter = 'missed_blocks_counter', - StartHeight = 'start_height', - Tombstoned = 'tombstoned', - ValidatorAddress = 'validator_address' -} - -export type Bdjuno_Provider_Validator_Signing_Info_Stddev_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_stddev_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Stddev_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_stddev_pop_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Stddev_Pop_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_stddev_samp_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Stddev_Samp_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Sum_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_sum_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Sum_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_var_pop_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Var_Pop_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_var_samp_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Var_Samp_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Variance_Fields = { - __typename?: 'bdjuno_provider_validator_signing_info_variance_fields'; - height?: Maybe; - index_offset?: Maybe; - missed_blocks_counter?: Maybe; - start_height?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Signing_Info_Variance_Order_By = { - height?: InputMaybe; - index_offset?: InputMaybe; - missed_blocks_counter?: InputMaybe; - start_height?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status = { - __typename?: 'bdjuno_provider_validator_status'; - height: Scalars['bdjuno_provider_bigint']; - jailed: Scalars['Boolean']; - status: Scalars['Int']; - tombstoned: Scalars['Boolean']; - validator: Bdjuno_Provider_Validator; - validator_address: Scalars['String']; -}; - -export type Bdjuno_Provider_Validator_Status_Aggregate = { - __typename?: 'bdjuno_provider_validator_status_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Validator_Status_Aggregate_Fields = { - __typename?: 'bdjuno_provider_validator_status_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Validator_Status_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Avg_Fields = { - __typename?: 'bdjuno_provider_validator_status_avg_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Avg_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - jailed?: InputMaybe; - status?: InputMaybe; - tombstoned?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Max_Fields = { - __typename?: 'bdjuno_provider_validator_status_max_fields'; - height?: Maybe; - status?: Maybe; - validator_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Max_Order_By = { - height?: InputMaybe; - status?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Min_Fields = { - __typename?: 'bdjuno_provider_validator_status_min_fields'; - height?: Maybe; - status?: Maybe; - validator_address?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Min_Order_By = { - height?: InputMaybe; - status?: InputMaybe; - validator_address?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Order_By = { - height?: InputMaybe; - jailed?: InputMaybe; - status?: InputMaybe; - tombstoned?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; -}; - -export enum Bdjuno_Provider_Validator_Status_Select_Column { - Height = 'height', - Jailed = 'jailed', - Status = 'status', - Tombstoned = 'tombstoned', - ValidatorAddress = 'validator_address' -} - -export type Bdjuno_Provider_Validator_Status_Stddev_Fields = { - __typename?: 'bdjuno_provider_validator_status_stddev_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Stddev_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_status_stddev_pop_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Stddev_Pop_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_status_stddev_samp_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Stddev_Samp_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Sum_Fields = { - __typename?: 'bdjuno_provider_validator_status_sum_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Sum_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_status_var_pop_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Var_Pop_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_status_var_samp_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Var_Samp_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Status_Variance_Fields = { - __typename?: 'bdjuno_provider_validator_status_variance_fields'; - height?: Maybe; - status?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Status_Variance_Order_By = { - height?: InputMaybe; - status?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power = { - __typename?: 'bdjuno_provider_validator_voting_power'; - block: Bdjuno_Provider_Block; - height: Scalars['bdjuno_provider_bigint']; - validator: Bdjuno_Provider_Validator; - validator_address: Scalars['String']; - voting_power: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Aggregate = { - __typename?: 'bdjuno_provider_validator_voting_power_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Aggregate_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Validator_Voting_Power_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Avg_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_avg_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Avg_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - block?: InputMaybe; - height?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Max_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_max_fields'; - height?: Maybe; - validator_address?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Max_Order_By = { - height?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Min_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_min_fields'; - height?: Maybe; - validator_address?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Min_Order_By = { - height?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Order_By = { - block?: InputMaybe; - height?: InputMaybe; - validator?: InputMaybe; - validator_address?: InputMaybe; - voting_power?: InputMaybe; -}; - -export enum Bdjuno_Provider_Validator_Voting_Power_Select_Column { - Height = 'height', - ValidatorAddress = 'validator_address', - VotingPower = 'voting_power' -} - -export type Bdjuno_Provider_Validator_Voting_Power_Stddev_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_stddev_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Stddev_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_stddev_pop_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Stddev_Pop_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_stddev_samp_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Stddev_Samp_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Sum_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_sum_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Sum_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_var_pop_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Var_Pop_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_var_samp_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Var_Samp_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Variance_Fields = { - __typename?: 'bdjuno_provider_validator_voting_power_variance_fields'; - height?: Maybe; - voting_power?: Maybe; -}; - -export type Bdjuno_Provider_Validator_Voting_Power_Variance_Order_By = { - height?: InputMaybe; - voting_power?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account = { - __typename?: 'bdjuno_provider_vesting_account'; - account: Bdjuno_Provider_Account; - address: Scalars['String']; - end_time: Scalars['bdjuno_provider_timestamp']; - id: Scalars['Int']; - original_vesting: Scalars['bdjuno_provider__coin']; - start_time?: Maybe; - type: Scalars['String']; - vesting_periods: Array; - vesting_periods_aggregate: Bdjuno_Provider_Vesting_Period_Aggregate; -}; - - -export type Bdjuno_Provider_Vesting_AccountVesting_PeriodsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Provider_Vesting_AccountVesting_Periods_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Aggregate = { - __typename?: 'bdjuno_provider_vesting_account_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Vesting_Account_Aggregate_Fields = { - __typename?: 'bdjuno_provider_vesting_account_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Vesting_Account_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Avg_Fields = { - __typename?: 'bdjuno_provider_vesting_account_avg_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Avg_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - account?: InputMaybe; - address?: InputMaybe; - end_time?: InputMaybe; - id?: InputMaybe; - original_vesting?: InputMaybe; - start_time?: InputMaybe; - type?: InputMaybe; - vesting_periods?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Max_Fields = { - __typename?: 'bdjuno_provider_vesting_account_max_fields'; - address?: Maybe; - end_time?: Maybe; - id?: Maybe; - start_time?: Maybe; - type?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Max_Order_By = { - address?: InputMaybe; - end_time?: InputMaybe; - id?: InputMaybe; - start_time?: InputMaybe; - type?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Min_Fields = { - __typename?: 'bdjuno_provider_vesting_account_min_fields'; - address?: Maybe; - end_time?: Maybe; - id?: Maybe; - start_time?: Maybe; - type?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Min_Order_By = { - address?: InputMaybe; - end_time?: InputMaybe; - id?: InputMaybe; - start_time?: InputMaybe; - type?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Order_By = { - account?: InputMaybe; - address?: InputMaybe; - end_time?: InputMaybe; - id?: InputMaybe; - original_vesting?: InputMaybe; - start_time?: InputMaybe; - type?: InputMaybe; - vesting_periods_aggregate?: InputMaybe; -}; - -export enum Bdjuno_Provider_Vesting_Account_Select_Column { - Address = 'address', - EndTime = 'end_time', - Id = 'id', - OriginalVesting = 'original_vesting', - StartTime = 'start_time', - Type = 'type' -} - -export type Bdjuno_Provider_Vesting_Account_Stddev_Fields = { - __typename?: 'bdjuno_provider_vesting_account_stddev_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Stddev_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_vesting_account_stddev_pop_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Stddev_Pop_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_vesting_account_stddev_samp_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Stddev_Samp_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Sum_Fields = { - __typename?: 'bdjuno_provider_vesting_account_sum_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Sum_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_vesting_account_var_pop_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Var_Pop_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_vesting_account_var_samp_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Var_Samp_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Variance_Fields = { - __typename?: 'bdjuno_provider_vesting_account_variance_fields'; - id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Account_Variance_Order_By = { - id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period = { - __typename?: 'bdjuno_provider_vesting_period'; - amount: Scalars['bdjuno_provider__coin']; - length: Scalars['bdjuno_provider_bigint']; - period_order: Scalars['bdjuno_provider_bigint']; - vesting_account: Bdjuno_Provider_Vesting_Account; - vesting_account_id: Scalars['bdjuno_provider_bigint']; -}; - -export type Bdjuno_Provider_Vesting_Period_Aggregate = { - __typename?: 'bdjuno_provider_vesting_period_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -export type Bdjuno_Provider_Vesting_Period_Aggregate_Fields = { - __typename?: 'bdjuno_provider_vesting_period_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -export type Bdjuno_Provider_Vesting_Period_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Aggregate_Order_By = { - avg?: InputMaybe; - count?: InputMaybe; - max?: InputMaybe; - min?: InputMaybe; - stddev?: InputMaybe; - stddev_pop?: InputMaybe; - stddev_samp?: InputMaybe; - sum?: InputMaybe; - var_pop?: InputMaybe; - var_samp?: InputMaybe; - variance?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Avg_Fields = { - __typename?: 'bdjuno_provider_vesting_period_avg_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Avg_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - amount?: InputMaybe; - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Max_Fields = { - __typename?: 'bdjuno_provider_vesting_period_max_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Max_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Min_Fields = { - __typename?: 'bdjuno_provider_vesting_period_min_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Min_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Order_By = { - amount?: InputMaybe; - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export enum Bdjuno_Provider_Vesting_Period_Select_Column { - Amount = 'amount', - Length = 'length', - PeriodOrder = 'period_order', - VestingAccountId = 'vesting_account_id' -} - -export type Bdjuno_Provider_Vesting_Period_Stddev_Fields = { - __typename?: 'bdjuno_provider_vesting_period_stddev_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Stddev_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Stddev_Pop_Fields = { - __typename?: 'bdjuno_provider_vesting_period_stddev_pop_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Stddev_Pop_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Stddev_Samp_Fields = { - __typename?: 'bdjuno_provider_vesting_period_stddev_samp_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Stddev_Samp_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Sum_Fields = { - __typename?: 'bdjuno_provider_vesting_period_sum_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Sum_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Var_Pop_Fields = { - __typename?: 'bdjuno_provider_vesting_period_var_pop_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Var_Pop_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Var_Samp_Fields = { - __typename?: 'bdjuno_provider_vesting_period_var_samp_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Var_Samp_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Variance_Fields = { - __typename?: 'bdjuno_provider_vesting_period_variance_fields'; - length?: Maybe; - period_order?: Maybe; - vesting_account_id?: Maybe; -}; - -export type Bdjuno_Provider_Vesting_Period_Variance_Order_By = { - length?: InputMaybe; - period_order?: InputMaybe; - vesting_account_id?: InputMaybe; -}; - -export type Bdjuno_Providerquery_Root = { - __typename?: 'bdjuno_providerquery_root'; - account: Array; - account_aggregate: Bdjuno_Provider_Account_Aggregate; - account_by_pk?: Maybe; - action_account_balance?: Maybe; - action_delegation?: Maybe; - action_delegation_reward?: Maybe>>; - action_delegation_total?: Maybe; - action_delegator_withdraw_address: Bdjuno_Provider_ActionAddress; - action_redelegation?: Maybe; - action_unbonding_delegation?: Maybe; - action_unbonding_delegation_total?: Maybe; - action_validator_commission_amount?: Maybe; - action_validator_delegations?: Maybe; - action_validator_redelegations_from?: Maybe; - action_validator_unbonding_delegations?: Maybe; - average_block_time_from_genesis: Array; - average_block_time_from_genesis_aggregate: Bdjuno_Provider_Average_Block_Time_From_Genesis_Aggregate; - average_block_time_per_day: Array; - average_block_time_per_day_aggregate: Bdjuno_Provider_Average_Block_Time_Per_Day_Aggregate; - average_block_time_per_hour: Array; - average_block_time_per_hour_aggregate: Bdjuno_Provider_Average_Block_Time_Per_Hour_Aggregate; - average_block_time_per_minute: Array; - average_block_time_per_minute_aggregate: Bdjuno_Provider_Average_Block_Time_Per_Minute_Aggregate; - block: Array; - block_aggregate: Bdjuno_Provider_Block_Aggregate; - block_by_pk?: Maybe; - community_pool: Array; - community_pool_aggregate: Bdjuno_Provider_Community_Pool_Aggregate; - distribution_params: Array; - distribution_params_aggregate: Bdjuno_Provider_Distribution_Params_Aggregate; - distribution_params_by_pk?: Maybe; - double_sign_evidence: Array; - double_sign_evidence_aggregate: Bdjuno_Provider_Double_Sign_Evidence_Aggregate; - double_sign_vote: Array; - double_sign_vote_aggregate: Bdjuno_Provider_Double_Sign_Vote_Aggregate; - double_sign_vote_by_pk?: Maybe; - fee_grant_allowance: Array; - fee_grant_allowance_aggregate: Bdjuno_Provider_Fee_Grant_Allowance_Aggregate; - fee_grant_allowance_by_pk?: Maybe; - genesis: Array; - genesis_aggregate: Bdjuno_Provider_Genesis_Aggregate; - gov_params: Array; - gov_params_aggregate: Bdjuno_Provider_Gov_Params_Aggregate; - gov_params_by_pk?: Maybe; - inflation: Array; - inflation_aggregate: Bdjuno_Provider_Inflation_Aggregate; - message: Array; - message_aggregate: Bdjuno_Provider_Message_Aggregate; - messages_by_address: Array; - messages_by_address_aggregate: Bdjuno_Provider_Message_Aggregate; - mint_params: Array; - mint_params_aggregate: Bdjuno_Provider_Mint_Params_Aggregate; - mint_params_by_pk?: Maybe; - modules: Array; - modules_aggregate: Bdjuno_Provider_Modules_Aggregate; - modules_by_pk?: Maybe; - pre_commit: Array; - pre_commit_aggregate: Bdjuno_Provider_Pre_Commit_Aggregate; - proposal: Array; - proposal_aggregate: Bdjuno_Provider_Proposal_Aggregate; - proposal_by_pk?: Maybe; - proposal_deposit: Array; - proposal_deposit_aggregate: Bdjuno_Provider_Proposal_Deposit_Aggregate; - proposal_staking_pool_snapshot: Array; - proposal_staking_pool_snapshot_aggregate: Bdjuno_Provider_Proposal_Staking_Pool_Snapshot_Aggregate; - proposal_staking_pool_snapshot_by_pk?: Maybe; - proposal_tally_result: Array; - proposal_tally_result_aggregate: Bdjuno_Provider_Proposal_Tally_Result_Aggregate; - proposal_tally_result_by_pk?: Maybe; - proposal_validator_status_snapshot: Array; - proposal_validator_status_snapshot_aggregate: Bdjuno_Provider_Proposal_Validator_Status_Snapshot_Aggregate; - proposal_validator_status_snapshot_by_pk?: Maybe; - proposal_vote: Array; - proposal_vote_aggregate: Bdjuno_Provider_Proposal_Vote_Aggregate; - slashing_params: Array; - slashing_params_aggregate: Bdjuno_Provider_Slashing_Params_Aggregate; - slashing_params_by_pk?: Maybe; - software_upgrade_plan: Array; - software_upgrade_plan_aggregate: Bdjuno_Provider_Software_Upgrade_Plan_Aggregate; - staking_params: Array; - staking_params_aggregate: Bdjuno_Provider_Staking_Params_Aggregate; - staking_params_by_pk?: Maybe; - staking_pool: Array; - staking_pool_aggregate: Bdjuno_Provider_Staking_Pool_Aggregate; - supply: Array; - supply_aggregate: Bdjuno_Provider_Supply_Aggregate; - token: Array; - token_aggregate: Bdjuno_Provider_Token_Aggregate; - token_price: Array; - token_price_aggregate: Bdjuno_Provider_Token_Price_Aggregate; - token_price_by_pk?: Maybe; - token_price_history: Array; - token_price_history_aggregate: Bdjuno_Provider_Token_Price_History_Aggregate; - token_unit: Array; - token_unit_aggregate: Bdjuno_Provider_Token_Unit_Aggregate; - transaction: Array; - transaction_aggregate: Bdjuno_Provider_Transaction_Aggregate; - validator: Array; - validator_aggregate: Bdjuno_Provider_Validator_Aggregate; - validator_by_pk?: Maybe; - validator_commission: Array; - validator_commission_aggregate: Bdjuno_Provider_Validator_Commission_Aggregate; - validator_commission_by_pk?: Maybe; - validator_description: Array; - validator_description_aggregate: Bdjuno_Provider_Validator_Description_Aggregate; - validator_description_by_pk?: Maybe; - validator_info: Array; - validator_info_aggregate: Bdjuno_Provider_Validator_Info_Aggregate; - validator_info_by_pk?: Maybe; - validator_signing_info: Array; - validator_signing_info_aggregate: Bdjuno_Provider_Validator_Signing_Info_Aggregate; - validator_signing_info_by_pk?: Maybe; - validator_status: Array; - validator_status_aggregate: Bdjuno_Provider_Validator_Status_Aggregate; - validator_status_by_pk?: Maybe; - validator_voting_power: Array; - validator_voting_power_aggregate: Bdjuno_Provider_Validator_Voting_Power_Aggregate; - validator_voting_power_by_pk?: Maybe; - vesting_account: Array; - vesting_account_aggregate: Bdjuno_Provider_Vesting_Account_Aggregate; - vesting_account_by_pk?: Maybe; - vesting_period: Array; - vesting_period_aggregate: Bdjuno_Provider_Vesting_Period_Aggregate; -}; - - -export type Bdjuno_Providerquery_RootAccountArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAccount_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAccount_By_PkArgs = { - address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootAction_Account_BalanceArgs = { - address: Scalars['String']; - height?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_DelegationArgs = { - address: Scalars['String']; - count_total?: InputMaybe; - height?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Delegation_RewardArgs = { - address: Scalars['String']; - height?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Delegation_TotalArgs = { - address: Scalars['String']; - height?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Delegator_Withdraw_AddressArgs = { - address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootAction_RedelegationArgs = { - address: Scalars['String']; - count_total?: InputMaybe; - height?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Unbonding_DelegationArgs = { - address: Scalars['String']; - count_total?: InputMaybe; - height?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Unbonding_Delegation_TotalArgs = { - address: Scalars['String']; - height?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Validator_Commission_AmountArgs = { - address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootAction_Validator_DelegationsArgs = { - address: Scalars['String']; - count_total?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Validator_Redelegations_FromArgs = { - address: Scalars['String']; - count_total?: InputMaybe; - height?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAction_Validator_Unbonding_DelegationsArgs = { - address: Scalars['String']; - count_total?: InputMaybe; - limit?: InputMaybe; - offset?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_From_GenesisArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_From_Genesis_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_Per_DayArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_Per_Day_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_Per_HourArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_Per_Hour_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_Per_MinuteArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootAverage_Block_Time_Per_Minute_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootBlockArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootBlock_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootBlock_By_PkArgs = { - height: Scalars['bdjuno_provider_bigint']; -}; - - -export type Bdjuno_Providerquery_RootCommunity_PoolArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootCommunity_Pool_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootDistribution_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootDistribution_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootDistribution_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - -export type Bdjuno_Providerquery_RootDouble_Sign_EvidenceArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootDouble_Sign_Evidence_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootDouble_Sign_VoteArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootDouble_Sign_Vote_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootDouble_Sign_Vote_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootFee_Grant_AllowanceArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootFee_Grant_Allowance_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootFee_Grant_Allowance_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootGenesisArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootGenesis_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootGov_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootGov_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootGov_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - -export type Bdjuno_Providerquery_RootInflationArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootInflation_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootMessageArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootMessage_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootMessages_By_AddressArgs = { - args: Bdjuno_Provider_Messages_By_Address_Args; - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootMessages_By_Address_AggregateArgs = { - args: Bdjuno_Provider_Messages_By_Address_Args; - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootMint_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootMint_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootMint_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - -export type Bdjuno_Providerquery_RootModulesArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootModules_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootModules_By_PkArgs = { - module_name: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootPre_CommitArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootPre_Commit_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposalArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootProposal_DepositArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Deposit_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Staking_Pool_SnapshotArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Staking_Pool_Snapshot_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Staking_Pool_Snapshot_By_PkArgs = { - proposal_id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootProposal_Tally_ResultArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Tally_Result_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Tally_Result_By_PkArgs = { - proposal_id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootProposal_Validator_Status_SnapshotArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Validator_Status_Snapshot_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootProposal_VoteArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootProposal_Vote_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootSlashing_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootSlashing_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootSlashing_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - -export type Bdjuno_Providerquery_RootSoftware_Upgrade_PlanArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootSoftware_Upgrade_Plan_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootStaking_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootStaking_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootStaking_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - -export type Bdjuno_Providerquery_RootStaking_PoolArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootStaking_Pool_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootSupplyArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootSupply_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootTokenArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootToken_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootToken_PriceArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootToken_Price_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootToken_Price_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootToken_Price_HistoryArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootToken_Price_History_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootToken_UnitArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootToken_Unit_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootTransactionArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootTransaction_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidatorArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_By_PkArgs = { - consensus_address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootValidator_CommissionArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Commission_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Commission_By_PkArgs = { - validator_address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootValidator_DescriptionArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Description_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Description_By_PkArgs = { - validator_address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootValidator_InfoArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Info_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Info_By_PkArgs = { - consensus_address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootValidator_Signing_InfoArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Signing_Info_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Signing_Info_By_PkArgs = { - validator_address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootValidator_StatusArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Status_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Status_By_PkArgs = { - validator_address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootValidator_Voting_PowerArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Voting_Power_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootValidator_Voting_Power_By_PkArgs = { - validator_address: Scalars['String']; -}; - - -export type Bdjuno_Providerquery_RootVesting_AccountArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootVesting_Account_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootVesting_Account_By_PkArgs = { - id: Scalars['Int']; -}; - - -export type Bdjuno_Providerquery_RootVesting_PeriodArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Bdjuno_Providerquery_RootVesting_Period_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - /** Boolean expression to compare columns of type "bigint". All fields are combined with logical 'AND'. */ export type Bigint_Comparison_Exp = { _eq?: InputMaybe; @@ -10642,28 +1601,51 @@ export type Genesis_Stream_Cursor_Value_Input = { /** columns and relationships of "gov_params" */ export type Gov_Params = { __typename?: 'gov_params'; - deposit_params: Scalars['jsonb']; height: Scalars['bigint']; - tally_params: Scalars['jsonb']; - voting_params: Scalars['jsonb']; + one_row_id: Scalars['Boolean']; + params: Scalars['jsonb']; }; /** columns and relationships of "gov_params" */ -export type Gov_ParamsDeposit_ParamsArgs = { +export type Gov_ParamsParamsArgs = { path?: InputMaybe; }; +/** aggregated selection of "gov_params" */ +export type Gov_Params_Aggregate = { + __typename?: 'gov_params_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; -/** columns and relationships of "gov_params" */ -export type Gov_ParamsTally_ParamsArgs = { - path?: InputMaybe; +/** aggregate fields of "gov_params" */ +export type Gov_Params_Aggregate_Fields = { + __typename?: 'gov_params_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; -/** columns and relationships of "gov_params" */ -export type Gov_ParamsVoting_ParamsArgs = { - path?: InputMaybe; +/** aggregate fields of "gov_params" */ +export type Gov_Params_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type Gov_Params_Avg_Fields = { + __typename?: 'gov_params_avg_fields'; + height?: Maybe; }; /** Boolean expression to filter rows from the table "gov_params". All fields are combined with a logical 'AND'. */ @@ -10671,32 +1653,58 @@ export type Gov_Params_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - deposit_params?: InputMaybe; height?: InputMaybe; - tally_params?: InputMaybe; - voting_params?: InputMaybe; + one_row_id?: InputMaybe; + params?: InputMaybe; +}; + +/** aggregate max on columns */ +export type Gov_Params_Max_Fields = { + __typename?: 'gov_params_max_fields'; + height?: Maybe; +}; + +/** aggregate min on columns */ +export type Gov_Params_Min_Fields = { + __typename?: 'gov_params_min_fields'; + height?: Maybe; }; /** Ordering options when selecting data from "gov_params". */ export type Gov_Params_Order_By = { - deposit_params?: InputMaybe; height?: InputMaybe; - tally_params?: InputMaybe; - voting_params?: InputMaybe; + one_row_id?: InputMaybe; + params?: InputMaybe; }; /** select columns of table "gov_params" */ export enum Gov_Params_Select_Column { - /** column name */ - DepositParams = 'deposit_params', /** column name */ Height = 'height', /** column name */ - TallyParams = 'tally_params', + OneRowId = 'one_row_id', /** column name */ - VotingParams = 'voting_params' + Params = 'params' } +/** aggregate stddev on columns */ +export type Gov_Params_Stddev_Fields = { + __typename?: 'gov_params_stddev_fields'; + height?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Gov_Params_Stddev_Pop_Fields = { + __typename?: 'gov_params_stddev_pop_fields'; + height?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Gov_Params_Stddev_Samp_Fields = { + __typename?: 'gov_params_stddev_samp_fields'; + height?: Maybe; +}; + /** Streaming cursor of the table "gov_params" */ export type Gov_Params_Stream_Cursor_Input = { /** Stream column input with initial value */ @@ -10705,12 +1713,35 @@ export type Gov_Params_Stream_Cursor_Input = { ordering?: InputMaybe; }; -/** Initial value of the column from where the streaming should start */ -export type Gov_Params_Stream_Cursor_Value_Input = { - deposit_params?: InputMaybe; - height?: InputMaybe; - tally_params?: InputMaybe; - voting_params?: InputMaybe; +/** Initial value of the column from where the streaming should start */ +export type Gov_Params_Stream_Cursor_Value_Input = { + height?: InputMaybe; + one_row_id?: InputMaybe; + params?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Gov_Params_Sum_Fields = { + __typename?: 'gov_params_sum_fields'; + height?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Gov_Params_Var_Pop_Fields = { + __typename?: 'gov_params_var_pop_fields'; + height?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Gov_Params_Var_Samp_Fields = { + __typename?: 'gov_params_var_samp_fields'; + height?: Maybe; +}; + +/** aggregate variance on columns */ +export type Gov_Params_Variance_Fields = { + __typename?: 'gov_params_variance_fields'; + height?: Maybe; }; /** columns and relationships of "inflation" */ @@ -11471,14 +2502,13 @@ export type Proposal = { deposit_end_time?: Maybe; description: Scalars['String']; id: Scalars['Int']; + metadata: Scalars['String']; /** An array relationship */ proposal_deposits: Array; - proposal_route: Scalars['String']; /** An object relationship */ proposal_tally_result?: Maybe; /** An array relationship */ proposal_tally_results: Array; - proposal_type: Scalars['String']; /** An array relationship */ proposal_votes: Array; /** An object relationship */ @@ -11617,11 +2647,10 @@ export type Proposal_Bool_Exp = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; + metadata?: InputMaybe; proposal_deposits?: InputMaybe; - proposal_route?: InputMaybe; proposal_tally_result?: InputMaybe; proposal_tally_results?: InputMaybe; - proposal_type?: InputMaybe; proposal_votes?: InputMaybe; proposer?: InputMaybe; proposer_address?: InputMaybe; @@ -11793,8 +2822,7 @@ export type Proposal_Max_Fields = { deposit_end_time?: Maybe; description?: Maybe; id?: Maybe; - proposal_route?: Maybe; - proposal_type?: Maybe; + metadata?: Maybe; proposer_address?: Maybe; status?: Maybe; submit_time?: Maybe; @@ -11808,8 +2836,7 @@ export type Proposal_Max_Order_By = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; - proposal_route?: InputMaybe; - proposal_type?: InputMaybe; + metadata?: InputMaybe; proposer_address?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; @@ -11824,8 +2851,7 @@ export type Proposal_Min_Fields = { deposit_end_time?: Maybe; description?: Maybe; id?: Maybe; - proposal_route?: Maybe; - proposal_type?: Maybe; + metadata?: Maybe; proposer_address?: Maybe; status?: Maybe; submit_time?: Maybe; @@ -11839,8 +2865,7 @@ export type Proposal_Min_Order_By = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; - proposal_route?: InputMaybe; - proposal_type?: InputMaybe; + metadata?: InputMaybe; proposer_address?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; @@ -11855,11 +2880,10 @@ export type Proposal_Order_By = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; + metadata?: InputMaybe; proposal_deposits_aggregate?: InputMaybe; - proposal_route?: InputMaybe; proposal_tally_result?: InputMaybe; proposal_tally_results_aggregate?: InputMaybe; - proposal_type?: InputMaybe; proposal_votes_aggregate?: InputMaybe; proposer?: InputMaybe; proposer_address?: InputMaybe; @@ -11883,9 +2907,7 @@ export enum Proposal_Select_Column { /** column name */ Id = 'id', /** column name */ - ProposalRoute = 'proposal_route', - /** column name */ - ProposalType = 'proposal_type', + Metadata = 'metadata', /** column name */ ProposerAddress = 'proposer_address', /** column name */ @@ -12007,8 +3029,7 @@ export type Proposal_Stream_Cursor_Value_Input = { deposit_end_time?: InputMaybe; description?: InputMaybe; id?: InputMaybe; - proposal_route?: InputMaybe; - proposal_type?: InputMaybe; + metadata?: InputMaybe; proposer_address?: InputMaybe; status?: InputMaybe; submit_time?: InputMaybe; @@ -17287,7 +8308,6 @@ export type Query_Root = { average_block_time_per_hour: Array; /** fetch data from the table: "average_block_time_per_minute" */ average_block_time_per_minute: Array; - bdjuno_provider?: Maybe; /** fetch data from the table: "block" */ block: Array; /** fetch data from the table: "block" using primary key columns */ @@ -17312,6 +8332,10 @@ export type Query_Root = { genesis: Array; /** fetch data from the table: "gov_params" */ gov_params: Array; + /** fetch aggregated fields from the table: "gov_params" */ + gov_params_aggregate: Gov_Params_Aggregate; + /** fetch data from the table: "gov_params" using primary key columns */ + gov_params_by_pk?: Maybe; /** fetch data from the table: "inflation" */ inflation: Array; /** fetch aggregated fields from the table: "inflation" */ @@ -17652,6 +8676,20 @@ export type Query_RootGov_ParamsArgs = { }; +export type Query_RootGov_Params_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootGov_Params_By_PkArgs = { + one_row_id: Scalars['Boolean']; +}; + + export type Query_RootInflationArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -18474,6 +9512,10 @@ export type Subscription_Root = { genesis_stream: Array; /** fetch data from the table: "gov_params" */ gov_params: Array; + /** fetch aggregated fields from the table: "gov_params" */ + gov_params_aggregate: Gov_Params_Aggregate; + /** fetch data from the table: "gov_params" using primary key columns */ + gov_params_by_pk?: Maybe; /** fetch data from the table in a streaming manner: "gov_params" */ gov_params_stream: Array; /** fetch data from the table: "inflation" */ @@ -18881,6 +9923,20 @@ export type Subscription_RootGov_ParamsArgs = { }; +export type Subscription_RootGov_Params_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootGov_Params_By_PkArgs = { + one_row_id: Scalars['Boolean']; +}; + + export type Subscription_RootGov_Params_StreamArgs = { batch_size: Scalars['Int']; cursor: Array>; @@ -22028,14 +13084,14 @@ export type OnlineVotingPowerQuery = { activeTotal: { __typename?: 'validator_st export type ParamsQueryVariables = Exact<{ [key: string]: never; }>; -export type ParamsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }>, mintParams: Array<{ __typename?: 'mint_params', params: any }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }>, govParams: Array<{ __typename?: 'gov_params', depositParams: any, tallyParams: any, votingParams: any }> }; +export type ParamsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }>, mintParams: Array<{ __typename?: 'mint_params', params: any }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }>, govParams: Array<{ __typename?: 'gov_params', params: any, height: any }> }; export type ProposalDetailsQueryVariables = Exact<{ proposalId?: InputMaybe; }>; -export type ProposalDetailsQuery = { proposal: Array<{ __typename?: 'proposal', title: string, description: string, status?: string | null, content: any, proposer: string, proposalId: number, submitTime: any, proposalType: string, depositEndTime?: any | null, votingStartTime?: any | null, votingEndTime?: any | null }> }; +export type ProposalDetailsQuery = { proposal: Array<{ __typename?: 'proposal', title: string, description: string, status?: string | null, content: any, proposer: string, proposalId: number, submitTime: any, depositEndTime?: any | null, votingStartTime?: any | null, votingEndTime?: any | null }> }; export type ProposalDetailsTallyQueryVariables = Exact<{ proposalId?: InputMaybe; @@ -22123,12 +13179,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -22179,11 +13277,6 @@ export type ProviderCustomValidatorQueryVariables = Exact<{ export type ProviderCustomValidatorQuery = { ccv_validator: Array<{ __typename?: 'ccv_validator', ccv_validator_info?: { __typename?: 'provider_validator_info', operator_address: string, validator: { __typename?: 'provider_validator', validatorDescriptions: Array<{ __typename?: 'provider_validator_description', moniker?: string | null, avatar_url?: string | null, validator_address: string, website?: string | null, details?: string | null }> } } | null }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -23044,9 +14137,8 @@ export const ParamsDocument = gql` params } govParams: gov_params(limit: 1, order_by: {height: desc}) { - depositParams: deposit_params - tallyParams: tally_params - votingParams: voting_params + params + height } } `; @@ -23087,7 +14179,6 @@ export const ProposalDetailsDocument = gql` content proposalId: id submitTime: submit_time - proposalType: proposal_type depositEndTime: deposit_end_time votingStartTime: voting_start_time votingEndTime: voting_end_time @@ -23138,7 +14229,7 @@ export const ProposalDetailsTallyDocument = gql` bondedTokens: bonded_tokens } quorum: gov_params(limit: 1, order_by: {height: desc}) { - tallyParams: tally_params + tallyParams: params } } `; @@ -23633,12 +14724,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -23647,11 +14734,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -23659,14 +14817,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -23675,40 +14960,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web-stride/src/screens/account_details/components/staking/hooks.ts b/apps/web-stride/src/screens/account_details/components/staking/hooks.ts index 30b5ac5604..48795281a9 100644 --- a/apps/web-stride/src/screens/account_details/components/staking/hooks.ts +++ b/apps/web-stride/src/screens/account_details/components/staking/hooks.ts @@ -128,7 +128,7 @@ export const useStaking = ( .filter((x) => x.validatorInfo) .map((x) => ({ validator: x.validatorInfo?.operatorAddress ?? '', - commission: (x.validatorCommissions?.[0]?.commission ?? 0) * 100, + commission: (x?.validatorCommissions?.[0]?.commission ?? 0) * 100, })); setValidatorsCommission(formattedItems); @@ -331,7 +331,7 @@ export const useStaking = ( ); return { - state, + stakingState: state, delegations: { loading: delegationsLoading, count: delegationsPagination, diff --git a/apps/web-stride/src/screens/account_details/hooks.ts b/apps/web-stride/src/screens/account_details/hooks.ts index 3aea2dca38..17b3aae847 100644 --- a/apps/web-stride/src/screens/account_details/hooks.ts +++ b/apps/web-stride/src/screens/account_details/hooks.ts @@ -5,9 +5,12 @@ import { useCallback, useEffect, useState } from 'react'; import chainConfig from '@/chainConfig'; import { useDesmosProfile } from '@/hooks/use_desmos_profile'; import type { - AccountDetailState, BalanceType, OtherTokenType, + AccountWithdrawalAddressState, + AccountDesmosProfileState, + AccountBalanceState, + AccountRewardsState, } from '@/screens/account_details/types'; import { useAccountWithdrawalAddress, @@ -30,15 +33,9 @@ const defaultTokenUnit: TokenUnit = { exponent: 0, }; -const initialState: AccountDetailState = { +const balanceInitialState: AccountBalanceState = { loading: true, - balanceLoading: true, exists: true, - desmosProfile: null, - overview: { - address: '', - withdrawalAddress: '', - }, otherTokens: { count: 0, data: [], @@ -54,6 +51,25 @@ const initialState: AccountDetailState = { rewards: {}, }; +const desmosProfileInitialState: AccountDesmosProfileState = { + loading: true, + exists: true, + desmosProfile: null, +}; + +const withdrawalAddrInitialState: AccountWithdrawalAddressState = { + loading: true, + overview: { + address: '', + withdrawalAddress: '', + }, +}; + +const rewardsInitialState: AccountRewardsState = { + loading: true, + rewards: {}, +}; + type Data = { delegationRewards?: unknown; accountBalances?: unknown; @@ -62,10 +78,14 @@ type Data = { commission?: unknown; }; +type RewardsData = { + delegationRewards?: unknown; +}; + // ============================ -// rewards +// Format rewards // ============================ -const formatRewards = (_data: Data) => { +const formatRewards = (_data: Data | RewardsData) => { const rewardsDict: { [key: string]: TokenUnit } = {}; // log all the rewards // data?.delegationRewards?.forEach((x) => { @@ -79,7 +99,7 @@ const formatRewards = (_data: Data) => { }; // ============================ -// balance +// Format balance // ============================ const formatBalance = (data: Data): BalanceType => { const available = getDenom(R.pathOr([], ['accountBalances', 'coins'], data), primaryTokenUnit); @@ -91,7 +111,7 @@ const formatBalance = (data: Data): BalanceType => { const unbondingAmount = formatToken(unbonding.amount, primaryTokenUnit); const rewards = '0'; - // data.delegationRewards?.reduce((a: BigSource, b: unknown) => { + // data.delegationRewards?.reduce((a, b) => { // if (!b) return a; // const coins = R.pathOr([], ['coins'], b); // const dsmCoins = getDenom(coins, primaryTokenUnit); @@ -100,14 +120,14 @@ const formatBalance = (data: Data): BalanceType => { // }, '0') ?? '0'; const rewardsAmount = formatToken(rewards, primaryTokenUnit); - // const commission = getDenom( - // R.pathOr['coins']>>( - // [], - // ['commission', 'coins'], - // data - // ), - // primaryTokenUnit - // ); + // const commission = getDenom( + // R.pathOr['coins']>>( + // [], + // ['commission', 'coins'], + // data + // ), + // primaryTokenUnit + // ); const commissionAmount = formatToken(0, primaryTokenUnit); const total = Big(availableAmount.value) @@ -135,7 +155,7 @@ const formatBalance = (data: Data): BalanceType => { }; // ============================ -// other tokens +// Format other tokens // ============================ const formatOtherTokens = (data: Data) => { // Loop through balance and delegation to figure out what the other tokens are @@ -194,30 +214,55 @@ const formatOtherTokens = (data: Data) => { }; // ========================== -// Format Data +// Format Balance Data // ========================== const formatAllBalance = (data: Data) => { - const stateChange: Partial = { - balanceLoading: false, + const stateChange: Partial = { + loading: false, }; - stateChange.rewards = formatRewards(data); stateChange.balance = formatBalance(data); - formatOtherTokens(data); - stateChange.otherTokens = formatOtherTokens(data); return stateChange; }; -export const useAccountDetails = () => { +export const useAccountProfileDetails = () => { + const router = useRouter(); + const [state, setState] = useState(desmosProfileInitialState); + + const address = Array.isArray(router.query.address) + ? router.query.address[0] + : router.query.address ?? ''; + + // ========================== + // Desmos Profile + // ========================== + const { data: dataDesmosProfile, loading: loadingDesmosProfile } = useDesmosProfile({ + addresses: [address], + skip: !extra.profile || !address, + }); + useEffect( + () => + setState((prevState) => ({ + ...prevState, + desmosProfile: dataDesmosProfile?.[0], + loading: loadingDesmosProfile, + })), + [dataDesmosProfile, loadingDesmosProfile] + ); + + return { profileState: state }; +}; + +export const useAccountBalance = () => { const router = useRouter(); - const [state, setState] = useState(initialState); + const [state, setState] = useState(balanceInitialState); const handleSetState = useCallback( - (stateChange: (prevState: AccountDetailState) => AccountDetailState) => { + (stateChange: (prevState: AccountBalanceState) => AccountBalanceState) => { setState((prevState) => { const newState = stateChange(prevState); return R.equals(prevState, newState) ? prevState : newState; @@ -251,23 +296,6 @@ export const useAccountDetails = () => { } }, [address, providerAddress, valAddressesInfo]); - // ========================== - // Desmos Profile - // ========================== - const { data: dataDesmosProfile, loading: loadingDesmosProfile } = useDesmosProfile({ - addresses: [address], - skip: !extra.profile || !address, - }); - useEffect( - () => - setState((prevState) => ({ - ...prevState, - desmosProfile: dataDesmosProfile?.[0], - loading: loadingDesmosProfile, - })), - [dataDesmosProfile, loadingDesmosProfile] - ); - const commission = useCommission(providerAddress); const available = useAvailableBalances(providerAddress); const delegation = useDelegationBalance(providerAddress); @@ -283,29 +311,63 @@ export const useAccountDetails = () => { delegationRewards?: any; } = {}; formattedRawData.commission = R.pathOr({ coins: [] }, ['commission'], commission); - formattedRawData.accountBalances = R.pathOr( - { coins: [] }, - ['bdjuno_provider', 'accountBalances'], - available - ); - formattedRawData.delegationBalance = R.pathOr( - { coins: [] }, - ['bdjuno_provider', 'delegationBalance'], - delegation - ); - formattedRawData.unbondingBalance = R.pathOr( - { coins: [] }, - ['bdjuno_provider', 'unbondingBalance'], - unbonding - ); - formattedRawData.delegationRewards = R.pathOr( - [], - ['bdjuno_provider', 'delegationRewards'], - rewards - ); - handleSetState((prevState) => ({ ...prevState, ...formatAllBalance(formattedRawData) })); + formattedRawData.accountBalances = R.pathOr({ coins: [] }, ['accountBalances'], available); + formattedRawData.delegationBalance = R.pathOr({ coins: [] }, ['delegationBalance'], delegation); + formattedRawData.unbondingBalance = R.pathOr({ coins: [] }, ['unbondingBalance'], unbonding); + formattedRawData.delegationRewards = R.pathOr([], ['delegationRewards'], rewards); + const formatAccountBalance = formatAllBalance(formattedRawData); + + if (Object.keys(formatAccountBalance).length > 0) { + handleSetState((prevState) => ({ + ...prevState, + ...formatAccountBalance, + loading: false, + })); + } }, [commission, available, delegation, unbonding, rewards, handleSetState]); + return { state }; +}; + +export const useAccountWithdrawalAddr = () => { + const router = useRouter(); + const [state, setState] = useState(withdrawalAddrInitialState); + + const handleSetState = useCallback( + (stateChange: (prevState: AccountWithdrawalAddressState) => AccountWithdrawalAddressState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + + const { data: valAddressesInfo } = useValidatorConsumerProviderAddressesQuery(); + + const address = Array.isArray(router.query.address) + ? router.query.address[0] + : router.query.address ?? ''; + + const [providerAddress, setProviderAddress] = useState(address); + + useEffect(() => { + let provider = ''; + if (valAddressesInfo?.ccv_validator) { + if (providerAddress.startsWith(prefix.validator)) { + const matchingValidator = valAddressesInfo.ccv_validator.find( + (x) => x.consumerOperatorAddress === providerAddress + ); + if (matchingValidator) { + provider = matchingValidator.providerOperatorAddress ?? ''; + } else { + provider = address; + } + setProviderAddress(provider); + } + } + }, [address, providerAddress, valAddressesInfo]); + // ========================== // Fetch Data // ========================== @@ -323,3 +385,60 @@ export const useAccountDetails = () => { return { state }; }; + +export const useAccountRewards = () => { + const router = useRouter(); + const [state, setState] = useState(rewardsInitialState); + + const handleSetState = useCallback( + (stateChange: (prevState: AccountRewardsState) => AccountRewardsState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + const { data: valAddressesInfo } = useValidatorConsumerProviderAddressesQuery(); + + const address = Array.isArray(router.query.address) + ? router.query.address[0] + : router.query.address ?? ''; + + const [providerAddress, setProviderAddress] = useState(address); + + useEffect(() => { + let provider = ''; + if (valAddressesInfo?.ccv_validator) { + if (providerAddress.startsWith(prefix.validator)) { + const matchingValidator = valAddressesInfo.ccv_validator.find( + (x) => x.consumerOperatorAddress === providerAddress + ); + if (matchingValidator) { + provider = matchingValidator.providerOperatorAddress ?? ''; + } else { + provider = address; + } + setProviderAddress(provider); + } + } + }, [address, providerAddress, valAddressesInfo]); + + const rewards = useRewards(providerAddress); + + useEffect(() => { + const formattedRawData: { + delegationRewards?: any; + } = {}; + formattedRawData.delegationRewards = R.pathOr([], ['delegationRewards'], rewards); + const updatedRewards = formatRewards(formattedRawData); + + handleSetState((prevState) => ({ + ...prevState, + rewards: updatedRewards, + loading: false, + })); + }, [rewards, handleSetState]); + + return { state }; +}; diff --git a/apps/web-stride/src/screens/proposal_details/components/overview/index.tsx b/apps/web-stride/src/screens/proposal_details/components/overview/index.tsx new file mode 100644 index 0000000000..5aa355329b --- /dev/null +++ b/apps/web-stride/src/screens/proposal_details/components/overview/index.tsx @@ -0,0 +1,199 @@ +import Divider from '@mui/material/Divider'; +import Typography from '@mui/material/Typography'; +import useAppTranslation from '@/hooks/useAppTranslation'; +import numeral from 'numeral'; +import * as R from 'ramda'; +import { FC, useCallback, useMemo } from 'react'; +import { useRecoilValue } from 'recoil'; +import Box from '@/components/box'; +import Markdown from '@/components/markdown'; +import Name from '@/components/name'; +import SingleProposal from '@/components/single_proposal'; +import { useProfileRecoil } from '@/recoil/profiles/hooks'; +import { readDate, readTimeFormat } from '@/recoil/settings'; +import CommunityPoolSpend from '@/screens/proposal_details/components/overview/components/community_pool_spend'; +import UpdateParams from '@/screens/proposal_details/components/overview/components/update_params'; +import ParamsChange from '@/screens/proposal_details/components/overview/components/params_change'; +import SoftwareUpgrade from '@/screens/proposal_details/components/overview/components/software_upgrade'; +import type { OverviewType } from '@/screens/proposal_details/types'; +import { getProposalType } from '@/screens/proposal_details/utils'; +import dayjs, { formatDayJs } from '@/utils/dayjs'; +import { formatNumber, formatToken } from '@/utils/format_token'; +import useStyles from './styles'; + +const Overview: FC<{ className?: string; overview: OverviewType }> = ({ className, overview }) => { + const dateFormat = useRecoilValue(readDate); + const timeFormat = useRecoilValue(readTimeFormat); + const { classes, cx } = useStyles(); + const { t } = useAppTranslation('proposals'); + + const types = useMemo(() => { + if (Array.isArray(overview.content)) { + const typeArray: string[] = []; + overview.content.forEach((type: { params: JSON; type: string }) => + typeArray.push(getProposalType(R.pathOr('', ['@type'], type))) + ); + return typeArray; + } + const typeArray: string[] = []; + typeArray.push(getProposalType(R.pathOr('', ['@type'], overview.content))); + return typeArray; + }, [overview.content]); + + const changes = useMemo(() => { + const changeList: any[] = []; + if (Array.isArray(overview.content)) { + overview.content.forEach((type: { params: JSON; type: string }) => { + changeList.push({ params: type.params, type: R.pathOr('', ['@type'], type) }); + }); + + return changeList; + } + return changeList; + }, [overview.content]); + + const { address: proposerAddress, name: proposerName } = useProfileRecoil(overview.proposer); + const { name: recipientName } = useProfileRecoil(overview?.content?.recipient); + const proposerMoniker = proposerName || overview.proposer; + const recipientMoniker = recipientName || overview?.content?.recipient; + const amountRequested = overview.content?.amount + ? formatToken(overview.content?.amount[0]?.amount, overview.content?.amount[0]?.denom) + : null; + const parsedAmountRequested = amountRequested + ? `${formatNumber( + amountRequested.value, + amountRequested.exponent + )} ${amountRequested.displayDenom.toUpperCase()}` + : ''; + + const getExtraDetails = useCallback(() => { + let extraDetails = null; + types.forEach((type: string) => { + if (type === 'parameterChangeProposal') { + extraDetails = ( + <> + + {t('changes')} + + + + ); + } + if (type === 'softwareUpgradeProposal') { + extraDetails = ( + <> + + {t('plan')} + + + + ); + } + if (type === 'communityPoolSpendProposal') { + extraDetails = ( + <> + + {t('content')} + + + + ); + } + + if (type.includes('MsgUpdateParams')) { + extraDetails = ( + <> + {changes.map((change) => ( + + ))} + + ); + } + }); + return extraDetails; + }, [changes, overview.content, parsedAmountRequested, recipientMoniker, t, types]); + + const extra = getExtraDetails(); + + return ( + + + +
+ + {t('type')} + + + {types.map((type: string) => ( + + {t(type)} + + ))} + + + {t('proposer')} + + + {!!overview.submitTime && ( + <> + + {t('submitTime')} + + + {formatDayJs(dayjs.utc(overview.submitTime), dateFormat, timeFormat)} + + + )} + {!!overview.depositEndTime && ( + <> + + {t('depositEndTime')} + + + {formatDayJs(dayjs.utc(overview.depositEndTime), dateFormat, timeFormat)} + + + )} + {!!overview.votingStartTime && ( + <> + + {t('votingStartTime')} + + + {formatDayJs(dayjs.utc(overview.votingStartTime), dateFormat, timeFormat)} + + + )} + {!!overview.votingEndTime && ( + <> + + {t('votingEndTime')} + + + {formatDayJs(dayjs.utc(overview.votingEndTime), dateFormat, timeFormat)} + + + )} + + {t('description')} + + + {extra} +
+
+ ); +}; + +export default Overview; diff --git a/apps/web-stride/src/screens/proposal_details/components/overview/styles.ts b/apps/web-stride/src/screens/proposal_details/components/overview/styles.ts new file mode 100644 index 0000000000..55ec30709d --- /dev/null +++ b/apps/web-stride/src/screens/proposal_details/components/overview/styles.ts @@ -0,0 +1,77 @@ +import { makeStyles } from 'tss-react/mui'; + +const useStyles = makeStyles()((theme) => ({ + root: { + '& .label': { + color: theme.palette.custom.fonts.fontThree, + }, + '& .content': { + marginBottom: theme.spacing(2), + display: 'block', + [theme.breakpoints.up('lg')]: { + display: 'flex', + }, + }, + '& .recipient': { + marginBottom: theme.spacing(2), + [theme.breakpoints.up('lg')]: { + display: 'block', + }, + }, + '& .amountRequested': { + marginBottom: theme.spacing(2), + display: 'block', + padding: '0', + [theme.breakpoints.up('lg')]: { + display: 'block', + paddingLeft: '30px', + }, + }, + '& .accordion': { + background: '#151519', + }, + }, + content: { + marginTop: theme.spacing(2), + display: 'grid', + p: { + lineHeight: 1.8, + }, + '& ul': { + padding: '0.25rem 0.5rem', + [theme.breakpoints.up('lg')]: { + padding: '0.5rem 1rem', + }, + }, + '& li': { + padding: '0.25rem 0.5rem', + [theme.breakpoints.up('lg')]: { + padding: '0.5rem 1rem', + }, + }, + '& > *': { + marginBottom: theme.spacing(1), + [theme.breakpoints.up('lg')]: { + marginBottom: theme.spacing(2), + }, + }, + [theme.breakpoints.up('lg')]: { + gridTemplateColumns: '200px auto', + }, + }, + time: { + marginTop: theme.spacing(2), + display: 'grid', + '& > *': { + marginBottom: theme.spacing(1), + [theme.breakpoints.up('md')]: { + marginBottom: theme.spacing(2), + }, + }, + [theme.breakpoints.up('md')]: { + gridTemplateColumns: 'repeat(2, 1fr)', + }, + }, +})); + +export default useStyles; diff --git a/apps/web-stride/src/screens/proposal_details/components/votes_graph/hooks.ts b/apps/web-stride/src/screens/proposal_details/components/votes_graph/hooks.ts new file mode 100644 index 0000000000..f086ae829d --- /dev/null +++ b/apps/web-stride/src/screens/proposal_details/components/votes_graph/hooks.ts @@ -0,0 +1,71 @@ +import Big from 'big.js'; +import { useRouter } from 'next/router'; +import * as R from 'ramda'; +import { useCallback, useState } from 'react'; +import chainConfig from '@/chainConfig'; +import { + ProposalDetailsTallyQuery, + useProposalDetailsTallyQuery, +} from '@/graphql/types/general_types'; +import type { VotesGraphState } from '@/screens/proposal_details/components/votes_graph/types'; +import { formatToken } from '@/utils/format_token'; + +const { votingPowerTokenUnit } = chainConfig(); + +const defaultTokenUnit: TokenUnit = { + value: '0', + baseDenom: '', + displayDenom: '', + exponent: 0, +}; + +export const useVotesGraph = () => { + const router = useRouter(); + const [state, setState] = useState({ + votes: { + yes: defaultTokenUnit, + no: defaultTokenUnit, + abstain: defaultTokenUnit, + veto: defaultTokenUnit, + }, + bonded: defaultTokenUnit, + quorum: '0', + }); + + const handleSetState = useCallback( + (stateChange: (prevState: VotesGraphState) => VotesGraphState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + + useProposalDetailsTallyQuery({ + variables: { + proposalId: parseFloat((router?.query?.id as string) ?? '0'), + }, + onCompleted: (data) => { + handleSetState((prevState) => ({ ...prevState, ...foramtProposalTally(data) })); + }, + }); + + const foramtProposalTally = (data: ProposalDetailsTallyQuery) => { + const quorumRaw = data.quorum?.[0]?.tallyParams?.quorum ?? '0'; + return { + votes: { + yes: formatToken(data?.proposalTallyResult?.[0]?.yes ?? '0', votingPowerTokenUnit), + no: formatToken(data?.proposalTallyResult?.[0]?.no ?? '0', votingPowerTokenUnit), + veto: formatToken(data?.proposalTallyResult?.[0]?.noWithVeto ?? '0', votingPowerTokenUnit), + abstain: formatToken(data?.proposalTallyResult?.[0]?.abstain ?? '0', votingPowerTokenUnit), + }, + bonded: formatToken(data?.stakingPool?.[0]?.bondedTokens ?? '0', votingPowerTokenUnit), + quorum: Big(quorumRaw)?.times(100).toFixed(2), + }; + }; + + return { + state, + }; +}; diff --git a/apps/web-stride/src/screens/proposal_details/hooks.ts b/apps/web-stride/src/screens/proposal_details/hooks.ts new file mode 100644 index 0000000000..43de7d33f2 --- /dev/null +++ b/apps/web-stride/src/screens/proposal_details/hooks.ts @@ -0,0 +1,95 @@ +import { useRouter } from 'next/router'; +import * as R from 'ramda'; +import { useCallback, useState } from 'react'; +import type { ProposalState } from '@/screens/proposal_details/types'; +import { ProposalDetailsQuery, useProposalDetailsQuery } from '@/graphql/types/general_types'; + +// ========================= +// overview +// ========================= +const formatOverview = (data: ProposalDetailsQuery) => { + const DEFAULT_TIME = '0001-01-01T00:00:00'; + let votingStartTime = data?.proposal?.[0]?.votingStartTime ?? DEFAULT_TIME; + votingStartTime = votingStartTime === DEFAULT_TIME ? '' : votingStartTime; + let votingEndTime = data?.proposal?.[0]?.votingEndTime ?? DEFAULT_TIME; + votingEndTime = votingEndTime === DEFAULT_TIME ? '' : votingEndTime; + + const overview = { + proposer: data?.proposal?.[0]?.proposer ?? '', + content: data?.proposal?.[0]?.content ?? '', + title: data?.proposal?.[0]?.title ?? '', + id: data?.proposal?.[0]?.proposalId ?? '', + description: data?.proposal?.[0]?.description ?? '', + status: data?.proposal?.[0]?.status ?? '', + submitTime: data?.proposal?.[0]?.submitTime ?? '', + depositEndTime: data?.proposal?.[0]?.depositEndTime ?? '', + votingStartTime, + votingEndTime, + }; + + return overview; +}; + +// ========================== +// parsers +// ========================== +const formatProposalQuery = (data: ProposalDetailsQuery) => { + const stateChange: Partial = { + loading: false, + }; + + if (!data.proposal.length) { + stateChange.exists = false; + return stateChange; + } + + stateChange.overview = formatOverview(data); + + return stateChange; +}; + +export const useProposalDetails = () => { + const router = useRouter(); + const [state, setState] = useState({ + loading: true, + exists: true, + overview: { + proposer: '', + content: { + recipient: '', + amount: [], + }, + title: '', + id: 0, + description: '', + status: '', + submitTime: '', + depositEndTime: '', + votingStartTime: '', + votingEndTime: '', + }, + }); + + const handleSetState = useCallback((stateChange: (prevState: ProposalState) => ProposalState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, []); + + // ========================== + // fetch data + // ========================== + useProposalDetailsQuery({ + variables: { + proposalId: parseFloat((router?.query?.id as string) ?? '0'), + }, + onCompleted: (data) => { + handleSetState((prevState) => ({ ...prevState, ...formatProposalQuery(data) })); + }, + }); + + return { + state, + }; +}; diff --git a/apps/web-stride/src/screens/proposal_details/types.ts b/apps/web-stride/src/screens/proposal_details/types.ts new file mode 100644 index 0000000000..2055522c4b --- /dev/null +++ b/apps/web-stride/src/screens/proposal_details/types.ts @@ -0,0 +1,24 @@ +export interface OverviewType { + title: string; + id: number; + proposer: string; + description: string; + status: string; + submitTime: string; + depositEndTime: string; + votingStartTime: string | null; + votingEndTime: string | null; + content: { + recipient: string; + amount: Array<{ + amount: string; + denom: string; + }>; + }; +} + +export interface ProposalState { + loading: boolean; + exists: boolean; + overview: OverviewType; +} diff --git a/apps/web-wormhole/src/graphql/general/validator_details.graphql b/apps/web-wormhole/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web-wormhole/src/graphql/general/validator_details.graphql +++ b/apps/web-wormhole/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web-wormhole/src/graphql/types/general_types.ts b/apps/web-wormhole/src/graphql/types/general_types.ts index e5192df66c..9af3fe8dbd 100644 --- a/apps/web-wormhole/src/graphql/types/general_types.ts +++ b/apps/web-wormhole/src/graphql/types/general_types.ts @@ -3231,6 +3231,8 @@ export type Query_Root = { transaction: Array; /** fetch data from the table: "validator" */ validator: Array; + /** fetch aggregated fields from the table: "validator" */ + validator_aggregate: Validator_Aggregate; /** fetch data from the table: "validator_allow_list" */ validator_allow_list: Array; /** fetch aggregated fields from the table: "validator_allow_list" */ @@ -3803,6 +3805,15 @@ export type Query_RootValidatorArgs = { }; +export type Query_RootValidator_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootValidator_Allow_ListArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -4435,6 +4446,8 @@ export type Subscription_Root = { transaction: Array; /** fetch data from the table: "validator" */ validator: Array; + /** fetch aggregated fields from the table: "validator" */ + validator_aggregate: Validator_Aggregate; /** fetch data from the table: "validator_allow_list" */ validator_allow_list: Array; /** fetch aggregated fields from the table: "validator_allow_list" */ @@ -4921,6 +4934,15 @@ export type Subscription_RootValidatorArgs = { }; +export type Subscription_RootValidator_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootValidator_Allow_ListArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6018,6 +6040,28 @@ export type ValidatorValidator_Voting_Powers_AggregateArgs = { where?: InputMaybe; }; +/** aggregated selection of "validator" */ +export type Validator_Aggregate = { + __typename?: 'validator_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "validator" */ +export type Validator_Aggregate_Fields = { + __typename?: 'validator_aggregate_fields'; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; +}; + + +/** aggregate fields of "validator" */ +export type Validator_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + /** columns and relationships of "validator_allow_list" */ export type Validator_Allow_List = { __typename?: 'validator_allow_list'; @@ -6527,6 +6571,20 @@ export enum Validator_Info_Select_Column { SelfDelegateAddress = 'self_delegate_address' } +/** aggregate max on columns */ +export type Validator_Max_Fields = { + __typename?: 'validator_max_fields'; + consensus_address?: Maybe; + consensus_pubkey?: Maybe; +}; + +/** aggregate min on columns */ +export type Validator_Min_Fields = { + __typename?: 'validator_min_fields'; + consensus_address?: Maybe; + consensus_pubkey?: Maybe; +}; + /** Ordering options when selecting data from "validator". */ export type Validator_Order_By = { blocks_aggregate?: InputMaybe; @@ -8610,12 +8668,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -8652,11 +8752,6 @@ export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; - export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -10103,12 +10198,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -10117,11 +10208,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -10129,14 +10291,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -10145,40 +10434,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/apps/web/src/graphql/general/validator_details.graphql b/apps/web/src/graphql/general/validator_details.graphql index cdc166572e..7f249941a6 100644 --- a/apps/web/src/graphql/general/validator_details.graphql +++ b/apps/web/src/graphql/general/validator_details.graphql @@ -23,40 +23,95 @@ subscription ValidatorLastSeenListener($address: String) { } } -query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { details website } + } +} + +query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + +query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions(order_by: {height: desc}, limit: 1) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos(order_by: {height: desc}, limit: 1) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + +query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + +query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers(offset: 0, limit: 1, order_by: {height: desc}) { height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens } } +query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } + } +} diff --git a/apps/web/src/graphql/types/general_types.ts b/apps/web/src/graphql/types/general_types.ts index f300b55cac..a697046747 100644 --- a/apps/web/src/graphql/types/general_types.ts +++ b/apps/web/src/graphql/types/general_types.ts @@ -3143,6 +3143,19 @@ export type Messages_By_Address_Args = { types?: InputMaybe; }; +export type Messages_By_Single_Address_Args = { + address?: InputMaybe; + apikey?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_Get_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; @@ -3614,137 +3627,6 @@ export type Pre_Commit_Variance_Order_By = { voting_power?: InputMaybe; }; -/** columns and relationships of "profiles_params" */ -export type Profiles_Params = { - __typename?: 'profiles_params'; - height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; - params: Scalars['jsonb']; -}; - - -/** columns and relationships of "profiles_params" */ -export type Profiles_ParamsParamsArgs = { - path?: InputMaybe; -}; - -/** aggregated selection of "profiles_params" */ -export type Profiles_Params_Aggregate = { - __typename?: 'profiles_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "profiles_params" */ -export type Profiles_Params_Aggregate_Fields = { - __typename?: 'profiles_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "profiles_params" */ -export type Profiles_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Profiles_Params_Avg_Fields = { - __typename?: 'profiles_params_avg_fields'; - height?: Maybe; -}; - -/** Boolean expression to filter rows from the table "profiles_params". All fields are combined with a logical 'AND'. */ -export type Profiles_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -/** aggregate max on columns */ -export type Profiles_Params_Max_Fields = { - __typename?: 'profiles_params_max_fields'; - height?: Maybe; -}; - -/** aggregate min on columns */ -export type Profiles_Params_Min_Fields = { - __typename?: 'profiles_params_min_fields'; - height?: Maybe; -}; - -/** Ordering options when selecting data from "profiles_params". */ -export type Profiles_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -/** select columns of table "profiles_params" */ -export enum Profiles_Params_Select_Column { - /** column name */ - Height = 'height', - /** column name */ - OneRowId = 'one_row_id', - /** column name */ - Params = 'params' -} - -/** aggregate stddev on columns */ -export type Profiles_Params_Stddev_Fields = { - __typename?: 'profiles_params_stddev_fields'; - height?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Profiles_Params_Stddev_Pop_Fields = { - __typename?: 'profiles_params_stddev_pop_fields'; - height?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Profiles_Params_Stddev_Samp_Fields = { - __typename?: 'profiles_params_stddev_samp_fields'; - height?: Maybe; -}; - -/** aggregate sum on columns */ -export type Profiles_Params_Sum_Fields = { - __typename?: 'profiles_params_sum_fields'; - height?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Profiles_Params_Var_Pop_Fields = { - __typename?: 'profiles_params_var_pop_fields'; - height?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Profiles_Params_Var_Samp_Fields = { - __typename?: 'profiles_params_var_samp_fields'; - height?: Maybe; -}; - -/** aggregate variance on columns */ -export type Profiles_Params_Variance_Fields = { - __typename?: 'profiles_params_variance_fields'; - height?: Maybe; -}; - /** columns and relationships of "proposal" */ export type Proposal = { __typename?: 'proposal'; @@ -3961,7 +3843,7 @@ export type Proposal_Deposit = { /** An object relationship */ depositor?: Maybe; depositor_address?: Maybe; - height?: Maybe; + height: Scalars['bigint']; /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; @@ -4308,9 +4190,9 @@ export enum Proposal_Select_Column { /** columns and relationships of "proposal_staking_pool_snapshot" */ export type Proposal_Staking_Pool_Snapshot = { __typename?: 'proposal_staking_pool_snapshot'; - bonded_tokens: Scalars['bigint']; + bonded_tokens: Scalars['String']; height: Scalars['bigint']; - not_bonded_tokens: Scalars['bigint']; + not_bonded_tokens: Scalars['String']; /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; @@ -4349,9 +4231,7 @@ export type Proposal_Staking_Pool_Snapshot_Aggregate_FieldsCountArgs = { /** aggregate avg on columns */ export type Proposal_Staking_Pool_Snapshot_Avg_Fields = { __typename?: 'proposal_staking_pool_snapshot_avg_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; @@ -4360,9 +4240,9 @@ export type Proposal_Staking_Pool_Snapshot_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - bonded_tokens?: InputMaybe; + bonded_tokens?: InputMaybe; height?: InputMaybe; - not_bonded_tokens?: InputMaybe; + not_bonded_tokens?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; }; @@ -4370,18 +4250,18 @@ export type Proposal_Staking_Pool_Snapshot_Bool_Exp = { /** aggregate max on columns */ export type Proposal_Staking_Pool_Snapshot_Max_Fields = { __typename?: 'proposal_staking_pool_snapshot_max_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate min on columns */ export type Proposal_Staking_Pool_Snapshot_Min_Fields = { __typename?: 'proposal_staking_pool_snapshot_min_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; @@ -4409,63 +4289,49 @@ export enum Proposal_Staking_Pool_Snapshot_Select_Column { /** aggregate stddev on columns */ export type Proposal_Staking_Pool_Snapshot_Stddev_Fields = { __typename?: 'proposal_staking_pool_snapshot_stddev_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate stddev_pop on columns */ export type Proposal_Staking_Pool_Snapshot_Stddev_Pop_Fields = { __typename?: 'proposal_staking_pool_snapshot_stddev_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate stddev_samp on columns */ export type Proposal_Staking_Pool_Snapshot_Stddev_Samp_Fields = { __typename?: 'proposal_staking_pool_snapshot_stddev_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate sum on columns */ export type Proposal_Staking_Pool_Snapshot_Sum_Fields = { __typename?: 'proposal_staking_pool_snapshot_sum_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate var_pop on columns */ export type Proposal_Staking_Pool_Snapshot_Var_Pop_Fields = { __typename?: 'proposal_staking_pool_snapshot_var_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate var_samp on columns */ export type Proposal_Staking_Pool_Snapshot_Var_Samp_Fields = { __typename?: 'proposal_staking_pool_snapshot_var_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate variance on columns */ export type Proposal_Staking_Pool_Snapshot_Variance_Fields = { __typename?: 'proposal_staking_pool_snapshot_variance_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; @@ -4762,7 +4628,7 @@ export type Proposal_Tally_Result_Variance_Order_By = { export type Proposal_Validator_Status_Snapshot = { __typename?: 'proposal_validator_status_snapshot'; height: Scalars['bigint']; - id: Scalars['Int']; + id: Scalars['bigint']; jailed: Scalars['Boolean']; /** An object relationship */ proposal?: Maybe; @@ -4844,7 +4710,7 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - id?: InputMaybe; + id?: InputMaybe; jailed?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; @@ -4858,7 +4724,7 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { export type Proposal_Validator_Status_Snapshot_Max_Fields = { __typename?: 'proposal_validator_status_snapshot_max_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4879,7 +4745,7 @@ export type Proposal_Validator_Status_Snapshot_Max_Order_By = { export type Proposal_Validator_Status_Snapshot_Min_Fields = { __typename?: 'proposal_validator_status_snapshot_min_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4988,7 +4854,7 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Samp_Order_By = { export type Proposal_Validator_Status_Snapshot_Sum_Fields = { __typename?: 'proposal_validator_status_snapshot_sum_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -5098,6 +4964,8 @@ export type Proposal_Vote = { __typename?: 'proposal_vote'; /** An object relationship */ account: Account; + /** An object relationship */ + block: Block; height: Scalars['bigint']; option: Scalars['String']; /** An object relationship */ @@ -5171,6 +5039,7 @@ export type Proposal_Vote_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; account?: InputMaybe; + block?: InputMaybe; height?: InputMaybe; option?: InputMaybe; proposal?: InputMaybe; @@ -5220,6 +5089,7 @@ export type Proposal_Vote_Min_Order_By = { /** Ordering options when selecting data from "proposal_vote". */ export type Proposal_Vote_Order_By = { account?: InputMaybe; + block?: InputMaybe; height?: InputMaybe; option?: InputMaybe; proposal?: InputMaybe; @@ -5423,6 +5293,14 @@ export type Query_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -5439,12 +5317,6 @@ export type Query_Root = { pre_commit: Array; /** fetch aggregated fields from the table: "pre_commit" */ pre_commit_aggregate: Pre_Commit_Aggregate; - /** fetch data from the table: "profiles_params" */ - profiles_params: Array; - /** fetch aggregated fields from the table: "profiles_params" */ - profiles_params_aggregate: Profiles_Params_Aggregate; - /** fetch data from the table: "profiles_params" using primary key columns */ - profiles_params_by_pk?: Maybe; /** fetch data from the table: "proposal" */ proposal: Array; /** fetch aggregated fields from the table: "proposal" */ @@ -5603,12 +5475,14 @@ export type Query_RootAccount_By_PkArgs = { export type Query_RootAction_Account_BalanceArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; export type Query_RootAction_DelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5618,12 +5492,14 @@ export type Query_RootAction_DelegationArgs = { export type Query_RootAction_Delegation_RewardArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; export type Query_RootAction_Delegation_TotalArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; @@ -5635,6 +5511,7 @@ export type Query_RootAction_Delegator_Withdraw_AddressArgs = { export type Query_RootAction_RedelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5644,6 +5521,7 @@ export type Query_RootAction_RedelegationArgs = { export type Query_RootAction_Unbonding_DelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5653,6 +5531,7 @@ export type Query_RootAction_Unbonding_DelegationArgs = { export type Query_RootAction_Unbonding_Delegation_TotalArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; @@ -5984,6 +5863,46 @@ export type Query_RootMessages_By_Address_AggregateArgs = { }; +export type Query_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6048,29 +5967,6 @@ export type Query_RootPre_Commit_AggregateArgs = { }; -export type Query_RootProfiles_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootProfiles_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootProfiles_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootProposalArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6177,7 +6073,7 @@ export type Query_RootProposal_Validator_Status_Snapshot_AggregateArgs = { export type Query_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; + id: Scalars['bigint']; }; @@ -7036,9 +6932,9 @@ export type Staking_Params_Variance_Fields = { /** columns and relationships of "staking_pool" */ export type Staking_Pool = { __typename?: 'staking_pool'; - bonded_tokens: Scalars['bigint']; + bonded_tokens: Scalars['String']; height: Scalars['bigint']; - not_bonded_tokens: Scalars['bigint']; + not_bonded_tokens: Scalars['String']; staked_not_bonded_tokens?: Maybe; unbonding_tokens?: Maybe; }; @@ -7076,9 +6972,7 @@ export type Staking_Pool_Aggregate_FieldsCountArgs = { /** aggregate avg on columns */ export type Staking_Pool_Avg_Fields = { __typename?: 'staking_pool_avg_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** Boolean expression to filter rows from the table "staking_pool". All fields are combined with a logical 'AND'. */ @@ -7086,9 +6980,9 @@ export type Staking_Pool_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - bonded_tokens?: InputMaybe; + bonded_tokens?: InputMaybe; height?: InputMaybe; - not_bonded_tokens?: InputMaybe; + not_bonded_tokens?: InputMaybe; staked_not_bonded_tokens?: InputMaybe; unbonding_tokens?: InputMaybe; }; @@ -7096,9 +6990,9 @@ export type Staking_Pool_Bool_Exp = { /** aggregate max on columns */ export type Staking_Pool_Max_Fields = { __typename?: 'staking_pool_max_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; staked_not_bonded_tokens?: Maybe; unbonding_tokens?: Maybe; }; @@ -7106,9 +7000,9 @@ export type Staking_Pool_Max_Fields = { /** aggregate min on columns */ export type Staking_Pool_Min_Fields = { __typename?: 'staking_pool_min_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; staked_not_bonded_tokens?: Maybe; unbonding_tokens?: Maybe; }; @@ -7139,57 +7033,43 @@ export enum Staking_Pool_Select_Column { /** aggregate stddev on columns */ export type Staking_Pool_Stddev_Fields = { __typename?: 'staking_pool_stddev_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate stddev_pop on columns */ export type Staking_Pool_Stddev_Pop_Fields = { __typename?: 'staking_pool_stddev_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate stddev_samp on columns */ export type Staking_Pool_Stddev_Samp_Fields = { __typename?: 'staking_pool_stddev_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate sum on columns */ export type Staking_Pool_Sum_Fields = { __typename?: 'staking_pool_sum_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate var_pop on columns */ export type Staking_Pool_Var_Pop_Fields = { __typename?: 'staking_pool_var_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate var_samp on columns */ export type Staking_Pool_Var_Samp_Fields = { __typename?: 'staking_pool_var_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate variance on columns */ export type Staking_Pool_Variance_Fields = { __typename?: 'staking_pool_variance_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; export type Subscription_Root = { @@ -7270,6 +7150,14 @@ export type Subscription_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -7286,12 +7174,6 @@ export type Subscription_Root = { pre_commit: Array; /** fetch aggregated fields from the table: "pre_commit" */ pre_commit_aggregate: Pre_Commit_Aggregate; - /** fetch data from the table: "profiles_params" */ - profiles_params: Array; - /** fetch aggregated fields from the table: "profiles_params" */ - profiles_params_aggregate: Profiles_Params_Aggregate; - /** fetch data from the table: "profiles_params" using primary key columns */ - profiles_params_by_pk?: Maybe; /** fetch data from the table: "proposal" */ proposal: Array; /** fetch aggregated fields from the table: "proposal" */ @@ -7745,6 +7627,46 @@ export type Subscription_RootMessages_By_Address_AggregateArgs = { }; +export type Subscription_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7809,29 +7731,6 @@ export type Subscription_RootPre_Commit_AggregateArgs = { }; -export type Subscription_RootProfiles_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootProfiles_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootProfiles_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootProposalArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7938,7 +7837,7 @@ export type Subscription_RootProposal_Validator_Status_Snapshot_AggregateArgs = export type Subscription_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; + id: Scalars['bigint']; }; @@ -11996,7 +11895,7 @@ export type MarketDataQueryVariables = Exact<{ }>; -export type MarketDataQuery = { communityPool: Array<{ __typename?: 'community_pool', coins: any }>, inflation: Array<{ __typename?: 'inflation', value: any }>, tokenPrice: Array<{ __typename?: 'token_price', price: any, marketCap: any }>, supply: Array<{ __typename?: 'supply', coins: any }>, bondedTokens: Array<{ __typename?: 'staking_pool', bonded_tokens: any }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }> }; +export type MarketDataQuery = { communityPool: Array<{ __typename?: 'community_pool', coins: any }>, inflation: Array<{ __typename?: 'inflation', value: any }>, tokenPrice: Array<{ __typename?: 'token_price', price: any, marketCap: any }>, supply: Array<{ __typename?: 'supply', coins: any }>, bondedTokens: Array<{ __typename?: 'staking_pool', bonded_tokens: string }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }> }; export type GetMessagesByAddressQueryVariables = Exact<{ address?: InputMaybe; @@ -12011,7 +11910,7 @@ export type GetMessagesByAddressQuery = { messagesByAddress: Array<{ __typename? export type OnlineVotingPowerQueryVariables = Exact<{ [key: string]: never; }>; -export type OnlineVotingPowerQuery = { activeTotal: { __typename?: 'validator_status_aggregate', aggregate?: { __typename?: 'validator_status_aggregate_fields', count: number } | null }, validatorVotingPowerAggregate: { __typename?: 'validator_voting_power_aggregate', aggregate?: { __typename?: 'validator_voting_power_aggregate_fields', sum?: { __typename?: 'validator_voting_power_sum_fields', votingPower?: any | null } | null } | null }, stakingPool: Array<{ __typename?: 'staking_pool', bonded: any }>, stakingParams: Array<{ __typename?: 'staking_params', params: any }> }; +export type OnlineVotingPowerQuery = { activeTotal: { __typename?: 'validator_status_aggregate', aggregate?: { __typename?: 'validator_status_aggregate_fields', count: number } | null }, validatorVotingPowerAggregate: { __typename?: 'validator_voting_power_aggregate', aggregate?: { __typename?: 'validator_voting_power_aggregate_fields', sum?: { __typename?: 'validator_voting_power_sum_fields', votingPower?: any | null } | null } | null }, stakingPool: Array<{ __typename?: 'staking_pool', bonded: string }>, stakingParams: Array<{ __typename?: 'staking_params', params: any }> }; export type ParamsQueryVariables = Exact<{ [key: string]: never; }>; @@ -12030,7 +11929,7 @@ export type ProposalDetailsTallyQueryVariables = Exact<{ }>; -export type ProposalDetailsTallyQuery = { proposalTallyResult: Array<{ __typename?: 'proposal_tally_result', yes: string, no: string, abstain: string, noWithVeto: string }>, stakingPool: Array<{ __typename?: 'proposal_staking_pool_snapshot', bondedTokens: any }>, quorum: Array<{ __typename?: 'gov_params', tallyParams: any }> }; +export type ProposalDetailsTallyQuery = { proposalTallyResult: Array<{ __typename?: 'proposal_tally_result', yes: string, no: string, abstain: string, noWithVeto: string }>, stakingPool: Array<{ __typename?: 'proposal_staking_pool_snapshot', bondedTokens: string }>, quorum: Array<{ __typename?: 'gov_params', tallyParams: any }> }; export type ProposalDetailsDepositsQueryVariables = Exact<{ proposalId?: InputMaybe; @@ -12072,7 +11971,7 @@ export type TokenPriceHistoryQuery = { tokenPrice: Array<{ __typename?: 'token_p export type TokenomicsQueryVariables = Exact<{ [key: string]: never; }>; -export type TokenomicsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, stakingPool: Array<{ __typename?: 'staking_pool', bonded: any, unbonded: any }>, supply: Array<{ __typename?: 'supply', coins: any }> }; +export type TokenomicsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, stakingPool: Array<{ __typename?: 'staking_pool', bonded: string, unbonded: string }>, supply: Array<{ __typename?: 'supply', coins: any }> }; export type TransactionDetailsQueryVariables = Exact<{ hash?: InputMaybe; @@ -12111,12 +12010,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: any }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -12151,12 +12092,7 @@ export type ValidatorUndelegationsQuery = { undelegations?: { __typename?: 'Acti export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; -export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: any }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; - -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; +export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13605,12 +13541,8 @@ export function useValidatorLastSeenListenerSubscription(baseOptions?: Apollo.Su } export type ValidatorLastSeenListenerSubscriptionHookResult = ReturnType; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13619,11 +13551,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13631,14 +13634,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13647,40 +13777,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/packages/ui/src/components/desmos_profile/index.tsx b/packages/ui/src/components/desmos_profile/index.tsx index 2c34774fe3..4fa21d5559 100644 --- a/packages/ui/src/components/desmos_profile/index.tsx +++ b/packages/ui/src/components/desmos_profile/index.tsx @@ -8,12 +8,14 @@ import Connections from '@/components/desmos_profile/components/connections'; import { useDesmosProfile } from '@/components/desmos_profile/hooks'; import useStyles from '@/components/desmos_profile/styles'; import Markdown from '@/components/markdown'; +import Loading from '@/components/loading'; type DesmosProfileProps = { className?: string; + loading?: boolean; } & Omit; -const DesmosProfile: FC = (props) => { +const DesmosProfile: FC = props => { const { t } = useAppTranslation('accounts'); const { classes, cx } = useStyles({ coverUrl: props.coverUrl }); const { connectionsOpen, handleConnectionsClose, handleConnectionsOpen } = useDesmosProfile(); @@ -23,33 +25,38 @@ const DesmosProfile: FC = (props) => { return ( <> -
-
-
- -
- - - {t('connections', { - connections: numeral(props.connections.length).format('0,0'), - })} - -
-
- {props.nickname} - - @{props.dtag} - -
- {props.bio && ( -
- -
+ {props.loading ? ( + + ) : ( + <> +
+
+
+
+ + + {t('connections', { + connections: numeral(props.connections.length).format('0,0'), + })} + +
+
+ {props.nickname} + + @{props.dtag} + +
+ {props.bio && ( +
+ +
+ )} + )} ; }; +export type Messages_By_Single_Address_Args = { + address?: InputMaybe; + apikey?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + types?: InputMaybe; +}; + +export type Messages_Get_Types_Args = { + limit?: InputMaybe; + offset?: InputMaybe; +}; + /** columns and relationships of "mint_params" */ export type Mint_Params = { __typename?: 'mint_params'; @@ -3614,137 +3627,6 @@ export type Pre_Commit_Variance_Order_By = { voting_power?: InputMaybe; }; -/** columns and relationships of "profiles_params" */ -export type Profiles_Params = { - __typename?: 'profiles_params'; - height: Scalars['bigint']; - one_row_id: Scalars['Boolean']; - params: Scalars['jsonb']; -}; - - -/** columns and relationships of "profiles_params" */ -export type Profiles_ParamsParamsArgs = { - path?: InputMaybe; -}; - -/** aggregated selection of "profiles_params" */ -export type Profiles_Params_Aggregate = { - __typename?: 'profiles_params_aggregate'; - aggregate?: Maybe; - nodes: Array; -}; - -/** aggregate fields of "profiles_params" */ -export type Profiles_Params_Aggregate_Fields = { - __typename?: 'profiles_params_aggregate_fields'; - avg?: Maybe; - count: Scalars['Int']; - max?: Maybe; - min?: Maybe; - stddev?: Maybe; - stddev_pop?: Maybe; - stddev_samp?: Maybe; - sum?: Maybe; - var_pop?: Maybe; - var_samp?: Maybe; - variance?: Maybe; -}; - - -/** aggregate fields of "profiles_params" */ -export type Profiles_Params_Aggregate_FieldsCountArgs = { - columns?: InputMaybe>; - distinct?: InputMaybe; -}; - -/** aggregate avg on columns */ -export type Profiles_Params_Avg_Fields = { - __typename?: 'profiles_params_avg_fields'; - height?: Maybe; -}; - -/** Boolean expression to filter rows from the table "profiles_params". All fields are combined with a logical 'AND'. */ -export type Profiles_Params_Bool_Exp = { - _and?: InputMaybe>; - _not?: InputMaybe; - _or?: InputMaybe>; - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -/** aggregate max on columns */ -export type Profiles_Params_Max_Fields = { - __typename?: 'profiles_params_max_fields'; - height?: Maybe; -}; - -/** aggregate min on columns */ -export type Profiles_Params_Min_Fields = { - __typename?: 'profiles_params_min_fields'; - height?: Maybe; -}; - -/** Ordering options when selecting data from "profiles_params". */ -export type Profiles_Params_Order_By = { - height?: InputMaybe; - one_row_id?: InputMaybe; - params?: InputMaybe; -}; - -/** select columns of table "profiles_params" */ -export enum Profiles_Params_Select_Column { - /** column name */ - Height = 'height', - /** column name */ - OneRowId = 'one_row_id', - /** column name */ - Params = 'params' -} - -/** aggregate stddev on columns */ -export type Profiles_Params_Stddev_Fields = { - __typename?: 'profiles_params_stddev_fields'; - height?: Maybe; -}; - -/** aggregate stddev_pop on columns */ -export type Profiles_Params_Stddev_Pop_Fields = { - __typename?: 'profiles_params_stddev_pop_fields'; - height?: Maybe; -}; - -/** aggregate stddev_samp on columns */ -export type Profiles_Params_Stddev_Samp_Fields = { - __typename?: 'profiles_params_stddev_samp_fields'; - height?: Maybe; -}; - -/** aggregate sum on columns */ -export type Profiles_Params_Sum_Fields = { - __typename?: 'profiles_params_sum_fields'; - height?: Maybe; -}; - -/** aggregate var_pop on columns */ -export type Profiles_Params_Var_Pop_Fields = { - __typename?: 'profiles_params_var_pop_fields'; - height?: Maybe; -}; - -/** aggregate var_samp on columns */ -export type Profiles_Params_Var_Samp_Fields = { - __typename?: 'profiles_params_var_samp_fields'; - height?: Maybe; -}; - -/** aggregate variance on columns */ -export type Profiles_Params_Variance_Fields = { - __typename?: 'profiles_params_variance_fields'; - height?: Maybe; -}; - /** columns and relationships of "proposal" */ export type Proposal = { __typename?: 'proposal'; @@ -3961,7 +3843,7 @@ export type Proposal_Deposit = { /** An object relationship */ depositor?: Maybe; depositor_address?: Maybe; - height?: Maybe; + height: Scalars['bigint']; /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; @@ -4308,9 +4190,9 @@ export enum Proposal_Select_Column { /** columns and relationships of "proposal_staking_pool_snapshot" */ export type Proposal_Staking_Pool_Snapshot = { __typename?: 'proposal_staking_pool_snapshot'; - bonded_tokens: Scalars['bigint']; + bonded_tokens: Scalars['String']; height: Scalars['bigint']; - not_bonded_tokens: Scalars['bigint']; + not_bonded_tokens: Scalars['String']; /** An object relationship */ proposal: Proposal; proposal_id: Scalars['Int']; @@ -4349,9 +4231,7 @@ export type Proposal_Staking_Pool_Snapshot_Aggregate_FieldsCountArgs = { /** aggregate avg on columns */ export type Proposal_Staking_Pool_Snapshot_Avg_Fields = { __typename?: 'proposal_staking_pool_snapshot_avg_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; @@ -4360,9 +4240,9 @@ export type Proposal_Staking_Pool_Snapshot_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - bonded_tokens?: InputMaybe; + bonded_tokens?: InputMaybe; height?: InputMaybe; - not_bonded_tokens?: InputMaybe; + not_bonded_tokens?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; }; @@ -4370,18 +4250,18 @@ export type Proposal_Staking_Pool_Snapshot_Bool_Exp = { /** aggregate max on columns */ export type Proposal_Staking_Pool_Snapshot_Max_Fields = { __typename?: 'proposal_staking_pool_snapshot_max_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate min on columns */ export type Proposal_Staking_Pool_Snapshot_Min_Fields = { __typename?: 'proposal_staking_pool_snapshot_min_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; @@ -4409,63 +4289,49 @@ export enum Proposal_Staking_Pool_Snapshot_Select_Column { /** aggregate stddev on columns */ export type Proposal_Staking_Pool_Snapshot_Stddev_Fields = { __typename?: 'proposal_staking_pool_snapshot_stddev_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate stddev_pop on columns */ export type Proposal_Staking_Pool_Snapshot_Stddev_Pop_Fields = { __typename?: 'proposal_staking_pool_snapshot_stddev_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate stddev_samp on columns */ export type Proposal_Staking_Pool_Snapshot_Stddev_Samp_Fields = { __typename?: 'proposal_staking_pool_snapshot_stddev_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate sum on columns */ export type Proposal_Staking_Pool_Snapshot_Sum_Fields = { __typename?: 'proposal_staking_pool_snapshot_sum_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate var_pop on columns */ export type Proposal_Staking_Pool_Snapshot_Var_Pop_Fields = { __typename?: 'proposal_staking_pool_snapshot_var_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate var_samp on columns */ export type Proposal_Staking_Pool_Snapshot_Var_Samp_Fields = { __typename?: 'proposal_staking_pool_snapshot_var_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; /** aggregate variance on columns */ export type Proposal_Staking_Pool_Snapshot_Variance_Fields = { __typename?: 'proposal_staking_pool_snapshot_variance_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; proposal_id?: Maybe; }; @@ -4762,7 +4628,7 @@ export type Proposal_Tally_Result_Variance_Order_By = { export type Proposal_Validator_Status_Snapshot = { __typename?: 'proposal_validator_status_snapshot'; height: Scalars['bigint']; - id: Scalars['Int']; + id: Scalars['bigint']; jailed: Scalars['Boolean']; /** An object relationship */ proposal?: Maybe; @@ -4844,7 +4710,7 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; height?: InputMaybe; - id?: InputMaybe; + id?: InputMaybe; jailed?: InputMaybe; proposal?: InputMaybe; proposal_id?: InputMaybe; @@ -4858,7 +4724,7 @@ export type Proposal_Validator_Status_Snapshot_Bool_Exp = { export type Proposal_Validator_Status_Snapshot_Max_Fields = { __typename?: 'proposal_validator_status_snapshot_max_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4879,7 +4745,7 @@ export type Proposal_Validator_Status_Snapshot_Max_Order_By = { export type Proposal_Validator_Status_Snapshot_Min_Fields = { __typename?: 'proposal_validator_status_snapshot_min_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; validator_address?: Maybe; @@ -4988,7 +4854,7 @@ export type Proposal_Validator_Status_Snapshot_Stddev_Samp_Order_By = { export type Proposal_Validator_Status_Snapshot_Sum_Fields = { __typename?: 'proposal_validator_status_snapshot_sum_fields'; height?: Maybe; - id?: Maybe; + id?: Maybe; proposal_id?: Maybe; status?: Maybe; voting_power?: Maybe; @@ -5098,6 +4964,8 @@ export type Proposal_Vote = { __typename?: 'proposal_vote'; /** An object relationship */ account: Account; + /** An object relationship */ + block: Block; height: Scalars['bigint']; option: Scalars['String']; /** An object relationship */ @@ -5171,6 +5039,7 @@ export type Proposal_Vote_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; account?: InputMaybe; + block?: InputMaybe; height?: InputMaybe; option?: InputMaybe; proposal?: InputMaybe; @@ -5220,6 +5089,7 @@ export type Proposal_Vote_Min_Order_By = { /** Ordering options when selecting data from "proposal_vote". */ export type Proposal_Vote_Order_By = { account?: InputMaybe; + block?: InputMaybe; height?: InputMaybe; option?: InputMaybe; proposal?: InputMaybe; @@ -5423,6 +5293,14 @@ export type Query_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -5439,12 +5317,6 @@ export type Query_Root = { pre_commit: Array; /** fetch aggregated fields from the table: "pre_commit" */ pre_commit_aggregate: Pre_Commit_Aggregate; - /** fetch data from the table: "profiles_params" */ - profiles_params: Array; - /** fetch aggregated fields from the table: "profiles_params" */ - profiles_params_aggregate: Profiles_Params_Aggregate; - /** fetch data from the table: "profiles_params" using primary key columns */ - profiles_params_by_pk?: Maybe; /** fetch data from the table: "proposal" */ proposal: Array; /** fetch aggregated fields from the table: "proposal" */ @@ -5603,12 +5475,14 @@ export type Query_RootAccount_By_PkArgs = { export type Query_RootAction_Account_BalanceArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; export type Query_RootAction_DelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5618,12 +5492,14 @@ export type Query_RootAction_DelegationArgs = { export type Query_RootAction_Delegation_RewardArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; export type Query_RootAction_Delegation_TotalArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; @@ -5635,6 +5511,7 @@ export type Query_RootAction_Delegator_Withdraw_AddressArgs = { export type Query_RootAction_RedelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5644,6 +5521,7 @@ export type Query_RootAction_RedelegationArgs = { export type Query_RootAction_Unbonding_DelegationArgs = { address: Scalars['String']; + apikey?: InputMaybe; count_total?: InputMaybe; height?: InputMaybe; limit?: InputMaybe; @@ -5653,6 +5531,7 @@ export type Query_RootAction_Unbonding_DelegationArgs = { export type Query_RootAction_Unbonding_Delegation_TotalArgs = { address: Scalars['String']; + apikey?: InputMaybe; height?: InputMaybe; }; @@ -5984,6 +5863,46 @@ export type Query_RootMessages_By_Address_AggregateArgs = { }; +export type Query_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Query_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6048,29 +5967,6 @@ export type Query_RootPre_Commit_AggregateArgs = { }; -export type Query_RootProfiles_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootProfiles_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Query_RootProfiles_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Query_RootProposalArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -6177,7 +6073,7 @@ export type Query_RootProposal_Validator_Status_Snapshot_AggregateArgs = { export type Query_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; + id: Scalars['bigint']; }; @@ -7036,9 +6932,9 @@ export type Staking_Params_Variance_Fields = { /** columns and relationships of "staking_pool" */ export type Staking_Pool = { __typename?: 'staking_pool'; - bonded_tokens: Scalars['bigint']; + bonded_tokens: Scalars['String']; height: Scalars['bigint']; - not_bonded_tokens: Scalars['bigint']; + not_bonded_tokens: Scalars['String']; staked_not_bonded_tokens?: Maybe; unbonding_tokens?: Maybe; }; @@ -7076,9 +6972,7 @@ export type Staking_Pool_Aggregate_FieldsCountArgs = { /** aggregate avg on columns */ export type Staking_Pool_Avg_Fields = { __typename?: 'staking_pool_avg_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** Boolean expression to filter rows from the table "staking_pool". All fields are combined with a logical 'AND'. */ @@ -7086,9 +6980,9 @@ export type Staking_Pool_Bool_Exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - bonded_tokens?: InputMaybe; + bonded_tokens?: InputMaybe; height?: InputMaybe; - not_bonded_tokens?: InputMaybe; + not_bonded_tokens?: InputMaybe; staked_not_bonded_tokens?: InputMaybe; unbonding_tokens?: InputMaybe; }; @@ -7096,9 +6990,9 @@ export type Staking_Pool_Bool_Exp = { /** aggregate max on columns */ export type Staking_Pool_Max_Fields = { __typename?: 'staking_pool_max_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; staked_not_bonded_tokens?: Maybe; unbonding_tokens?: Maybe; }; @@ -7106,9 +7000,9 @@ export type Staking_Pool_Max_Fields = { /** aggregate min on columns */ export type Staking_Pool_Min_Fields = { __typename?: 'staking_pool_min_fields'; - bonded_tokens?: Maybe; + bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; + not_bonded_tokens?: Maybe; staked_not_bonded_tokens?: Maybe; unbonding_tokens?: Maybe; }; @@ -7139,57 +7033,43 @@ export enum Staking_Pool_Select_Column { /** aggregate stddev on columns */ export type Staking_Pool_Stddev_Fields = { __typename?: 'staking_pool_stddev_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate stddev_pop on columns */ export type Staking_Pool_Stddev_Pop_Fields = { __typename?: 'staking_pool_stddev_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate stddev_samp on columns */ export type Staking_Pool_Stddev_Samp_Fields = { __typename?: 'staking_pool_stddev_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate sum on columns */ export type Staking_Pool_Sum_Fields = { __typename?: 'staking_pool_sum_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate var_pop on columns */ export type Staking_Pool_Var_Pop_Fields = { __typename?: 'staking_pool_var_pop_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate var_samp on columns */ export type Staking_Pool_Var_Samp_Fields = { __typename?: 'staking_pool_var_samp_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; /** aggregate variance on columns */ export type Staking_Pool_Variance_Fields = { __typename?: 'staking_pool_variance_fields'; - bonded_tokens?: Maybe; height?: Maybe; - not_bonded_tokens?: Maybe; }; export type Subscription_Root = { @@ -7270,6 +7150,14 @@ export type Subscription_Root = { messages_by_address: Array; /** execute function "messages_by_address" and query aggregates on result of table type "message" */ messages_by_address_aggregate: Message_Aggregate; + /** execute function "messages_by_single_address" which returns "message" */ + messages_by_single_address: Array; + /** execute function "messages_by_single_address" and query aggregates on result of table type "message" */ + messages_by_single_address_aggregate: Message_Aggregate; + /** execute function "messages_get_types" which returns "message" */ + messages_get_types: Array; + /** execute function "messages_get_types" and query aggregates on result of table type "message" */ + messages_get_types_aggregate: Message_Aggregate; /** fetch data from the table: "mint_params" */ mint_params: Array; /** fetch aggregated fields from the table: "mint_params" */ @@ -7286,12 +7174,6 @@ export type Subscription_Root = { pre_commit: Array; /** fetch aggregated fields from the table: "pre_commit" */ pre_commit_aggregate: Pre_Commit_Aggregate; - /** fetch data from the table: "profiles_params" */ - profiles_params: Array; - /** fetch aggregated fields from the table: "profiles_params" */ - profiles_params_aggregate: Profiles_Params_Aggregate; - /** fetch data from the table: "profiles_params" using primary key columns */ - profiles_params_by_pk?: Maybe; /** fetch data from the table: "proposal" */ proposal: Array; /** fetch aggregated fields from the table: "proposal" */ @@ -7745,6 +7627,46 @@ export type Subscription_RootMessages_By_Address_AggregateArgs = { }; +export type Subscription_RootMessages_By_Single_AddressArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_By_Single_Address_AggregateArgs = { + args: Messages_By_Single_Address_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_TypesArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + +export type Subscription_RootMessages_Get_Types_AggregateArgs = { + args: Messages_Get_Types_Args; + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootMint_ParamsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7809,29 +7731,6 @@ export type Subscription_RootPre_Commit_AggregateArgs = { }; -export type Subscription_RootProfiles_ParamsArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootProfiles_Params_AggregateArgs = { - distinct_on?: InputMaybe>; - limit?: InputMaybe; - offset?: InputMaybe; - order_by?: InputMaybe>; - where?: InputMaybe; -}; - - -export type Subscription_RootProfiles_Params_By_PkArgs = { - one_row_id: Scalars['Boolean']; -}; - - export type Subscription_RootProposalArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7938,7 +7837,7 @@ export type Subscription_RootProposal_Validator_Status_Snapshot_AggregateArgs = export type Subscription_RootProposal_Validator_Status_Snapshot_By_PkArgs = { - id: Scalars['Int']; + id: Scalars['bigint']; }; @@ -11996,7 +11895,7 @@ export type MarketDataQueryVariables = Exact<{ }>; -export type MarketDataQuery = { communityPool: Array<{ __typename?: 'community_pool', coins: any }>, inflation: Array<{ __typename?: 'inflation', value: any }>, tokenPrice: Array<{ __typename?: 'token_price', price: any, marketCap: any }>, supply: Array<{ __typename?: 'supply', coins: any }>, bondedTokens: Array<{ __typename?: 'staking_pool', bonded_tokens: any }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }> }; +export type MarketDataQuery = { communityPool: Array<{ __typename?: 'community_pool', coins: any }>, inflation: Array<{ __typename?: 'inflation', value: any }>, tokenPrice: Array<{ __typename?: 'token_price', price: any, marketCap: any }>, supply: Array<{ __typename?: 'supply', coins: any }>, bondedTokens: Array<{ __typename?: 'staking_pool', bonded_tokens: string }>, distributionParams: Array<{ __typename?: 'distribution_params', params: any }> }; export type GetMessagesByAddressQueryVariables = Exact<{ address?: InputMaybe; @@ -12011,7 +11910,7 @@ export type GetMessagesByAddressQuery = { messagesByAddress: Array<{ __typename? export type OnlineVotingPowerQueryVariables = Exact<{ [key: string]: never; }>; -export type OnlineVotingPowerQuery = { activeTotal: { __typename?: 'validator_status_aggregate', aggregate?: { __typename?: 'validator_status_aggregate_fields', count: number } | null }, validatorVotingPowerAggregate: { __typename?: 'validator_voting_power_aggregate', aggregate?: { __typename?: 'validator_voting_power_aggregate_fields', sum?: { __typename?: 'validator_voting_power_sum_fields', votingPower?: any | null } | null } | null }, stakingPool: Array<{ __typename?: 'staking_pool', bonded: any }>, stakingParams: Array<{ __typename?: 'staking_params', params: any }> }; +export type OnlineVotingPowerQuery = { activeTotal: { __typename?: 'validator_status_aggregate', aggregate?: { __typename?: 'validator_status_aggregate_fields', count: number } | null }, validatorVotingPowerAggregate: { __typename?: 'validator_voting_power_aggregate', aggregate?: { __typename?: 'validator_voting_power_aggregate_fields', sum?: { __typename?: 'validator_voting_power_sum_fields', votingPower?: any | null } | null } | null }, stakingPool: Array<{ __typename?: 'staking_pool', bonded: string }>, stakingParams: Array<{ __typename?: 'staking_params', params: any }> }; export type ParamsQueryVariables = Exact<{ [key: string]: never; }>; @@ -12030,7 +11929,7 @@ export type ProposalDetailsTallyQueryVariables = Exact<{ }>; -export type ProposalDetailsTallyQuery = { proposalTallyResult: Array<{ __typename?: 'proposal_tally_result', yes: string, no: string, abstain: string, noWithVeto: string }>, stakingPool: Array<{ __typename?: 'proposal_staking_pool_snapshot', bondedTokens: any }>, quorum: Array<{ __typename?: 'gov_params', tallyParams: any }> }; +export type ProposalDetailsTallyQuery = { proposalTallyResult: Array<{ __typename?: 'proposal_tally_result', yes: string, no: string, abstain: string, noWithVeto: string }>, stakingPool: Array<{ __typename?: 'proposal_staking_pool_snapshot', bondedTokens: string }>, quorum: Array<{ __typename?: 'gov_params', tallyParams: any }> }; export type ProposalDetailsDepositsQueryVariables = Exact<{ proposalId?: InputMaybe; @@ -12059,7 +11958,7 @@ export type TokenPriceListenerSubscriptionVariables = Exact<{ }>; -export type TokenPriceListenerSubscription = { tokenPrice: Array<{ __typename?: 'token_price', id: number, price: any, timestamp: any, marketCap: any, unitName: string }> }; +export type TokenPriceListenerSubscription = { tokenPrice: Array<{ __typename?: 'token_price', price: any, timestamp: any, marketCap: any, unitName: string }> }; export type TokenPriceHistoryQueryVariables = Exact<{ denom?: InputMaybe; @@ -12072,7 +11971,7 @@ export type TokenPriceHistoryQuery = { tokenPrice: Array<{ __typename?: 'token_p export type TokenomicsQueryVariables = Exact<{ [key: string]: never; }>; -export type TokenomicsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, stakingPool: Array<{ __typename?: 'staking_pool', bonded: any, unbonded: any }>, supply: Array<{ __typename?: 'supply', coins: any }> }; +export type TokenomicsQuery = { stakingParams: Array<{ __typename?: 'staking_params', params: any }>, stakingPool: Array<{ __typename?: 'staking_pool', bonded: string, unbonded: string }>, supply: Array<{ __typename?: 'supply', coins: any }> }; export type TransactionDetailsQueryVariables = Exact<{ hash?: InputMaybe; @@ -12111,12 +12010,54 @@ export type ValidatorLastSeenListenerSubscriptionVariables = Exact<{ export type ValidatorLastSeenListenerSubscription = { preCommit: Array<{ __typename?: 'pre_commit', height: any, timestamp: any }> }; -export type ValidatorDetailsQueryVariables = Exact<{ +export type ValidatorDescriptionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorDescriptionQuery = { validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }> }> }; + +export type ValidatorStatusesQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorStatusesQuery = { validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorSigningInfosQueryVariables = Exact<{ address?: InputMaybe; }>; -export type ValidatorDetailsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: any }>, validator: Array<{ __typename?: 'validator', validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }>, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; +export type ValidatorSigningInfosQuery = { validator: Array<{ __typename?: 'validator', validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }> }> }; + +export type ValidatorInfoQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorInfoQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, maxRate: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', details?: string | null, website?: string | null }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; + +export type ValidatorCommissionQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorCommissionQuery = { validator: Array<{ __typename?: 'validator', validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }> }; + +export type ValidatorVotingPowersQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorVotingPowersQuery = { validator: Array<{ __typename?: 'validator', validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', height: any, votingPower: any }>, validatorStatuses: Array<{ __typename?: 'validator_status', status: number }> }>, stakingPool: Array<{ __typename?: 'staking_pool', height: any, bonded: string }> }; + +export type ValidatorAddressQueryVariables = Exact<{ + address?: InputMaybe; +}>; + + +export type ValidatorAddressQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null }> }; export type ValidatorDelegationsQueryVariables = Exact<{ validatorAddress: Scalars['String']; @@ -12151,12 +12092,7 @@ export type ValidatorUndelegationsQuery = { undelegations?: { __typename?: 'Acti export type ValidatorsQueryVariables = Exact<{ [key: string]: never; }>; -export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: any }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; - -export type ValidatorsAddressListQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ValidatorsAddressListQuery = { validator: Array<{ __typename?: 'validator', validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null, consensusAddress: string } | null, validatorDescriptions: Array<{ __typename?: 'validator_description', moniker?: string | null, identity?: string | null, avatarUrl?: string | null }> }> }; +export type ValidatorsQuery = { stakingPool: Array<{ __typename?: 'staking_pool', bondedTokens: string }>, validator: Array<{ __typename?: 'validator', validatorStatuses: Array<{ __typename?: 'validator_status', status: number, jailed: boolean, height: any }>, validatorSigningInfos: Array<{ __typename?: 'validator_signing_info', tombstoned: boolean, missedBlocksCounter: any }>, validatorInfo?: { __typename?: 'validator_info', operatorAddress: string, selfDelegateAddress?: string | null } | null, validatorVotingPowers: Array<{ __typename?: 'validator_voting_power', votingPower: any }>, validatorCommissions: Array<{ __typename?: 'validator_commission', commission: any }> }>, slashingParams: Array<{ __typename?: 'slashing_params', params: any }> }; export type ValidatorAddressesQueryVariables = Exact<{ [key: string]: never; }>; @@ -13278,7 +13214,6 @@ export type ProposalsQueryResult = Apollo.QueryResult; export type ValidatorLastSeenListenerSubscriptionResult = Apollo.SubscriptionResult; -export const ValidatorDetailsDocument = gql` - query ValidatorDetails($address: String) { - stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { - height - bonded: bonded_tokens - } +export const ValidatorDescriptionDocument = gql` + query ValidatorDescription($address: String) { validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorDescriptions: validator_descriptions( order_by: {height: desc} @@ -13619,11 +13550,82 @@ export const ValidatorDetailsDocument = gql` details website } + } +} + `; + +/** + * __useValidatorDescriptionQuery__ + * + * To run a query within a React component, call `useValidatorDescriptionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorDescriptionQuery` 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 } = useValidatorDescriptionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorDescriptionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorDescriptionDocument, options); + } +export function useValidatorDescriptionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorDescriptionDocument, options); + } +export type ValidatorDescriptionQueryHookResult = ReturnType; +export type ValidatorDescriptionLazyQueryHookResult = ReturnType; +export type ValidatorDescriptionQueryResult = Apollo.QueryResult; +export const ValidatorStatusesDocument = gql` + query ValidatorStatuses($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { status jailed height } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorStatusesQuery__ + * + * To run a query within a React component, call `useValidatorStatusesQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorStatusesQuery` 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 } = useValidatorStatusesQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorStatusesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorStatusesDocument, options); + } +export function useValidatorStatusesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorStatusesDocument, options); + } +export type ValidatorStatusesQueryHookResult = ReturnType; +export type ValidatorStatusesLazyQueryHookResult = ReturnType; +export type ValidatorStatusesQueryResult = Apollo.QueryResult; +export const ValidatorSigningInfosDocument = gql` + query ValidatorSigningInfos($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorSigningInfos: validator_signing_infos( order_by: {height: desc} limit: 1 @@ -13631,14 +13633,141 @@ export const ValidatorDetailsDocument = gql` missedBlocksCounter: missed_blocks_counter tombstoned } + } +} + `; + +/** + * __useValidatorSigningInfosQuery__ + * + * To run a query within a React component, call `useValidatorSigningInfosQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorSigningInfosQuery` 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 } = useValidatorSigningInfosQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorSigningInfosQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorSigningInfosDocument, options); + } +export function useValidatorSigningInfosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorSigningInfosDocument, options); + } +export type ValidatorSigningInfosQueryHookResult = ReturnType; +export type ValidatorSigningInfosLazyQueryHookResult = ReturnType; +export type ValidatorSigningInfosQueryResult = Apollo.QueryResult; +export const ValidatorInfoDocument = gql` + query ValidatorInfo($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorInfo: validator_info { operatorAddress: operator_address selfDelegateAddress: self_delegate_address maxRate: max_rate } + validatorDescriptions: validator_descriptions( + order_by: {height: desc} + limit: 1 + ) { + details + website + } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + jailed + height + } + validatorSigningInfos: validator_signing_infos( + order_by: {height: desc} + limit: 1 + ) { + missedBlocksCounter: missed_blocks_counter + tombstoned + } validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { commission } + } + slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { + params + } +} + `; + +/** + * __useValidatorInfoQuery__ + * + * To run a query within a React component, call `useValidatorInfoQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorInfoQuery` 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 } = useValidatorInfoQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorInfoQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorInfoDocument, options); + } +export function useValidatorInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorInfoDocument, options); + } +export type ValidatorInfoQueryHookResult = ReturnType; +export type ValidatorInfoLazyQueryHookResult = ReturnType; +export type ValidatorInfoQueryResult = Apollo.QueryResult; +export const ValidatorCommissionDocument = gql` + query ValidatorCommission($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorCommissions: validator_commissions(order_by: {height: desc}, limit: 1) { + commission + } + } +} + `; + +/** + * __useValidatorCommissionQuery__ + * + * To run a query within a React component, call `useValidatorCommissionQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorCommissionQuery` 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 } = useValidatorCommissionQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorCommissionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorCommissionDocument, options); + } +export function useValidatorCommissionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorCommissionDocument, options); + } +export type ValidatorCommissionQueryHookResult = ReturnType; +export type ValidatorCommissionLazyQueryHookResult = ReturnType; +export type ValidatorCommissionQueryResult = Apollo.QueryResult; +export const ValidatorVotingPowersDocument = gql` + query ValidatorVotingPowers($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { validatorVotingPowers: validator_voting_powers( offset: 0 limit: 1 @@ -13647,40 +13776,82 @@ export const ValidatorDetailsDocument = gql` height votingPower: voting_power } + validatorStatuses: validator_statuses(order_by: {height: desc}, limit: 1) { + status + } } - slashingParams: slashing_params(order_by: {height: desc}, limit: 1) { - params + stakingPool: staking_pool(order_by: {height: desc}, limit: 1, offset: 0) { + height + bonded: bonded_tokens + } +} + `; + +/** + * __useValidatorVotingPowersQuery__ + * + * To run a query within a React component, call `useValidatorVotingPowersQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorVotingPowersQuery` 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 } = useValidatorVotingPowersQuery({ + * variables: { + * address: // value for 'address' + * }, + * }); + */ +export function useValidatorVotingPowersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ValidatorVotingPowersDocument, options); + } +export function useValidatorVotingPowersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ValidatorVotingPowersDocument, options); + } +export type ValidatorVotingPowersQueryHookResult = ReturnType; +export type ValidatorVotingPowersLazyQueryHookResult = ReturnType; +export type ValidatorVotingPowersQueryResult = Apollo.QueryResult; +export const ValidatorAddressDocument = gql` + query ValidatorAddress($address: String) { + validator(where: {validator_info: {operator_address: {_eq: $address}}}) { + validatorInfo: validator_info { + operatorAddress: operator_address + selfDelegateAddress: self_delegate_address + } } } `; /** - * __useValidatorDetailsQuery__ + * __useValidatorAddressQuery__ * - * To run a query within a React component, call `useValidatorDetailsQuery` and pass it any options that fit your needs. - * When your component renders, `useValidatorDetailsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useValidatorAddressQuery` and pass it any options that fit your needs. + * When your component renders, `useValidatorAddressQuery` 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 } = useValidatorDetailsQuery({ + * const { data, loading, error } = useValidatorAddressQuery({ * variables: { * address: // value for 'address' * }, * }); */ -export function useValidatorDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useValidatorAddressQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(ValidatorDetailsDocument, options); + return Apollo.useQuery(ValidatorAddressDocument, options); } -export function useValidatorDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { +export function useValidatorAddressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(ValidatorDetailsDocument, options); + return Apollo.useLazyQuery(ValidatorAddressDocument, options); } -export type ValidatorDetailsQueryHookResult = ReturnType; -export type ValidatorDetailsLazyQueryHookResult = ReturnType; -export type ValidatorDetailsQueryResult = Apollo.QueryResult; +export type ValidatorAddressQueryHookResult = ReturnType; +export type ValidatorAddressLazyQueryHookResult = ReturnType; +export type ValidatorAddressQueryResult = Apollo.QueryResult; export const ValidatorDelegationsDocument = gql` query ValidatorDelegations($validatorAddress: String!, $offset: Int = 0, $limit: Int = 10, $pagination: Boolean! = true) { delegations: action_validator_delegations( diff --git a/packages/ui/src/graphql/types/profile_types.ts b/packages/ui/src/graphql/types/profile_types.ts index d56e03631c..a9b6ca4d07 100644 --- a/packages/ui/src/graphql/types/profile_types.ts +++ b/packages/ui/src/graphql/types/profile_types.ts @@ -656,6 +656,28 @@ export type ProfileOutgoing_Dtag_Transfer_RequestsArgs = { where?: InputMaybe; }; +/** aggregated selection of "profile" */ +export type Profile_Aggregate = { + __typename?: 'profile_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "profile" */ +export type Profile_Aggregate_Fields = { + __typename?: 'profile_aggregate_fields'; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; +}; + + +/** aggregate fields of "profile" */ +export type Profile_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "profile". All fields are combined with a logical 'AND'. */ export type Profile_Bool_Exp = { _and?: InputMaybe>; @@ -674,6 +696,30 @@ export type Profile_Bool_Exp = { profile_pic?: InputMaybe; }; +/** aggregate max on columns */ +export type Profile_Max_Fields = { + __typename?: 'profile_max_fields'; + address?: Maybe; + bio?: Maybe; + cover_pic?: Maybe; + creation_time?: Maybe; + dtag?: Maybe; + nickname?: Maybe; + profile_pic?: Maybe; +}; + +/** aggregate min on columns */ +export type Profile_Min_Fields = { + __typename?: 'profile_min_fields'; + address?: Maybe; + bio?: Maybe; + cover_pic?: Maybe; + creation_time?: Maybe; + dtag?: Maybe; + nickname?: Maybe; + profile_pic?: Maybe; +}; + /** Ordering options when selecting data from "profile". */ export type Profile_Order_By = { address?: InputMaybe; @@ -756,6 +802,8 @@ export type Query_Root = { dtag_transfer_requests: Array; /** fetch data from the table: "profile" */ profile: Array; + /** fetch aggregated fields from the table: "profile" */ + profile_aggregate: Profile_Aggregate; /** fetch data from the table: "profile" using primary key columns */ profile_by_pk?: Maybe; /** fetch data from the table: "profiles_params" */ @@ -764,6 +812,8 @@ export type Query_Root = { user_block: Array; /** fetch data from the table: "user_relationship" */ user_relationship: Array; + /** fetch aggregated fields from the table: "user_relationship" */ + user_relationship_aggregate: User_Relationship_Aggregate; }; @@ -839,6 +889,15 @@ export type Query_RootProfileArgs = { }; +export type Query_RootProfile_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Query_RootProfile_By_PkArgs = { address: Scalars['String']; }; @@ -870,6 +929,15 @@ export type Query_RootUser_RelationshipArgs = { where?: InputMaybe; }; + +export type Query_RootUser_Relationship_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + export type Subscription_Root = { __typename?: 'subscription_root'; /** fetch data from the table: "application_link" */ @@ -888,6 +956,8 @@ export type Subscription_Root = { dtag_transfer_requests: Array; /** fetch data from the table: "profile" */ profile: Array; + /** fetch aggregated fields from the table: "profile" */ + profile_aggregate: Profile_Aggregate; /** fetch data from the table: "profile" using primary key columns */ profile_by_pk?: Maybe; /** fetch data from the table: "profiles_params" */ @@ -896,6 +966,8 @@ export type Subscription_Root = { user_block: Array; /** fetch data from the table: "user_relationship" */ user_relationship: Array; + /** fetch aggregated fields from the table: "user_relationship" */ + user_relationship_aggregate: User_Relationship_Aggregate; }; @@ -971,6 +1043,15 @@ export type Subscription_RootProfileArgs = { }; +export type Subscription_RootProfile_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + + export type Subscription_RootProfile_By_PkArgs = { address: Scalars['String']; }; @@ -1002,6 +1083,15 @@ export type Subscription_RootUser_RelationshipArgs = { where?: InputMaybe; }; + +export type Subscription_RootUser_Relationship_AggregateArgs = { + distinct_on?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + order_by?: InputMaybe>; + where?: InputMaybe; +}; + /** Boolean expression to compare columns of type "timestamp". All fields are combined with logical 'AND'. */ export type Timestamp_Comparison_Exp = { _eq?: InputMaybe; @@ -1075,6 +1165,42 @@ export type User_Relationship = { subspace_id: Scalars['bigint']; }; +/** aggregated selection of "user_relationship" */ +export type User_Relationship_Aggregate = { + __typename?: 'user_relationship_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "user_relationship" */ +export type User_Relationship_Aggregate_Fields = { + __typename?: 'user_relationship_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "user_relationship" */ +export type User_Relationship_Aggregate_FieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type User_Relationship_Avg_Fields = { + __typename?: 'user_relationship_avg_fields'; + subspace_id?: Maybe; +}; + /** Boolean expression to filter rows from the table "user_relationship". All fields are combined with a logical 'AND'. */ export type User_Relationship_Bool_Exp = { _and?: InputMaybe>; @@ -1087,6 +1213,22 @@ export type User_Relationship_Bool_Exp = { subspace_id?: InputMaybe; }; +/** aggregate max on columns */ +export type User_Relationship_Max_Fields = { + __typename?: 'user_relationship_max_fields'; + counterparty_address?: Maybe; + creator_address?: Maybe; + subspace_id?: Maybe; +}; + +/** aggregate min on columns */ +export type User_Relationship_Min_Fields = { + __typename?: 'user_relationship_min_fields'; + counterparty_address?: Maybe; + creator_address?: Maybe; + subspace_id?: Maybe; +}; + /** Ordering options when selecting data from "user_relationship". */ export type User_Relationship_Order_By = { counterparty?: InputMaybe; @@ -1106,6 +1248,48 @@ export enum User_Relationship_Select_Column { SubspaceId = 'subspace_id' } +/** aggregate stddev on columns */ +export type User_Relationship_Stddev_Fields = { + __typename?: 'user_relationship_stddev_fields'; + subspace_id?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type User_Relationship_Stddev_Pop_Fields = { + __typename?: 'user_relationship_stddev_pop_fields'; + subspace_id?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type User_Relationship_Stddev_Samp_Fields = { + __typename?: 'user_relationship_stddev_samp_fields'; + subspace_id?: Maybe; +}; + +/** aggregate sum on columns */ +export type User_Relationship_Sum_Fields = { + __typename?: 'user_relationship_sum_fields'; + subspace_id?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type User_Relationship_Var_Pop_Fields = { + __typename?: 'user_relationship_var_pop_fields'; + subspace_id?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type User_Relationship_Var_Samp_Fields = { + __typename?: 'user_relationship_var_samp_fields'; + subspace_id?: Maybe; +}; + +/** aggregate variance on columns */ +export type User_Relationship_Variance_Fields = { + __typename?: 'user_relationship_variance_fields'; + subspace_id?: Maybe; +}; + export type DesmosProfileQueryVariables = Exact<{ addresses?: InputMaybe | Scalars['String']>; }>; diff --git a/packages/ui/src/screens/account_details/components/balance/index.tsx b/packages/ui/src/screens/account_details/components/balance/index.tsx index 197fccacfd..54db40015f 100644 --- a/packages/ui/src/screens/account_details/components/balance/index.tsx +++ b/packages/ui/src/screens/account_details/components/balance/index.tsx @@ -14,6 +14,7 @@ import numeral from 'numeral'; import { FC } from 'react'; import { Cell, Pie, PieChart, ResponsiveContainer } from 'recharts'; import { useRecoilValue } from 'recoil'; +import Loading from '@/components/loading'; const DynamicPieChart = dynamic(() => Promise.resolve(PieChart), { ssr: false }); const { primaryTokenUnit, tokenUnits } = chainConfig(); @@ -21,6 +22,7 @@ const { primaryTokenUnit, tokenUnits } = chainConfig(); type BalanceProps = Parameters[0] & { className?: string; total: TokenUnit; + loading: boolean; }; const Balance: FC = (props) => { @@ -62,66 +64,72 @@ const Balance: FC = (props) => { return ( {t('balance')} -
-
- - - 1 ? 5 : 0} - fill="#82ca9d" - stroke="none" - > - {dataMemo.map((entry) => ( - - ))} - - - -
-
- {dataMemo.map((x) => { - if (x.key.toLowerCase() === 'empty') { - return null; - } + {props.loading ? ( + + ) : ( + <> +
+
+ + + 1 ? 5 : 0} + fill="#82ca9d" + stroke="none" + > + {dataMemo.map((entry) => ( + + ))} + + + +
+
+ {dataMemo.map((x) => { + if (x.key.toLowerCase() === 'empty') { + return null; + } - return ( -
-
-
- {t(x.key)} -
- {x.display} -
- ); - })} -
-
-
- -
-
- - {t('total', { - unit: props.total.displayDenom.toUpperCase(), + return ( +
+
+
+ {t(x.key)} +
+ {x.display} +
+ ); })} - - {totalDisplay} +
-
- - ${numeral(market.price).format('0,0.[00]', Math.floor)} /{' '} - {(tokenUnits?.[primaryTokenUnit]?.display ?? '').toUpperCase()} - - {totalAmount} +
+ +
+
+ + {t('total', { + unit: props.total.displayDenom.toUpperCase(), + })} + + {totalDisplay} +
+
+ + ${numeral(market.price).format('0,0.[00]', Math.floor)} /{' '} + {(tokenUnits?.[primaryTokenUnit]?.display ?? '').toUpperCase()} + + {totalAmount} +
+
-
-
+ + )} ); }; diff --git a/packages/ui/src/screens/account_details/components/other_tokens/index.tsx b/packages/ui/src/screens/account_details/components/other_tokens/index.tsx index 7821e3c59e..2dae2c0aa6 100644 --- a/packages/ui/src/screens/account_details/components/other_tokens/index.tsx +++ b/packages/ui/src/screens/account_details/components/other_tokens/index.tsx @@ -10,6 +10,7 @@ import { useDisplayStyles } from '@/styles/useSharedStyles'; import Typography from '@mui/material/Typography'; import useAppTranslation from '@/hooks/useAppTranslation'; import { FC, useMemo } from 'react'; +import Loading from '@/components/loading'; type OtherTokensProps = { className?: string; @@ -17,14 +18,16 @@ type OtherTokensProps = { data: OtherTokenType[]; count: number; }; + loading: boolean; }; -const OtherTokens: FC = ({ className, otherTokens }) => { +const OtherTokens: FC = ({ className, otherTokens, loading }) => { const { t } = useAppTranslation('accounts'); const { classes } = useStyles(); const display = useDisplayStyles().classes; const { page, rowsPerPage, handlePageChange, handleRowsPerPageChange, sliceItems } = usePagination({}); + const dataMemo = useShallowMemo(otherTokens.data); const items = useMemo(() => sliceItems(dataMemo), [dataMemo, sliceItems]); @@ -36,17 +39,23 @@ const OtherTokens: FC = ({ className, otherTokens }) => { return ( {t('otherTokens')} - - - + {loading ? ( + + ) : ( + <> + + + + + )} ); }; diff --git a/packages/ui/src/screens/account_details/components/overview/__snapshots__/index.test.tsx.snap b/packages/ui/src/screens/account_details/components/overview/__snapshots__/index.test.tsx.snap index 27b9776566..176bf33aac 100644 --- a/packages/ui/src/screens/account_details/components/overview/__snapshots__/index.test.tsx.snap +++ b/packages/ui/src/screens/account_details/components/overview/__snapshots__/index.test.tsx.snap @@ -125,12 +125,12 @@ exports[`screen: AccountDetails/Overview matches snapshot 1`] = ` - desmos1jrld5g998gqm4yx26l6cvhxz7y5adgxquy94nz + desmos1hfhkduejung7g29wv863x369rndf3hu5xj4g93 - desmos1jrld5g99...y94nz + desmos1hfhkduej...j4g93

@@ -156,12 +156,12 @@ exports[`screen: AccountDetails/Overview matches snapshot 1`] = ` - desmos1jrld5g998gqm4yx26l6cvhxz7y5adgxquy94nz + desmos1hfhkduejung7g29wv863x369rndf3hu5xj4g93 - desmos1jrld5g99...y94nz + desmos1hfhkduej...j4g93

diff --git a/packages/ui/src/screens/account_details/components/overview/index.test.tsx b/packages/ui/src/screens/account_details/components/overview/index.test.tsx index 5c53872896..d2fc427678 100644 --- a/packages/ui/src/screens/account_details/components/overview/index.test.tsx +++ b/packages/ui/src/screens/account_details/components/overview/index.test.tsx @@ -1,12 +1,22 @@ import renderer from 'react-test-renderer'; import Overview from '@/screens/account_details/components/overview'; import MockTheme from '@/tests/mocks/MockTheme'; - -let component: renderer.ReactTestRenderer; +import { mockClient } from '@/tests/mocks/mockApollo'; +import wait from '@/tests/utils/wait'; +import { ApolloProvider } from '@apollo/client'; // ================================== // mocks // ================================== +jest.mock('next/router', () => ({ + ...jest.requireActual('next/router'), + useRouter: () => ({ + query: { + address: 'desmos1hfhkduejung7g29wv863x369rndf3hu5xj4g93', + }, + }), +})); + jest.mock('@/components/box_details', () => (props: JSX.IntrinsicElements['div']) => (
)); @@ -14,19 +24,25 @@ jest.mock('@/components/box', () => (props: JSX.IntrinsicElements['div']) => (
)); + // ================================== // unit tests // ================================== describe('screen: AccountDetails/Overview', () => { - it('matches snapshot', () => { - component = renderer.create( - - - - ); + it('matches snapshot', async () => { + let component: renderer.ReactTestRenderer | undefined; + + renderer.act(() => { + component = renderer.create( + + + + + + ); + }); + await wait(renderer.act); + const tree = component?.toJSON(); expect(tree).toMatchSnapshot(); }); diff --git a/packages/ui/src/screens/account_details/components/overview/index.tsx b/packages/ui/src/screens/account_details/components/overview/index.tsx index 1ffe7ca732..d2f63c3282 100644 --- a/packages/ui/src/screens/account_details/components/overview/index.tsx +++ b/packages/ui/src/screens/account_details/components/overview/index.tsx @@ -23,19 +23,20 @@ import { } from 'react-share'; import CopyIcon from 'shared-utils/assets/icon-copy.svg'; import ShareIcon from 'shared-utils/assets/icon-share.svg'; +import { useAccountWithdrawalAddr } from '@/screens/account_details/hooks'; type OverviewProps = { className?: string; - withdrawalAddress: string; - address: string; }; -const Overview: FC = ({ className, address, withdrawalAddress }) => { +const Overview: FC = ({ className }) => { const { location } = useWindowOrigin(); const { classes, cx } = useStyles(); const display = useDisplayStyles().classes; const { t } = useAppTranslation('accounts'); const { open, handleClose, handleOpen, handleCopyToClipboard } = useOverview(t); + const { state } = useAccountWithdrawalAddr(); + const { address, withdrawalAddress } = state.overview; const url = `${location}/accounts/${address}`; const hashTags = ['bigdipperexplorer', 'bigdipper']; diff --git a/packages/ui/src/screens/account_details/components/staking/hooks.ts b/packages/ui/src/screens/account_details/components/staking/hooks.ts index 2db6da9f1d..336652a929 100644 --- a/packages/ui/src/screens/account_details/components/staking/hooks.ts +++ b/packages/ui/src/screens/account_details/components/staking/hooks.ts @@ -306,7 +306,7 @@ export const useStaking = ( ); return { - state, + stakingState: state, delegations: { loading: delegationsLoading, count: delegationsPagination, diff --git a/packages/ui/src/screens/account_details/components/staking/index.tsx b/packages/ui/src/screens/account_details/components/staking/index.tsx index ce8eaa0ebb..885878f879 100644 --- a/packages/ui/src/screens/account_details/components/staking/index.tsx +++ b/packages/ui/src/screens/account_details/components/staking/index.tsx @@ -7,21 +7,24 @@ import Tabs from '@/screens/account_details/components/staking/components/tabs'; import Unbondings from '@/screens/account_details/components/staking/components/unbondings'; import { useStaking } from '@/screens/account_details/components/staking/hooks'; import useStyles from '@/screens/account_details/components/staking/styles'; -import type { RewardsType } from '@/screens/account_details/types'; import { formatCount } from '@/screens/validator_details/components/staking'; +import Loading from '@/components/loading'; +import { useAccountRewards } from '@/screens/account_details/hooks'; type StakingProps = { className?: string; - rewards: RewardsType; }; -const Staking: FC = ({ rewards, className }) => { +const Staking: FC = ({ className }) => { const { classes, cx } = useStyles(); const [delegationsPage, setDelegationsPage] = useState(0); const [redelegationsPage, setRedelegationsPage] = useState(0); const [unbondingsPage, setUnbondingsPage] = useState(0); - const { state, delegations, redelegations, unbondings, handleTabChange } = useStaking( - rewards, + const accountRewards = useAccountRewards(); + const { state } = accountRewards; + + const { stakingState, delegations, redelegations, unbondings, handleTabChange } = useStaking( + state.rewards, delegationsPage, redelegationsPage, unbondingsPage @@ -50,12 +53,18 @@ const Staking: FC = ({ rewards, className }) => { return ( - - {tabs.map((x) => ( - - {x.component} - - ))} + {state.loading ? ( + + ) : ( + <> + + {tabs.map((x) => ( + + {x.component} + + ))} + + )} ); }; diff --git a/packages/ui/src/screens/account_details/components/transactions/index.tsx b/packages/ui/src/screens/account_details/components/transactions/index.tsx index 1ff3d56870..4779314a14 100644 --- a/packages/ui/src/screens/account_details/components/transactions/index.tsx +++ b/packages/ui/src/screens/account_details/components/transactions/index.tsx @@ -9,7 +9,7 @@ import { readTx } from '@/recoil/settings'; import { useTransactions } from '@/screens/account_details/components/transactions/hooks'; import useStyles from '@/screens/account_details/components/transactions/styles'; -const Transactions: FC = (props) => { +const Transactions: FC = (props) => { const txListFormat = useRecoilValue(readTx); const { classes, cx } = useStyles(); const { t } = useAppTranslation('validators'); @@ -32,7 +32,7 @@ const Transactions: FC = (props) => { isNextPageLoading={state.isNextPageLoading} loadNextPage={loadNextPage} loadMoreItems={loadMoreItems} - isItemLoaded={isItemLoaded || !props.loading} + isItemLoaded={isItemLoaded} /> ) : ( = (props) => { isNextPageLoading={state.isNextPageLoading} loadNextPage={loadNextPage} loadMoreItems={loadMoreItems} - isItemLoaded={isItemLoaded || !props.loading} + isItemLoaded={isItemLoaded} /> )}
diff --git a/packages/ui/src/screens/account_details/hooks.ts b/packages/ui/src/screens/account_details/hooks.ts index 75bd2da116..0664d4b6b7 100644 --- a/packages/ui/src/screens/account_details/hooks.ts +++ b/packages/ui/src/screens/account_details/hooks.ts @@ -5,9 +5,12 @@ import { useCallback, useEffect, useState } from 'react'; import chainConfig from '@/chainConfig'; import { useDesmosProfile } from '@/hooks/use_desmos_profile'; import type { - AccountDetailState, BalanceType, OtherTokenType, + AccountWithdrawalAddressState, + AccountDesmosProfileState, + AccountBalanceState, + AccountRewardsState, } from '@/screens/account_details/types'; import { useAccountWithdrawalAddress, @@ -29,15 +32,9 @@ const defaultTokenUnit: TokenUnit = { exponent: 0, }; -const initialState: AccountDetailState = { +const balanceInitialState: AccountBalanceState = { loading: true, - balanceLoading: true, exists: true, - desmosProfile: null, - overview: { - address: '', - withdrawalAddress: '', - }, otherTokens: { count: 0, data: [], @@ -53,6 +50,25 @@ const initialState: AccountDetailState = { rewards: {}, }; +const desmosProfileInitialState: AccountDesmosProfileState = { + loading: true, + exists: true, + desmosProfile: null, +}; + +const withdrawalAddrInitialState: AccountWithdrawalAddressState = { + loading: true, + overview: { + address: '', + withdrawalAddress: '', + }, +}; + +const rewardsInitialState: AccountRewardsState = { + loading: true, + rewards: {}, +}; + type Data = { delegationRewards?: ReturnType['delegationRewards']; accountBalances?: ReturnType['accountBalances']; @@ -61,10 +77,14 @@ type Data = { commission?: ReturnType['commission']; }; +type RewardsData = { + delegationRewards?: ReturnType['delegationRewards']; +}; + // ============================ -// rewards +// Format rewards // ============================ -const formatRewards = (data: Data) => { +const formatRewards = (data: Data | RewardsData) => { const rewardsDict: { [key: string]: TokenUnit } = {}; // log all the rewards data?.delegationRewards?.forEach((x) => { @@ -78,7 +98,7 @@ const formatRewards = (data: Data) => { }; // ============================ -// balance +// Format balance // ============================ const formatBalance = (data: Data): BalanceType => { const available = getDenom(R.pathOr([], ['accountBalances', 'coins'], data), primaryTokenUnit); @@ -134,7 +154,7 @@ const formatBalance = (data: Data): BalanceType => { }; // ============================ -// other tokens +// Format other tokens // ============================ const formatOtherTokens = (data: Data) => { // Loop through balance and delegation to figure out what the other tokens are @@ -193,37 +213,26 @@ const formatOtherTokens = (data: Data) => { }; // ========================== -// Format Data +// Format Balance Data // ========================== const formatAllBalance = (data: Data) => { - const stateChange: Partial = { - balanceLoading: false, + const stateChange: Partial = { + loading: false, }; stateChange.rewards = formatRewards(data); stateChange.balance = formatBalance(data); - formatOtherTokens(data); - stateChange.otherTokens = formatOtherTokens(data); return stateChange; }; -export const useAccountDetails = () => { +export const useAccountProfileDetails = () => { const router = useRouter(); - const [state, setState] = useState(initialState); + const [state, setState] = useState(desmosProfileInitialState); - const handleSetState = useCallback( - (stateChange: (prevState: AccountDetailState) => AccountDetailState) => { - setState((prevState) => { - const newState = stateChange(prevState); - return R.equals(prevState, newState) ? prevState : newState; - }); - }, - [] - ); const address = Array.isArray(router.query.address) ? router.query.address[0] : router.query.address ?? ''; @@ -245,6 +254,26 @@ export const useAccountDetails = () => { [dataDesmosProfile, loadingDesmosProfile] ); + return { profileState: state }; +}; + +export const useAccountBalance = () => { + const router = useRouter(); + const [state, setState] = useState(balanceInitialState); + + const handleSetState = useCallback( + (stateChange: (prevState: AccountBalanceState) => AccountBalanceState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + const address = Array.isArray(router.query.address) + ? router.query.address[0] + : router.query.address ?? ''; + const commission = useCommission(address); const available = useAvailableBalances(address); const delegation = useDelegationBalance(address); @@ -265,9 +294,37 @@ export const useAccountDetails = () => { formattedRawData.unbondingBalance = R.pathOr({ coins: [] }, ['unbondingBalance'], unbonding); formattedRawData.delegationRewards = R.pathOr([], ['delegationRewards'], rewards); - handleSetState((prevState) => ({ ...prevState, ...formatAllBalance(formattedRawData) })); + const formatAccountBalance = formatAllBalance(formattedRawData); + + if (Object.keys(formatAccountBalance).length > 0) { + handleSetState((prevState) => ({ + ...prevState, + ...formatAccountBalance, + loading: false, + })); + } }, [commission, available, delegation, unbonding, rewards, handleSetState]); + return { state }; +}; + +export const useAccountWithdrawalAddr = () => { + const router = useRouter(); + const [state, setState] = useState(withdrawalAddrInitialState); + + const handleSetState = useCallback( + (stateChange: (prevState: AccountWithdrawalAddressState) => AccountWithdrawalAddressState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + const address = Array.isArray(router.query.address) + ? router.query.address[0] + : router.query.address ?? ''; + // ========================== // Fetch Data // ========================== @@ -285,3 +342,41 @@ export const useAccountDetails = () => { return { state }; }; + +export const useAccountRewards = () => { + const router = useRouter(); + const [state, setState] = useState(rewardsInitialState); + + const handleSetState = useCallback( + (stateChange: (prevState: AccountRewardsState) => AccountRewardsState) => { + setState((prevState) => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); + const address = Array.isArray(router.query.address) + ? router.query.address[0] + : router.query.address ?? ''; + + const rewards = useRewards(address); + + useEffect(() => { + const formattedRawData: { + delegationRewards?: (typeof rewards)['delegationRewards']; + } = {}; + formattedRawData.delegationRewards = R.pathOr([], ['delegationRewards'], rewards); + const updatedRewards = formatRewards(formattedRawData); + + if (Object.keys(updatedRewards).length > 0) { + handleSetState((prevState) => ({ + ...prevState, + rewards: updatedRewards, + loading: false, + })); + } + }, [rewards, handleSetState]); + + return { state }; +}; diff --git a/packages/ui/src/screens/account_details/index.tsx b/packages/ui/src/screens/account_details/index.tsx index 6d28e31fd3..04930635f5 100644 --- a/packages/ui/src/screens/account_details/index.tsx +++ b/packages/ui/src/screens/account_details/index.tsx @@ -8,13 +8,15 @@ import OtherTokens from '@/screens/account_details/components/other_tokens'; import Overview from '@/screens/account_details/components/overview'; import Staking from '@/screens/account_details/components/staking'; import Transactions from '@/screens/account_details/components/transactions'; -import { useAccountDetails } from '@/screens/account_details/hooks'; +import { useAccountProfileDetails, useAccountBalance } from '@/screens/account_details/hooks'; import useStyles from '@/screens/account_details/styles'; const AccountDetails = () => { const { t } = useAppTranslation('accounts'); const { classes } = useStyles(); - const { state } = useAccountDetails(); + const { profileState } = useAccountProfileDetails(); + const accountBalance = useAccountBalance(); + const { state: accountBalanceState } = accountBalance; return ( <> @@ -25,35 +27,44 @@ const AccountDetails = () => { }} /> - + - {!!state.desmosProfile && ( + {!!profileState.desmosProfile && ( )} - - - - - + + {!profileState.loading ? ( + <> + + + + ) : null} + {!profileState.loading && !accountBalanceState.loading ? ( + <> + + + + ) : null} diff --git a/packages/ui/src/screens/account_details/types.ts b/packages/ui/src/screens/account_details/types.ts index 9c9bbdeb32..b01473b0e4 100644 --- a/packages/ui/src/screens/account_details/types.ts +++ b/packages/ui/src/screens/account_details/types.ts @@ -23,12 +23,9 @@ export interface RewardsType { [value: string]: TokenUnit; } -export interface AccountDetailState { +export interface AccountBalanceState { loading: boolean; - balanceLoading: boolean; exists: boolean; - desmosProfile: DesmosProfile | null; - overview: OverviewType; balance: BalanceType; otherTokens: { data: OtherTokenType[]; @@ -36,3 +33,19 @@ export interface AccountDetailState { }; rewards: RewardsType; } + +export interface AccountDesmosProfileState { + exists: boolean; + loading: boolean; + desmosProfile: DesmosProfile | null; +} + +export interface AccountWithdrawalAddressState { + loading: boolean; + overview: OverviewType; +} + +export interface AccountRewardsState { + loading: boolean; + rewards: RewardsType; +} diff --git a/packages/ui/src/screens/home/components/hero/components/online_voting_power/hooks.ts b/packages/ui/src/screens/home/components/hero/components/online_voting_power/hooks.ts index 283ad8d062..6d3d33b1ae 100644 --- a/packages/ui/src/screens/home/components/hero/components/online_voting_power/hooks.ts +++ b/packages/ui/src/screens/home/components/hero/components/online_voting_power/hooks.ts @@ -32,11 +32,11 @@ const formatOnlineVotingPower = (data: OnlineVotingPowerQuery) => { }; export const useOnlineVotingPower = () => { - const [state, setState] = useState(initialState); + const [onlineVPstate, setOnlineVPState] = useState(initialState); const handleSetState = useCallback( (stateChange: (prevState: OnlineVotingPowerState) => OnlineVotingPowerState) => { - setState((prevState) => { + setOnlineVPState((prevState) => { const newState = stateChange(prevState); return R.equals(prevState, newState) ? prevState : newState; }); @@ -54,6 +54,6 @@ export const useOnlineVotingPower = () => { }); return { - state, + onlineVPstate, }; }; diff --git a/packages/ui/src/screens/home/components/hero/components/online_voting_power/index.tsx b/packages/ui/src/screens/home/components/hero/components/online_voting_power/index.tsx index 4d1650fbdd..d1845d6ba9 100644 --- a/packages/ui/src/screens/home/components/hero/components/online_voting_power/index.tsx +++ b/packages/ui/src/screens/home/components/hero/components/online_voting_power/index.tsx @@ -8,17 +8,17 @@ import { useOnlineVotingPower } from '@/screens/home/components/hero/components/ const OnlineVotingPower: FC = () => { const { t } = useAppTranslation('home'); - const { state } = useOnlineVotingPower(); + const { onlineVPstate } = useOnlineVotingPower(); const { chainName } = chainConfig(); const votingPowerPercent = // eslint-disable-next-line no-nested-ternary chainName === 'wormhole' - ? numeral((state.activeValidators / state.votingPower) * 100) - : state.totalVotingPower === 0 + ? numeral((onlineVPstate.activeValidators / onlineVPstate.votingPower) * 100) + : onlineVPstate.totalVotingPower === 0 ? numeral(0) - : numeral((state.votingPower / state.totalVotingPower) * 100); + : numeral((onlineVPstate.votingPower / onlineVPstate.totalVotingPower) * 100); const { classes } = useStyles({ percentage: votingPowerPercent.format('0') }); @@ -30,10 +30,10 @@ const OnlineVotingPower: FC = () => { {`${votingPowerPercent.format('0,0.00', (n) => Math.floor(n))}%`} - {numeral(state.votingPower).format('0,0')} /{' '} - {state.totalVotingPower === 0 - ? numeral(state.votingPower).format('0,0') - : numeral(state.totalVotingPower).format('0,0')} + {numeral(onlineVPstate.votingPower).format('0,0')} /{' '} + {onlineVPstate.totalVotingPower === 0 + ? numeral(onlineVPstate.votingPower).format('0,0') + : numeral(onlineVPstate.totalVotingPower).format('0,0')}
@@ -45,7 +45,7 @@ const OnlineVotingPower: FC = () => { {t('validators')} - {numeral(state.activeValidators).format('0,0')} + {numeral(onlineVPstate.activeValidators).format('0,0')}
@@ -61,16 +61,16 @@ const OnlineVotingPower: FC = () => { {t('votingPower')} - {numeral(state.votingPower).format('0,0')} + {numeral(onlineVPstate.votingPower).format('0,0')}
- {state.totalVotingPower === 0 ? null : ( + {onlineVPstate.totalVotingPower === 0 ? null : (
{t('totalVotingPower')} - {numeral(state.totalVotingPower).format('0,0')} + {numeral(onlineVPstate.totalVotingPower).format('0,0')}
)} diff --git a/packages/ui/src/screens/proposals/hooks.ts b/packages/ui/src/screens/proposals/hooks.ts index 1cc305e8c2..918cdd5d99 100644 --- a/packages/ui/src/screens/proposals/hooks.ts +++ b/packages/ui/src/screens/proposals/hooks.ts @@ -5,8 +5,8 @@ import { useCallback, useState } from 'react'; import xss from 'xss'; const formatProposals = (data: ProposalsQuery) => - data.proposals.map((x): ProposalType => { - const description = xss(x.description.replace(/\\n\s?/g, '
')); + data?.proposals.map((x): ProposalType => { + const description = xss(x?.description.replace(/\\n\s?/g, '
')); return { description, id: x.proposalId, diff --git a/packages/ui/src/screens/validator_details/components/blocks/index.tsx b/packages/ui/src/screens/validator_details/components/blocks/index.tsx index 70aead3d97..c4d9abff2e 100644 --- a/packages/ui/src/screens/validator_details/components/blocks/index.tsx +++ b/packages/ui/src/screens/validator_details/components/blocks/index.tsx @@ -80,12 +80,15 @@ const Blocks: FC = ({ className, address }) => { return ( {t('lastBlocks')} - {loading && } -
- {state.map((x, i) => ( - - ))} -
+ {loading ? ( + + ) : ( +
+ {state.map((x, i) => ( + + ))} +
+ )}
); }; diff --git a/packages/ui/src/screens/validator_details/components/profile/index.test.tsx b/packages/ui/src/screens/validator_details/components/profile/index.test.tsx index 5ea9667075..b87028d1c0 100644 --- a/packages/ui/src/screens/validator_details/components/profile/index.test.tsx +++ b/packages/ui/src/screens/validator_details/components/profile/index.test.tsx @@ -39,6 +39,7 @@ describe('screen: ValidatorDetails/Profile', () => { description: 'description', website: '', }} + loading={false} /> ); diff --git a/packages/ui/src/screens/validator_details/components/profile/index.tsx b/packages/ui/src/screens/validator_details/components/profile/index.tsx index b6b9da1257..af30c4609a 100644 --- a/packages/ui/src/screens/validator_details/components/profile/index.tsx +++ b/packages/ui/src/screens/validator_details/components/profile/index.tsx @@ -3,14 +3,19 @@ import Box from '@/components/box'; import Markdown from '@/components/markdown'; import { useProfileRecoil } from '@/recoil/profiles/hooks'; import useStyles from '@/screens/validator_details/components/profile/styles'; -import type { OverviewType } from '@/screens/validator_details/types'; import { useDisplayStyles } from '@/styles/useSharedStyles'; import Divider from '@mui/material/Divider'; import Typography from '@mui/material/Typography'; import useAppTranslation from '@/hooks/useAppTranslation'; import { FC } from 'react'; +import Loading from '@/components/loading'; +import type { OverviewType } from '@/screens/validator_details/types'; -const Profile: FC<{ className?: string; profile: OverviewType }> = ({ className, profile }) => { +const Profile: FC<{ className?: string; profile: OverviewType; loading: boolean }> = ({ + className, + profile, + loading, +}) => { const { classes, cx } = useStyles(); const display = useDisplayStyles().classes; const { t } = useAppTranslation('validators'); @@ -25,57 +30,63 @@ const Profile: FC<{ className?: string; profile: OverviewType }> = ({ className, return ( -
- -
-
- {/* ======================== */} - {/* hiddenWhenLg header */} - {/* ======================== */} -
- -
- {name} + {loading ? ( + + ) : ( + <> +
+ +
+
+ {/* ======================== */} + {/* hiddenWhenLg header */} + {/* ======================== */} +
+ +
+ {name} +
+
+ {/* ======================== */} + {/* bio */} + {/* ======================== */} + {profile.description && ( +
+ +
+ )}
- {/* ======================== */} - {/* bio */} - {/* ======================== */} - {profile.description && ( -
- -
- )} -
-
- -
-
- - {t('website')} - - - {profile.website} - -
-
+ +
+
+ + {t('website')} + + + {profile.website} + +
+
+ + )} ); }; diff --git a/packages/ui/src/screens/validator_details/components/validator_overview/index.tsx b/packages/ui/src/screens/validator_details/components/validator_overview/index.tsx index 5c70817947..871bbb4fcb 100644 --- a/packages/ui/src/screens/validator_details/components/validator_overview/index.tsx +++ b/packages/ui/src/screens/validator_details/components/validator_overview/index.tsx @@ -5,7 +5,6 @@ import Tag from '@/components/tag'; import { useAddress } from '@/screens/validator_details/components/validator_overview/hooks'; import useStyles from '@/screens/validator_details/components/validator_overview/styles'; import { getCondition } from '@/screens/validator_details/components/validator_overview/utils'; -import type { OverviewType, StatusType } from '@/screens/validator_details/types'; import { useDisplayStyles } from '@/styles/useSharedStyles'; import { getMiddleEllipsis } from '@/utils/get_middle_ellipsis'; import { getValidatorStatus } from '@/utils/get_validator_status'; @@ -18,19 +17,26 @@ import Link from 'next/link'; import numeral from 'numeral'; import { FC } from 'react'; import CopyIcon from 'shared-utils/assets/icon-copy.svg'; +import Loading from '@/components/loading'; +import type { OverviewType, StatusType } from '@/screens/validator_details/types'; type ValidatorOverviewProps = { className?: string; status: StatusType; overview: OverviewType; + loading: boolean; }; -const ValidatorOverview: FC = ({ status, overview, className }) => { +const ValidatorOverview: FC = ({ + status, + overview, + className, + loading, +}) => { const { classes, cx } = useStyles(); const display = useDisplayStyles().classes; const { t } = useAppTranslation('validators'); const { handleCopyToClipboard } = useAddress(t); - const statusTheme = getValidatorStatus(status.status, status.jailed, status.tombstoned); const condition = getCondition(status.condition, status.status); @@ -119,63 +125,69 @@ const ValidatorOverview: FC = ({ status, overview, class return ( -
-
- - {t('operatorAddress')} - -
- handleCopyToClipboard(overview.operatorAddress)} - className={classes.actionIcons} - /> - - {overview.operatorAddress} - - {getMiddleEllipsis(overview.operatorAddress, { - beginning: 15, - ending: 5, - })} - - -
-
+ {loading ? ( + + ) : ( + <> +
+
+ + {t('operatorAddress')} + +
+ handleCopyToClipboard(overview.operatorAddress)} + className={classes.actionIcons} + /> + + {overview.operatorAddress} + + {getMiddleEllipsis(overview.operatorAddress, { + beginning: 15, + ending: 5, + })} + + +
+
-
- - {t('selfDelegateAddress')} - -
- handleCopyToClipboard(overview.selfDelegateAddress)} - /> - - {overview.selfDelegateAddress} - - {getMiddleEllipsis(overview.selfDelegateAddress, { - beginning: 15, - ending: 5, - })} - - +
+ + {t('selfDelegateAddress')} + +
+ handleCopyToClipboard(overview.selfDelegateAddress)} + /> + + {overview.selfDelegateAddress} + + {getMiddleEllipsis(overview.selfDelegateAddress, { + beginning: 15, + ending: 5, + })} + + +
+
-
-
- -
- {statusItems.map((x) => ( -
- {x.name} - {x.value} + +
+ {statusItems.map((x) => ( +
+ {x.name} + {x.value} +
+ ))}
- ))} -
+ + )} ); }; diff --git a/packages/ui/src/screens/validator_details/components/voting_power/index.tsx b/packages/ui/src/screens/validator_details/components/voting_power/index.tsx index 5cf57625b0..0b8764752f 100644 --- a/packages/ui/src/screens/validator_details/components/voting_power/index.tsx +++ b/packages/ui/src/screens/validator_details/components/voting_power/index.tsx @@ -5,30 +5,31 @@ import numeral from 'numeral'; import { FC } from 'react'; import chainConfig from '@/chainConfig'; import { BLOCK_DETAILS } from '@/utils/go_to_page'; -import type { VotingPowerType } from '@/screens/validator_details/types'; import useStyles from '@/screens/validator_details/components/voting_power/styles'; import Box from '@/components/box'; import { useOnlineVotingPower } from '@/screens/home/components/hero/components/online_voting_power/hooks'; +import Loading from '@/components/loading'; +import type { VotingPowerType } from '@/screens/validator_details/types'; type VotingPowerProps = { className?: string; data: VotingPowerType; status?: number; + loading: boolean; }; -const VotingPower: FC = ({ className, data, status }) => { +const VotingPower: FC = ({ className, data, status, loading }) => { const { t } = useAppTranslation('validators'); - const { state } = useOnlineVotingPower(); - + const { onlineVPstate } = useOnlineVotingPower(); const { chainName } = chainConfig(); - const votingPower = status === 3 ? numeral(data.self).format('0,0') : '0'; + const validatorVotingPower = status === 3 ? numeral(data.self).format('0,0') : '0'; const votingPowerPercent = // eslint-disable-next-line no-nested-ternary status === 3 ? chainName === 'wormhole' - ? numeral((Number(votingPower) / state.activeValidators) * 100) + ? numeral((Number(validatorVotingPower) / onlineVPstate.activeValidators) * 100) : numeral((data.self / (numeral(data.overall.value).value() ?? 0)) * 100) : numeral(0); @@ -38,43 +39,49 @@ const VotingPower: FC = ({ className, data, status }) => { return ( {t('votingPower')} -
- - {`${votingPowerPercent.format('0,0.00')}%`} - - - {chainName === 'wormhole' - ? `${votingPower} / ${state.activeValidators}` - : `${votingPower} / ${numeral(data.overall.value).format('0,0')}`} - -
-
-
-
-
- - {t('block')} - - - {numeral(data.height).format('0,0')} - -
-
- - {t('votingPower')} - - - {votingPower} - -
-
- - {t('votingPowerPercent')} - - - {`${votingPowerPercent.format('0,0.00')}%`} - -
+ {loading ? ( + + ) : ( + <> +
+ + {`${votingPowerPercent.format('0,0.00')}%`} + + + {chainName === 'wormhole' + ? `${validatorVotingPower} / ${onlineVPstate.activeValidators}` + : `${validatorVotingPower} / ${numeral(data.overall.value).format('0,0')}`} + +
+
+
+
+
+ + {t('block')} + + + {numeral(data.height).format('0,0')} + +
+
+ + {t('votingPower')} + + + {validatorVotingPower} + +
+
+ + {t('votingPowerPercent')} + + + {`${votingPowerPercent.format('0,0.00')}%`} + +
+ + )} ); }; diff --git a/packages/ui/src/screens/validator_details/hooks.ts b/packages/ui/src/screens/validator_details/hooks.ts index 877abbdf2d..d1559ac8c2 100644 --- a/packages/ui/src/screens/validator_details/hooks.ts +++ b/packages/ui/src/screens/validator_details/hooks.ts @@ -2,10 +2,22 @@ import { useRouter } from 'next/router'; import * as R from 'ramda'; import { useCallback, useEffect, useState } from 'react'; import chainConfig from '@/chainConfig'; -import { useValidatorDetailsQuery, ValidatorDetailsQuery } from '@/graphql/types/general_types'; +import { + useValidatorVotingPowersQuery, + ValidatorVotingPowersQuery, + useValidatorInfoQuery, + ValidatorInfoQuery, + ValidatorAddressQuery, + useValidatorAddressQuery, +} from '@/graphql/types/general_types'; import { useDesmosProfile } from '@/hooks/use_desmos_profile'; import { SlashingParams } from '@/models'; -import { StatusType, ValidatorDetailsState } from '@/screens/validator_details/types'; +import { + StatusType, + ValidatorVPState, + ValidatorProfileState, + ValidatorOverviewState, +} from '@/screens/validator_details/types'; import { formatToken } from '@/utils/format_token'; import { getValidatorCondition } from '@/utils/get_validator_condition'; @@ -18,9 +30,18 @@ const initialTokenDenom: TokenUnit = { exponent: 0, }; -const initialState: ValidatorDetailsState = { +const initialVotingPowerState: ValidatorVPState = { + validatorVPExists: true, + votingPower: { + height: 0, + overall: initialTokenDenom, + self: 0, + validatorStatus: 0, + }, +}; + +const initialValidatorOverviewState: ValidatorOverviewState = { exists: true, - desmosProfile: null, overview: { validator: '', operatorAddress: '', @@ -38,78 +59,80 @@ const initialState: ValidatorDetailsState = { signedBlockWindow: 0, maxRate: '0', }, - votingPower: { - height: 0, - overall: initialTokenDenom, - self: 0, - }, }; -// ============================ -// overview -// ============================ -const formatOverview = (data: ValidatorDetailsQuery) => { - const operatorAddress = data?.validator?.[0]?.validatorInfo?.operatorAddress ?? ''; - const selfDelegateAddress = data?.validator?.[0]?.validatorInfo?.selfDelegateAddress ?? ''; - const profile = { - validator: operatorAddress, - operatorAddress, - selfDelegateAddress, - description: data.validator[0]?.validatorDescriptions?.[0]?.details ?? '', - website: data.validator[0]?.validatorDescriptions?.[0]?.website ?? '', - }; - - return profile; +const initialValidatorProfileState: ValidatorProfileState = { + exists: true, + desmosProfile: null, + operatorAddress: '', + selfDelegateAddress: '', }; -// ============================ -// status -// ============================ -const formatStatus = (data: ValidatorDetailsQuery) => { - const slashingParams = SlashingParams.fromJson(data?.slashingParams?.[0]?.params ?? {}); - const missedBlockCounter = - data.validator[0]?.validatorSigningInfos?.[0]?.missedBlocksCounter ?? 0; - const { signedBlockWindow } = slashingParams; - const condition = getValidatorCondition(signedBlockWindow, missedBlockCounter); +export const useValidatorVotingPowerDetails = () => { + const router = useRouter(); + const [state, setState] = useState(initialVotingPowerState); - const profile: StatusType = { - status: data.validator[0]?.validatorStatuses?.[0]?.status ?? 3, - jailed: data.validator[0]?.validatorStatuses?.[0]?.jailed ?? false, - tombstoned: data.validator[0]?.validatorSigningInfos?.[0]?.tombstoned ?? false, - commission: data.validator[0]?.validatorCommissions?.[0]?.commission ?? 0, - condition, - missedBlockCounter, - signedBlockWindow, - maxRate: data?.validator?.[0]?.validatorInfo?.maxRate ?? '0', - }; + const handleSetState = useCallback( + (stateChange: (prevState: ValidatorVPState) => ValidatorVPState) => { + setState(prevState => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); - return profile; + // ========================== + // Fetch Data + // ========================== + const { loading } = useValidatorVotingPowersQuery({ + variables: { + address: router.query.address as string, + }, + onCompleted: data => { + handleSetState(prevState => ({ ...prevState, ...formatValidatorVotingPower(data) })); + }, + }); + + return { state, loading }; }; -// ============================ -// votingPower -// ============================ -const formatVotingPower = (data: ValidatorDetailsQuery) => { - const selfVotingPower = - (data.validator[0]?.validatorVotingPowers?.[0]?.votingPower ?? 0) / - 10 ** (extra.votingPowerExponent ?? 0); +export const useValidatorOverviewDetails = () => { + const router = useRouter(); + const [state, setState] = useState(initialValidatorOverviewState); - const votingPower = { - self: selfVotingPower, - overall: formatToken(data?.stakingPool?.[0]?.bonded ?? 0, votingPowerTokenUnit), - height: data.validator[0]?.validatorVotingPowers?.[0]?.height ?? 0, - }; + const handleSetState = useCallback( + (stateChange: (prevState: ValidatorOverviewState) => ValidatorOverviewState) => { + setState(prevState => { + const newState = stateChange(prevState); + return R.equals(prevState, newState) ? prevState : newState; + }); + }, + [] + ); - return votingPower; + // ========================== + // Fetch Data + // ========================== + const { loading } = useValidatorInfoQuery({ + variables: { + address: router.query.address as string, + }, + onCompleted: data => { + handleSetState(prevState => ({ ...prevState, ...formatValidatorOverview(data) })); + }, + }); + + return { state, loading }; }; -export const useValidatorDetails = () => { +export const useValidatorProfileDetails = () => { + const [state, setState] = useState(initialValidatorProfileState); const router = useRouter(); - const [state, setState] = useState(initialState); const handleSetState = useCallback( - (stateChange: (prevState: ValidatorDetailsState) => ValidatorDetailsState) => { - setState((prevState) => { + (stateChange: (prevState: ValidatorProfileState) => ValidatorProfileState) => { + setState(prevState => { const newState = stateChange(prevState); return R.equals(prevState, newState) ? prevState : newState; }); @@ -120,12 +143,12 @@ export const useValidatorDetails = () => { // ========================== // Fetch Data // ========================== - const { loading } = useValidatorDetailsQuery({ + const { loading } = useValidatorAddressQuery({ variables: { address: router.query.address as string, }, - onCompleted: (data) => { - handleSetState((prevState) => ({ ...prevState, ...formatAccountQuery(data) })); + onCompleted: data => { + handleSetState(prevState => ({ ...prevState, ...formatValidatorAddress(data) })); }, }); @@ -133,34 +156,96 @@ export const useValidatorDetails = () => { // Desmos Profile // ========================== const { data: dataDesmosProfile, loading: loadingDesmosProfile } = useDesmosProfile({ - addresses: [state.overview.selfDelegateAddress], - skip: !extra.profile || !state.overview.selfDelegateAddress, + addresses: [state.selfDelegateAddress], + skip: !extra.profile || !state.selfDelegateAddress, }); useEffect( () => - setState((prevState) => ({ + setState(prevState => ({ ...prevState, desmosProfile: dataDesmosProfile?.[0], loading: loadingDesmosProfile, })), [dataDesmosProfile, loadingDesmosProfile] ); - return { state, loading }; }; -function formatAccountQuery(data: ValidatorDetailsQuery): Partial { - const stateChange: Partial = {}; +function formatValidatorAddress(data: ValidatorAddressQuery): Partial { + const stateChange: Partial = {}; + if (!data.validator.length) { + stateChange.exists = false; + return stateChange; + } + + const operatorAddress = data?.validator?.[0]?.validatorInfo?.operatorAddress ?? ''; + const selfDelegateAddress = data?.validator?.[0]?.validatorInfo?.selfDelegateAddress ?? ''; + + stateChange.operatorAddress = operatorAddress; + stateChange.selfDelegateAddress = selfDelegateAddress; + return stateChange; +} +function formatValidatorVotingPower(data: ValidatorVotingPowersQuery): Partial { + const stateChange: Partial = {}; + if (!data.validator.length) { + stateChange.validatorVPExists = false; + return stateChange; + } + + const selfVotingPower = + (data.validator[0]?.validatorVotingPowers?.[0]?.votingPower ?? 0) / + 10 ** (extra.votingPowerExponent ?? 0); + + const votingPower = { + self: selfVotingPower, + overall: formatToken(data?.stakingPool?.[0]?.bonded ?? 0, votingPowerTokenUnit), + height: data.validator[0]?.validatorVotingPowers?.[0]?.height ?? 0, + validatorStatus: data.validator[0]?.validatorStatuses[0]?.status, + }; + + stateChange.votingPower = votingPower; + stateChange.validatorVPExists = true; + + return stateChange; +} + +function formatValidatorOverview(data: ValidatorInfoQuery): Partial { + const stateChange: Partial = {}; if (!data.validator.length) { stateChange.exists = false; return stateChange; } - stateChange.overview = formatOverview(data); + const operatorAddress = data?.validator?.[0]?.validatorInfo?.operatorAddress ?? ''; + const selfDelegateAddress = data?.validator?.[0]?.validatorInfo?.selfDelegateAddress ?? ''; + const overview = { + validator: operatorAddress, + operatorAddress, + selfDelegateAddress, + description: data.validator[0]?.validatorDescriptions?.[0]?.details ?? '', + website: data.validator[0]?.validatorDescriptions?.[0]?.website ?? '', + }; + + const slashingParams = SlashingParams.fromJson(data?.slashingParams?.[0]?.params ?? {}); + const missedBlockCounter = + data.validator[0]?.validatorSigningInfos?.[0]?.missedBlocksCounter ?? 0; + const { signedBlockWindow } = slashingParams; + const condition = getValidatorCondition(signedBlockWindow, missedBlockCounter); - stateChange.status = formatStatus(data); - stateChange.votingPower = formatVotingPower(data); + const status: StatusType = { + status: data.validator[0]?.validatorStatuses?.[0]?.status ?? 3, + jailed: data.validator[0]?.validatorStatuses?.[0]?.jailed ?? false, + tombstoned: data.validator[0]?.validatorSigningInfos?.[0]?.tombstoned ?? false, + commission: data.validator[0]?.validatorCommissions?.[0]?.commission ?? 0, + condition, + missedBlockCounter, + signedBlockWindow, + maxRate: data?.validator?.[0]?.validatorInfo?.maxRate ?? '0', + }; + stateChange.exists = true; + stateChange.overview = overview; + stateChange.status = status; return stateChange; } diff --git a/packages/ui/src/screens/validator_details/index.tsx b/packages/ui/src/screens/validator_details/index.tsx index 2554012319..1fd9c6513b 100644 --- a/packages/ui/src/screens/validator_details/index.tsx +++ b/packages/ui/src/screens/validator_details/index.tsx @@ -2,21 +2,28 @@ import { NextSeo } from 'next-seo'; import useAppTranslation from '@/hooks/useAppTranslation'; import DesmosProfile from '@/components/desmos_profile'; import Layout from '@/components/layout'; -import LoadAndExist from '@/components/load_and_exist'; import Blocks from '@/screens/validator_details/components/blocks'; import Profile from '@/screens/validator_details/components/profile'; import Staking from '@/screens/validator_details/components/staking'; import Transactions from '@/screens/validator_details/components/transactions'; import ValidatorOverview from '@/screens/validator_details/components/validator_overview'; import VotingPower from '@/screens/validator_details/components/voting_power'; -import { useValidatorDetails } from '@/screens/validator_details/hooks'; +import { + useValidatorProfileDetails, + useValidatorOverviewDetails, + useValidatorVotingPowerDetails, +} from '@/screens/validator_details/hooks'; import useStyles from '@/screens/validator_details/styles'; +import LoadAndExist from '@/components/load_and_exist'; const ValidatorDetails = () => { const { t } = useAppTranslation('validators'); const { classes } = useStyles(); - const { state, loading } = useValidatorDetails(); - const { desmosProfile, exists, overview, status, votingPower, cosmosAddress } = state; + const { state, loading } = useValidatorProfileDetails(); + const { exists, desmosProfile, operatorAddress } = state; + const { state: validatorOverviewState, loading: validatorOverviewLoading } = + useValidatorOverviewDetails(); + const { state: validatorVPState, loading: validatorVPLoading } = useValidatorVotingPowerDetails(); return ( <> @@ -27,29 +34,43 @@ const ValidatorDetails = () => { }} /> - - - {desmosProfile ? ( - - ) : ( - - )} - - - - - - + +
+ + {exists && desmosProfile ? ( + + ) : ( + + )} + {!loading ? ( + <> + + + + ) : null} + {!loading && !validatorOverviewLoading && !validatorVPLoading ? ( + <> + + + + + ) : null} + +
diff --git a/packages/ui/src/screens/validator_details/types.ts b/packages/ui/src/screens/validator_details/types.ts index 2ae98a254f..a250467abd 100644 --- a/packages/ui/src/screens/validator_details/types.ts +++ b/packages/ui/src/screens/validator_details/types.ts @@ -22,13 +22,23 @@ export interface VotingPowerType { height: number; overall: TokenUnit; self: number; + validatorStatus: number; } -export interface ValidatorDetailsState { +export interface ValidatorVPState { + validatorVPExists: boolean; + votingPower: VotingPowerType; +} + +export interface ValidatorOverviewState { exists: boolean; - desmosProfile: DesmosProfile | null; overview: OverviewType; - cosmosAddress?: string; status: StatusType; - votingPower: VotingPowerType; +} + +export interface ValidatorProfileState { + exists: boolean; + desmosProfile: DesmosProfile | null; + operatorAddress: string; + selfDelegateAddress: string; }