From 84649c4472903a707c41ac7dd944ed5828c916bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E6=B7=91=E4=BC=9F?= Date: Fri, 10 Aug 2018 00:04:46 +0800 Subject: [PATCH] repair bytes ABI error in calldata --- contracts/HumanStandardToken.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/HumanStandardToken.sol b/contracts/HumanStandardToken.sol index 63620e7..cd4012e 100644 --- a/contracts/HumanStandardToken.sol +++ b/contracts/HumanStandardToken.sol @@ -55,7 +55,7 @@ contract HumanStandardToken is StandardToken { //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this. //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. - if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)) { throw; } + if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), abi.encode(msg.sender, _value, this, _extraData))) { throw; } return true; } }