pragma solidity ^0.4.24; import "./ERC223PausableToken.sol"; import "tokenboost-solidity/contracts/token/Token.sol"; import "zeppelin-solidity/contracts/token/ERC20/BurnableToken.sol"; import "zeppelin-solidity/contracts/token/ERC20/RBACMintableToken.sol"; contract ERC223Token is Token, ERC223PausableToken, BurnableToken, RBACMintableToken { /** * @notice this.owner.selector ^ this.renounceOwnership.selector ^ this.transferOwnership.selector ^ this.template.selector ^ this.activate.selector ^ this.name.selector ^ this.symbol.selector ^ this.totalSupply.selector ^ this.balanceOf.selector ^ bytes4(keccak256("transfer(address,uint256)")) ^ this.allowance.selector ^ this.transferFrom.selector ^ this.approve.selector ^ this.increaseApproval.selector ^ this.decreaseApproval.selector ^ this.mintingFinished.selector ^ this.finishMinting.selector ^ this.checkRole.selector ^ this.hasRole.selector ^ this.ROLE_MINTER.selector ^ this.addMinter.selector ^ this.removeMinter.selector ^ this.burn.selector ^ this.paused.selector ^ this.pause.selector ^ this.unpause.selector ^ this.decimals.selector ^ this.initialSupply.selector ^ this.mintable.selector ^ this.maxMintable.selector ^ this.burnable.selector ^ this.pausable.selector ^ this.update.selector ^ this.setMaxMintable.selector ^ bytes4(keccak256("transfer(address,uint256,bytes)")) ^ bytes4(keccak256("transfer(address,uint256,bytes,string)")) */ bytes4 public constant InterfaceId_ERC223Token = 0xd0c381c9; uint8 public decimals = 18; uint256 public initialSupply; bool public mintable; uint256 public maxMintable; bool public burnable; bool public pausable; modifier whenBurnable() { require(burnable); _; } modifier whenMintable() { require(mintable); _; } modifier whenPausable() { require(pausable); _; } constructor( address _owner, string _name, string _symbol ) public Token(_owner, _name, _symbol){ _registerInterface(InterfaceId_ERC223Token); } function update( string _name, string _symbol, uint8 _decimals, uint256 _initialSupply, bool _mintable, bool _burnable, bool _pausable) public onlyOwner whenNotActivated { name = _name; symbol = _symbol; decimals = _decimals; initialSupply = _initialSupply; mintable = _mintable; burnable = _burnable; pausable = _pausable; } function setMaxMintable(uint _maxMintable) onlyOwner whenNotActivated public { maxMintable = _maxMintable; } function activate() whenNotActivated public returns (bool) { totalSupply_ = initialSupply; balances[owner] = totalSupply_; return super.activate(); } function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public whenActivated returns (bool success) { return super.transfer(_to, _value, _data, _custom_fallback); } function transfer(address _to, uint _value, bytes _data) public whenActivated returns (bool success) { return super.transfer(_to, _value, _data); } function transfer(address _to, uint _value) whenActivated public returns (bool success) { return super.transfer(_to, _value); } function transferFrom( address _from, address _to, uint256 _value ) whenActivated public returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address spender, uint256 value) whenActivated public returns (bool) { return super.approve(spender, value); } function mint(address _to, uint256 _amount) whenMintable whenActivated public returns (bool) { if (maxMintable > 0) { require(totalSupply_.add(_amount) <= maxMintable); } return super.mint(_to, _amount); } function burn(uint256 _value) whenBurnable whenActivated public { super.burn(_value); } function pause() whenPausable whenActivated public { super.pause(); } }