contract MiniMeTokenController is ITokenController {
    address public owner;
    address public miniMeToken;

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev Constructor
     * @param _miniMeToken MiniMeToken address that this contract will control
     */
    function MiniMeTokenController(address _miniMeToken) public {
        owner = msg.sender;
        miniMeToken = _miniMeToken;
    }

    /**
     * @notice Changes this contract's owner
     * @param _newOwner Address of the new owner
     */
    function changeOwner(address _newOwner) public onlyOwner {
        owner = _newOwner;
    }

    /** ITokenController methods */

    /**
     * Modified from Aragon TokenManager https://github.com/aragon/aragon-apps/blob/master/apps/token-manager/contracts/TokenManager.sol
     * @dev Called when ether is sent to the MiniMeToken contract
     * @return True if the ether is accepted, false for it to throw
     */
    function proxyPayment(address) public payable returns (bool) {
        // Sender check is required to avoid anyone sending ETH to the Token Manager through this method
        // Even though it is tested, solidity-coverage doesnt get it because
        // MiniMeToken is not instrumented and entire tx is reverted
        require(msg.sender == address(miniMeToken), 'Wrong sender');
        return false;
    }

    /**
     * Modified from Aragon TokenManager https://github.com/aragon/aragon-apps/blob/master/apps/token-manager/contracts/TokenManager.sol
     * @dev Notifies this contract about a transfer on miniMeToken allowing
     * this contrfact to react if desired
     * @return False if the transfer is not authorized
     */
    function onTransfer(address, address, uint) public returns (bool) {
        return true;
    }

    /**
     * Modified from Aragon TokenManager https://github.com/aragon/aragon-apps/blob/master/apps/token-manager/contracts/TokenManager.sol
     * @dev Notifies this contract about an approval on miniMeToken allowing
     * this contract to react if desired
     * @return False if the approval is not authorized
     */
    function onApprove(address, address, uint) public returns (bool) {
        return true;
    }

    /** MiniMeToken methods */

    // Include any methods on MiniMeToken that you need implemented which
    // are covered by the `onlyController` modifier. Excluding any of those
    // methods will break their functionality.

    /**
     * @notice Changes the controller of miniMeToken
     * @dev These methods will fail if this contract is not set as the
     * controller of the assigned `miniMeToken`.
     * @param _newController The new controller of the contract
     */
    function changeController(address _newController) onlyOwner  public {
        MiniMeToken(miniMeToken).changeController(_newController);
    }
}
/**
 * @title MiniMeToken Controller
 * Implements ITokenController interface to allow contracts (e.g. a multisig)
 * to be the controller of a MiniMeToken.
 *
 * @author Val Mack - <val@quantfive.org>
 * @notice Control of the MiniMeToken contract is delegated to this contract by
 * this contract's owner. I.e. In order to execute any method on the token
 * contract that is marked `onlyController`, the owner of this contract calls
 * the method (with matching function signature) on this contract, and this
 * contract calls the method on the MiniMeToken, where it is then executed.
 */
function changeController(address _newController) onlyOwner  public {
        MiniMeToken(miniMeToken).changeController(_newController);
    }
/**
 * @notice Changes the controller of miniMeToken
 * @dev These methods will fail if this contract is not set as the
 * controller of the assigned `miniMeToken`.
 * @param _newController The new controller of the contract
 */