This contract is creating and managing of the EcoPot project and exercising voting rights for the EcoPot project. KSP staking users vote for the EcoPot project they want and receive tokens according to their stake.
Event Read-Only Functions State-Changing Functions
CreateEcoPot
Copy event CreateEcoPot ( address operator, address ecoPot, address token, string name);
Event log of EcoPot created
Parameters
operator
: EcoPotOperator address
token
: Token address received by user
name
: EcoPot Project name
RemoveEcoPot
Copy event RemoveEcoPot ( address ecoPot);
Event that occurs when EcoPot is removed
ChangeEcoPotAvailable
Copy event ChangeEcoPotAvailable ( address ecoPot, bool b);
Event that occurs when the status is changed
AddVoting
Copy event AddVoting ( address user, address ecopot, uint amount);
Event log of voting vKSP for EcoPot
Parameters
amount : Vote vKSP amount
RemoveVoting
Copy event RemoveVoting ( address user, address ecopot, uint amount);
Event log of remove voting vKSP for EcoPot
Parameters
amount : Unote vKSP amount
Read-Only Functions
ecoPotCount
MAX_VOTING _ POT_COUNT
Maximum number of EcoPots where users can vote
ecoPotList
ecoPotExist
Return if the address is EcoPot address
potTotalVotedAmount
Total voted number of EcoPot
userVotingPotCount
Number of votes each user voted for EcoPot
userVotingPotAddress
Copy function userVotingPotAddress ( address user , uint256 ecoPotIndex) public view returns ( address )
EcoPot addresses voted by each user
userVotingPotAmount
Copy function userVotingPotAmount ( address user , uint256 ecoPotIndex) public view returns ( uint256 )
EcoPot voted amount by each user
State-Changing Functions
addVoting
Copy function addVoting ( address ecoPot , uint amount) public
Method to voting vKSP for EcoPot
The amount can be entered in integer units
removeVoting
Copy function removeVoting ( address ecoPot , uint amount) public
Method to remove voting vKSP for Ecopot
The amount can be entered in integer units within the voting limit
removeAllVoting
Copy function removeAllVoting () public
Method of remove total vote Ecopot
claimReward
Copy function claimReward ( address ecopot) public
Method of vote Ecopot’s reward
claimRewardAll
Copy function claimRewardAll () public
Method of all vote Ecopot’s reward