Skip to content

Commit

Permalink
Merge pull request #805 from NewShadesDAO/add-prop-version-block-number
Browse files Browse the repository at this point in the history
add createdBlock field to proposal version
  • Loading branch information
solimander authored Oct 9, 2023
2 parents 59ba775 + 312f07d commit 2607b4b
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 @@ -291,6 +291,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 @@ -371,6 +371,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 2607b4b

Please sign in to comment.