Governance Subgraph
Subgraph of protocol Governance system (Proposals, Voters, Votes, etc.)
Proposal
Proposal schema:
Field | Type | Description |
---|---|---|
id | String! (required string) | Unique string id (e.g. 1, 15, 20) |
proposer | Bytes! (required string) | Address of the proposer |
targets | [Bytes!]! (required string array) | Array of contract addresses which will be interacted due to proposal execution |
values | [BigInt!]! (required string array) | Array of values which will be placed into contract method due to proposal execution |
signatures | [String!]! (required string array) | Array of signatures for contract method due to proposal execution |
callDatas | [Bytes!]! (required string array) | Array of call data for contract method due to proposal execution |
startBlock | BigInt! (required string) | Number of the block when proposal will be active |
endBlock | BigInt! (required string) | Number of the block when proposal will be ended |
description | String! (required string) | Description of the proposal |
state | ProposalState! (required string) | Four main states of the proposal, other states you can compute by this state and start block timestamp or end block timestamp |
eta | BigInt! (required string) | ETA of the proposal |
forVotes | BigInt! (required string) | Sum of votes for |
againstVotes | BigInt! (required string) | Sum of votes against |
createdBlockNumber | BigInt! (required string) | Number of the block when proposal was created |
createdBlockTimestamp | BigInt! (required string) | Timestamp of the block when proposal was created |
createdTransactionHash | Bytes! (required string) | Hash of the transaction with proposal creation event |
queuedBlockNumber | BigInt! (required string) | Number of the block when proposal was queued |
queuedBlockTimestamp | BigInt! (required string) | Timestamp of the block when proposal was queued |
queuedTransactionHash | Bytes! (required string) | Hash of the transaction with proposal queue event |
executedBlockNumber | BigInt! (required string) | Number of the block when proposal was executed |
executedBlockTimestamp | BigInt! (required string) | Timestamp of the block when proposal was executed |
executedTransactionHash | Bytes! (required string) | Hash of the transaction with proposal execution event |
canceledBlockNumber | BigInt! (required string) | Number of the block when proposal was canceled |
canceledBlockTimestamp | BigInt! (required string) | Timestamp of the block when proposal was canceled |
canceledTransactionHash | Bytes! (required string) | Hash of the transaction with proposal cancel event |
Example of Proposal querying:
Proposal vote
ProposalVote schema:
Field | Type | Description |
---|---|---|
id | Bytes! (required string) | Unique id for vote |
proposal | Proposal! (required Proposal) | Voted for or against proposal |
address | Bytes! (required string) | Address of the voters |
support | Boolean! (required boolean) | If true - vote for If false - vote against |
votes | BigInt! (required string) | Number of votes in receipt |
blockNumber | BigInt! (required string) | Number of the block when vote was created |
blockTimestamp | BigInt! (required string) | Timestamp of the block when vote was created |
transactionHash | Bytes! (required string) | Hash of the transaction with event when vote was created |
Example of ProposalVote querying:
Proposal count
Used to get total count of proposals
ProposalCount schema:
Field | Type | Description |
---|---|---|
id | String! (required string) | System used id is "0" |
count | BigInt! (required string) | Total count of proposals |
Example of ProposalCount querying:
Last updated