Skip to content

Commit

Permalink
Use correct value for votingPeriod, remove unused function argument
Browse files Browse the repository at this point in the history
  • Loading branch information
matjazv committed Feb 26, 2024
1 parent 244298b commit fe1c46e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion script/L2Governor.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ contract L2GovernorScript is Script {
L2Governor l2Governor = L2Governor(payable(address(l2GovernorProxy)));
assert(keccak256(bytes(l2Governor.name())) == keccak256(bytes("Lisk Governor")));
assert(l2Governor.votingDelay() == 0);
assert(l2Governor.votingPeriod() == 50400);
assert(l2Governor.votingPeriod() == 604800);
assert(l2Governor.proposalThreshold() == 2e18);
assert(l2Governor.timelock() == address(timelock));
assert(address(l2Governor.token()) == address(votingPower));
Expand Down
11 changes: 4 additions & 7 deletions src/L2/L2Governor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ contract L2Governor is
uint48 public constant VOTING_DELAY = 0;

/// @notice Voting period for proposals (in EIP-6372 clock).
uint32 public constant VOTING_PERIOD = 50400; // 7 days
uint32 public constant VOTING_PERIOD = 604800; // 7 days

/// @notice Threshold for a proposal to be successful.
uint256 public constant PROPOSAL_THRESHOLD = 2e18;
uint256 public constant PROPOSAL_THRESHOLD = 2e18; // TODO change this value once we have a proper threshold

/// @notice Quorum required for a proposal to be successful (number of tokens).
uint256 public constant QUORUM_THRESHOLD = 50000e18;
uint256 public constant QUORUM_THRESHOLD = 50000e18; // TODO change this value once we have a proper threshold

/// @notice Disabling initializers on implementation contract to prevent misuse.
constructor() {
Expand Down Expand Up @@ -74,10 +74,7 @@ contract L2Governor is
}

/// @notice Returns the quorum required for a proposal to be successful.
function quorum(uint256 blockNumber) public pure override returns (uint256) {
// blockNumber is not used in the calculation, but it is a required parameter.
blockNumber;

function quorum(uint256) public pure override returns (uint256) {
return QUORUM_THRESHOLD;
}

Expand Down
2 changes: 1 addition & 1 deletion test/L2/L2Governor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ contract L2GovernorTest is Test {
assertEq(l2Governor.name(), "Lisk Governor");
assertEq(l2Governor.version(), "1.0.0");
assertEq(l2Governor.votingDelay(), 0);
assertEq(l2Governor.votingPeriod(), 50400);
assertEq(l2Governor.votingPeriod(), 604800);
assertEq(l2Governor.proposalThreshold(), 2e18);
assertEq(l2Governor.timelock(), address(timelock));
assertEq(address(l2Governor.token()), address(votingPower));
Expand Down

0 comments on commit fe1c46e

Please sign in to comment.