Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/VotingMultipliers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ contract VotingMultipliers is Ownable2StepUpgradeable, IVotingMultipliers {
/// @notice Initializes the contract
/// @param _initialOwner The address of the initial owner
function __VotingMultipliers_init(address _initialOwner) internal onlyInitializing {
__Ownable_init(_initialOwner);
if (owner() == address(0)) {
__Ownable_init(_initialOwner);
}
}

/// @notice Returns the multiplier at the given index
Expand Down
13 changes: 6 additions & 7 deletions src/YieldDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ contract YieldDistributor is IYieldDistributor, Ownable2StepUpgradeable, VotingM
* @param _blsSignatureChecker The address of the BLS signature checker
* @custom:oz-upgrades-validate-as-initializer
*/
function initializeGasKiller(address _avsAddress, address _blsSignatureChecker) public reinitializer(2) {
function initializeGasKiller(address _avsAddress, address _blsSignatureChecker) public reinitializer(2) onlyOwner {
_setAvsAddress(_avsAddress);
_setBlsSignatureChecker(_blsSignatureChecker);
}
Expand Down Expand Up @@ -160,12 +160,11 @@ contract YieldDistributor is IYieldDistributor, Ownable2StepUpgradeable, VotingM
* @param _account Address of user to return the voting power for
* @return uint256 Voting power of the specified user at the specified period of time
*/
function getVotingPowerForPeriod(
IERC20Votes _sourceContract,
uint256 _start,
uint256 _end,
address _account
) public view returns (uint256) {
function getVotingPowerForPeriod(IERC20Votes _sourceContract, uint256 _start, uint256 _end, address _account)
public
view
returns (uint256)
{
if (_start >= _end) revert StartMustBeBeforeEnd();
if (_end > block.number) revert EndAfterCurrentBlock();

Expand Down
Loading