Comment on page
BiasCalculator
address GAUGE_CONTROLLER
Address of the Curve Gauge Controller
address questBoard
Address of the QuestBoard contract
event AddToVoterList(uint256 questID, address account)
Event emitted when an address is added to a Quest voter list
event RemoveFromVoterList(uint256 questID, address account)
Event emitted when an address is removed from a Quest voter list
modifier onlyBoard()
Check the caller is the QuestBoard contract
constructor(address _gaugeController, address _questBoard) public
function getCurrentPeriod() public view returns (uint256)
Returns the current Period for the contract
function getQuestVoterList(uint256 questID) external view returns (address[])
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 |
function getCurrentReducedBias(uint256 questID, address gauge, enum QuestDataTypes.QuestVoteType questType) external view returns (uint256)
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 |
function getReducedBias(uint256 period, uint256 questID, address gauge, enum QuestDataTypes.QuestVoteType questType) public view returns (uint256)
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 |
function _getVoterBias(address gauge, address voter, uint256 period) internal view returns (uint256 userBias)
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 |
function _addToVoterList(uint256 questID, address account) internal
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 |
function setQuestVoterList(uint256 questID, address[] accounts) external
Sets the initial voter list for a given Quest
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
accounts | address[] | list of voters |
function addToVoterList(uint256 questID, address[] accounts) external
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 |
function removeFromVoterList(uint256 questID, address account) external
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 modified 1mo ago