Skip to content

Commit

Permalink
Fix Election NatSpecs (#11255)
Browse files Browse the repository at this point in the history
Fix NatSpecs
  • Loading branch information
m-chrzan authored Oct 16, 2024
1 parent 3e81caf commit 048fc11
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions packages/protocol/contracts/governance/Election.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import "../common/libraries/ReentrancyGuard.sol";
import "../common/Blockable.sol";
import "../common/PrecompilesOverride.sol";

/**
* @title Manages the validator election process.
*/
contract Election is
IElection,
ICeloVersionedContract,
Expand Down Expand Up @@ -153,6 +156,12 @@ contract Election is
);
event EpochRewardsDistributedToVoters(address indexed group, uint256 value);

/**
* @notice - On L1, ensures the function is called via the consensus client.
* - On L2, ensures the function is called by the permitted address.
* @param permittedAddress The address permitted to call permissioned
* functions on L2.
*/
modifier onlyVmOrPermitted(address permittedAddress) {
if (isL2()) require(msg.sender == permittedAddress, "Only permitted address can call");
else {
Expand Down Expand Up @@ -428,9 +437,11 @@ contract Election is
return value;
}

/// @notice Sets the address of the blocking contract.
/// @param _blockedBy The address of the contract that will determine if this contract is blocked.
/// @dev Can only be called by the owner of the contract.
/**
* @notice Sets the address of the blocking contract.
* @param _blockedBy The address of the contract that will determine if this contract is blocked.
* @dev Can only be called by the owner of the contract.
*/
function setBlockedByContract(address _blockedBy) external onlyOwner {
_setBlockedBy(_blockedBy);
}
Expand Down

0 comments on commit 048fc11

Please sign in to comment.