diff --git a/contracts/OysterPearl.sol b/contracts/OysterPearl.sol index c714f3e..7ef1bd4 100644 --- a/contracts/OysterPearl.sol +++ b/contracts/OysterPearl.sol @@ -39,6 +39,9 @@ contract OysterPearl { // This notifies clients about a claim being made on a buried address event Claim(address indexed _target, address indexed _payout, address indexed _fee); + // This notifies clients on a change of directorship + event TransferDirector(address indexed _newDirector); + /** * Constructor function * @@ -47,7 +50,7 @@ contract OysterPearl { function OysterPearl() public payable { director = msg.sender; name = "Oyster Pearl"; - symbol = "PRL"; + symbol = "PRL2"; decimals = 18; saleClosed = true; directorLock = false; @@ -136,6 +139,11 @@ contract OysterPearl { */ function amendClaim(uint8 claimAmountSet, uint8 payAmountSet, uint8 feeAmountSet, uint8 accuracy) public onlyDirector returns (bool success) { require(claimAmountSet == (payAmountSet + feeAmountSet)); + require(payAmountSet < claimAmountSet); + require(feeAmountSet < claimAmountSet); + require(claimAmountSet > 0); + require(payAmountSet > 0); + require(feeAmountSet > 0); claimAmount = claimAmountSet * 10 ** (uint256(decimals) - accuracy); payAmount = payAmountSet * 10 ** (uint256(decimals) - accuracy); @@ -161,30 +169,6 @@ contract OysterPearl { return true; } - /** - * Director can close the crowdsale - */ - function closeSale() public onlyDirector returns (bool success) { - // The sale must be currently open - require(!saleClosed); - - // Lock the crowdsale - saleClosed = true; - return true; - } - - /** - * Director can open the crowdsale - */ - function openSale() public onlyDirector returns (bool success) { - // The sale must be currently closed - require(saleClosed); - - // Unlock the crowdsale - saleClosed = false; - return true; - } - /** * Oyster Protocol Function * More information at https://oyster.ws/OysterWhitepaper.pdf @@ -273,29 +257,7 @@ contract OysterPearl { * Crowdsale function */ function () public payable { - // Check if crowdsale is still active - require(!saleClosed); - - // Minimum amount is 1 finney - require(msg.value >= 1 finney); - - // Price is 1 ETH = 5000 PRL - uint256 amount = msg.value * 5000; - - // totalSupply limit is 500 million PRL - require(totalSupply + amount <= (500000000 * 10 ** uint256(decimals))); - - // Increases the total supply - totalSupply += amount; - - // Adds the amount to the balance - balances[msg.sender] += amount; - - // Track ETH amount raised - funds += msg.value; - - // Execute an event reflecting the change - Transfer(this, msg.sender, amount); + return false; } /** @@ -448,4 +410,4 @@ contract OysterPearl { Burn(_from, _value); return true; } -} \ No newline at end of file +}