Skip to content

Commit

Permalink
add createdBlock field to proposal version
Browse files Browse the repository at this point in the history
  • Loading branch information
pedropregueiro committed Oct 6, 2023
1 parent 21af7aa commit 312f07d
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 @@ -288,6 +288,9 @@ type ProposalVersion @entity(immutable: true) {
"The proposal that was updated"
proposal: Proposal!

"The block number of the update"
createdBlock: BigInt!

"The block timestamp of the update"
createdAt: BigInt!

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 @@ -365,6 +365,7 @@ function captureProposalVersion(
const versionId = txHash.concat('-').concat(logIndex);
const previousVersion = getOrCreateProposalVersion(versionId);
previousVersion.proposal = proposal.id;
previousVersion.createdBlock = proposal.lastUpdatedBlock;
previousVersion.createdAt = proposal.lastUpdatedTimestamp;
previousVersion.targets = proposal.targets;
previousVersion.values = proposal.values;
Expand Down

0 comments on commit 312f07d

Please sign in to comment.