diff --git a/apollo/subgraph.ts b/apollo/subgraph.ts index 96a56a01..221a1a65 100644 --- a/apollo/subgraph.ts +++ b/apollo/subgraph.ts @@ -286,18 +286,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; @@ -306,6 +432,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; @@ -314,6 +448,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; @@ -323,12 +473,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. */ @@ -924,8 +1114,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', @@ -2678,6 +2875,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 */ @@ -2755,6 +2954,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; @@ -3001,6 +3206,7 @@ export type Protocol_Filter = { }; export enum Protocol_OrderBy { + ActiveBroadcasters = 'activeBroadcasters', ActiveTranscoderCount = 'activeTranscoderCount', CurrentRound = 'currentRound', CurrentRoundActiveTranscoderCount = 'currentRound__activeTranscoderCount', @@ -3090,6 +3296,8 @@ export type Query = { bondEvent?: Maybe; bondEvents: Array; broadcaster?: Maybe; + broadcasterDay?: Maybe; + broadcasterDays: Array; broadcasters: Array; burnEvent?: Maybe; burnEvents: Array; @@ -3163,6 +3371,10 @@ export type Query = { transferBondEvents: Array; treasuryProposal?: Maybe; treasuryProposals: Array; + treasuryVote?: Maybe; + treasuryVoteEvent?: Maybe; + treasuryVoteEvents: Array; + treasuryVotes: Array; unbondEvent?: Maybe; unbondEvents: Array; unbondingLock?: Maybe; @@ -3214,6 +3426,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; @@ -3873,6 +4103,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']; @@ -4395,8 +4661,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', @@ -4543,8 +4816,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', @@ -5802,7 +6082,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; @@ -7191,29 +7471,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>; @@ -7241,6 +7558,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; @@ -7277,6 +7602,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>; @@ -7299,98 +7632,71 @@ 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' } -/** UnbondEvent entities are created for every emitted Unbond event. */ -export type UnbondEvent = Event & { - __typename: 'UnbondEvent'; - /** Amount unbonded in the transaction */ - amount: Scalars['BigDecimal']; - /** Reference to the delegate unbonded from */ - delegate: Transcoder; - /** Reference to the Delegator that unbonded */ - delegator: Delegator; +/** 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; - /** The unbonding lock ID associated with this transaction, used to optionally rebond the amount */ - unbondingLockId?: Maybe; - /** The future round in which the Delegator may withdraw its unbonded stake */ - withdrawRound: Scalars['BigInt']; + /** Account that cast the vote */ + voter: LivepeerAccount; + /** Stake-weighted voting power */ + weight: Scalars['BigDecimal']; }; -export type UnbondEvent_Filter = { +export type TreasuryVoteEvent_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; - amount?: InputMaybe; - amount_gt?: InputMaybe; - amount_gte?: InputMaybe; - amount_in?: InputMaybe>; - amount_lt?: InputMaybe; - amount_lte?: InputMaybe; - amount_not?: InputMaybe; - amount_not_in?: InputMaybe>; - and?: InputMaybe>>; - delegate?: InputMaybe; - delegate_?: InputMaybe; - delegate_contains?: InputMaybe; - delegate_contains_nocase?: InputMaybe; - delegate_ends_with?: InputMaybe; - delegate_ends_with_nocase?: InputMaybe; - delegate_gt?: InputMaybe; - delegate_gte?: InputMaybe; - delegate_in?: InputMaybe>; - delegate_lt?: InputMaybe; - delegate_lte?: InputMaybe; - delegate_not?: InputMaybe; - delegate_not_contains?: InputMaybe; - delegate_not_contains_nocase?: InputMaybe; - delegate_not_ends_with?: InputMaybe; - delegate_not_ends_with_nocase?: InputMaybe; - delegate_not_in?: InputMaybe>; - delegate_not_starts_with?: InputMaybe; - delegate_not_starts_with_nocase?: InputMaybe; - delegate_starts_with?: InputMaybe; - delegate_starts_with_nocase?: InputMaybe; - delegator?: InputMaybe; - delegator_?: InputMaybe; - delegator_contains?: InputMaybe; - delegator_contains_nocase?: InputMaybe; - delegator_ends_with?: InputMaybe; - delegator_ends_with_nocase?: InputMaybe; - delegator_gt?: InputMaybe; - delegator_gte?: InputMaybe; - delegator_in?: InputMaybe>; - delegator_lt?: InputMaybe; - delegator_lte?: InputMaybe; - delegator_not?: InputMaybe; - delegator_not_contains?: InputMaybe; - delegator_not_contains_nocase?: InputMaybe; - delegator_not_ends_with?: InputMaybe; - delegator_not_ends_with_nocase?: InputMaybe; - delegator_not_in?: InputMaybe>; - delegator_not_starts_with?: InputMaybe; - delegator_not_starts_with_nocase?: InputMaybe; - delegator_starts_with?: InputMaybe; - delegator_starts_with_nocase?: InputMaybe; + and?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -7399,7 +7705,48 @@ export type UnbondEvent_Filter = { id_lte?: InputMaybe; id_not?: InputMaybe; id_not_in?: InputMaybe>; - or?: 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; @@ -7421,6 +7768,10 @@ export type UnbondEvent_Filter = { 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; @@ -7450,20 +7801,348 @@ export type UnbondEvent_Filter = { transaction_not_starts_with_nocase?: InputMaybe; transaction_starts_with?: InputMaybe; transaction_starts_with_nocase?: InputMaybe; - unbondingLockId?: InputMaybe; - unbondingLockId_gt?: InputMaybe; - unbondingLockId_gte?: InputMaybe; - unbondingLockId_in?: InputMaybe>; - unbondingLockId_lt?: InputMaybe; - unbondingLockId_lte?: InputMaybe; - unbondingLockId_not?: InputMaybe; - unbondingLockId_not_in?: InputMaybe>; - withdrawRound?: InputMaybe; - withdrawRound_gt?: InputMaybe; - withdrawRound_gte?: InputMaybe; - withdrawRound_in?: InputMaybe>; - withdrawRound_lt?: InputMaybe; - withdrawRound_lte?: 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. */ +export type UnbondEvent = Event & { + __typename: 'UnbondEvent'; + /** Amount unbonded in the transaction */ + amount: Scalars['BigDecimal']; + /** Reference to the delegate unbonded from */ + delegate: Transcoder; + /** Reference to the Delegator that unbonded */ + delegator: Delegator; + /** Ethereum transaction hash + event log index */ + id: Scalars['ID']; + /** Reference to the round the event occured in */ + round: Round; + /** Timestamp of the transaction the event was included in */ + timestamp: Scalars['Int']; + /** Reference to the transaction the event was included in */ + transaction: Transaction; + /** The unbonding lock ID associated with this transaction, used to optionally rebond the amount */ + unbondingLockId?: Maybe; + /** The future round in which the Delegator may withdraw its unbonded stake */ + withdrawRound: Scalars['BigInt']; +}; + +export type UnbondEvent_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; + and?: InputMaybe>>; + delegate?: InputMaybe; + delegate_?: InputMaybe; + delegate_contains?: InputMaybe; + delegate_contains_nocase?: InputMaybe; + delegate_ends_with?: InputMaybe; + delegate_ends_with_nocase?: InputMaybe; + delegate_gt?: InputMaybe; + delegate_gte?: InputMaybe; + delegate_in?: InputMaybe>; + delegate_lt?: InputMaybe; + delegate_lte?: InputMaybe; + delegate_not?: InputMaybe; + delegate_not_contains?: InputMaybe; + delegate_not_contains_nocase?: InputMaybe; + delegate_not_ends_with?: InputMaybe; + delegate_not_ends_with_nocase?: InputMaybe; + delegate_not_in?: InputMaybe>; + delegate_not_starts_with?: InputMaybe; + delegate_not_starts_with_nocase?: InputMaybe; + delegate_starts_with?: InputMaybe; + delegate_starts_with_nocase?: InputMaybe; + delegator?: InputMaybe; + delegator_?: InputMaybe; + delegator_contains?: InputMaybe; + delegator_contains_nocase?: InputMaybe; + delegator_ends_with?: InputMaybe; + delegator_ends_with_nocase?: InputMaybe; + delegator_gt?: InputMaybe; + delegator_gte?: InputMaybe; + delegator_in?: InputMaybe>; + delegator_lt?: InputMaybe; + delegator_lte?: InputMaybe; + delegator_not?: InputMaybe; + delegator_not_contains?: InputMaybe; + delegator_not_contains_nocase?: InputMaybe; + delegator_not_ends_with?: InputMaybe; + delegator_not_ends_with_nocase?: InputMaybe; + delegator_not_in?: InputMaybe>; + delegator_not_starts_with?: InputMaybe; + delegator_not_starts_with_nocase?: InputMaybe; + delegator_starts_with?: InputMaybe; + delegator_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: 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; + 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; + unbondingLockId?: InputMaybe; + unbondingLockId_gt?: InputMaybe; + unbondingLockId_gte?: InputMaybe; + unbondingLockId_in?: InputMaybe>; + unbondingLockId_lt?: InputMaybe; + unbondingLockId_lte?: InputMaybe; + unbondingLockId_not?: InputMaybe; + unbondingLockId_not_in?: InputMaybe>; + withdrawRound?: InputMaybe; + withdrawRound_gt?: InputMaybe; + withdrawRound_gte?: InputMaybe; + withdrawRound_in?: InputMaybe>; + withdrawRound_lt?: InputMaybe; + withdrawRound_lte?: InputMaybe; withdrawRound_not?: InputMaybe; withdrawRound_not_in?: InputMaybe>; }; @@ -8317,8 +8996,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', @@ -8817,8 +9503,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', @@ -8898,7 +9591,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; @@ -8949,7 +9642,17 @@ 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 TranscoderActivatedEventsQueryVariables = Exact<{ + where?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; +}>; + + +export type TranscoderActivatedEventsQuery = { __typename: 'Query', transcoderActivatedEvents: Array<{ __typename: 'TranscoderActivatedEvent', activationRound: string, id: string }> }; export type TreasuryProposalQueryVariables = Exact<{ id: Scalars['ID']; @@ -8958,11 +9661,37 @@ export type TreasuryProposalQueryVariables = Exact<{ export type TreasuryProposalQuery = { __typename: 'Query', treasuryProposal?: { __typename: 'TreasuryProposal', id: string, description: string, calldatas: Array, targets: Array, values: Array, voteEnd: string, voteStart: string, proposer: { __typename: 'LivepeerAccount', id: string } } | null }; -export type TreasuryProposalsQueryVariables = Exact<{ [key: string]: never; }>; +export type TreasuryProposalsQueryVariables = Exact<{ + where?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; +}>; export type TreasuryProposalsQuery = { __typename: 'Query', treasuryProposals: Array<{ __typename: 'TreasuryProposal', id: string, description: string, calldatas: Array, targets: Array, values: Array, voteEnd: string, voteStart: string, proposer: { __typename: 'LivepeerAccount', id: string } }> }; +export type GetProposalsByIdsQueryVariables = Exact<{ + ids: Array | Scalars['ID']; +}>; + + +export type GetProposalsByIdsQuery = { __typename: 'Query', treasuryProposals: Array<{ __typename: 'TreasuryProposal', id: string, description: string, voteStart: string, voteEnd: string }> }; + +export type TreasuryVoteEventsQueryVariables = Exact<{ + first?: InputMaybe; + where?: InputMaybe; +}>; + + +export type TreasuryVoteEventsQuery = { __typename: 'Query', treasuryVoteEvents: Array<{ __typename: 'TreasuryVoteEvent', id: string, reason?: string | null, support: TreasuryVoteSupport, timestamp: number, weight: string, proposal: { __typename: 'TreasuryProposal', id: string, targets: Array, description: string }, voter: { __typename: 'LivepeerAccount', id: string }, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } }> }; + +export type TreasuryVotesQueryVariables = Exact<{ + where?: InputMaybe; +}>; + + +export type TreasuryVotesQuery = { __typename: 'Query', treasuryVotes: Array<{ __typename: 'TreasuryVote', id: string, reason?: string | null, support: TreasuryVoteSupport, weight: string, proposal: { __typename: 'TreasuryProposal', id: string, voteStart: string, voteEnd: string }, voter: { __typename: 'LivepeerAccount', id: string, delegate?: { __typename: 'Transcoder', activationRound: string, deactivationRound: string } | null } }> }; + export type VoteQueryVariables = Exact<{ id: Scalars['ID']; }>; @@ -8970,6 +9699,13 @@ export type VoteQueryVariables = Exact<{ export type VoteQuery = { __typename: 'Query', vote?: { __typename: 'Vote', choiceID?: PollChoice | null, voteStake: string, nonVoteStake: string } | null }; +export type VoteEventsQueryVariables = Exact<{ + where?: InputMaybe; +}>; + + +export type VoteEventsQuery = { __typename: 'Query', voteEvents: Array<{ __typename: 'VoteEvent', voter: string, choiceID: string, id: string, timestamp: number, poll: { __typename: 'Poll', id: string, proposal: string, endBlock: string, quorum: string, quota: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number }, round: { __typename: 'Round', id: string } }> }; + export const AccountDocument = gql` query account($account: ID!) { @@ -9819,6 +10555,50 @@ export function useTransactionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptio export type TransactionsQueryHookResult = ReturnType; export type TransactionsLazyQueryHookResult = ReturnType; export type TransactionsQueryResult = Apollo.QueryResult; +export const TranscoderActivatedEventsDocument = gql` + query transcoderActivatedEvents($where: TranscoderActivatedEvent_filter, $first: Int, $orderBy: TranscoderActivatedEvent_orderBy, $orderDirection: OrderDirection) { + transcoderActivatedEvents( + where: $where + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + ) { + activationRound + id + } +} + `; + +/** + * __useTranscoderActivatedEventsQuery__ + * + * To run a query within a React component, call `useTranscoderActivatedEventsQuery` and pass it any options that fit your needs. + * When your component renders, `useTranscoderActivatedEventsQuery` 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 } = useTranscoderActivatedEventsQuery({ + * variables: { + * where: // value for 'where' + * first: // value for 'first' + * orderBy: // value for 'orderBy' + * orderDirection: // value for 'orderDirection' + * }, + * }); + */ +export function useTranscoderActivatedEventsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(TranscoderActivatedEventsDocument, options); + } +export function useTranscoderActivatedEventsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(TranscoderActivatedEventsDocument, options); + } +export type TranscoderActivatedEventsQueryHookResult = ReturnType; +export type TranscoderActivatedEventsLazyQueryHookResult = ReturnType; +export type TranscoderActivatedEventsQueryResult = Apollo.QueryResult; export const TreasuryProposalDocument = gql` query treasuryProposal($id: ID!) { treasuryProposal(id: $id) { @@ -9864,8 +10644,12 @@ export type TreasuryProposalQueryHookResult = ReturnType; export type TreasuryProposalQueryResult = Apollo.QueryResult; export const TreasuryProposalsDocument = gql` - query treasuryProposals { - treasuryProposals(orderBy: voteStart, orderDirection: desc) { + query treasuryProposals($where: TreasuryProposal_filter, $orderBy: TreasuryProposal_orderBy = voteStart, $orderDirection: OrderDirection = desc) { + treasuryProposals( + where: $where + orderBy: $orderBy + orderDirection: $orderDirection + ) { id description calldatas @@ -9892,6 +10676,9 @@ export const TreasuryProposalsDocument = gql` * @example * const { data, loading, error } = useTreasuryProposalsQuery({ * variables: { + * where: // value for 'where' + * orderBy: // value for 'orderBy' + * orderDirection: // value for 'orderDirection' * }, * }); */ @@ -9906,6 +10693,149 @@ export function useTreasuryProposalsLazyQuery(baseOptions?: Apollo.LazyQueryHook export type TreasuryProposalsQueryHookResult = ReturnType; export type TreasuryProposalsLazyQueryHookResult = ReturnType; export type TreasuryProposalsQueryResult = Apollo.QueryResult; +export const GetProposalsByIdsDocument = gql` + query getProposalsByIds($ids: [ID!]!) { + treasuryProposals(where: {id_in: $ids}) { + id + description + voteStart + voteEnd + } +} + `; + +/** + * __useGetProposalsByIdsQuery__ + * + * To run a query within a React component, call `useGetProposalsByIdsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetProposalsByIdsQuery` 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 } = useGetProposalsByIdsQuery({ + * variables: { + * ids: // value for 'ids' + * }, + * }); + */ +export function useGetProposalsByIdsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetProposalsByIdsDocument, options); + } +export function useGetProposalsByIdsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetProposalsByIdsDocument, options); + } +export type GetProposalsByIdsQueryHookResult = ReturnType; +export type GetProposalsByIdsLazyQueryHookResult = ReturnType; +export type GetProposalsByIdsQueryResult = Apollo.QueryResult; +export const TreasuryVoteEventsDocument = gql` + query treasuryVoteEvents($first: Int, $where: TreasuryVoteEvent_filter) { + treasuryVoteEvents(first: $first, where: $where) { + id + reason + support + timestamp + proposal { + id + targets + description + } + voter { + id + } + weight + round { + id + } + transaction { + id + timestamp + } + } +} + `; + +/** + * __useTreasuryVoteEventsQuery__ + * + * To run a query within a React component, call `useTreasuryVoteEventsQuery` and pass it any options that fit your needs. + * When your component renders, `useTreasuryVoteEventsQuery` 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 } = useTreasuryVoteEventsQuery({ + * variables: { + * first: // value for 'first' + * where: // value for 'where' + * }, + * }); + */ +export function useTreasuryVoteEventsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(TreasuryVoteEventsDocument, options); + } +export function useTreasuryVoteEventsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(TreasuryVoteEventsDocument, options); + } +export type TreasuryVoteEventsQueryHookResult = ReturnType; +export type TreasuryVoteEventsLazyQueryHookResult = ReturnType; +export type TreasuryVoteEventsQueryResult = Apollo.QueryResult; +export const TreasuryVotesDocument = gql` + query treasuryVotes($where: TreasuryVote_filter) { + treasuryVotes(where: $where) { + id + reason + support + weight + proposal { + id + voteStart + voteEnd + } + voter { + id + delegate { + activationRound + deactivationRound + } + } + } +} + `; + +/** + * __useTreasuryVotesQuery__ + * + * To run a query within a React component, call `useTreasuryVotesQuery` and pass it any options that fit your needs. + * When your component renders, `useTreasuryVotesQuery` 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 } = useTreasuryVotesQuery({ + * variables: { + * where: // value for 'where' + * }, + * }); + */ +export function useTreasuryVotesQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(TreasuryVotesDocument, options); + } +export function useTreasuryVotesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(TreasuryVotesDocument, options); + } +export type TreasuryVotesQueryHookResult = ReturnType; +export type TreasuryVotesLazyQueryHookResult = ReturnType; +export type TreasuryVotesQueryResult = Apollo.QueryResult; export const VoteDocument = gql` query vote($id: ID!) { vote(id: $id) { @@ -9942,4 +10872,56 @@ export function useVoteLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions; export type VoteLazyQueryHookResult = ReturnType; -export type VoteQueryResult = Apollo.QueryResult; \ No newline at end of file +export type VoteQueryResult = Apollo.QueryResult; +export const VoteEventsDocument = gql` + query voteEvents($where: VoteEvent_filter) { + voteEvents(where: $where) { + voter + poll { + id + proposal + endBlock + quorum + quota + } + transaction { + id + timestamp + } + choiceID + id + round { + id + } + timestamp + } +} + `; + +/** + * __useVoteEventsQuery__ + * + * To run a query within a React component, call `useVoteEventsQuery` and pass it any options that fit your needs. + * When your component renders, `useVoteEventsQuery` 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 } = useVoteEventsQuery({ + * variables: { + * where: // value for 'where' + * }, + * }); + */ +export function useVoteEventsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(VoteEventsDocument, options); + } +export function useVoteEventsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(VoteEventsDocument, options); + } +export type VoteEventsQueryHookResult = ReturnType; +export type VoteEventsLazyQueryHookResult = ReturnType; +export type VoteEventsQueryResult = Apollo.QueryResult; \ No newline at end of file diff --git a/components/Account/index.tsx b/components/Account/index.tsx index 9f74de7a..e295376b 100644 --- a/components/Account/index.tsx +++ b/components/Account/index.tsx @@ -1,3 +1,4 @@ +import { formatAddress } from "@lib/utils"; import { Box, Flex, Link as A } from "@livepeer/design-system"; import { useAccountAddress, useEnsData } from "hooks"; import Link from "next/link"; @@ -52,11 +53,7 @@ const Account = () => { > - - {ens?.name - ? ens.name - : accountAddress.replace(accountAddress.slice(6, 38), "…")} - + {ens?.name ? ens.name : formatAddress(accountAddress)} diff --git a/components/AccountCell/index.tsx b/components/AccountCell/index.tsx index f9dc8d59..43f86c15 100644 --- a/components/AccountCell/index.tsx +++ b/components/AccountCell/index.tsx @@ -1,4 +1,4 @@ -import { textTruncate } from "@lib/utils"; +import { formatAddress, textTruncate } from "@lib/utils"; import { Box, Flex } from "@livepeer/design-system"; import { useEnsData } from "hooks"; import { QRCodeCanvas } from "qrcode.react"; @@ -88,7 +88,7 @@ const Index = ({ active, address }) => { {identity?.name ? textTruncate(identity.name, 12, "…") - : address.replace(address.slice(5, 36), "…")} + : formatAddress(address)} diff --git a/components/Claim/index.tsx b/components/Claim/index.tsx index b64985d2..d0abfa8e 100644 --- a/components/Claim/index.tsx +++ b/components/Claim/index.tsx @@ -1,6 +1,7 @@ import { LAYOUT_MAX_WIDTH } from "@layouts/constants"; import { l2Migrator } from "@lib/api/abis/bridge/L2Migrator"; import { getL2MigratorAddress } from "@lib/api/contracts"; +import { formatAddress } from "@lib/utils"; import { Box, Button, Container, Flex, Text } from "@livepeer/design-system"; import { ArrowTopRightIcon } from "@modulz/radix-icons"; import { constants, ethers } from "ethers"; @@ -202,10 +203,7 @@ const Claim = () => { borderBottom: "1px solid rgba(255,255,255, .2)", }} > - {migrationParams.delegate.replace( - migrationParams.delegate.slice(6, 38), - "…" - )} + {formatAddress(migrationParams.delegate)} diff --git a/components/DelegatingView/index.tsx b/components/DelegatingView/index.tsx index 83279309..0f32a1b9 100644 --- a/components/DelegatingView/index.tsx +++ b/components/DelegatingView/index.tsx @@ -1,7 +1,7 @@ import { ExplorerTooltip } from "@components/ExplorerTooltip"; import Stat from "@components/Stat"; import { bondingManager } from "@lib/api/abis/main/BondingManager"; -import { checkAddressEquality } from "@lib/utils"; +import { checkAddressEquality, formatAddress } from "@lib/utils"; import { Box, Button, Flex, Link as A, Text } from "@livepeer/design-system"; import { QuestionMarkCircledIcon } from "@modulz/radix-icons"; import { AccountQueryResult, OrchestratorsSortedQueryResult } from "apollo"; @@ -167,10 +167,7 @@ const Index = ({ delegator, transcoders, protocol, currentRound }: Props) => { {delegateIdentity?.name ? delegateIdentity?.name - : delegator?.delegate?.id.replace( - delegator?.delegate?.id.slice(7, 37), - "…" - )} + : formatAddress(delegator?.delegate?.id)} } />{" "} diff --git a/components/DelegatingWidget/Header.tsx b/components/DelegatingWidget/Header.tsx index 60cda370..b808c216 100644 --- a/components/DelegatingWidget/Header.tsx +++ b/components/DelegatingWidget/Header.tsx @@ -1,4 +1,5 @@ import { EnsIdentity } from "@lib/api/types/get-ens"; +import { formatAddress } from "@lib/utils"; import { Box, Flex, Heading } from "@livepeer/design-system"; import { QRCodeCanvas } from "qrcode.react"; @@ -58,7 +59,7 @@ const Header = ({ {delegateProfile?.name ? delegateProfile.name - : transcoder?.id.replace(transcoder.id.slice(7, 37), "…")} + : formatAddress(transcoder?.id)} { const query = router.query; const account = query.account as string; + const { data: treasureVoteEventsData } = useTreasuryVoteEventsQuery({ + variables: { + where: { + voter: account.toLowerCase(), + }, + }, + notifyOnNetworkStatusChange: true, + }); + const [extendedTreasureVoteEventsData, setExtendedTreasureVoteEventsData] = + useState<(TreasuryVoteEvent & { attributes: Fm | null })[]>([]); + useEffect(() => { + if (treasureVoteEventsData) { + const extendedTreasureVoteEventsData = + treasureVoteEventsData?.treasuryVoteEvents.map((treasureVoteEvent) => { + const parsed = parseProposalText( + treasureVoteEvent.proposal as Proposal + ); + return { + ...treasureVoteEvent, + attributes: parsed.attributes, + }; + }); + setExtendedTreasureVoteEventsData( + extendedTreasureVoteEventsData as (TreasuryVoteEvent & { + attributes: Fm | null; + })[] + ); + } + }, [treasureVoteEventsData]); + + const { data: voteEventsData } = useVoteEventsQuery({ + variables: { + where: { + voter: account.toLowerCase(), + }, + }, + notifyOnNetworkStatusChange: true, + }); + const [extendedVoteEventsData, setExtendedVoteEventsData] = useState< + (VoteEvent & { attributes: Fm | null })[] + >([]); + useEffect(() => { + const getExtendedVoteEventsData = async () => { + const extendedVoteEventsData = await Promise.all( + voteEventsData?.voteEvents.map(async (voteEvent) => { + const ipfsObject = await catIpfsJson( + voteEvent.poll?.proposal + ); + let attributes: Fm | null = null; + + // only include proposals with valid format + if (ipfsObject?.text && ipfsObject?.gitCommitHash) { + const transformedProposal = fm(ipfsObject.text); + + attributes = { + title: String(transformedProposal.attributes.title), + lip: String(transformedProposal.attributes.lip), + commitHash: String(ipfsObject.gitCommitHash), + created: String(transformedProposal.attributes.created), + text: String(transformedProposal.body), + }; + } + return { + ...voteEvent, + attributes, + }; + }) || [] + ); + setExtendedVoteEventsData( + extendedVoteEventsData as (VoteEvent & { attributes: Fm | null })[] + ); + }; + getExtendedVoteEventsData(); + }, [voteEventsData]); + const { data, loading, error, fetchMore, stopPolling } = useTransactionsQuery( { variables: { @@ -64,11 +152,19 @@ const Index = () => { ...(data?.winningTicketRedeemedEvents?.filter( (e) => (e?.transaction?.timestamp ?? 0) > lastEventTimestamp ) ?? []), + ...extendedTreasureVoteEventsData, + ...extendedVoteEventsData, ].sort( (a, b) => (b?.transaction?.timestamp ?? 0) - (a?.transaction?.timestamp ?? 0) ), - [events, data, lastEventTimestamp] + [ + events, + data, + lastEventTimestamp, + extendedTreasureVoteEventsData, + extendedVoteEventsData, + ] ); if (error) { @@ -185,11 +281,7 @@ function renderSwitch(event, i: number) { > - Delegated with{" "} - {event.newDelegate.id.replace( - event.newDelegate.id.slice(7, 37), - "…" - )} + Delegated with {formatAddress(event.newDelegate.id)} - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -271,10 +360,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -312,8 +398,7 @@ function renderSwitch(event, i: number) { > - Redelegated with{" "} - {event.delegate.id.replace(event.delegate.id.slice(7, 37), "…")} + Redelegated with {formatAddress(event.delegate.id)} - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -378,8 +460,7 @@ function renderSwitch(event, i: number) { > - Undelegated from{" "} - {event.delegate.id.replace(event.delegate.id.slice(7, 37), "…")} + Undelegated from {formatAddress(event.delegate.id)} - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -463,10 +541,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -526,10 +601,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -593,10 +665,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -655,10 +724,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -717,10 +783,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -780,10 +843,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -848,10 +908,7 @@ function renderSwitch(event, i: number) { }} > - {event.transaction.id.replace( - event.transaction.id.slice(6, 62), - "…" - )} + {formatTransactionHash(event.transaction.id)} @@ -870,6 +927,139 @@ function renderSwitch(event, i: number) { ); + case "TreasuryVoteEvent": + const supportTreasuryVoteEvent = + VOTING_SUPPORT_MAP[event.support] || + VOTING_SUPPORT_MAP[TreasuryVoteSupport.Abstain]; + return ( + + + + + Voted on treasury proposal "{event.attributes?.title}" + + + {dayjs + .unix(event.transaction.timestamp) + .format("MM/DD/YYYY h:mm:ss a")}{" "} + - Round #{event.round.id} + + + + {formatTransactionHash(event.transaction.id)} + + + + + + {" "} + + {supportTreasuryVoteEvent?.text} + {" "} + + + + ); + case "VoteEvent": + const supportVoteEvent = + VOTING_SUPPORT[event.choiceID] || VOTING_SUPPORT["2"]; + return ( + + + + + Voted on poll "{event.attributes?.title}" + + + {dayjs + .unix(event.transaction.timestamp) + .format("MM/DD/YYYY h:mm:ss a")}{" "} + - Round #{event.round.id} + + + + {formatTransactionHash(event.transaction.id)} + + + + + + {" "} + + {supportVoteEvent?.text} + {" "} + + + + ); default: return null; } diff --git a/components/OrchestratingView/index.tsx b/components/OrchestratingView/index.tsx index df2cf494..08d20463 100644 --- a/components/OrchestratingView/index.tsx +++ b/components/OrchestratingView/index.tsx @@ -1,10 +1,18 @@ import Stat from "@components/Stat"; import dayjs from "@lib/dayjs"; -import { Box, Flex } from "@livepeer/design-system"; -import { CheckIcon, Cross1Icon } from "@modulz/radix-icons"; -import { AccountQueryResult } from "apollo"; +import { Box, Flex, Link as A, Text } from "@livepeer/design-system"; +import { ArrowTopRightIcon, CheckIcon, Cross1Icon } from "@modulz/radix-icons"; +import { + AccountQueryResult, + OrderDirection, + TranscoderActivatedEvent_OrderBy, + useTranscoderActivatedEventsQuery, + useTreasuryProposalsQuery, + useTreasuryVotesQuery, +} from "apollo"; import { useScoreData } from "hooks"; import { useRegionsData } from "hooks/useSwr"; +import Link from "next/link"; import numbro from "numbro"; import { useMemo } from "react"; import Masonry from "react-masonry-css"; @@ -33,6 +41,52 @@ const Index = ({ currentRound, transcoder, isActive }: Props) => { const scores = useScoreData(transcoder?.id); const knownRegions = useRegionsData(); + const { data: firstTranscoderActivatedEventsData } = + useTranscoderActivatedEventsQuery({ + variables: { + where: { + delegate: transcoder?.id, + }, + first: 1, + orderBy: TranscoderActivatedEvent_OrderBy.ActivationRound, + orderDirection: OrderDirection.Asc, + }, + }); + + const firstActivationRound = useMemo(() => { + return firstTranscoderActivatedEventsData?.transcoderActivatedEvents[0] + ?.activationRound; + }, [firstTranscoderActivatedEventsData]); + + const { data: treasuryVotesData } = useTreasuryVotesQuery({ + variables: { + where: { + voter: transcoder?.id, + }, + }, + }); + + const { data: eligebleProposalsData } = useTreasuryProposalsQuery({ + variables: { + where: { + voteStart_gt: firstActivationRound, + }, + }, + skip: !firstActivationRound, + }); + + console.log(transcoder); + console.log(treasuryVotesData); + console.log(eligebleProposalsData); + + const govStats = useMemo(() => { + if (!treasuryVotesData || !eligebleProposalsData) return null; + return { + voted: treasuryVotesData?.treasuryVotes.length ?? 0, + eligible: eligebleProposalsData?.treasuryProposals.length ?? 0, + }; + }, [treasuryVotesData, eligebleProposalsData]); + const maxScore = useMemo(() => { const topTransData = Object.keys(scores?.scores ?? {}).reduce( (prev, curr) => { @@ -279,6 +333,111 @@ const Index = ({ currentRound, transcoder, isActive }: Props) => { } /> )} + + + Number of proposals voted on relative to the number of proposals + the orchestrator was eligible for while active. + + } + value={ + govStats ? ( + + {govStats.voted} + + / {govStats.eligible} Proposals + + + ) : ( + "N/A" + ) + } + meta={ + + {govStats && ( + + + + )} + + {govStats && ( + + {numbro(govStats.voted / govStats.eligible).format({ + output: "percent", + mantissa: 0, + })}{" "} + Participation + + )} + + See history + + + + + } + /> + ); diff --git a/components/OrchestratorList/index.tsx b/components/OrchestratorList/index.tsx index 1370086e..dade2dec 100644 --- a/components/OrchestratorList/index.tsx +++ b/components/OrchestratorList/index.tsx @@ -11,7 +11,7 @@ import { ROIInflationChange, ROITimeHorizon, } from "@lib/roi"; -import { textTruncate } from "@lib/utils"; +import { formatAddress, textTruncate } from "@lib/utils"; import { Badge, Box, @@ -291,7 +291,7 @@ const OrchestratorList = ({ ) : ( - {row.values.id.replace(row.values.id.slice(7, 37), "…")} + {formatAddress(row.values.id)} )} {/* {(row?.original?.daysSinceChangeParams ?? diff --git a/components/PerformanceList/index.tsx b/components/PerformanceList/index.tsx index fede2324..3bb703ad 100644 --- a/components/PerformanceList/index.tsx +++ b/components/PerformanceList/index.tsx @@ -3,7 +3,7 @@ import IdentityAvatar from "@components/IdentityAvatar"; import Table from "@components/Table"; import { Pipeline } from "@lib/api/types/get-available-pipelines"; import { Region } from "@lib/api/types/get-regions"; -import { textTruncate } from "@lib/utils"; +import { formatAddress, textTruncate } from "@lib/utils"; import { Badge, Box, Flex, Link as A, Skeleton } from "@livepeer/design-system"; import { QuestionMarkCircledIcon } from "@modulz/radix-icons"; import { OrchestratorsQueryResult } from "apollo"; @@ -149,7 +149,7 @@ const PerformanceList = ({ ) : ( - {row.values.id.replace(row.values.id.slice(7, 37), "…")} + {formatAddress(row.values.id)} )} {typeof row.values.scores != "undefined" && diff --git a/components/Profile/index.tsx b/components/Profile/index.tsx index 2f5f1522..233226d9 100644 --- a/components/Profile/index.tsx +++ b/components/Profile/index.tsx @@ -1,6 +1,7 @@ import { ExplorerTooltip } from "@components/ExplorerTooltip"; import ShowMoreRichText from "@components/ShowMoreRichText"; import { EnsIdentity } from "@lib/api/types/get-ens"; +import { formatAddress } from "@lib/utils"; import { Box, Flex, Heading, Link as A, Text } from "@livepeer/design-system"; import { CheckIcon, @@ -107,9 +108,7 @@ const Index = ({ account, isMyAccount = false, identity }: Props) => { fontWeight: 700, }} > - {identity?.name - ? identity.name - : account.replace(account.slice(5, 39), "…")} + {identity?.name ? identity.name : formatAddress(account)} diff --git a/components/Search/index.tsx b/components/Search/index.tsx index 28853e7e..ad2f8d96 100644 --- a/components/Search/index.tsx +++ b/components/Search/index.tsx @@ -1,4 +1,5 @@ import Spinner from "@components/Spinner"; +import { formatAddress } from "@lib/utils"; import { Box, Dialog, @@ -182,14 +183,10 @@ const Index = ({ css = {}, ...props }) => { {result.item.name - ? `${result.item.name} (${result.item.id.replace( - result.item.id.slice(5, 39), - "…" + ? `${result.item.name} (${formatAddress( + result.item.id )})` - : result.item.id.replace( - result.item.id.slice(7, 37), - "…" - )} + : formatAddress(result.item.id, 8, 6)} diff --git a/components/StakeTransactions/index.tsx b/components/StakeTransactions/index.tsx index d4511cee..c2f244ad 100644 --- a/components/StakeTransactions/index.tsx +++ b/components/StakeTransactions/index.tsx @@ -4,6 +4,7 @@ import { parseEther } from "viem"; import { abbreviateNumber, + formatAddress, getHint, simulateNewActiveSetOrder, } from "../../lib/utils"; @@ -62,11 +63,7 @@ const Index = ({ delegator, transcoders, currentRound, isMyAccount }) => { > - Undelegating from{" "} - {lock.delegate.id.replace( - lock.delegate.id.slice(7, 37), - "…" - )} + Undelegating from {formatAddress(lock.delegate.id)} Tokens will be available for withdrawal in approximately{" "} @@ -136,13 +133,7 @@ const Index = ({ delegator, transcoders, currentRound, isMyAccount }) => { justifyContent: "space-between", }} > - - Undelegated from{" "} - {lock.delegate.id.replace( - lock.delegate.id.slice(7, 37), - "…" - )} - + Undelegated from {formatAddress(lock.delegate.id)} {isMyAccount && ( diff --git a/components/Table/index.tsx b/components/Table/index.tsx index 6e9832fa..84884998 100644 --- a/components/Table/index.tsx +++ b/components/Table/index.tsx @@ -80,7 +80,7 @@ function DataTable({ <> {input && ( @@ -98,7 +98,6 @@ function DataTable({ css={{ borderCollapse: "collapse", tableLayout: "auto", - minWidth: 980, width: "100%", "@bp4": { width: "100%", diff --git a/components/TransactionsList/index.tsx b/components/TransactionsList/index.tsx index 7fdb1e05..8b9fe98c 100644 --- a/components/TransactionsList/index.tsx +++ b/components/TransactionsList/index.tsx @@ -1,5 +1,6 @@ import Table from "@components/Table"; import dayjs from "@lib/dayjs"; +import { formatTransactionHash } from "@lib/utils"; import { Badge, Box, Flex, Link as A, Text } from "@livepeer/design-system"; import { ArrowTopRightIcon } from "@modulz/radix-icons"; import { EventsQueryResult } from "apollo"; @@ -79,7 +80,7 @@ const Transaction = (props: { id: string | undefined }) => { } > - {props.id ? props.id.replace(props.id.slice(6, 62), "…") : "N/A"} + {props.id ? formatTransactionHash(props.id) : "N/A"} {`Voted `} - {+event?.choiceID === 0 ? '"Yes"' : '"No"'} + {+event?.choiceID === 0 ? '"Against"' : '"For"'} {` on a proposal`} {renderEmoji("👩‍⚖️")} diff --git a/components/TreasuryVotingReason/index.tsx b/components/TreasuryVotingReason/index.tsx index 52724984..67b77998 100644 --- a/components/TreasuryVotingReason/index.tsx +++ b/components/TreasuryVotingReason/index.tsx @@ -1,4 +1,4 @@ -import { Text, TextArea } from "@livepeer/design-system"; +import { Box, Text, TextArea } from "@livepeer/design-system"; const MAX_INPUT_LENGTH = 256; const MIN_INPUT_LENGTH = 3; @@ -22,17 +22,30 @@ const Index = ({ const charsLeft = MAX_INPUT_LENGTH - reason.length; return ( - <> - + + Reason (optional)