From 75cb0cd738f49e73dd5ac386e67c326fa58a734e Mon Sep 17 00:00:00 2001 From: olderdev1003 Date: Thu, 7 Jun 2018 22:42:19 +0800 Subject: [PATCH] make transfer func compatible to eip20 standard As discussed in https://github.com/ethereum/solidity/issues/4116 Due to solidity compiler change after v0.4.22, this wrong transfer function will cause serious issues. We (SECBIT.IO) found many people followed this tutorial on ethereum.org. SHOULD fix this ASAP! --- solidity/token-advanced.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solidity/token-advanced.sol b/solidity/token-advanced.sol index 080f322..036bb75 100644 --- a/solidity/token-advanced.sol +++ b/solidity/token-advanced.sol @@ -82,8 +82,9 @@ contract TokenERC20 { * @param _to The address of the recipient * @param _value the amount to send */ - function transfer(address _to, uint256 _value) public { + function transfer(address _to, uint256 _value) public returns (bool success) { _transfer(msg.sender, _to, _value); + return true; } /**