Skip to content

Commit

Permalink
fix: rename votesBlockNumber to votesBlocknumber
Browse files Browse the repository at this point in the history
Signed-off-by: 0xRaccoon <[email protected]>
  • Loading branch information
0xRaccoon committed Jan 4, 2024
1 parent f6b8f6b commit 18debee
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
32 changes: 16 additions & 16 deletions solidity/contracts/governance/WonderGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ abstract contract WonderGovernor is
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string memory description
) public virtual validProposalType(proposalType) returns (uint256) {
address proposer = _msgSender();
Expand All @@ -316,7 +316,7 @@ abstract contract WonderGovernor is
}

// check proposal threshold
uint256 proposerVotes = getVotes(proposer, proposalType, votesBlockNumber, clock() - 1);
uint256 proposerVotes = getVotes(proposer, proposalType, votesBlocknumber, clock() - 1);
uint256 votesThreshold = proposalThreshold(proposalType);
if (proposerVotes < votesThreshold) {
revert GovernorInsufficientProposerVotes(proposer, proposerVotes, votesThreshold);
Expand Down Expand Up @@ -560,9 +560,9 @@ abstract contract WonderGovernor is
/**
* @dev See {IWonderGovernor-castVote}.
*/
function castVote(uint256 proposalId, uint8 support, uint256 votesBlockNumber) public virtual returns (uint256) {
function castVote(uint256 proposalId, uint8 support, uint256 votesBlocknumber) public virtual returns (uint256) {
address voter = _msgSender();
return _castVote(proposalId, voter, support, votesBlockNumber, '');
return _castVote(proposalId, voter, support, votesBlocknumber, '');
}

/**
Expand All @@ -571,11 +571,11 @@ abstract contract WonderGovernor is
function castVoteWithReason(
uint256 proposalId,
uint8 support,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string calldata reason
) public virtual returns (uint256) {
address voter = _msgSender();
return _castVote(proposalId, voter, support, votesBlockNumber, reason);
return _castVote(proposalId, voter, support, votesBlocknumber, reason);
}

/**
Expand All @@ -584,12 +584,12 @@ abstract contract WonderGovernor is
function castVoteWithReasonAndParams(
uint256 proposalId,
uint8 support,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string calldata reason,
bytes memory params
) public virtual returns (uint256) {
address voter = _msgSender();
return _castVote(proposalId, voter, support, reason, votesBlockNumber, params);
return _castVote(proposalId, voter, support, reason, votesBlocknumber, params);
}

/**
Expand All @@ -599,7 +599,7 @@ abstract contract WonderGovernor is
uint256 proposalId,
uint8 support,
address voter,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
bytes memory signature
) public virtual returns (uint256) {
bool valid = SignatureChecker.isValidSignatureNow(
Expand All @@ -612,7 +612,7 @@ abstract contract WonderGovernor is
revert GovernorInvalidSignature(voter);
}

return _castVote(proposalId, voter, support, votesBlockNumber, '');
return _castVote(proposalId, voter, support, votesBlocknumber, '');
}

/**
Expand All @@ -622,7 +622,7 @@ abstract contract WonderGovernor is
uint256 proposalId,
uint8 support,
address voter,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string calldata reason,
bytes memory params,
bytes memory signature
Expand All @@ -649,7 +649,7 @@ abstract contract WonderGovernor is
revert GovernorInvalidSignature(voter);
}

return _castVote(proposalId, voter, support, reason, votesBlockNumber, params);
return _castVote(proposalId, voter, support, reason, votesBlocknumber, params);
}

/**
Expand All @@ -662,10 +662,10 @@ abstract contract WonderGovernor is
uint256 proposalId,
address account,
uint8 support,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string memory reason
) internal virtual returns (uint256) {
return _castVote(proposalId, account, support, reason, votesBlockNumber, _defaultParams());
return _castVote(proposalId, account, support, reason, votesBlocknumber, _defaultParams());
}

/**
Expand All @@ -679,14 +679,14 @@ abstract contract WonderGovernor is
address account,
uint8 support,
string memory reason,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
bytes memory params
) internal virtual returns (uint256) {
_validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Active));

uint8 _proposalType = _proposals[proposalId].proposalType;

uint256 weight = _getVotes(account, _proposalType, votesBlockNumber, proposalSnapshot(proposalId), params);
uint256 weight = _getVotes(account, _proposalType, votesBlocknumber, proposalSnapshot(proposalId), params);
_countVote(proposalId, account, support, weight, params);

if (params.length == 0) {
Expand Down
12 changes: 6 additions & 6 deletions solidity/interfaces/governance/IWonderGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ interface IWonderGovernor is IERC165, IERC6372 {
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string memory description
) external returns (uint256 proposalId);

Expand Down Expand Up @@ -385,7 +385,7 @@ interface IWonderGovernor is IERC165, IERC6372 {
*
* Emits a {VoteCast} event.
*/
function castVote(uint256 proposalId, uint8 support, uint256 votesBlockNumber) external returns (uint256 balance);
function castVote(uint256 proposalId, uint8 support, uint256 votesBlocknumber) external returns (uint256 balance);

/**
* @dev Cast a vote with a reason
Expand All @@ -395,7 +395,7 @@ interface IWonderGovernor is IERC165, IERC6372 {
function castVoteWithReason(
uint256 proposalId,
uint8 support,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string calldata reason
) external returns (uint256 balance);

Expand All @@ -407,7 +407,7 @@ interface IWonderGovernor is IERC165, IERC6372 {
function castVoteWithReasonAndParams(
uint256 proposalId,
uint8 support,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string calldata reason,
bytes memory params
) external returns (uint256 balance);
Expand All @@ -421,7 +421,7 @@ interface IWonderGovernor is IERC165, IERC6372 {
uint256 proposalId,
uint8 support,
address voter,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
bytes memory signature
) external returns (uint256 balance);

Expand All @@ -435,7 +435,7 @@ interface IWonderGovernor is IERC165, IERC6372 {
uint256 proposalId,
uint8 support,
address voter,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
string calldata reason,
bytes memory params,
bytes memory signature
Expand Down
2 changes: 1 addition & 1 deletion solidity/interfaces/governance/utils/IWonderVotes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ interface IWonderVotes {
function getSnapshotVotes(
address account,
uint8 proposalType,
uint256 votesBlockNumber,
uint256 votesBlocknumber,
uint256 voteStart
) external view returns (uint256);

Expand Down

0 comments on commit 18debee

Please sign in to comment.