2017-12-25 31 views
-1

모든 토큰이 crowdsale에서 판매되지 않은 경우, 돈을 기부 한 사람에게 돌려주는 계약서를 작성하려고합니다. 내 코드는 다음과 같습니다.스마트 계약서에 환불 기능 생성

contract refundcrowdsale is basicCrowdsale { 
    uint256 private _startTime; 
    uint256 private _endTime; 
    address private _wallet; 
    address private _owner; 
    uint256 private _weiRaised; 
    uint256 private _tokensIssued; 
    token private _token; 
    bool private isFinalized = false; 


    function basicCrowdsale(uint256 startTime, uint256 endTime,string symbol, 
string name, uint8 decimals, uint256 totalSupply) public 
    { 
if (startTime < now) { 
    revert(); 
} else if (endTime < now || endTime < startTime) { 
    revert(); 
} else { 
    _startTime = startTime; 
    _endTime = endTime; 
    _owner = msg.sender; 
} 

    function refundallert(unint startTime, uint256 endTime, uint256 totalSupply) 
public return (bool){ 
    if (endTime == now && totalSupply != 0){ 
    function 
    } 
} 

}` 

답변