- ERC20 defines a transfer function to transfer tokens between accounts. Create the function to implement the feature:
function transfer() { }
- Modify the function to accept two parameters: to address the amount to transfer. It should return a result of type boolean to indicate success or failure:
function transfer(address _to, uint256 _value) public returns (bool) { }
- Use the msg.sender property to determine the from address. You don't have to explicitly pass the from address. The function considers the address of the transaction sender as the from account.
- For each transfer, deduct the amount from the sender account and add it to the target account. Make sure to use the SafeMath library to perform arithmetic operations ...