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
1 change: 1 addition & 0 deletions contracts/governance/DegenDAOInterfaces.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ contract DegenDAOStorageV1 is DegenDAOProxyStorage {
struct Proposal {
uint256 id;
address proposer;
uint256 creationBlock;
uint256 proposalThreshold;
uint256 quorumVotes;
uint256 eta;
Expand Down
3 changes: 2 additions & 1 deletion contracts/governance/DegenDAOLogicV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ contract DegenDAOLogicV1 is DegenDAOStorageV1, DegenDAOEvents {

newProposal.id = proposalCount;
newProposal.proposer = msg.sender;
newProposal.creationBlock = block.number;
newProposal.proposalThreshold = temp.proposalThreshold;
newProposal.quorumVotes = bps2Uint(quorumVotesBPS, temp.totalSupply);
newProposal.eta = 0;
Expand Down Expand Up @@ -494,7 +495,7 @@ contract DegenDAOLogicV1 is DegenDAOStorageV1, DegenDAOEvents {
Receipt storage receipt = proposal.receipts[voter];
require(receipt.hasVoted == false, 'DegenDAO::castVoteInternal: voter already voted');

uint96 votes = dogs.getPriorVotes(voter, proposal.startBlock - votingDelay);
uint96 votes = dogs.getPriorVotes(voter, proposal.creationBlock);

if (support == 0) {
proposal.againstVotes = proposal.againstVotes + votes;
Expand Down