diff options
Diffstat (limited to 'test/compilationTests/zeppelin/token/LimitedTransferToken.sol')
-rw-r--r-- | test/compilationTests/zeppelin/token/LimitedTransferToken.sol | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol index ee5032c9..d668b86f 100644 --- a/test/compilationTests/zeppelin/token/LimitedTransferToken.sol +++ b/test/compilationTests/zeppelin/token/LimitedTransferToken.sol @@ -4,13 +4,13 @@ import "./ERC20.sol"; /** * @title LimitedTransferToken - * @dev LimitedTransferToken defines the generic interface and the implementation to limit token - * transferability for different events. It is intended to be used as a base class for other token - * contracts. + * @dev LimitedTransferToken defines the generic interface and the implementation to limit token + * transferability for different events. It is intended to be used as a base class for other token + * contracts. * LimitedTransferToken has been designed to allow for different limiting factors, - * this can be achieved by recursively calling super.transferableTokens() until the base class is + * this can be achieved by recursively calling super.transferableTokens() until the base class is * hit. For example: - * function transferableTokens(address holder, uint64 time) constant public returns (uint256) { + * function transferableTokens(address holder, uint64 time) view public returns (uint256) { * return min256(unlockedTokens, super.transferableTokens(holder, time)); * } * A working example is VestedToken.sol: @@ -23,35 +23,35 @@ contract LimitedTransferToken is ERC20 { * @dev Checks whether it can transfer or otherwise throws. */ modifier canTransfer(address _sender, uint256 _value) { - if (_value > transferableTokens(_sender, uint64(now))) throw; + if (_value > transferableTokens(_sender, uint64(now))) revert(); _; } /** * @dev Checks modifier and allows transfer if tokens are not locked. - * @param _to The address that will recieve the tokens. + * @param _to The address that will receive the tokens. * @param _value The amount of tokens to be transferred. */ - function transfer(address _to, uint256 _value) canTransfer(msg.sender, _value) { + function transfer(address _to, uint256 _value) canTransfer(msg.sender, _value) public { super.transfer(_to, _value); } /** * @dev Checks modifier and allows transfer if tokens are not locked. * @param _from The address that will send the tokens. - * @param _to The address that will recieve the tokens. + * @param _to The address that will receive the tokens. * @param _value The amount of tokens to be transferred. */ - function transferFrom(address _from, address _to, uint256 _value) canTransfer(_from, _value) { + function transferFrom(address _from, address _to, uint256 _value) public canTransfer(_from, _value) { super.transferFrom(_from, _to, _value); } /** * @dev Default transferable tokens function returns all tokens for a holder (no limit). - * @dev Overwriting transferableTokens(address holder, uint64 time) is the way to provide the + * @dev Overwriting transferableTokens(address holder, uint64 time) is the way to provide the * specific logic for limiting token transferability for a holder over time. */ - function transferableTokens(address holder, uint64 time) constant public returns (uint256) { + function transferableTokens(address holder, uint64 time) view public returns (uint256) { return balanceOf(holder); } } |