Skip to content

Commit

Permalink
Merge pull request #797 from NewShadesDAO/add-block-timestamp-to-votes
Browse files Browse the repository at this point in the history
add blockTimestamp to Votes subgraph
  • Loading branch information
solimander authored Oct 2, 2023
2 parents 2afbf52 + c220e4d commit 59ba775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/nouns-subgraph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ type Vote @entity {

"Block number of vote"
blockNumber: BigInt!

"The timestamp of the block the vote is in"
blockTimestamp: BigInt!
}

type Governance @entity {
Expand Down
1 change: 1 addition & 0 deletions packages/nouns-subgraph/src/nouns-dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export function handleVoteCast(event: VoteCast): void {
vote.supportDetailed = event.params.support;
vote.nouns = voter.nounsRepresented;
vote.blockNumber = event.block.number;
vote.blockTimestamp = event.block.timestamp;

if (event.params.reason != '') {
vote.reason = event.params.reason;
Expand Down

0 comments on commit 59ba775

Please sign in to comment.