-
Notifications
You must be signed in to change notification settings - Fork 5
Implement VotingStreakMultiplier #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
526986a
9e57b1b
0ee81a2
7f56c11
e74b804
4250340
9042f17
bc484ca
7813141
9a2a440
68f1efc
32eab1c
cad7e3d
3a761f1
7fb1e7e
b1def3b
08f183d
6babba8
5217f57
1717f2e
48508e5
c6cd5a5
fe64fc6
5376053
3c86cca
8e70f68
f470adf
5d67dc3
097e147
b1e3882
fd16164
c63332b
a41ce0f
d95dbac
4961315
b6c6182
7e7d15b
f17990d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ cache | |
out | ||
broadcast | ||
.env | ||
.DS_Store |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {MultiplierConstants} from "src/libraries/MultiplierConstants.sol"; | ||
|
||
interface IMultiplier { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually might be a good idea to just add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i had this instinct as well, but found that solidity prevents variables from being set in interfaces. cursor suggested i create a library directory and define it, like MultiplierConstants, and import it from there. Do you think that's a good solution ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did this in a separate commit so its clearer f17990d - wdyt? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh weird I didnt know that. I do think this makes things a little easier to work with so that the value doesn't need to be explicitly defined each time |
||
/// @notice Returns the voting multiplier for `_user`. | ||
/// @notice Updates the multiplying factor for a specific user | ||
/// @param _user The address of the user to update the multiplying factor for | ||
function updateMultiplyingFactor(address _user) external; | ||
|
||
/// @notice Returns the multiplying factor for `_user`. | ||
function getMultiplyingFactor(address _user) external view returns (uint256); | ||
|
||
/// @notice Returns the validity period of the multiplier for `_user`. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.22; | ||
|
||
library MultiplierConstants { | ||
/// @notice The base multiplier value (100% in fixed-point representation) | ||
uint256 public constant BASE_MULTIPLIER = 1e18; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.