From 75d2accf9eefb92e0eab7430acd3cfe541076719 Mon Sep 17 00:00:00 2001 From: ECWireless Date: Sun, 18 Jan 2026 16:23:56 -0700 Subject: [PATCH] fix: winningTicket query defaults to 100 rows --- apollo/subgraph.ts | 705 ++++++++++++++++++++++++++++++- components/HistoryView/index.tsx | 7 + queries/transactions.graphql | 2 + 3 files changed, 709 insertions(+), 5 deletions(-) diff --git a/apollo/subgraph.ts b/apollo/subgraph.ts index ca344fe7..e51d7be2 100644 --- a/apollo/subgraph.ts +++ b/apollo/subgraph.ts @@ -292,18 +292,144 @@ export enum BondEvent_OrderBy { /** Broadcasters pay transcoders to do the work of transcoding in exchange for fees */ export type Broadcaster = { __typename: 'Broadcaster'; + /** Days in which this broadcaster paid out fees */ + broadcasterDays: Array; /** Amount of funds deposited */ deposit: Scalars['BigDecimal']; + /** The date this broadcaster first funded a deposit or reserve, beginning at 12:00am UTC */ + firstActiveDay: Scalars['Int']; /** ETH address of a broadcaster */ id: Scalars['ID']; + /** The date this broadcaster last paid fees, beginning at 12:00am UTC */ + lastActiveDay: Scalars['Int']; + /** Fees paid out by this broadcaster in ETH during the last 90 days */ + ninetyDayVolumeETH: Scalars['BigDecimal']; /** Amount of funds in reserve */ reserve: Scalars['BigDecimal']; + /** Fees paid out by this broadcaster in ETH during the last 60 days */ + sixtyDayVolumeETH: Scalars['BigDecimal']; + /** Fees paid out by this broadcaster in ETH during the last 30 days */ + thirtyDayVolumeETH: Scalars['BigDecimal']; + /** Total fees paid out by this broadcaster in ETH */ + totalVolumeETH: Scalars['BigDecimal']; + /** Total fees paid out by this broadcaster in USD */ + totalVolumeUSD: Scalars['BigDecimal']; +}; + + +/** Broadcasters pay transcoders to do the work of transcoding in exchange for fees */ +export type BroadcasterBroadcasterDaysArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +/** Broadcaster data accumulated and condensed into day stats */ +export type BroadcasterDay = { + __typename: 'BroadcasterDay'; + /** Broadcaster associated with the day */ + broadcaster: Broadcaster; + /** The date beginning at 12:00am UTC */ + date: Scalars['Int']; + /** Concatenation of the broadcaster address and the day timestamp (e.g.
-) */ + id: Scalars['ID']; + /** Fees paid this day in ETH */ + volumeETH: Scalars['BigDecimal']; + /** Fees paid this day in USD */ + volumeUSD: Scalars['BigDecimal']; +}; + +export type BroadcasterDay_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + broadcaster?: InputMaybe; + broadcaster_?: InputMaybe; + broadcaster_contains?: InputMaybe; + broadcaster_contains_nocase?: InputMaybe; + broadcaster_ends_with?: InputMaybe; + broadcaster_ends_with_nocase?: InputMaybe; + broadcaster_gt?: InputMaybe; + broadcaster_gte?: InputMaybe; + broadcaster_in?: InputMaybe>; + broadcaster_lt?: InputMaybe; + broadcaster_lte?: InputMaybe; + broadcaster_not?: InputMaybe; + broadcaster_not_contains?: InputMaybe; + broadcaster_not_contains_nocase?: InputMaybe; + broadcaster_not_ends_with?: InputMaybe; + broadcaster_not_ends_with_nocase?: InputMaybe; + broadcaster_not_in?: InputMaybe>; + broadcaster_not_starts_with?: InputMaybe; + broadcaster_not_starts_with_nocase?: InputMaybe; + broadcaster_starts_with?: InputMaybe; + broadcaster_starts_with_nocase?: InputMaybe; + date?: InputMaybe; + date_gt?: InputMaybe; + date_gte?: InputMaybe; + date_in?: InputMaybe>; + date_lt?: InputMaybe; + date_lte?: InputMaybe; + date_not?: InputMaybe; + date_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + volumeETH?: InputMaybe; + volumeETH_gt?: InputMaybe; + volumeETH_gte?: InputMaybe; + volumeETH_in?: InputMaybe>; + volumeETH_lt?: InputMaybe; + volumeETH_lte?: InputMaybe; + volumeETH_not?: InputMaybe; + volumeETH_not_in?: InputMaybe>; + volumeUSD?: InputMaybe; + volumeUSD_gt?: InputMaybe; + volumeUSD_gte?: InputMaybe; + volumeUSD_in?: InputMaybe>; + volumeUSD_lt?: InputMaybe; + volumeUSD_lte?: InputMaybe; + volumeUSD_not?: InputMaybe; + volumeUSD_not_in?: InputMaybe>; }; +export enum BroadcasterDay_OrderBy { + Broadcaster = 'broadcaster', + BroadcasterDeposit = 'broadcaster__deposit', + BroadcasterFirstActiveDay = 'broadcaster__firstActiveDay', + BroadcasterId = 'broadcaster__id', + BroadcasterLastActiveDay = 'broadcaster__lastActiveDay', + BroadcasterNinetyDayVolumeEth = 'broadcaster__ninetyDayVolumeETH', + BroadcasterReserve = 'broadcaster__reserve', + BroadcasterSixtyDayVolumeEth = 'broadcaster__sixtyDayVolumeETH', + BroadcasterThirtyDayVolumeEth = 'broadcaster__thirtyDayVolumeETH', + BroadcasterTotalVolumeEth = 'broadcaster__totalVolumeETH', + BroadcasterTotalVolumeUsd = 'broadcaster__totalVolumeUSD', + Date = 'date', + Id = 'id', + VolumeEth = 'volumeETH', + VolumeUsd = 'volumeUSD' +} + export type Broadcaster_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; + broadcasterDays?: InputMaybe>; + broadcasterDays_?: InputMaybe; + broadcasterDays_contains?: InputMaybe>; + broadcasterDays_contains_nocase?: InputMaybe>; + broadcasterDays_not?: InputMaybe>; + broadcasterDays_not_contains?: InputMaybe>; + broadcasterDays_not_contains_nocase?: InputMaybe>; deposit?: InputMaybe; deposit_gt?: InputMaybe; deposit_gte?: InputMaybe; @@ -312,6 +438,14 @@ export type Broadcaster_Filter = { deposit_lte?: InputMaybe; deposit_not?: InputMaybe; deposit_not_in?: InputMaybe>; + firstActiveDay?: InputMaybe; + firstActiveDay_gt?: InputMaybe; + firstActiveDay_gte?: InputMaybe; + firstActiveDay_in?: InputMaybe>; + firstActiveDay_lt?: InputMaybe; + firstActiveDay_lte?: InputMaybe; + firstActiveDay_not?: InputMaybe; + firstActiveDay_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -320,6 +454,22 @@ export type Broadcaster_Filter = { id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; + lastActiveDay?: InputMaybe; + lastActiveDay_gt?: InputMaybe; + lastActiveDay_gte?: InputMaybe; + lastActiveDay_in?: InputMaybe>; + lastActiveDay_lt?: InputMaybe; + lastActiveDay_lte?: InputMaybe; + lastActiveDay_not?: InputMaybe; + lastActiveDay_not_in?: InputMaybe>; + ninetyDayVolumeETH?: InputMaybe; + ninetyDayVolumeETH_gt?: InputMaybe; + ninetyDayVolumeETH_gte?: InputMaybe; + ninetyDayVolumeETH_in?: InputMaybe>; + ninetyDayVolumeETH_lt?: InputMaybe; + ninetyDayVolumeETH_lte?: InputMaybe; + ninetyDayVolumeETH_not?: InputMaybe; + ninetyDayVolumeETH_not_in?: InputMaybe>; or?: InputMaybe>>; reserve?: InputMaybe; reserve_gt?: InputMaybe; @@ -329,12 +479,52 @@ export type Broadcaster_Filter = { reserve_lte?: InputMaybe; reserve_not?: InputMaybe; reserve_not_in?: InputMaybe>; + sixtyDayVolumeETH?: InputMaybe; + sixtyDayVolumeETH_gt?: InputMaybe; + sixtyDayVolumeETH_gte?: InputMaybe; + sixtyDayVolumeETH_in?: InputMaybe>; + sixtyDayVolumeETH_lt?: InputMaybe; + sixtyDayVolumeETH_lte?: InputMaybe; + sixtyDayVolumeETH_not?: InputMaybe; + sixtyDayVolumeETH_not_in?: InputMaybe>; + thirtyDayVolumeETH?: InputMaybe; + thirtyDayVolumeETH_gt?: InputMaybe; + thirtyDayVolumeETH_gte?: InputMaybe; + thirtyDayVolumeETH_in?: InputMaybe>; + thirtyDayVolumeETH_lt?: InputMaybe; + thirtyDayVolumeETH_lte?: InputMaybe; + thirtyDayVolumeETH_not?: InputMaybe; + thirtyDayVolumeETH_not_in?: InputMaybe>; + totalVolumeETH?: InputMaybe; + totalVolumeETH_gt?: InputMaybe; + totalVolumeETH_gte?: InputMaybe; + totalVolumeETH_in?: InputMaybe>; + totalVolumeETH_lt?: InputMaybe; + totalVolumeETH_lte?: InputMaybe; + totalVolumeETH_not?: InputMaybe; + totalVolumeETH_not_in?: InputMaybe>; + totalVolumeUSD?: InputMaybe; + totalVolumeUSD_gt?: InputMaybe; + totalVolumeUSD_gte?: InputMaybe; + totalVolumeUSD_in?: InputMaybe>; + totalVolumeUSD_lt?: InputMaybe; + totalVolumeUSD_lte?: InputMaybe; + totalVolumeUSD_not?: InputMaybe; + totalVolumeUSD_not_in?: InputMaybe>; }; export enum Broadcaster_OrderBy { + BroadcasterDays = 'broadcasterDays', Deposit = 'deposit', + FirstActiveDay = 'firstActiveDay', Id = 'id', - Reserve = 'reserve' + LastActiveDay = 'lastActiveDay', + NinetyDayVolumeEth = 'ninetyDayVolumeETH', + Reserve = 'reserve', + SixtyDayVolumeEth = 'sixtyDayVolumeETH', + ThirtyDayVolumeEth = 'thirtyDayVolumeETH', + TotalVolumeEth = 'totalVolumeETH', + TotalVolumeUsd = 'totalVolumeUSD' } /** BurnEvent entities are created for every emitted Burn event. */ @@ -930,8 +1120,15 @@ export enum DepositFundedEvent_OrderBy { RoundVolumeUsd = 'round__volumeUSD', Sender = 'sender', SenderDeposit = 'sender__deposit', + SenderFirstActiveDay = 'sender__firstActiveDay', SenderId = 'sender__id', + SenderLastActiveDay = 'sender__lastActiveDay', + SenderNinetyDayVolumeEth = 'sender__ninetyDayVolumeETH', SenderReserve = 'sender__reserve', + SenderSixtyDayVolumeEth = 'sender__sixtyDayVolumeETH', + SenderThirtyDayVolumeEth = 'sender__thirtyDayVolumeETH', + SenderTotalVolumeEth = 'sender__totalVolumeETH', + SenderTotalVolumeUsd = 'sender__totalVolumeUSD', Timestamp = 'timestamp', Transaction = 'transaction', TransactionBlockNumber = 'transaction__blockNumber', @@ -2684,6 +2881,8 @@ export enum Pool_OrderBy { /** Livepeer protocol global parameters */ export type Protocol = { __typename: 'Protocol'; + /** Broadcasters active within the current 90 day fee window */ + activeBroadcasters: Array; /** Total active transcoders (up to the limit) */ activeTranscoderCount: Scalars['BigInt']; /** Current round the protocol is in */ @@ -2761,6 +2960,12 @@ export type ProtocolPendingDeactivationArgs = { export type Protocol_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; + activeBroadcasters?: InputMaybe>; + activeBroadcasters_contains?: InputMaybe>; + activeBroadcasters_contains_nocase?: InputMaybe>; + activeBroadcasters_not?: InputMaybe>; + activeBroadcasters_not_contains?: InputMaybe>; + activeBroadcasters_not_contains_nocase?: InputMaybe>; activeTranscoderCount?: InputMaybe; activeTranscoderCount_gt?: InputMaybe; activeTranscoderCount_gte?: InputMaybe; @@ -3007,6 +3212,7 @@ export type Protocol_Filter = { }; export enum Protocol_OrderBy { + ActiveBroadcasters = 'activeBroadcasters', ActiveTranscoderCount = 'activeTranscoderCount', CurrentRound = 'currentRound', CurrentRoundActiveTranscoderCount = 'currentRound__activeTranscoderCount', @@ -3096,6 +3302,8 @@ export type Query = { bondEvent?: Maybe; bondEvents: Array; broadcaster?: Maybe; + broadcasterDay?: Maybe; + broadcasterDays: Array; broadcasters: Array; burnEvent?: Maybe; burnEvents: Array; @@ -3169,6 +3377,10 @@ export type Query = { transferBondEvents: Array; treasuryProposal?: Maybe; treasuryProposals: Array; + treasuryVote?: Maybe; + treasuryVoteEvent?: Maybe; + treasuryVoteEvents: Array; + treasuryVotes: Array; unbondEvent?: Maybe; unbondEvents: Array; unbondingLock?: Maybe; @@ -3220,6 +3432,24 @@ export type QueryBroadcasterArgs = { }; +export type QueryBroadcasterDayArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryBroadcasterDaysArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + + export type QueryBroadcastersArgs = { block?: InputMaybe; first?: InputMaybe; @@ -3879,6 +4109,42 @@ export type QueryTreasuryProposalsArgs = { }; +export type QueryTreasuryVoteArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryTreasuryVoteEventArgs = { + block?: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryTreasuryVoteEventsArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + + +export type QueryTreasuryVotesArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + + export type QueryUnbondEventArgs = { block?: InputMaybe; id: Scalars['ID']; @@ -4401,8 +4667,15 @@ export enum ReserveClaimedEvent_OrderBy { Id = 'id', ReserveHolder = 'reserveHolder', ReserveHolderDeposit = 'reserveHolder__deposit', + ReserveHolderFirstActiveDay = 'reserveHolder__firstActiveDay', ReserveHolderId = 'reserveHolder__id', + ReserveHolderLastActiveDay = 'reserveHolder__lastActiveDay', + ReserveHolderNinetyDayVolumeEth = 'reserveHolder__ninetyDayVolumeETH', ReserveHolderReserve = 'reserveHolder__reserve', + ReserveHolderSixtyDayVolumeEth = 'reserveHolder__sixtyDayVolumeETH', + ReserveHolderThirtyDayVolumeEth = 'reserveHolder__thirtyDayVolumeETH', + ReserveHolderTotalVolumeEth = 'reserveHolder__totalVolumeETH', + ReserveHolderTotalVolumeUsd = 'reserveHolder__totalVolumeUSD', Round = 'round', RoundActiveTranscoderCount = 'round__activeTranscoderCount', RoundDelegatorsCount = 'round__delegatorsCount', @@ -4549,8 +4822,15 @@ export enum ReserveFundedEvent_OrderBy { Id = 'id', ReserveHolder = 'reserveHolder', ReserveHolderDeposit = 'reserveHolder__deposit', + ReserveHolderFirstActiveDay = 'reserveHolder__firstActiveDay', ReserveHolderId = 'reserveHolder__id', + ReserveHolderLastActiveDay = 'reserveHolder__lastActiveDay', + ReserveHolderNinetyDayVolumeEth = 'reserveHolder__ninetyDayVolumeETH', ReserveHolderReserve = 'reserveHolder__reserve', + ReserveHolderSixtyDayVolumeEth = 'reserveHolder__sixtyDayVolumeETH', + ReserveHolderThirtyDayVolumeEth = 'reserveHolder__thirtyDayVolumeETH', + ReserveHolderTotalVolumeEth = 'reserveHolder__totalVolumeETH', + ReserveHolderTotalVolumeUsd = 'reserveHolder__totalVolumeUSD', Round = 'round', RoundActiveTranscoderCount = 'round__activeTranscoderCount', RoundDelegatorsCount = 'round__delegatorsCount', @@ -5808,7 +6088,7 @@ export type TranscoderDay = { __typename: 'TranscoderDay'; /** The date beginning at 12:00am UTC */ date: Scalars['Int']; - /** Combination of the transcoder address and the timestamp rounded to current day by dividing by 86400 */ + /** Concatenation of the transcoder address and the day timestamp (e.g.
-) */ id: Scalars['ID']; /** Transcoder associated with the day */ transcoder: Transcoder; @@ -7197,29 +7477,66 @@ export enum TransferBondEvent_OrderBy { TransactionTo = 'transaction__to' } +/** Stake weighted treasury proposal */ export type TreasuryProposal = { __typename: 'TreasuryProposal'; + /** Total weight of abstaining votes */ + abstainVotes: Scalars['BigDecimal']; + /** Total weight of votes against */ + againstVotes: Scalars['BigDecimal']; /** Functions to call on the targets on proposal execution */ calldatas: Array; /** Description of the proposal */ description: Scalars['String']; + /** Total weight of votes in favor */ + forVotes: Scalars['BigDecimal']; /** Governor proposal ID formatted as a decimal number */ id: Scalars['ID']; /** Account that created the proposal */ proposer: LivepeerAccount; /** Targets to be called on proposal execution */ targets: Array; + /** Sum of all vote weights */ + totalVotes: Scalars['BigDecimal']; /** Values to be passed to the targets on proposal execution */ values: Array; /** Round after which the proposal voting will end and, if approved, execution will be allowed */ voteEnd: Scalars['BigInt']; /** Round after which the proposal voting will begin */ voteStart: Scalars['BigInt']; + /** Votes cast for this proposal */ + votes: Array; +}; + + +/** Stake weighted treasury proposal */ +export type TreasuryProposalVotesArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }; export type TreasuryProposal_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; + abstainVotes?: InputMaybe; + abstainVotes_gt?: InputMaybe; + abstainVotes_gte?: InputMaybe; + abstainVotes_in?: InputMaybe>; + abstainVotes_lt?: InputMaybe; + abstainVotes_lte?: InputMaybe; + abstainVotes_not?: InputMaybe; + abstainVotes_not_in?: InputMaybe>; + againstVotes?: InputMaybe; + againstVotes_gt?: InputMaybe; + againstVotes_gte?: InputMaybe; + againstVotes_in?: InputMaybe>; + againstVotes_lt?: InputMaybe; + againstVotes_lte?: InputMaybe; + againstVotes_not?: InputMaybe; + againstVotes_not_in?: InputMaybe>; and?: InputMaybe>>; calldatas?: InputMaybe>; calldatas_contains?: InputMaybe>; @@ -7247,6 +7564,14 @@ export type TreasuryProposal_Filter = { description_not_starts_with_nocase?: InputMaybe; description_starts_with?: InputMaybe; description_starts_with_nocase?: InputMaybe; + forVotes?: InputMaybe; + forVotes_gt?: InputMaybe; + forVotes_gte?: InputMaybe; + forVotes_in?: InputMaybe>; + forVotes_lt?: InputMaybe; + forVotes_lte?: InputMaybe; + forVotes_not?: InputMaybe; + forVotes_not_in?: InputMaybe>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -7283,6 +7608,14 @@ export type TreasuryProposal_Filter = { targets_not?: InputMaybe>; targets_not_contains?: InputMaybe>; targets_not_contains_nocase?: InputMaybe>; + totalVotes?: InputMaybe; + totalVotes_gt?: InputMaybe; + totalVotes_gte?: InputMaybe; + totalVotes_in?: InputMaybe>; + totalVotes_lt?: InputMaybe; + totalVotes_lte?: InputMaybe; + totalVotes_not?: InputMaybe; + totalVotes_not_in?: InputMaybe>; values?: InputMaybe>; values_contains?: InputMaybe>; values_contains_nocase?: InputMaybe>; @@ -7305,19 +7638,365 @@ export type TreasuryProposal_Filter = { voteStart_lte?: InputMaybe; voteStart_not?: InputMaybe; voteStart_not_in?: InputMaybe>; + votes_?: InputMaybe; }; export enum TreasuryProposal_OrderBy { + AbstainVotes = 'abstainVotes', + AgainstVotes = 'againstVotes', Calldatas = 'calldatas', Description = 'description', + ForVotes = 'forVotes', Id = 'id', Proposer = 'proposer', ProposerId = 'proposer__id', ProposerLastUpdatedTimestamp = 'proposer__lastUpdatedTimestamp', Targets = 'targets', + TotalVotes = 'totalVotes', Values = 'values', VoteEnd = 'voteEnd', - VoteStart = 'voteStart' + VoteStart = 'voteStart', + Votes = 'votes' +} + +/** Stake weighted vote on a treasury proposal */ +export type TreasuryVote = { + __typename: 'TreasuryVote'; + /** Proposal ID + voter address */ + id: Scalars['ID']; + /** The proposal that was voted on */ + proposal: TreasuryProposal; + /** Optional reason string provided by the voter */ + reason?: Maybe; + /** The voter's position */ + support: TreasuryVoteSupport; + /** Account that cast the vote */ + voter: LivepeerAccount; + /** Stake-weighted voting power */ + weight: Scalars['BigDecimal']; +}; + +/** TreasuryVoteEvent entities are created for every emitted VoteCast/VoteCastWithParams event. */ +export type TreasuryVoteEvent = Event & { + __typename: 'TreasuryVoteEvent'; + /** Ethereum transaction hash + event log index */ + id: Scalars['ID']; + /** Proposal that the vote was cast for */ + proposal: TreasuryProposal; + /** Optional reason string provided by the voter */ + reason?: Maybe; + /** Reference to the round the event occured in */ + round: Round; + /** The voter's position */ + support: TreasuryVoteSupport; + /** Timestamp of the transaction the event was included in */ + timestamp: Scalars['Int']; + /** Reference to the transaction the event was included in */ + transaction: Transaction; + /** Account that cast the vote */ + voter: LivepeerAccount; + /** Stake-weighted voting power */ + weight: Scalars['BigDecimal']; +}; + +export type TreasuryVoteEvent_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + proposal?: InputMaybe; + proposal_?: InputMaybe; + proposal_contains?: InputMaybe; + proposal_contains_nocase?: InputMaybe; + proposal_ends_with?: InputMaybe; + proposal_ends_with_nocase?: InputMaybe; + proposal_gt?: InputMaybe; + proposal_gte?: InputMaybe; + proposal_in?: InputMaybe>; + proposal_lt?: InputMaybe; + proposal_lte?: InputMaybe; + proposal_not?: InputMaybe; + proposal_not_contains?: InputMaybe; + proposal_not_contains_nocase?: InputMaybe; + proposal_not_ends_with?: InputMaybe; + proposal_not_ends_with_nocase?: InputMaybe; + proposal_not_in?: InputMaybe>; + proposal_not_starts_with?: InputMaybe; + proposal_not_starts_with_nocase?: InputMaybe; + proposal_starts_with?: InputMaybe; + proposal_starts_with_nocase?: InputMaybe; + reason?: InputMaybe; + reason_contains?: InputMaybe; + reason_contains_nocase?: InputMaybe; + reason_ends_with?: InputMaybe; + reason_ends_with_nocase?: InputMaybe; + reason_gt?: InputMaybe; + reason_gte?: InputMaybe; + reason_in?: InputMaybe>; + reason_lt?: InputMaybe; + reason_lte?: InputMaybe; + reason_not?: InputMaybe; + reason_not_contains?: InputMaybe; + reason_not_contains_nocase?: InputMaybe; + reason_not_ends_with?: InputMaybe; + reason_not_ends_with_nocase?: InputMaybe; + reason_not_in?: InputMaybe>; + reason_not_starts_with?: InputMaybe; + reason_not_starts_with_nocase?: InputMaybe; + reason_starts_with?: InputMaybe; + reason_starts_with_nocase?: InputMaybe; + round?: InputMaybe; + round_?: InputMaybe; + round_contains?: InputMaybe; + round_contains_nocase?: InputMaybe; + round_ends_with?: InputMaybe; + round_ends_with_nocase?: InputMaybe; + round_gt?: InputMaybe; + round_gte?: InputMaybe; + round_in?: InputMaybe>; + round_lt?: InputMaybe; + round_lte?: InputMaybe; + round_not?: InputMaybe; + round_not_contains?: InputMaybe; + round_not_contains_nocase?: InputMaybe; + round_not_ends_with?: InputMaybe; + round_not_ends_with_nocase?: InputMaybe; + round_not_in?: InputMaybe>; + round_not_starts_with?: InputMaybe; + round_not_starts_with_nocase?: InputMaybe; + round_starts_with?: InputMaybe; + round_starts_with_nocase?: InputMaybe; + support?: InputMaybe; + support_in?: InputMaybe>; + support_not?: InputMaybe; + support_not_in?: InputMaybe>; + timestamp?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not?: InputMaybe; + timestamp_not_in?: InputMaybe>; + transaction?: InputMaybe; + transaction_?: InputMaybe; + transaction_contains?: InputMaybe; + transaction_contains_nocase?: InputMaybe; + transaction_ends_with?: InputMaybe; + transaction_ends_with_nocase?: InputMaybe; + transaction_gt?: InputMaybe; + transaction_gte?: InputMaybe; + transaction_in?: InputMaybe>; + transaction_lt?: InputMaybe; + transaction_lte?: InputMaybe; + transaction_not?: InputMaybe; + transaction_not_contains?: InputMaybe; + transaction_not_contains_nocase?: InputMaybe; + transaction_not_ends_with?: InputMaybe; + transaction_not_ends_with_nocase?: InputMaybe; + transaction_not_in?: InputMaybe>; + transaction_not_starts_with?: InputMaybe; + transaction_not_starts_with_nocase?: InputMaybe; + transaction_starts_with?: InputMaybe; + transaction_starts_with_nocase?: InputMaybe; + voter?: InputMaybe; + voter_?: InputMaybe; + voter_contains?: InputMaybe; + voter_contains_nocase?: InputMaybe; + voter_ends_with?: InputMaybe; + voter_ends_with_nocase?: InputMaybe; + voter_gt?: InputMaybe; + voter_gte?: InputMaybe; + voter_in?: InputMaybe>; + voter_lt?: InputMaybe; + voter_lte?: InputMaybe; + voter_not?: InputMaybe; + voter_not_contains?: InputMaybe; + voter_not_contains_nocase?: InputMaybe; + voter_not_ends_with?: InputMaybe; + voter_not_ends_with_nocase?: InputMaybe; + voter_not_in?: InputMaybe>; + voter_not_starts_with?: InputMaybe; + voter_not_starts_with_nocase?: InputMaybe; + voter_starts_with?: InputMaybe; + voter_starts_with_nocase?: InputMaybe; + weight?: InputMaybe; + weight_gt?: InputMaybe; + weight_gte?: InputMaybe; + weight_in?: InputMaybe>; + weight_lt?: InputMaybe; + weight_lte?: InputMaybe; + weight_not?: InputMaybe; + weight_not_in?: InputMaybe>; +}; + +export enum TreasuryVoteEvent_OrderBy { + Id = 'id', + Proposal = 'proposal', + ProposalAbstainVotes = 'proposal__abstainVotes', + ProposalAgainstVotes = 'proposal__againstVotes', + ProposalDescription = 'proposal__description', + ProposalForVotes = 'proposal__forVotes', + ProposalId = 'proposal__id', + ProposalTotalVotes = 'proposal__totalVotes', + ProposalVoteEnd = 'proposal__voteEnd', + ProposalVoteStart = 'proposal__voteStart', + Reason = 'reason', + Round = 'round', + RoundActiveTranscoderCount = 'round__activeTranscoderCount', + RoundDelegatorsCount = 'round__delegatorsCount', + RoundEndBlock = 'round__endBlock', + RoundId = 'round__id', + RoundInflation = 'round__inflation', + RoundInitialized = 'round__initialized', + RoundLength = 'round__length', + RoundMintableTokens = 'round__mintableTokens', + RoundMovedStake = 'round__movedStake', + RoundNewStake = 'round__newStake', + RoundNumActiveTranscoders = 'round__numActiveTranscoders', + RoundParticipationRate = 'round__participationRate', + RoundStartBlock = 'round__startBlock', + RoundStartTimestamp = 'round__startTimestamp', + RoundTotalActiveStake = 'round__totalActiveStake', + RoundTotalSupply = 'round__totalSupply', + RoundVolumeEth = 'round__volumeETH', + RoundVolumeUsd = 'round__volumeUSD', + Support = 'support', + Timestamp = 'timestamp', + Transaction = 'transaction', + TransactionBlockNumber = 'transaction__blockNumber', + TransactionFrom = 'transaction__from', + TransactionGasPrice = 'transaction__gasPrice', + TransactionGasUsed = 'transaction__gasUsed', + TransactionId = 'transaction__id', + TransactionTimestamp = 'transaction__timestamp', + TransactionTo = 'transaction__to', + Voter = 'voter', + VoterId = 'voter__id', + VoterLastUpdatedTimestamp = 'voter__lastUpdatedTimestamp', + Weight = 'weight' +} + +export enum TreasuryVoteSupport { + Abstain = 'Abstain', + Against = 'Against', + For = 'For' +} + +export type TreasuryVote_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + proposal?: InputMaybe; + proposal_?: InputMaybe; + proposal_contains?: InputMaybe; + proposal_contains_nocase?: InputMaybe; + proposal_ends_with?: InputMaybe; + proposal_ends_with_nocase?: InputMaybe; + proposal_gt?: InputMaybe; + proposal_gte?: InputMaybe; + proposal_in?: InputMaybe>; + proposal_lt?: InputMaybe; + proposal_lte?: InputMaybe; + proposal_not?: InputMaybe; + proposal_not_contains?: InputMaybe; + proposal_not_contains_nocase?: InputMaybe; + proposal_not_ends_with?: InputMaybe; + proposal_not_ends_with_nocase?: InputMaybe; + proposal_not_in?: InputMaybe>; + proposal_not_starts_with?: InputMaybe; + proposal_not_starts_with_nocase?: InputMaybe; + proposal_starts_with?: InputMaybe; + proposal_starts_with_nocase?: InputMaybe; + reason?: InputMaybe; + reason_contains?: InputMaybe; + reason_contains_nocase?: InputMaybe; + reason_ends_with?: InputMaybe; + reason_ends_with_nocase?: InputMaybe; + reason_gt?: InputMaybe; + reason_gte?: InputMaybe; + reason_in?: InputMaybe>; + reason_lt?: InputMaybe; + reason_lte?: InputMaybe; + reason_not?: InputMaybe; + reason_not_contains?: InputMaybe; + reason_not_contains_nocase?: InputMaybe; + reason_not_ends_with?: InputMaybe; + reason_not_ends_with_nocase?: InputMaybe; + reason_not_in?: InputMaybe>; + reason_not_starts_with?: InputMaybe; + reason_not_starts_with_nocase?: InputMaybe; + reason_starts_with?: InputMaybe; + reason_starts_with_nocase?: InputMaybe; + support?: InputMaybe; + support_in?: InputMaybe>; + support_not?: InputMaybe; + support_not_in?: InputMaybe>; + voter?: InputMaybe; + voter_?: InputMaybe; + voter_contains?: InputMaybe; + voter_contains_nocase?: InputMaybe; + voter_ends_with?: InputMaybe; + voter_ends_with_nocase?: InputMaybe; + voter_gt?: InputMaybe; + voter_gte?: InputMaybe; + voter_in?: InputMaybe>; + voter_lt?: InputMaybe; + voter_lte?: InputMaybe; + voter_not?: InputMaybe; + voter_not_contains?: InputMaybe; + voter_not_contains_nocase?: InputMaybe; + voter_not_ends_with?: InputMaybe; + voter_not_ends_with_nocase?: InputMaybe; + voter_not_in?: InputMaybe>; + voter_not_starts_with?: InputMaybe; + voter_not_starts_with_nocase?: InputMaybe; + voter_starts_with?: InputMaybe; + voter_starts_with_nocase?: InputMaybe; + weight?: InputMaybe; + weight_gt?: InputMaybe; + weight_gte?: InputMaybe; + weight_in?: InputMaybe>; + weight_lt?: InputMaybe; + weight_lte?: InputMaybe; + weight_not?: InputMaybe; + weight_not_in?: InputMaybe>; +}; + +export enum TreasuryVote_OrderBy { + Id = 'id', + Proposal = 'proposal', + ProposalAbstainVotes = 'proposal__abstainVotes', + ProposalAgainstVotes = 'proposal__againstVotes', + ProposalDescription = 'proposal__description', + ProposalForVotes = 'proposal__forVotes', + ProposalId = 'proposal__id', + ProposalTotalVotes = 'proposal__totalVotes', + ProposalVoteEnd = 'proposal__voteEnd', + ProposalVoteStart = 'proposal__voteStart', + Reason = 'reason', + Support = 'support', + Voter = 'voter', + VoterId = 'voter__id', + VoterLastUpdatedTimestamp = 'voter__lastUpdatedTimestamp', + Weight = 'weight' } /** UnbondEvent entities are created for every emitted Unbond event. */ @@ -8323,8 +9002,15 @@ export enum WinningTicketRedeemedEvent_OrderBy { Sender = 'sender', SenderNonce = 'senderNonce', SenderDeposit = 'sender__deposit', + SenderFirstActiveDay = 'sender__firstActiveDay', SenderId = 'sender__id', + SenderLastActiveDay = 'sender__lastActiveDay', + SenderNinetyDayVolumeEth = 'sender__ninetyDayVolumeETH', SenderReserve = 'sender__reserve', + SenderSixtyDayVolumeEth = 'sender__sixtyDayVolumeETH', + SenderThirtyDayVolumeEth = 'sender__thirtyDayVolumeETH', + SenderTotalVolumeEth = 'sender__totalVolumeETH', + SenderTotalVolumeUsd = 'sender__totalVolumeUSD', Timestamp = 'timestamp', Transaction = 'transaction', TransactionBlockNumber = 'transaction__blockNumber', @@ -8823,8 +9509,15 @@ export enum WithdrawalEvent_OrderBy { RoundVolumeUsd = 'round__volumeUSD', Sender = 'sender', SenderDeposit = 'sender__deposit', + SenderFirstActiveDay = 'sender__firstActiveDay', SenderId = 'sender__id', + SenderLastActiveDay = 'sender__lastActiveDay', + SenderNinetyDayVolumeEth = 'sender__ninetyDayVolumeETH', SenderReserve = 'sender__reserve', + SenderSixtyDayVolumeEth = 'sender__sixtyDayVolumeETH', + SenderThirtyDayVolumeEth = 'sender__thirtyDayVolumeETH', + SenderTotalVolumeEth = 'sender__totalVolumeETH', + SenderTotalVolumeUsd = 'sender__totalVolumeUSD', Timestamp = 'timestamp', Transaction = 'transaction', TransactionBlockNumber = 'transaction__blockNumber', @@ -8904,7 +9597,7 @@ export type EventsQueryVariables = Exact<{ }>; -export type EventsQuery = { __typename: 'Query', transactions: Array<{ __typename: 'Transaction', events?: Array<{ __typename: 'BondEvent', additionalAmount: string, delegator: { __typename: 'Delegator', id: string }, newDelegate: { __typename: 'Transcoder', id: string }, oldDelegate?: { __typename: 'Transcoder', id: string } | null, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'BurnEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'DepositFundedEvent', amount: string, sender: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'EarningsClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'MigrateDelegatorFinalizedEvent', l1Addr: string, l2Addr: string, stake: string, delegatedStake: string, fees: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'MintEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'NewRoundEvent', transaction: { __typename: 'Transaction', from: string, id: string, timestamp: number }, round: { __typename: 'Round', id: string } } | { __typename: 'ParameterUpdateEvent', param: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'PauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'PollCreatedEvent', endBlock: string, poll: { __typename: 'Poll', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'RebondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'ReserveClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'ReserveFundedEvent', amount: string, reserveHolder: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'RewardEvent', rewardTokens: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'ServiceURIUpdateEvent', addr: string, serviceURI: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'SetCurrentRewardTokensEvent', currentInflation: string, currentMintableTokens: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'StakeClaimedEvent', stake: string, fees: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderActivatedEvent', activationRound: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderDeactivatedEvent', deactivationRound: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderEvictedEvent', delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderResignedEvent', delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderSlashedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderUpdateEvent', rewardCut: string, feeShare: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TransferBondEvent', amount: string, newDelegator: { __typename: 'Delegator', id: string }, oldDelegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'UnbondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'UnpauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'VoteEvent', voter: string, choiceID: string, poll: { __typename: 'Poll', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WinningTicketRedeemedEvent', faceValue: string, recipient: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WithdrawFeesEvent', amount: string, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WithdrawStakeEvent', amount: string, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WithdrawalEvent', deposit: string, reserve: string, sender: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } }> | null }>, transcoders: Array<{ __typename: 'Transcoder', id: string }> }; +export type EventsQuery = { __typename: 'Query', transactions: Array<{ __typename: 'Transaction', events?: Array<{ __typename: 'BondEvent', additionalAmount: string, delegator: { __typename: 'Delegator', id: string }, newDelegate: { __typename: 'Transcoder', id: string }, oldDelegate?: { __typename: 'Transcoder', id: string } | null, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'BurnEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'DepositFundedEvent', amount: string, sender: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'EarningsClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'MigrateDelegatorFinalizedEvent', l1Addr: string, l2Addr: string, stake: string, delegatedStake: string, fees: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'MintEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'NewRoundEvent', transaction: { __typename: 'Transaction', from: string, id: string, timestamp: number }, round: { __typename: 'Round', id: string } } | { __typename: 'ParameterUpdateEvent', param: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'PauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'PollCreatedEvent', endBlock: string, poll: { __typename: 'Poll', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'RebondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'ReserveClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'ReserveFundedEvent', amount: string, reserveHolder: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'RewardEvent', rewardTokens: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'ServiceURIUpdateEvent', addr: string, serviceURI: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'SetCurrentRewardTokensEvent', currentInflation: string, currentMintableTokens: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'StakeClaimedEvent', stake: string, fees: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderActivatedEvent', activationRound: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderDeactivatedEvent', deactivationRound: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderEvictedEvent', delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderResignedEvent', delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderSlashedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TranscoderUpdateEvent', rewardCut: string, feeShare: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TransferBondEvent', amount: string, newDelegator: { __typename: 'Delegator', id: string }, oldDelegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'TreasuryVoteEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'UnbondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'UnpauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'VoteEvent', voter: string, choiceID: string, poll: { __typename: 'Poll', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WinningTicketRedeemedEvent', faceValue: string, recipient: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WithdrawFeesEvent', amount: string, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WithdrawStakeEvent', amount: string, delegator: { __typename: 'Delegator', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } } | { __typename: 'WithdrawalEvent', deposit: string, reserve: string, sender: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number, from: string } }> | null }>, transcoders: Array<{ __typename: 'Transcoder', id: string }> }; export type OrchestratorsQueryVariables = Exact<{ currentRound?: InputMaybe; @@ -8955,7 +9648,7 @@ export type TransactionsQueryVariables = Exact<{ }>; -export type TransactionsQuery = { __typename: 'Query', transactions: Array<{ __typename: 'Transaction', events?: Array<{ __typename: 'BondEvent', additionalAmount: string, delegator: { __typename: 'Delegator', id: string }, newDelegate: { __typename: 'Transcoder', id: string }, oldDelegate?: { __typename: 'Transcoder', id: string } | null, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'BurnEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'DepositFundedEvent', amount: string, sender: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'EarningsClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'MigrateDelegatorFinalizedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'MintEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'NewRoundEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ParameterUpdateEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'PauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'PollCreatedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'RebondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ReserveClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ReserveFundedEvent', amount: string, reserveHolder: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'RewardEvent', rewardTokens: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ServiceURIUpdateEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'SetCurrentRewardTokensEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'StakeClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderActivatedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderDeactivatedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderEvictedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderResignedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderSlashedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderUpdateEvent', rewardCut: string, feeShare: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TransferBondEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'UnbondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'UnpauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'VoteEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WinningTicketRedeemedEvent', faceValue: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WithdrawFeesEvent', amount: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WithdrawStakeEvent', amount: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WithdrawalEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } }> | null }>, winningTicketRedeemedEvents: Array<{ __typename: 'WinningTicketRedeemedEvent', id: string, faceValue: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } }> }; +export type TransactionsQuery = { __typename: 'Query', transactions: Array<{ __typename: 'Transaction', events?: Array<{ __typename: 'BondEvent', additionalAmount: string, delegator: { __typename: 'Delegator', id: string }, newDelegate: { __typename: 'Transcoder', id: string }, oldDelegate?: { __typename: 'Transcoder', id: string } | null, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'BurnEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'DepositFundedEvent', amount: string, sender: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'EarningsClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'MigrateDelegatorFinalizedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'MintEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'NewRoundEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ParameterUpdateEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'PauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'PollCreatedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'RebondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ReserveClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ReserveFundedEvent', amount: string, reserveHolder: { __typename: 'Broadcaster', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'RewardEvent', rewardTokens: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'ServiceURIUpdateEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'SetCurrentRewardTokensEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'StakeClaimedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderActivatedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderDeactivatedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderEvictedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderResignedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderSlashedEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TranscoderUpdateEvent', rewardCut: string, feeShare: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TransferBondEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'TreasuryVoteEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'UnbondEvent', amount: string, delegate: { __typename: 'Transcoder', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'UnpauseEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'VoteEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WinningTicketRedeemedEvent', faceValue: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WithdrawFeesEvent', amount: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WithdrawStakeEvent', amount: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } } | { __typename: 'WithdrawalEvent', round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } }> | null }>, winningTicketRedeemedEvents: Array<{ __typename: 'WinningTicketRedeemedEvent', id: string, faceValue: string, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } }> }; export type TreasuryProposalQueryVariables = Exact<{ id: Scalars['ID']; @@ -9781,6 +10474,8 @@ export const TransactionsDocument = gql` orderBy: timestamp orderDirection: desc where: {recipient: $account} + first: $first + skip: $skip ) { __typename id diff --git a/components/HistoryView/index.tsx b/components/HistoryView/index.tsx index 888e8f09..1bfd9c97 100644 --- a/components/HistoryView/index.tsx +++ b/components/HistoryView/index.tsx @@ -118,6 +118,13 @@ const Index = () => { ...previousResult.transactions, ...fetchMoreResult.transactions, ], + // Basing the query skip for winning tickets on transactions.length is fine because there will always be more transactions than winning tickets + // So, we will always have winning ticket events that are older than the last transaction timestamp + // Allowing mergedEvents to filter correctly + winningTicketRedeemedEvents: [ + ...previousResult.winningTicketRedeemedEvents, + ...fetchMoreResult.winningTicketRedeemedEvents, + ], }; }, }); diff --git a/queries/transactions.graphql b/queries/transactions.graphql index aa976a98..85da93c9 100644 --- a/queries/transactions.graphql +++ b/queries/transactions.graphql @@ -73,6 +73,8 @@ query transactions($account: String!, $first: Int!, $skip: Int!) { orderBy: timestamp orderDirection: desc where: { recipient: $account } + first: $first + skip: $skip ) { __typename id