KLAYswap
Search…
EcoPotVoting
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.

Address

  • Cypress :
Event
Read-Only Functions
State-Changing Functions
CreateEcoPot
1
event CreateEcoPot(address operator, address ecoPot, address token, string name);
Copied!
  • Event log of EcoPot created
  • Parameters
    • operator : EcoPotOperator address
    • ecoPot : EcoPot address
    • token : Token address received by user
    • name : EcoPot Project name
RemoveEcoPot
1
event RemoveEcoPot(address ecoPot);
Copied!
  • Event that occurs when EcoPot is removed
ChangeEcoPotAvailable
1
event ChangeEcoPotAvailable(address ecoPot, bool b);
Copied!
  • Event that occurs when the status is changed
AddVoting
1
event AddVoting(address user, address ecopot, uint amount);
Copied!
  • Event log of voting vKSP for EcoPot
  • Parameters
    • user : User address
    • ecopot : EcoPot address
    • amount : Vote vKSP amount
RemoveVoting
1
event RemoveVoting(address user, address ecopot, uint amount);
Copied!
  • Event log of remove voting vKSP for EcoPot
  • Parameters
    • user : User address
    • ecopot : EcoPot address
    • amount : Unote vKSP 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
1
function userVotingPotAddress(address user, uint256 ecoPotIndex) public view returns (address)
Copied!
  • EcoPot addresses voted by each user
userVotingPotAmount
1
function userVotingPotAmount(address user, uint256 ecoPotIndex) public view returns (uint256)
Copied!
  • EcoPot voted amount by each user

State-Changing Functions

addVoting
1
function addVoting(address ecoPot, uint amount) public
Copied!
  • Method to voting vKSP for EcoPot
  • The amount can be entered in integer units
removeVoting
1
function removeVoting(address ecoPot, uint amount) public
Copied!
  • Method to remove voting vKSP for Ecopot
  • The amount can be entered in integer units within the voting limit
removeAllVoting
1
function removeAllVoting() public
Copied!
  • Method of remove total vote Ecopot
claimReward
1
function claimReward(address ecopot) public
Copied!
  • Method of vote Ecopot’s reward
claimRewardAll
1
function claimRewardAll() public
Copied!
  • Method of all vote Ecopot’s reward
Last modified 4mo ago
Copy link
Contents
Address