diff --git a/graphql.config.ts b/graphql.config.ts index 199c1ed..9a7432f 100644 --- a/graphql.config.ts +++ b/graphql.config.ts @@ -7,7 +7,7 @@ export default { overwrite: true, schema: process.env.SQUID_API_URL || - 'https://subsquid.squids.live/subsquid-network-testnet/v/v5/graphql', + 'https://subsquid.squids.live/subsquid-network-mainnet@v5/api/graphql', documents: ['src/api/subsquid-network-squid/schema.graphql'], hooks: { afterOneFileWrite: ['prettier --write'], diff --git a/src/api/subsquid-network-squid/graphql.tsx b/src/api/subsquid-network-squid/graphql.tsx index 56c25f5..d699d17 100644 --- a/src/api/subsquid-network-squid/graphql.tsx +++ b/src/api/subsquid-network-squid/graphql.tsx @@ -1072,6 +1072,211 @@ export type CommitmentsConnection = { totalCount: Scalars['Int']['output']; }; +export type Contracts = { + __typename?: 'Contracts'; + distributedRewardsDistribution?: Maybe; + gatewayRegistry?: Maybe; + networkController?: Maybe; + rewardCalculation?: Maybe; + rewardTreasury?: Maybe; + router?: Maybe; + softCap?: Maybe; + staking?: Maybe; + temporaryHoldingFactory?: Maybe; + vestingFactory?: Maybe; + workerRegistration?: Maybe; +}; + +export type ContractsWhereInput = { + distributedRewardsDistribution_contains?: InputMaybe; + distributedRewardsDistribution_containsInsensitive?: InputMaybe; + distributedRewardsDistribution_endsWith?: InputMaybe; + distributedRewardsDistribution_eq?: InputMaybe; + distributedRewardsDistribution_gt?: InputMaybe; + distributedRewardsDistribution_gte?: InputMaybe; + distributedRewardsDistribution_in?: InputMaybe>; + distributedRewardsDistribution_isNull?: InputMaybe; + distributedRewardsDistribution_lt?: InputMaybe; + distributedRewardsDistribution_lte?: InputMaybe; + distributedRewardsDistribution_not_contains?: InputMaybe; + distributedRewardsDistribution_not_containsInsensitive?: InputMaybe; + distributedRewardsDistribution_not_endsWith?: InputMaybe; + distributedRewardsDistribution_not_eq?: InputMaybe; + distributedRewardsDistribution_not_in?: InputMaybe>; + distributedRewardsDistribution_not_startsWith?: InputMaybe; + distributedRewardsDistribution_startsWith?: InputMaybe; + gatewayRegistry_contains?: InputMaybe; + gatewayRegistry_containsInsensitive?: InputMaybe; + gatewayRegistry_endsWith?: InputMaybe; + gatewayRegistry_eq?: InputMaybe; + gatewayRegistry_gt?: InputMaybe; + gatewayRegistry_gte?: InputMaybe; + gatewayRegistry_in?: InputMaybe>; + gatewayRegistry_isNull?: InputMaybe; + gatewayRegistry_lt?: InputMaybe; + gatewayRegistry_lte?: InputMaybe; + gatewayRegistry_not_contains?: InputMaybe; + gatewayRegistry_not_containsInsensitive?: InputMaybe; + gatewayRegistry_not_endsWith?: InputMaybe; + gatewayRegistry_not_eq?: InputMaybe; + gatewayRegistry_not_in?: InputMaybe>; + gatewayRegistry_not_startsWith?: InputMaybe; + gatewayRegistry_startsWith?: InputMaybe; + networkController_contains?: InputMaybe; + networkController_containsInsensitive?: InputMaybe; + networkController_endsWith?: InputMaybe; + networkController_eq?: InputMaybe; + networkController_gt?: InputMaybe; + networkController_gte?: InputMaybe; + networkController_in?: InputMaybe>; + networkController_isNull?: InputMaybe; + networkController_lt?: InputMaybe; + networkController_lte?: InputMaybe; + networkController_not_contains?: InputMaybe; + networkController_not_containsInsensitive?: InputMaybe; + networkController_not_endsWith?: InputMaybe; + networkController_not_eq?: InputMaybe; + networkController_not_in?: InputMaybe>; + networkController_not_startsWith?: InputMaybe; + networkController_startsWith?: InputMaybe; + rewardCalculation_contains?: InputMaybe; + rewardCalculation_containsInsensitive?: InputMaybe; + rewardCalculation_endsWith?: InputMaybe; + rewardCalculation_eq?: InputMaybe; + rewardCalculation_gt?: InputMaybe; + rewardCalculation_gte?: InputMaybe; + rewardCalculation_in?: InputMaybe>; + rewardCalculation_isNull?: InputMaybe; + rewardCalculation_lt?: InputMaybe; + rewardCalculation_lte?: InputMaybe; + rewardCalculation_not_contains?: InputMaybe; + rewardCalculation_not_containsInsensitive?: InputMaybe; + rewardCalculation_not_endsWith?: InputMaybe; + rewardCalculation_not_eq?: InputMaybe; + rewardCalculation_not_in?: InputMaybe>; + rewardCalculation_not_startsWith?: InputMaybe; + rewardCalculation_startsWith?: InputMaybe; + rewardTreasury_contains?: InputMaybe; + rewardTreasury_containsInsensitive?: InputMaybe; + rewardTreasury_endsWith?: InputMaybe; + rewardTreasury_eq?: InputMaybe; + rewardTreasury_gt?: InputMaybe; + rewardTreasury_gte?: InputMaybe; + rewardTreasury_in?: InputMaybe>; + rewardTreasury_isNull?: InputMaybe; + rewardTreasury_lt?: InputMaybe; + rewardTreasury_lte?: InputMaybe; + rewardTreasury_not_contains?: InputMaybe; + rewardTreasury_not_containsInsensitive?: InputMaybe; + rewardTreasury_not_endsWith?: InputMaybe; + rewardTreasury_not_eq?: InputMaybe; + rewardTreasury_not_in?: InputMaybe>; + rewardTreasury_not_startsWith?: InputMaybe; + rewardTreasury_startsWith?: InputMaybe; + router_contains?: InputMaybe; + router_containsInsensitive?: InputMaybe; + router_endsWith?: InputMaybe; + router_eq?: InputMaybe; + router_gt?: InputMaybe; + router_gte?: InputMaybe; + router_in?: InputMaybe>; + router_isNull?: InputMaybe; + router_lt?: InputMaybe; + router_lte?: InputMaybe; + router_not_contains?: InputMaybe; + router_not_containsInsensitive?: InputMaybe; + router_not_endsWith?: InputMaybe; + router_not_eq?: InputMaybe; + router_not_in?: InputMaybe>; + router_not_startsWith?: InputMaybe; + router_startsWith?: InputMaybe; + softCap_contains?: InputMaybe; + softCap_containsInsensitive?: InputMaybe; + softCap_endsWith?: InputMaybe; + softCap_eq?: InputMaybe; + softCap_gt?: InputMaybe; + softCap_gte?: InputMaybe; + softCap_in?: InputMaybe>; + softCap_isNull?: InputMaybe; + softCap_lt?: InputMaybe; + softCap_lte?: InputMaybe; + softCap_not_contains?: InputMaybe; + softCap_not_containsInsensitive?: InputMaybe; + softCap_not_endsWith?: InputMaybe; + softCap_not_eq?: InputMaybe; + softCap_not_in?: InputMaybe>; + softCap_not_startsWith?: InputMaybe; + softCap_startsWith?: InputMaybe; + staking_contains?: InputMaybe; + staking_containsInsensitive?: InputMaybe; + staking_endsWith?: InputMaybe; + staking_eq?: InputMaybe; + staking_gt?: InputMaybe; + staking_gte?: InputMaybe; + staking_in?: InputMaybe>; + staking_isNull?: InputMaybe; + staking_lt?: InputMaybe; + staking_lte?: InputMaybe; + staking_not_contains?: InputMaybe; + staking_not_containsInsensitive?: InputMaybe; + staking_not_endsWith?: InputMaybe; + staking_not_eq?: InputMaybe; + staking_not_in?: InputMaybe>; + staking_not_startsWith?: InputMaybe; + staking_startsWith?: InputMaybe; + temporaryHoldingFactory_contains?: InputMaybe; + temporaryHoldingFactory_containsInsensitive?: InputMaybe; + temporaryHoldingFactory_endsWith?: InputMaybe; + temporaryHoldingFactory_eq?: InputMaybe; + temporaryHoldingFactory_gt?: InputMaybe; + temporaryHoldingFactory_gte?: InputMaybe; + temporaryHoldingFactory_in?: InputMaybe>; + temporaryHoldingFactory_isNull?: InputMaybe; + temporaryHoldingFactory_lt?: InputMaybe; + temporaryHoldingFactory_lte?: InputMaybe; + temporaryHoldingFactory_not_contains?: InputMaybe; + temporaryHoldingFactory_not_containsInsensitive?: InputMaybe; + temporaryHoldingFactory_not_endsWith?: InputMaybe; + temporaryHoldingFactory_not_eq?: InputMaybe; + temporaryHoldingFactory_not_in?: InputMaybe>; + temporaryHoldingFactory_not_startsWith?: InputMaybe; + temporaryHoldingFactory_startsWith?: InputMaybe; + vestingFactory_contains?: InputMaybe; + vestingFactory_containsInsensitive?: InputMaybe; + vestingFactory_endsWith?: InputMaybe; + vestingFactory_eq?: InputMaybe; + vestingFactory_gt?: InputMaybe; + vestingFactory_gte?: InputMaybe; + vestingFactory_in?: InputMaybe>; + vestingFactory_isNull?: InputMaybe; + vestingFactory_lt?: InputMaybe; + vestingFactory_lte?: InputMaybe; + vestingFactory_not_contains?: InputMaybe; + vestingFactory_not_containsInsensitive?: InputMaybe; + vestingFactory_not_endsWith?: InputMaybe; + vestingFactory_not_eq?: InputMaybe; + vestingFactory_not_in?: InputMaybe>; + vestingFactory_not_startsWith?: InputMaybe; + vestingFactory_startsWith?: InputMaybe; + workerRegistration_contains?: InputMaybe; + workerRegistration_containsInsensitive?: InputMaybe; + workerRegistration_endsWith?: InputMaybe; + workerRegistration_eq?: InputMaybe; + workerRegistration_gt?: InputMaybe; + workerRegistration_gte?: InputMaybe; + workerRegistration_in?: InputMaybe>; + workerRegistration_isNull?: InputMaybe; + workerRegistration_lt?: InputMaybe; + workerRegistration_lte?: InputMaybe; + workerRegistration_not_contains?: InputMaybe; + workerRegistration_not_containsInsensitive?: InputMaybe; + workerRegistration_not_endsWith?: InputMaybe; + workerRegistration_not_eq?: InputMaybe; + workerRegistration_not_in?: InputMaybe>; + workerRegistration_not_startsWith?: InputMaybe; + workerRegistration_startsWith?: InputMaybe; +}; + export type Delegation = { __typename?: 'Delegation'; claimableReward: Scalars['BigInt']['output']; @@ -2554,9 +2759,6 @@ export type Query = { settingsById?: Maybe; settingsConnection: SettingsConnection; squidStatus: SquidStatus; - statistics: Array; - statisticsById?: Maybe; - statisticsConnection: StatisticsConnection; transferById?: Maybe; transfers: Array; transfersConnection: TransfersConnection; @@ -2791,24 +2993,6 @@ export type QuerySettingsConnectionArgs = { where?: InputMaybe; }; -export type QueryStatisticsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe>; - where?: InputMaybe; -}; - -export type QueryStatisticsByIdArgs = { - id: Scalars['String']['input']; -}; - -export type QueryStatisticsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; - orderBy: Array; - where?: InputMaybe; -}; - export type QueryTransferByIdArgs = { id: Scalars['String']['input']; }; @@ -2907,12 +3091,17 @@ export type QueryWorkersConnectionArgs = { export type Settings = { __typename?: 'Settings'; + baseApr: Scalars['Float']['output']; bondAmount?: Maybe; + contracts: Contracts; + currentEpoch?: Maybe; delegationLimitCoefficient: Scalars['Float']['output']; epochLength?: Maybe; id: Scalars['String']['output']; + lockPeriod?: Maybe; minimalWorkerVersion?: Maybe; recommendedWorkerVersion?: Maybe; + utilizedStake: Scalars['BigInt']['output']; }; export type SettingsConnection = { @@ -2929,12 +3118,90 @@ export type SettingsEdge = { }; export enum SettingsOrderByInput { + BaseAprAsc = 'baseApr_ASC', + BaseAprAscNullsFirst = 'baseApr_ASC_NULLS_FIRST', + BaseAprAscNullsLast = 'baseApr_ASC_NULLS_LAST', + BaseAprDesc = 'baseApr_DESC', + BaseAprDescNullsFirst = 'baseApr_DESC_NULLS_FIRST', + BaseAprDescNullsLast = 'baseApr_DESC_NULLS_LAST', BondAmountAsc = 'bondAmount_ASC', BondAmountAscNullsFirst = 'bondAmount_ASC_NULLS_FIRST', BondAmountAscNullsLast = 'bondAmount_ASC_NULLS_LAST', BondAmountDesc = 'bondAmount_DESC', BondAmountDescNullsFirst = 'bondAmount_DESC_NULLS_FIRST', BondAmountDescNullsLast = 'bondAmount_DESC_NULLS_LAST', + ContractsDistributedRewardsDistributionAsc = 'contracts_distributedRewardsDistribution_ASC', + ContractsDistributedRewardsDistributionAscNullsFirst = 'contracts_distributedRewardsDistribution_ASC_NULLS_FIRST', + ContractsDistributedRewardsDistributionAscNullsLast = 'contracts_distributedRewardsDistribution_ASC_NULLS_LAST', + ContractsDistributedRewardsDistributionDesc = 'contracts_distributedRewardsDistribution_DESC', + ContractsDistributedRewardsDistributionDescNullsFirst = 'contracts_distributedRewardsDistribution_DESC_NULLS_FIRST', + ContractsDistributedRewardsDistributionDescNullsLast = 'contracts_distributedRewardsDistribution_DESC_NULLS_LAST', + ContractsGatewayRegistryAsc = 'contracts_gatewayRegistry_ASC', + ContractsGatewayRegistryAscNullsFirst = 'contracts_gatewayRegistry_ASC_NULLS_FIRST', + ContractsGatewayRegistryAscNullsLast = 'contracts_gatewayRegistry_ASC_NULLS_LAST', + ContractsGatewayRegistryDesc = 'contracts_gatewayRegistry_DESC', + ContractsGatewayRegistryDescNullsFirst = 'contracts_gatewayRegistry_DESC_NULLS_FIRST', + ContractsGatewayRegistryDescNullsLast = 'contracts_gatewayRegistry_DESC_NULLS_LAST', + ContractsNetworkControllerAsc = 'contracts_networkController_ASC', + ContractsNetworkControllerAscNullsFirst = 'contracts_networkController_ASC_NULLS_FIRST', + ContractsNetworkControllerAscNullsLast = 'contracts_networkController_ASC_NULLS_LAST', + ContractsNetworkControllerDesc = 'contracts_networkController_DESC', + ContractsNetworkControllerDescNullsFirst = 'contracts_networkController_DESC_NULLS_FIRST', + ContractsNetworkControllerDescNullsLast = 'contracts_networkController_DESC_NULLS_LAST', + ContractsRewardCalculationAsc = 'contracts_rewardCalculation_ASC', + ContractsRewardCalculationAscNullsFirst = 'contracts_rewardCalculation_ASC_NULLS_FIRST', + ContractsRewardCalculationAscNullsLast = 'contracts_rewardCalculation_ASC_NULLS_LAST', + ContractsRewardCalculationDesc = 'contracts_rewardCalculation_DESC', + ContractsRewardCalculationDescNullsFirst = 'contracts_rewardCalculation_DESC_NULLS_FIRST', + ContractsRewardCalculationDescNullsLast = 'contracts_rewardCalculation_DESC_NULLS_LAST', + ContractsRewardTreasuryAsc = 'contracts_rewardTreasury_ASC', + ContractsRewardTreasuryAscNullsFirst = 'contracts_rewardTreasury_ASC_NULLS_FIRST', + ContractsRewardTreasuryAscNullsLast = 'contracts_rewardTreasury_ASC_NULLS_LAST', + ContractsRewardTreasuryDesc = 'contracts_rewardTreasury_DESC', + ContractsRewardTreasuryDescNullsFirst = 'contracts_rewardTreasury_DESC_NULLS_FIRST', + ContractsRewardTreasuryDescNullsLast = 'contracts_rewardTreasury_DESC_NULLS_LAST', + ContractsRouterAsc = 'contracts_router_ASC', + ContractsRouterAscNullsFirst = 'contracts_router_ASC_NULLS_FIRST', + ContractsRouterAscNullsLast = 'contracts_router_ASC_NULLS_LAST', + ContractsRouterDesc = 'contracts_router_DESC', + ContractsRouterDescNullsFirst = 'contracts_router_DESC_NULLS_FIRST', + ContractsRouterDescNullsLast = 'contracts_router_DESC_NULLS_LAST', + ContractsSoftCapAsc = 'contracts_softCap_ASC', + ContractsSoftCapAscNullsFirst = 'contracts_softCap_ASC_NULLS_FIRST', + ContractsSoftCapAscNullsLast = 'contracts_softCap_ASC_NULLS_LAST', + ContractsSoftCapDesc = 'contracts_softCap_DESC', + ContractsSoftCapDescNullsFirst = 'contracts_softCap_DESC_NULLS_FIRST', + ContractsSoftCapDescNullsLast = 'contracts_softCap_DESC_NULLS_LAST', + ContractsStakingAsc = 'contracts_staking_ASC', + ContractsStakingAscNullsFirst = 'contracts_staking_ASC_NULLS_FIRST', + ContractsStakingAscNullsLast = 'contracts_staking_ASC_NULLS_LAST', + ContractsStakingDesc = 'contracts_staking_DESC', + ContractsStakingDescNullsFirst = 'contracts_staking_DESC_NULLS_FIRST', + ContractsStakingDescNullsLast = 'contracts_staking_DESC_NULLS_LAST', + ContractsTemporaryHoldingFactoryAsc = 'contracts_temporaryHoldingFactory_ASC', + ContractsTemporaryHoldingFactoryAscNullsFirst = 'contracts_temporaryHoldingFactory_ASC_NULLS_FIRST', + ContractsTemporaryHoldingFactoryAscNullsLast = 'contracts_temporaryHoldingFactory_ASC_NULLS_LAST', + ContractsTemporaryHoldingFactoryDesc = 'contracts_temporaryHoldingFactory_DESC', + ContractsTemporaryHoldingFactoryDescNullsFirst = 'contracts_temporaryHoldingFactory_DESC_NULLS_FIRST', + ContractsTemporaryHoldingFactoryDescNullsLast = 'contracts_temporaryHoldingFactory_DESC_NULLS_LAST', + ContractsVestingFactoryAsc = 'contracts_vestingFactory_ASC', + ContractsVestingFactoryAscNullsFirst = 'contracts_vestingFactory_ASC_NULLS_FIRST', + ContractsVestingFactoryAscNullsLast = 'contracts_vestingFactory_ASC_NULLS_LAST', + ContractsVestingFactoryDesc = 'contracts_vestingFactory_DESC', + ContractsVestingFactoryDescNullsFirst = 'contracts_vestingFactory_DESC_NULLS_FIRST', + ContractsVestingFactoryDescNullsLast = 'contracts_vestingFactory_DESC_NULLS_LAST', + ContractsWorkerRegistrationAsc = 'contracts_workerRegistration_ASC', + ContractsWorkerRegistrationAscNullsFirst = 'contracts_workerRegistration_ASC_NULLS_FIRST', + ContractsWorkerRegistrationAscNullsLast = 'contracts_workerRegistration_ASC_NULLS_LAST', + ContractsWorkerRegistrationDesc = 'contracts_workerRegistration_DESC', + ContractsWorkerRegistrationDescNullsFirst = 'contracts_workerRegistration_DESC_NULLS_FIRST', + ContractsWorkerRegistrationDescNullsLast = 'contracts_workerRegistration_DESC_NULLS_LAST', + CurrentEpochAsc = 'currentEpoch_ASC', + CurrentEpochAscNullsFirst = 'currentEpoch_ASC_NULLS_FIRST', + CurrentEpochAscNullsLast = 'currentEpoch_ASC_NULLS_LAST', + CurrentEpochDesc = 'currentEpoch_DESC', + CurrentEpochDescNullsFirst = 'currentEpoch_DESC_NULLS_FIRST', + CurrentEpochDescNullsLast = 'currentEpoch_DESC_NULLS_LAST', DelegationLimitCoefficientAsc = 'delegationLimitCoefficient_ASC', DelegationLimitCoefficientAscNullsFirst = 'delegationLimitCoefficient_ASC_NULLS_FIRST', DelegationLimitCoefficientAscNullsLast = 'delegationLimitCoefficient_ASC_NULLS_LAST', @@ -2953,6 +3220,12 @@ export enum SettingsOrderByInput { IdDesc = 'id_DESC', IdDescNullsFirst = 'id_DESC_NULLS_FIRST', IdDescNullsLast = 'id_DESC_NULLS_LAST', + LockPeriodAsc = 'lockPeriod_ASC', + LockPeriodAscNullsFirst = 'lockPeriod_ASC_NULLS_FIRST', + LockPeriodAscNullsLast = 'lockPeriod_ASC_NULLS_LAST', + LockPeriodDesc = 'lockPeriod_DESC', + LockPeriodDescNullsFirst = 'lockPeriod_DESC_NULLS_FIRST', + LockPeriodDescNullsLast = 'lockPeriod_DESC_NULLS_LAST', MinimalWorkerVersionAsc = 'minimalWorkerVersion_ASC', MinimalWorkerVersionAscNullsFirst = 'minimalWorkerVersion_ASC_NULLS_FIRST', MinimalWorkerVersionAscNullsLast = 'minimalWorkerVersion_ASC_NULLS_LAST', @@ -2965,11 +3238,26 @@ export enum SettingsOrderByInput { RecommendedWorkerVersionDesc = 'recommendedWorkerVersion_DESC', RecommendedWorkerVersionDescNullsFirst = 'recommendedWorkerVersion_DESC_NULLS_FIRST', RecommendedWorkerVersionDescNullsLast = 'recommendedWorkerVersion_DESC_NULLS_LAST', + UtilizedStakeAsc = 'utilizedStake_ASC', + UtilizedStakeAscNullsFirst = 'utilizedStake_ASC_NULLS_FIRST', + UtilizedStakeAscNullsLast = 'utilizedStake_ASC_NULLS_LAST', + UtilizedStakeDesc = 'utilizedStake_DESC', + UtilizedStakeDescNullsFirst = 'utilizedStake_DESC_NULLS_FIRST', + UtilizedStakeDescNullsLast = 'utilizedStake_DESC_NULLS_LAST', } export type SettingsWhereInput = { AND?: InputMaybe>; OR?: InputMaybe>; + baseApr_eq?: InputMaybe; + baseApr_gt?: InputMaybe; + baseApr_gte?: InputMaybe; + baseApr_in?: InputMaybe>; + baseApr_isNull?: InputMaybe; + baseApr_lt?: InputMaybe; + baseApr_lte?: InputMaybe; + baseApr_not_eq?: InputMaybe; + baseApr_not_in?: InputMaybe>; bondAmount_eq?: InputMaybe; bondAmount_gt?: InputMaybe; bondAmount_gte?: InputMaybe; @@ -2979,6 +3267,17 @@ export type SettingsWhereInput = { bondAmount_lte?: InputMaybe; bondAmount_not_eq?: InputMaybe; bondAmount_not_in?: InputMaybe>; + contracts?: InputMaybe; + contracts_isNull?: InputMaybe; + currentEpoch_eq?: InputMaybe; + currentEpoch_gt?: InputMaybe; + currentEpoch_gte?: InputMaybe; + currentEpoch_in?: InputMaybe>; + currentEpoch_isNull?: InputMaybe; + currentEpoch_lt?: InputMaybe; + currentEpoch_lte?: InputMaybe; + currentEpoch_not_eq?: InputMaybe; + currentEpoch_not_in?: InputMaybe>; delegationLimitCoefficient_eq?: InputMaybe; delegationLimitCoefficient_gt?: InputMaybe; delegationLimitCoefficient_gte?: InputMaybe; @@ -3014,6 +3313,15 @@ export type SettingsWhereInput = { id_not_in?: InputMaybe>; id_not_startsWith?: InputMaybe; id_startsWith?: InputMaybe; + lockPeriod_eq?: InputMaybe; + lockPeriod_gt?: InputMaybe; + lockPeriod_gte?: InputMaybe; + lockPeriod_in?: InputMaybe>; + lockPeriod_isNull?: InputMaybe; + lockPeriod_lt?: InputMaybe; + lockPeriod_lte?: InputMaybe; + lockPeriod_not_eq?: InputMaybe; + lockPeriod_not_in?: InputMaybe>; minimalWorkerVersion_contains?: InputMaybe; minimalWorkerVersion_containsInsensitive?: InputMaybe; minimalWorkerVersion_endsWith?: InputMaybe; @@ -3048,212 +3356,6 @@ export type SettingsWhereInput = { recommendedWorkerVersion_not_in?: InputMaybe>; recommendedWorkerVersion_not_startsWith?: InputMaybe; recommendedWorkerVersion_startsWith?: InputMaybe; -}; - -export type SquidStatus = { - __typename?: 'SquidStatus'; - finalizedHeight: Scalars['Float']['output']; - height: Scalars['Float']['output']; -}; - -export type Statistics = { - __typename?: 'Statistics'; - baseApr: Scalars['Float']['output']; - blockTime: Scalars['Int']['output']; - blockTimeL1: Scalars['Int']['output']; - currentEpoch?: Maybe; - id: Scalars['String']['output']; - lastBlock: Scalars['Int']['output']; - lastBlockL1: Scalars['Int']['output']; - lastBlockTimestamp: Scalars['DateTime']['output']; - lastBlockTimestampL1: Scalars['DateTime']['output']; - lastSnapshotTimestamp: Scalars['DateTime']['output']; - utilizedStake: Scalars['BigInt']['output']; -}; - -export type StatisticsConnection = { - __typename?: 'StatisticsConnection'; - edges: Array; - pageInfo: PageInfo; - totalCount: Scalars['Int']['output']; -}; - -export type StatisticsEdge = { - __typename?: 'StatisticsEdge'; - cursor: Scalars['String']['output']; - node: Statistics; -}; - -export enum StatisticsOrderByInput { - BaseAprAsc = 'baseApr_ASC', - BaseAprAscNullsFirst = 'baseApr_ASC_NULLS_FIRST', - BaseAprAscNullsLast = 'baseApr_ASC_NULLS_LAST', - BaseAprDesc = 'baseApr_DESC', - BaseAprDescNullsFirst = 'baseApr_DESC_NULLS_FIRST', - BaseAprDescNullsLast = 'baseApr_DESC_NULLS_LAST', - BlockTimeL1Asc = 'blockTimeL1_ASC', - BlockTimeL1AscNullsFirst = 'blockTimeL1_ASC_NULLS_FIRST', - BlockTimeL1AscNullsLast = 'blockTimeL1_ASC_NULLS_LAST', - BlockTimeL1Desc = 'blockTimeL1_DESC', - BlockTimeL1DescNullsFirst = 'blockTimeL1_DESC_NULLS_FIRST', - BlockTimeL1DescNullsLast = 'blockTimeL1_DESC_NULLS_LAST', - BlockTimeAsc = 'blockTime_ASC', - BlockTimeAscNullsFirst = 'blockTime_ASC_NULLS_FIRST', - BlockTimeAscNullsLast = 'blockTime_ASC_NULLS_LAST', - BlockTimeDesc = 'blockTime_DESC', - BlockTimeDescNullsFirst = 'blockTime_DESC_NULLS_FIRST', - BlockTimeDescNullsLast = 'blockTime_DESC_NULLS_LAST', - CurrentEpochAsc = 'currentEpoch_ASC', - CurrentEpochAscNullsFirst = 'currentEpoch_ASC_NULLS_FIRST', - CurrentEpochAscNullsLast = 'currentEpoch_ASC_NULLS_LAST', - CurrentEpochDesc = 'currentEpoch_DESC', - CurrentEpochDescNullsFirst = 'currentEpoch_DESC_NULLS_FIRST', - CurrentEpochDescNullsLast = 'currentEpoch_DESC_NULLS_LAST', - IdAsc = 'id_ASC', - IdAscNullsFirst = 'id_ASC_NULLS_FIRST', - IdAscNullsLast = 'id_ASC_NULLS_LAST', - IdDesc = 'id_DESC', - IdDescNullsFirst = 'id_DESC_NULLS_FIRST', - IdDescNullsLast = 'id_DESC_NULLS_LAST', - LastBlockL1Asc = 'lastBlockL1_ASC', - LastBlockL1AscNullsFirst = 'lastBlockL1_ASC_NULLS_FIRST', - LastBlockL1AscNullsLast = 'lastBlockL1_ASC_NULLS_LAST', - LastBlockL1Desc = 'lastBlockL1_DESC', - LastBlockL1DescNullsFirst = 'lastBlockL1_DESC_NULLS_FIRST', - LastBlockL1DescNullsLast = 'lastBlockL1_DESC_NULLS_LAST', - LastBlockTimestampL1Asc = 'lastBlockTimestampL1_ASC', - LastBlockTimestampL1AscNullsFirst = 'lastBlockTimestampL1_ASC_NULLS_FIRST', - LastBlockTimestampL1AscNullsLast = 'lastBlockTimestampL1_ASC_NULLS_LAST', - LastBlockTimestampL1Desc = 'lastBlockTimestampL1_DESC', - LastBlockTimestampL1DescNullsFirst = 'lastBlockTimestampL1_DESC_NULLS_FIRST', - LastBlockTimestampL1DescNullsLast = 'lastBlockTimestampL1_DESC_NULLS_LAST', - LastBlockTimestampAsc = 'lastBlockTimestamp_ASC', - LastBlockTimestampAscNullsFirst = 'lastBlockTimestamp_ASC_NULLS_FIRST', - LastBlockTimestampAscNullsLast = 'lastBlockTimestamp_ASC_NULLS_LAST', - LastBlockTimestampDesc = 'lastBlockTimestamp_DESC', - LastBlockTimestampDescNullsFirst = 'lastBlockTimestamp_DESC_NULLS_FIRST', - LastBlockTimestampDescNullsLast = 'lastBlockTimestamp_DESC_NULLS_LAST', - LastBlockAsc = 'lastBlock_ASC', - LastBlockAscNullsFirst = 'lastBlock_ASC_NULLS_FIRST', - LastBlockAscNullsLast = 'lastBlock_ASC_NULLS_LAST', - LastBlockDesc = 'lastBlock_DESC', - LastBlockDescNullsFirst = 'lastBlock_DESC_NULLS_FIRST', - LastBlockDescNullsLast = 'lastBlock_DESC_NULLS_LAST', - LastSnapshotTimestampAsc = 'lastSnapshotTimestamp_ASC', - LastSnapshotTimestampAscNullsFirst = 'lastSnapshotTimestamp_ASC_NULLS_FIRST', - LastSnapshotTimestampAscNullsLast = 'lastSnapshotTimestamp_ASC_NULLS_LAST', - LastSnapshotTimestampDesc = 'lastSnapshotTimestamp_DESC', - LastSnapshotTimestampDescNullsFirst = 'lastSnapshotTimestamp_DESC_NULLS_FIRST', - LastSnapshotTimestampDescNullsLast = 'lastSnapshotTimestamp_DESC_NULLS_LAST', - UtilizedStakeAsc = 'utilizedStake_ASC', - UtilizedStakeAscNullsFirst = 'utilizedStake_ASC_NULLS_FIRST', - UtilizedStakeAscNullsLast = 'utilizedStake_ASC_NULLS_LAST', - UtilizedStakeDesc = 'utilizedStake_DESC', - UtilizedStakeDescNullsFirst = 'utilizedStake_DESC_NULLS_FIRST', - UtilizedStakeDescNullsLast = 'utilizedStake_DESC_NULLS_LAST', -} - -export type StatisticsWhereInput = { - AND?: InputMaybe>; - OR?: InputMaybe>; - baseApr_eq?: InputMaybe; - baseApr_gt?: InputMaybe; - baseApr_gte?: InputMaybe; - baseApr_in?: InputMaybe>; - baseApr_isNull?: InputMaybe; - baseApr_lt?: InputMaybe; - baseApr_lte?: InputMaybe; - baseApr_not_eq?: InputMaybe; - baseApr_not_in?: InputMaybe>; - blockTimeL1_eq?: InputMaybe; - blockTimeL1_gt?: InputMaybe; - blockTimeL1_gte?: InputMaybe; - blockTimeL1_in?: InputMaybe>; - blockTimeL1_isNull?: InputMaybe; - blockTimeL1_lt?: InputMaybe; - blockTimeL1_lte?: InputMaybe; - blockTimeL1_not_eq?: InputMaybe; - blockTimeL1_not_in?: InputMaybe>; - blockTime_eq?: InputMaybe; - blockTime_gt?: InputMaybe; - blockTime_gte?: InputMaybe; - blockTime_in?: InputMaybe>; - blockTime_isNull?: InputMaybe; - blockTime_lt?: InputMaybe; - blockTime_lte?: InputMaybe; - blockTime_not_eq?: InputMaybe; - blockTime_not_in?: InputMaybe>; - currentEpoch_eq?: InputMaybe; - currentEpoch_gt?: InputMaybe; - currentEpoch_gte?: InputMaybe; - currentEpoch_in?: InputMaybe>; - currentEpoch_isNull?: InputMaybe; - currentEpoch_lt?: InputMaybe; - currentEpoch_lte?: InputMaybe; - currentEpoch_not_eq?: InputMaybe; - currentEpoch_not_in?: InputMaybe>; - id_contains?: InputMaybe; - id_containsInsensitive?: InputMaybe; - id_endsWith?: InputMaybe; - id_eq?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_isNull?: InputMaybe; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_containsInsensitive?: InputMaybe; - id_not_endsWith?: InputMaybe; - id_not_eq?: InputMaybe; - id_not_in?: InputMaybe>; - id_not_startsWith?: InputMaybe; - id_startsWith?: InputMaybe; - lastBlockL1_eq?: InputMaybe; - lastBlockL1_gt?: InputMaybe; - lastBlockL1_gte?: InputMaybe; - lastBlockL1_in?: InputMaybe>; - lastBlockL1_isNull?: InputMaybe; - lastBlockL1_lt?: InputMaybe; - lastBlockL1_lte?: InputMaybe; - lastBlockL1_not_eq?: InputMaybe; - lastBlockL1_not_in?: InputMaybe>; - lastBlockTimestampL1_eq?: InputMaybe; - lastBlockTimestampL1_gt?: InputMaybe; - lastBlockTimestampL1_gte?: InputMaybe; - lastBlockTimestampL1_in?: InputMaybe>; - lastBlockTimestampL1_isNull?: InputMaybe; - lastBlockTimestampL1_lt?: InputMaybe; - lastBlockTimestampL1_lte?: InputMaybe; - lastBlockTimestampL1_not_eq?: InputMaybe; - lastBlockTimestampL1_not_in?: InputMaybe>; - lastBlockTimestamp_eq?: InputMaybe; - lastBlockTimestamp_gt?: InputMaybe; - lastBlockTimestamp_gte?: InputMaybe; - lastBlockTimestamp_in?: InputMaybe>; - lastBlockTimestamp_isNull?: InputMaybe; - lastBlockTimestamp_lt?: InputMaybe; - lastBlockTimestamp_lte?: InputMaybe; - lastBlockTimestamp_not_eq?: InputMaybe; - lastBlockTimestamp_not_in?: InputMaybe>; - lastBlock_eq?: InputMaybe; - lastBlock_gt?: InputMaybe; - lastBlock_gte?: InputMaybe; - lastBlock_in?: InputMaybe>; - lastBlock_isNull?: InputMaybe; - lastBlock_lt?: InputMaybe; - lastBlock_lte?: InputMaybe; - lastBlock_not_eq?: InputMaybe; - lastBlock_not_in?: InputMaybe>; - lastSnapshotTimestamp_eq?: InputMaybe; - lastSnapshotTimestamp_gt?: InputMaybe; - lastSnapshotTimestamp_gte?: InputMaybe; - lastSnapshotTimestamp_in?: InputMaybe>; - lastSnapshotTimestamp_isNull?: InputMaybe; - lastSnapshotTimestamp_lt?: InputMaybe; - lastSnapshotTimestamp_lte?: InputMaybe; - lastSnapshotTimestamp_not_eq?: InputMaybe; - lastSnapshotTimestamp_not_in?: InputMaybe>; utilizedStake_eq?: InputMaybe; utilizedStake_gt?: InputMaybe; utilizedStake_gte?: InputMaybe; @@ -3265,6 +3367,12 @@ export type StatisticsWhereInput = { utilizedStake_not_in?: InputMaybe>; }; +export type SquidStatus = { + __typename?: 'SquidStatus'; + finalizedHeight: Scalars['Float']['output']; + height: Scalars['Float']['output']; +}; + export type Transfer = { __typename?: 'Transfer'; amount: Scalars['BigInt']['output']; @@ -5292,6 +5400,7 @@ export type SourcesWithAssetsQuery = { claimableReward: string; worker: { __typename?: 'Worker'; id: string; name?: string; peerId: string }; }>; + gatewayStakes: Array<{ __typename?: 'GatewayStake'; id: string; amount: string }>; }>; }; @@ -5542,7 +5651,7 @@ export type WorkerDelegationInfoQuery = { dTenure?: number; trafficWeight?: number; }; - statistics: Array<{ __typename?: 'Statistics'; utilizedStake: string; baseApr: number }>; + settings: Array<{ __typename?: 'Settings'; utilizedStake: string; baseApr: number }>; }; export type WorkerOwnerQueryVariables = Exact<{ @@ -6014,6 +6123,10 @@ export const SourcesWithAssetsDocument = ` ...WorkerBaseFragment } } + gatewayStakes(where: {amount_gt: 0}) { + id + amount + } } } ${AccountFragmentFragmentDoc} @@ -6243,7 +6356,7 @@ export const WorkerDelegationInfoDocument = ` dTenure trafficWeight } - statistics(limit: 1) { + settings(limit: 1) { utilizedStake baseApr } diff --git a/src/api/subsquid-network-squid/schema.graphql b/src/api/subsquid-network-squid/schema.graphql index 36c21d9..874ddb0 100644 --- a/src/api/subsquid-network-squid/schema.graphql +++ b/src/api/subsquid-network-squid/schema.graphql @@ -59,6 +59,11 @@ query sourcesWithAssets($address: String!) { ...WorkerBaseFragment } } + + gatewayStakes(where: { amount_gt: 0 }) { + id + amount + } } } @@ -193,7 +198,7 @@ query workerDelegationInfo($workerId: String!) { trafficWeight } - statistics(limit: 1) { + settings(limit: 1) { utilizedStake baseApr } diff --git a/src/pages/AssetsPage/Assets.tsx b/src/pages/AssetsPage/Assets.tsx index dcb921c..440810f 100644 --- a/src/pages/AssetsPage/Assets.tsx +++ b/src/pages/AssetsPage/Assets.tsx @@ -31,6 +31,7 @@ import { useContracts } from '@network/useContracts'; import { ColumnLabel, ColumnValue, SummarySection } from '@pages/DashboardPage/Summary'; import { ClaimButton } from './ClaimButton'; +import {demoFeaturesEnabled} from '@hooks/demoFeaturesEnabled'; type TokenBalance = { name: string; @@ -171,7 +172,7 @@ export function MyAssets() { value: BigNumber(0), color: theme.palette.text.primary, background: theme.palette.text.primary, - tip: '', + tip: 'Tokens locked in Portal stake', }; sourcesQuery?.accounts.forEach(s => { @@ -190,6 +191,10 @@ export function MyAssets() { bonded.value = bonded.value.plus(w.bond); claimable.value = claimable.value.plus(w.claimableReward); }); + + s.gatewayStakes.forEach(gs => { + lockedPortal.value = bonded.value.plus(gs.amount); + }); }); return [transferable, vesting, claimable, bonded, delegated, lockedPortal]; @@ -281,7 +286,7 @@ export function MyAssets() { } spacing={1} flex={1}> - {/* */} + {demoFeaturesEnabled() && }