Skip to content

Commit

Permalink
ERC-667 fix because web3.py cannot yet correctly discriminate events …
Browse files Browse the repository at this point in the history
…with same name
  • Loading branch information
miohtama committed Dec 27, 2018
1 parent 4b88092 commit ed06d4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion contracts/security-token/ERC677.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ interface ERC677Receiver {
}

interface ERC677 {
event Transfer(address from, address receiver, uint256 amount, bytes data);

// TODO: Have a different event name to make sure that tools with bad APIs do not mix this with ERC-20 Transfer() event that lacks data parameter
event ERC677Transfer(address from, address receiver, uint256 amount, bytes data);

function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success);
}
2 changes: 1 addition & 1 deletion contracts/security-token/ERC677Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ contract ERC677Token is ERC20, ERC677 {
function transferAndCall(ERC677Receiver receiver, uint amount, bytes data) returns (bool success) {
require(transfer(address(receiver), amount));

Transfer(msg.sender, address(receiver), amount, data);
ERC677Transfer(msg.sender, address(receiver), amount, data);

require(receiver.tokenFallback(msg.sender, amount, data));
}
Expand Down

0 comments on commit ed06d4a

Please sign in to comment.