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