pragma solidity ^0.4.20; contract ArichToken { address owner; // Mapping Wallet for all accounts mapping (address => uint256) public balanceOf; // Array of created Accounts address[] public created_accounts; // This generates a public event on the blockchain that will notify clients /* Mapping for ALL balances */ function ArichToken(uint256 initialSupply) public { owner = msg.sender; /* Give to the owner all tokens */ balanceOf[owner] = initialSupply; } /* Transfer tokens from one account to another */ function transfer(address _to, uint256 _value) public returns(bool success) { bool retval; if (balanceOf[msg.sender] > _value) { balanceOf[_to] += _value; balanceOf[msg.sender] -= _value; retval = true; } return retval; } /* Add more tokens */ function addTokens(uint256 _value) public returns(bool success) { require(msg.sender == owner); require(_value < 100); // Not more than 100 Tokens balanceOf[owner] += _value; return true; } /* Remove more tokens */ function removeTokens(uint256 _value) public returns(bool success) { require(msg.sender == owner); require(balanceOf[owner] - _value > 0); require(_value < 100); // Not more than 100 Tokens balanceOf[owner] -= _value; return true; } /* Kill Smart Contract */ function kill() { if (msg.sender == owner) selfdestruct(owner); } }
0.4.25