Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 107 additions & 22 deletions apollo/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ export type Scalars = {
Timestamp: any;
};

/** Indicates whether the current, partially filled bucket should be included in the response. Defaults to `exclude` */
export enum Aggregation_Current {
/** Exclude the current, partially filled bucket from the response */
Exclude = 'exclude',
/** Include the current, partially filled bucket in the response */
Include = 'include'
}

export enum Aggregation_Interval {
Day = 'day',
Hour = 'hour'
Expand Down Expand Up @@ -7578,8 +7570,10 @@ export type TreasuryProposal_Filter = {
and?: InputMaybe<Array<InputMaybe<TreasuryProposal_Filter>>>;
calldatas?: InputMaybe<Array<Scalars['Bytes']>>;
calldatas_contains?: InputMaybe<Array<Scalars['Bytes']>>;
calldatas_contains_nocase?: InputMaybe<Array<Scalars['Bytes']>>;
calldatas_not?: InputMaybe<Array<Scalars['Bytes']>>;
calldatas_not_contains?: InputMaybe<Array<Scalars['Bytes']>>;
calldatas_not_contains_nocase?: InputMaybe<Array<Scalars['Bytes']>>;
description?: InputMaybe<Scalars['String']>;
description_contains?: InputMaybe<Scalars['String']>;
description_contains_nocase?: InputMaybe<Scalars['String']>;
Expand Down Expand Up @@ -7654,8 +7648,10 @@ export type TreasuryProposal_Filter = {
totalVotes_not_in?: InputMaybe<Array<Scalars['BigDecimal']>>;
values?: InputMaybe<Array<Scalars['BigInt']>>;
values_contains?: InputMaybe<Array<Scalars['BigInt']>>;
values_contains_nocase?: InputMaybe<Array<Scalars['BigInt']>>;
values_not?: InputMaybe<Array<Scalars['BigInt']>>;
values_not_contains?: InputMaybe<Array<Scalars['BigInt']>>;
values_not_contains_nocase?: InputMaybe<Array<Scalars['BigInt']>>;
voteEnd?: InputMaybe<Scalars['BigInt']>;
voteEnd_gt?: InputMaybe<Scalars['BigInt']>;
voteEnd_gte?: InputMaybe<Scalars['BigInt']>;
Expand Down Expand Up @@ -9681,7 +9677,7 @@ export type PollQueryVariables = Exact<{
}>;


export type PollQuery = { __typename: 'Query', poll?: { __typename: 'Poll', id: string, proposal: string, endBlock: string, quorum: string, quota: string, tally?: { __typename: 'PollTally', yes: string, no: string } | null, votes: Array<{ __typename: 'Vote', id: string }> } | null };
export type PollQuery = { __typename: 'Query', poll?: { __typename: 'Poll', id: string, proposal: string, endBlock: string, quorum: string, quota: string, tally?: { __typename: 'PollTally', yes: string, no: string } | null, votes: Array<{ __typename: 'Vote', id: string, choiceID?: PollChoice | null, voter: string, voteStake: string, nonVoteStake: string }> } | null };

export type PollsQueryVariables = Exact<{ [key: string]: never; }>;

Expand Down Expand Up @@ -9719,6 +9715,16 @@ export type TranscoderActivatedEventsQueryVariables = Exact<{

export type TranscoderActivatedEventsQuery = { __typename: 'Query', transcoderActivatedEvents: Array<{ __typename: 'TranscoderActivatedEvent', activationRound: string, id: string }> };

export type TranscoderUpdateEventsQueryVariables = Exact<{
where?: InputMaybe<TranscoderUpdateEvent_Filter>;
first?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<TranscoderUpdateEvent_OrderBy>;
orderDirection?: InputMaybe<OrderDirection>;
}>;


export type TranscoderUpdateEventsQuery = { __typename: 'Query', transcoderUpdateEvents: Array<{ __typename: 'TranscoderUpdateEvent', id: string, rewardCut: string, feeShare: string, timestamp: number, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string } }> };

export type TreasuryProposalQueryVariables = Exact<{
id: Scalars['ID'];
}>;
Expand Down Expand Up @@ -9755,7 +9761,15 @@ export type VoteQueryVariables = Exact<{
}>;


export type VoteQuery = { __typename: 'Query', vote?: { __typename: 'Vote', choiceID?: PollChoice | null, voteStake: string, nonVoteStake: string } | null };
export type VoteQuery = { __typename: 'Query', vote?: { __typename: 'Vote', choiceID?: PollChoice | null, voteStake: string, nonVoteStake: string, poll?: { __typename: 'Poll', id: string, votes: Array<{ __typename: 'Vote', voteStake: string, id: string }> } | null } | null };

export type VoteEventsQueryVariables = Exact<{
first?: InputMaybe<Scalars['Int']>;
where?: InputMaybe<VoteEvent_Filter>;
}>;


export type VoteEventsQuery = { __typename: 'Query', voteEvents: Array<{ __typename: 'VoteEvent', id: string, choiceID: string, voter: string, timestamp: number, poll: { __typename: 'Poll', id: string, proposal: string }, transaction: { __typename: 'Transaction', id: string, timestamp: number } }> };


export const AccountDocument = gql`
Expand Down Expand Up @@ -10451,6 +10465,10 @@ export const PollDocument = gql`
}
votes {
id
choiceID
voter
voteStake
nonVoteStake
}
}
}
Expand Down Expand Up @@ -10838,16 +10856,6 @@ export function useTranscoderActivatedEventsLazyQuery(baseOptions?: Apollo.LazyQ
export type TranscoderActivatedEventsQueryHookResult = ReturnType<typeof useTranscoderActivatedEventsQuery>;
export type TranscoderActivatedEventsLazyQueryHookResult = ReturnType<typeof useTranscoderActivatedEventsLazyQuery>;
export type TranscoderActivatedEventsQueryResult = Apollo.QueryResult<TranscoderActivatedEventsQuery, TranscoderActivatedEventsQueryVariables>;

export type TranscoderUpdateEventsQueryVariables = Exact<{
where?: InputMaybe<TranscoderUpdateEvent_Filter>;
first?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<TranscoderUpdateEvent_OrderBy>;
orderDirection?: InputMaybe<OrderDirection>;
}>;

export type TranscoderUpdateEventsQuery = { __typename: 'Query', transcoderUpdateEvents: Array<{ __typename: 'TranscoderUpdateEvent', id: string, rewardCut: string, feeShare: string, timestamp: number, round: { __typename: 'Round', id: string }, transaction: { __typename: 'Transaction', id: string } }> };

export const TranscoderUpdateEventsDocument = gql`
query transcoderUpdateEvents($where: TranscoderUpdateEvent_filter, $first: Int, $orderBy: TranscoderUpdateEvent_orderBy, $orderDirection: OrderDirection) {
transcoderUpdateEvents(
Expand All @@ -10870,6 +10878,25 @@ export const TranscoderUpdateEventsDocument = gql`
}
`;

/**
* __useTranscoderUpdateEventsQuery__
*
* To run a query within a React component, call `useTranscoderUpdateEventsQuery` and pass it any options that fit your needs.
* When your component renders, `useTranscoderUpdateEventsQuery` 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 } = useTranscoderUpdateEventsQuery({
* variables: {
* where: // value for 'where'
* first: // value for 'first'
* orderBy: // value for 'orderBy'
* orderDirection: // value for 'orderDirection'
* },
* });
*/
export function useTranscoderUpdateEventsQuery(baseOptions?: Apollo.QueryHookOptions<TranscoderUpdateEventsQuery, TranscoderUpdateEventsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<TranscoderUpdateEventsQuery, TranscoderUpdateEventsQueryVariables>(TranscoderUpdateEventsDocument, options);
Expand All @@ -10881,7 +10908,6 @@ export function useTranscoderUpdateEventsLazyQuery(baseOptions?: Apollo.LazyQuer
export type TranscoderUpdateEventsQueryHookResult = ReturnType<typeof useTranscoderUpdateEventsQuery>;
export type TranscoderUpdateEventsLazyQueryHookResult = ReturnType<typeof useTranscoderUpdateEventsLazyQuery>;
export type TranscoderUpdateEventsQueryResult = Apollo.QueryResult<TranscoderUpdateEventsQuery, TranscoderUpdateEventsQueryVariables>;

export const TreasuryProposalDocument = gql`
query treasuryProposal($id: ID!) {
treasuryProposal(id: $id) {
Expand Down Expand Up @@ -11093,6 +11119,13 @@ export const VoteDocument = gql`
choiceID
voteStake
nonVoteStake
poll {
id
votes {
voteStake
id
}
}
}
}
`;
Expand Down Expand Up @@ -11123,4 +11156,56 @@ export function useVoteLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<VoteQ
}
export type VoteQueryHookResult = ReturnType<typeof useVoteQuery>;
export type VoteLazyQueryHookResult = ReturnType<typeof useVoteLazyQuery>;
export type VoteQueryResult = Apollo.QueryResult<VoteQuery, VoteQueryVariables>;
export type VoteQueryResult = Apollo.QueryResult<VoteQuery, VoteQueryVariables>;
export const VoteEventsDocument = gql`
query voteEvents($first: Int, $where: VoteEvent_filter) {
voteEvents(
orderBy: timestamp
orderDirection: desc
first: $first
where: $where
) {
id
choiceID
voter
timestamp
poll {
id
proposal
}
transaction {
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: {
* first: // value for 'first'
* where: // value for 'where'
* },
* });
*/
export function useVoteEventsQuery(baseOptions?: Apollo.QueryHookOptions<VoteEventsQuery, VoteEventsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<VoteEventsQuery, VoteEventsQueryVariables>(VoteEventsDocument, options);
}
export function useVoteEventsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<VoteEventsQuery, VoteEventsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<VoteEventsQuery, VoteEventsQueryVariables>(VoteEventsDocument, options);
}
export type VoteEventsQueryHookResult = ReturnType<typeof useVoteEventsQuery>;
export type VoteEventsLazyQueryHookResult = ReturnType<typeof useVoteEventsLazyQuery>;
export type VoteEventsQueryResult = Apollo.QueryResult<VoteEventsQuery, VoteEventsQueryVariables>;
Loading