interface GatewayInterface {

    /* External functions */

    /**
     * @notice Returns bounty amount.
     *
     * @return Amount of ERC20 which needs to be staked by facilitator.
     */
    function bounty()
        external
        returns (uint256);

    /**
     * @notice Initiates the stake process.  In order to stake the staker
     *         needs to approve Gateway contract for stake amount.
     *         Staked amount is transferred from staker address to
     *         Gateway contract. Bounty amount is also transferred from staker.
     *
     * @param _amount Stake amount that will be transferred from the staker
     *                account.
     * @param _beneficiary The address in the auxiliary chain where the utility
     *                     tokens will be minted.
     * @param _gasPrice Gas price that staker is ready to pay to get the stake
     *                  and mint process done.
     * @param _gasLimit Gas limit that staker is ready to pay.
     * @param _nonce Nonce of the staker address.
     * @param _hashLock Hash Lock provided by the facilitator.
     *
     * @return messageHash_ Message hash is unique for each request.
     */
    function stake(
        uint256 _amount,
        address _beneficiary,
        uint256 _gasPrice,
        uint256 _gasLimit,
        uint256 _nonce,
        bytes32 _hashLock
    )
        external
        returns (bytes32 messageHash_);

    /**
     * @notice Revert stake process and get the stake
     *         amount back. Only staker can revert stake by providing
     *         penalty i.e. 1.5 times of bounty amount. On progress revert stake
     *         penalty and facilitator bounty will be burned.
     *
     * @dev To revert the the sender must sign the sha3(messageHash, nonce+1)
     *
     * @param _messageHash Message hash.
     *
     * @return staker_ Staker address
     * @return stakerNonce_ Staker nonce
     * @return amount_ Stake amount
     */
    function revertStake(
        bytes32 _messageHash
    )
        external
        returns
    (
        address staker_,
        uint256 stakerNonce_,
        uint256 amount_
    );
}
/**
 * @title GatewayInterface Contract
 *
 * @notice Provides interface for gateway contract.
 */
function stake(
    uint256 _amount,
    address _beneficiary,
    uint256 _gasPrice,
    uint256 _gasLimit,
    uint256 _nonce,
    bytes32 _hashLock
)
    external
    returns (bytes32 messageHash_);

/**
 * @notice Initiates the stake process.  In order to stake the staker
 *         needs to approve Gateway contract for stake amount.
 *         Staked amount is transferred from staker address to
 *         Gateway contract. Bounty amount is also transferred from staker.
 *
 * @param _amount Stake amount that will be transferred from the staker
 *                account.
 * @param _beneficiary The address in the auxiliary chain where the utility
 *                     tokens will be minted.
 * @param _gasPrice Gas price that staker is ready to pay to get the stake
 *                  and mint process done.
 * @param _gasLimit Gas limit that staker is ready to pay.
 * @param _nonce Nonce of the staker address.
 * @param _hashLock Hash Lock provided by the facilitator.
 *
 * @return messageHash_ Message hash is unique for each request.
 */