contract MenloTokenReceiver {

    /*
     * @dev Address of the MenloToken contract
     */
    MenloToken token;

    constructor(MenloToken _tokenContract) public {
        token = _tokenContract;
    }

    /**
     * @dev Magic value to be returned upon successful reception of Menlo Tokens
     */
    bytes4 internal constant ONE_RECEIVED = 0x150b7a03;

    /**
     * @dev Throws if called by any account other than the Menlo Token contract.
     */
    modifier onlyTokenContract() {
        require(msg.sender == address(token));
        _;
    }

    /**
     * @notice Handle the receipt of Menlo Tokens
     * @dev The MenloToken contract calls this function on the recipient
     * after a `transferAndCall`. This function MAY throw to revert and reject the
     * transfer. Return of other than the magic value MUST result in the
     * transaction being reverted.
     * Warning: this function must call the onlyTokenContract modifier to trust
     * the transfer took place
     * @param _from The address which previously owned the token
     * @param _value Number of tokens that were transfered
     * @param _action Used to define enumeration of possible functions to call
     * @param _data Additional data with no specified format
     * @return `bytes4(0x150b7a03)`
     */
    function onTokenReceived(
        address _from,
        uint256 _value,
        uint256 _action,
        bytes _data
    ) public /* onlyTokenContract */ returns(bytes4);
}
function onTokenReceived(
    address _from,
    uint256 _value,
    uint256 _action,
    bytes _data
) public /* onlyTokenContract */ returns(bytes4);

/**
 * @notice Handle the receipt of Menlo Tokens
 * @dev The MenloToken contract calls this function on the recipient
 * after a `transferAndCall`. This function MAY throw to revert and reject the
 * transfer. Return of other than the magic value MUST result in the
 * transaction being reverted.
 * Warning: this function must call the onlyTokenContract modifier to trust
 * the transfer took place
 * @param _from The address which previously owned the token
 * @param _value Number of tokens that were transfered
 * @param _action Used to define enumeration of possible functions to call
 * @param _data Additional data with no specified format
 * @return `bytes4(0x150b7a03)`
 */