BiasCalculator
Storage
GAUGE_CONTROLLER
Address of the Curve Gauge Controller
questBoard
Address of the QuestBoard contract
Events
AddToVoterList
Event emitted when an address is added to a Quest voter list
RemoveFromVoterList
Event emitted when an address is removed from a Quest voter list
Modifiers
onlyBoard
Check the caller is the QuestBoard contract
Constructor
View Methods
getCurrentPeriod
Returns the current Period for the contract
getQuestVoterList
Returns the voter list for a given Quest
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
Return Values
Name | Type | Description |
---|---|---|
[0] | address[] | address[] : vote list |
getCurrentReducedBias
Returns the current reduced bias for a given gauge (based on a Quest's voter list)
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
gauge | address | address of the gauge |
questType | enum QuestDataTypes.QuestVoteType | Vote type of the Quest |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | uint256 : current reduced bias |
getReducedBias
Returns the reduced bias for a given gauge for a given period (based on a Quest's voter list)
Parameters
Name | Type | Description |
---|---|---|
period | uint256 | timestamp of the period |
questID | uint256 | ID of the Quest |
gauge | address | address of the gauge |
questType | enum QuestDataTypes.QuestVoteType | Vote type of the Quest |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | uint256 : current reduced bias |
_getVoterBias
Returns the bias for a given voter for a given gauge, at a given period
Parameters
Name | Type | Description |
---|---|---|
gauge | address | address of the gauge |
voter | address | address of the voter |
period | uint256 | timestamp of the period |
Return Values
Name | Type | Description |
---|---|---|
userBias | uint256 | (uint256) : voter bias |
State-changing Methods
_addToVoterList
Adds a given address to a Quest's voter list
Adds a given address to a Quest's voter list
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
account | address | address of the voter |
setQuestVoterList
Sets the initial voter list for a given Quest
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
accounts | address[] | list of voters |
addToVoterList
Adds a given list of addresses to a Quest's voter list
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
accounts | address[] | list of voters |
removeFromVoterList
Removes a given address from a Quest's voter list
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
account | address | address of the voter |
Last updated