Commit 7bd95b1e by AugustoL

Overload ERC20 funcitons with new _data argument

parent 4ecdf312
...@@ -13,7 +13,7 @@ import "./StandardToken.sol"; ...@@ -13,7 +13,7 @@ import "./StandardToken.sol";
contract ERC827 is StandardToken { contract ERC827 is StandardToken {
/** /**
@dev `approveData` is an addition to ERC20 token methods. It allows to @dev Addition to ERC20 token methods. It allows to
approve the transfer of value and execute a call with the sent data. approve the transfer of value and execute a call with the sent data.
Beware that changing an allowance with this method brings the risk that Beware that changing an allowance with this method brings the risk that
...@@ -29,7 +29,7 @@ contract ERC827 is StandardToken { ...@@ -29,7 +29,7 @@ contract ERC827 is StandardToken {
@return true if the call function was executed successfully @return true if the call function was executed successfully
*/ */
function approveData(address _spender, uint256 _value, bytes _data) public returns (bool) { function approve(address _spender, uint256 _value, bytes _data) public returns (bool) {
require(_spender != address(this)); require(_spender != address(this));
super.approve(_spender, _value); super.approve(_spender, _value);
...@@ -49,7 +49,7 @@ contract ERC827 is StandardToken { ...@@ -49,7 +49,7 @@ contract ERC827 is StandardToken {
@return true if the call function was executed successfully @return true if the call function was executed successfully
*/ */
function transferData(address _to, uint256 _value, bytes _data) public returns (bool) { function transfer(address _to, uint256 _value, bytes _data) public returns (bool) {
require(_to != address(this)); require(_to != address(this));
super.transfer(_to, _value); super.transfer(_to, _value);
...@@ -69,7 +69,7 @@ contract ERC827 is StandardToken { ...@@ -69,7 +69,7 @@ contract ERC827 is StandardToken {
@return true if the call function was executed successfully @return true if the call function was executed successfully
*/ */
function transferDataFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool) { function transferFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool) {
require(_to != address(this)); require(_to != address(this));
super.transferFrom(_from, _to, _value); super.transferFrom(_from, _to, _value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment