-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c6c8c0
commit fffe13b
Showing
2 changed files
with
287 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.22; | ||
|
||
import {IMultiplier} from "src/interfaces/IVotingMultipliers.sol"; | ||
|
||
/// @title MockMultiplier | ||
/// @notice A mock contract implementing the IMultiplier interface for testing purposes | ||
contract MockMultiplier is IMultiplier { | ||
uint256 private _multiplyingFactor; | ||
uint256 private _validUntil; | ||
|
||
/// @notice Sets the multiplying factor and valid until block for testing | ||
/// @param factor The multiplying factor to set | ||
/// @param validUntilBlock The block number until which the multiplier is valid | ||
function setMultiplier(uint256 factor, uint256 validUntilBlock) external { | ||
_multiplyingFactor = factor; | ||
_validUntil = validUntilBlock; | ||
} | ||
|
||
/// @notice Returns the multiplying factor for a given user | ||
/// @return The multiplying factor | ||
function getMultiplyingFactor(address /* user */ ) external view returns (uint256) { | ||
return _multiplyingFactor; | ||
} | ||
|
||
/// @notice Returns the block number until which the multiplier is valid for a given user | ||
/// @return The block number until which the multiplier is valid | ||
function validUntil(address /* user */ ) external view returns (uint256) { | ||
return _validUntil; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters