visual-identity/contracts/token/TokenController.sol

34 lines
1.3 KiB
Solidity
Raw Normal View History

2017-11-28 03:33:25 +00:00
pragma solidity ^0.4.14;
2018-05-08 03:51:07 +00:00
/**
* @dev The token controller contract must implement these functions
*/
2018-01-24 02:09:50 +00:00
contract TokenController {
2018-05-08 03:51:07 +00:00
/**
* @notice Called when `_owner` sends ether to the MiniMe Token contract
* @param _owner The address that sent the ether to create tokens
* @return True if the ether is accepted, false if it throws
*/
2018-01-24 02:09:50 +00:00
function proxyPayment(address _owner) payable returns(bool);
2018-05-08 03:51:07 +00:00
/**
* @notice Notifies the controller about a token transfer allowing the
* controller to react if desired
* @param _from The origin of the transfer
* @param _to The destination of the transfer
* @param _amount The amount of the transfer
* @return False if the controller does not authorize the transfer
*/
2018-01-24 02:09:50 +00:00
function onTransfer(address _from, address _to, uint _amount) returns(bool);
2018-05-08 03:51:07 +00:00
/**
* @notice Notifies the controller about an approval allowing the
* controller to react if desired
* @param _owner The address that calls `approve()`
* @param _spender The spender in the `approve()` call
* @param _amount The amount in the `approve()` call
* @return False if the controller does not authorize the approval
*/
2018-01-24 02:09:50 +00:00
function onApprove(address _owner, address _spender, uint _amount)
returns(bool);
}