EcoPotVoting
이 컨트랙트는 EcoPot 프로젝트 생성 및 상태 관리, EcoPot 프로젝트 투표권 행사를 주관하는 컨트랙트입니다. KSP 스테이킹 유저는 원하는 EcoPot 프로젝트에 투표하여 지분율에 따라 Token을 분배받게 됩니다.
Address
CreateEcoPot
event CreateEcoPot(address operator, address ecoPot, address token, string name);EcoPot 생성시 발생하는 이벤트
Parameters
operator: EcoPotOperator 주소ecoPot: 생성된 EcoPot 주소token: 분배될 token 주소name: EcoPot Project 이름
RemoveEcoPot
event RemoveEcoPot(address ecoPot);EcoPot 종료시 발생되는 이벤트
ChangeEcoPotAvailable
event ChangeEcoPotAvailable(address ecoPot, bool b);EcoPot 상태 변경시 발생되는 이벤트
AddVoting
event AddVoting(address user, address ecopot, uint amount);EcoPot 투표시 발생되는 이벤트
Parameters
user: 투표자 주소ecopot: EcoPot 주소amount: 투표 량
RemoveVoting
event RemoveVoting(address user, address ecopot, uint amount);EcoPot 투표 철회시 발생되는 이벤트
Parameters
user: 투표자 주소ecopot: EcoPot 주소amount: 철회 수량
Read-Only Functions
ecoPotCount
생성된 EcoPot 개수
MAX_VOTING_POT_COUNT
최대 투표 가능 EcoPot 개수
ecoPotList
mapping(uint => address)
EcoPot 주소
ecoPotExist
mapping(address => bool)
EcoPot 유무
potTotalVotedAmount
EcoPot 총 투표 수
userVotingPotCount
mapping(address => uint)
유저 투표 EcoPot 개수
userVotingPotAddress
function userVotingPotAddress(address user, uint256 ecoPotIndex) public view returns (address) 유저 투표 EcoPot 주소
userVotingPotAmount
function userVotingPotAmount(address user, uint256 ecoPotIndex) public view returns (uint256) 유저 EcoPot 투표 수
State-Changing Functions
addVoting
function addVoting(address ecoPot, uint amount) publicEcoPot 투표 함수
vKSP 정수 단위 허용
removeVoting
function removeVoting(address ecoPot, uint amount) publicEcopot 투표 철회 함수
Ecopot 투표 수량 범위 내의 vKSP 정수 단위 허용
removeAllVoting
function removeAllVoting() publicEcopot 투표 풀 전체에 대한 철회 함수
claimReward
function claimReward(address ecopot) public Ecopot 투표 풀의 보상 청구 함수
claimRewardAll
function claimRewardAll() publicEcopot 투표 풀 전체에 대한 보상 청구 함수
Last updated