ERC827Token
Reference
Functions
approve
function approve(address _spender, uint256 _value, bytes _data) public returns (bool)
Addition to ERC20 token methods. It allows to 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 someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729.
- Parameters:
_spender
- The address that will spend the funds._value
- The amount of tokens to be spent._data
- ABI-encoded contract call to call `_to` address.- Returns:
- true if the call function was executed successfully
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue, bytes _data) public returns (bool)
Addition to StandardToken methods. Decrease the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * approve should be called when allowed[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol.
- Parameters:
_spender
- The address which will spend the funds._subtractedValue
- The amount of tokens to decrease the allowance by._data
- ABI-encoded contract call to call `_spender` address.- Returns:
- bool
increaseApproval
function increaseApproval(address _spender, uint _addedValue, bytes _data) public returns (bool)
Addition to StandardToken methods. Increase the amount of tokens that an owner allowed to a spender and execute a call with the sent data. * approve should be called when allowed[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol.
- Parameters:
_spender
- The address which will spend the funds._addedValue
- The amount of tokens to increase the allowance by._data
- ABI-encoded contract call to call `_spender` address.- Returns:
- bool
transfer
function transfer(address _to, uint256 _value, bytes _data) public returns (bool)
Addition to ERC20 token methods. Transfer tokens to a specified address and execute a call with the sent data on the same transaction.
- Parameters:
_to
- address The address which you want to transfer to_value
- uint256 the amout of tokens to be transfered_data
- ABI-encoded contract call to call `_to` address.- Returns:
- true if the call function was executed successfully
transferFrom
function transferFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool)
Addition to ERC20 token methods. Transfer tokens from one address to another and make a contract call on the same transaction.
- Parameters:
_from
- The address which you want to send tokens from_to
- The address which you want to transfer to_value
- The amout of tokens to be transferred_data
- ABI-encoded contract call to call `_to` address.- Returns:
- true if the call function was executed successfully