ETH Price: $3,683.53 (+0.76%)

Contract

0x93aad8d9941b0c034acA21f2A2C5317ec1397ee2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deploy Gelato LQ...201999912024-06-29 21:21:23157 days ago1719696083IN
0x93aad8d9...ec1397ee2
0 ETH0.00132381.6499863
Deploy Gelato LQ...163567052023-01-07 18:29:47696 days ago1673116187IN
0x93aad8d9...ec1397ee2
0 ETH0.0110924913.83021662
Deploy Gelato LQ...163551442023-01-07 13:16:35696 days ago1673097395IN
0x93aad8d9...ec1397ee2
0 ETH0.0105644213.48915732
Deploy Gelato LQ...160777722022-11-29 19:35:35735 days ago1669750535IN
0x93aad8d9...ec1397ee2
0 ETH0.0083115410.36290742
Deploy Gelato LQ...160777682022-11-29 19:34:47735 days ago1669750487IN
0x93aad8d9...ec1397ee2
0 ETH0.0088768411.06772421
Deploy Gelato LQ...160777652022-11-29 19:34:11735 days ago1669750451IN
0x93aad8d9...ec1397ee2
0 ETH0.0084357810.51781081
Deploy Gelato LQ...160777612022-11-29 19:33:23735 days ago1669750403IN
0x93aad8d9...ec1397ee2
0 ETH0.0083528310.41438803
Deploy Gelato LQ...160777532022-11-29 19:31:47735 days ago1669750307IN
0x93aad8d9...ec1397ee2
0 ETH0.0088228111.00035378
Deploy Gelato LQ...160777522022-11-29 19:31:35735 days ago1669750295IN
0x93aad8d9...ec1397ee2
0 ETH0.0087882610.95727959
Deploy Gelato LQ...160777492022-11-29 19:30:59735 days ago1669750259IN
0x93aad8d9...ec1397ee2
0 ETH0.0089652711.17797874
Deploy Gelato LQ...160777462022-11-29 19:30:23735 days ago1669750223IN
0x93aad8d9...ec1397ee2
0 ETH0.008881411.07340535
Deploy Gelato LQ...160777382022-11-29 19:28:47735 days ago1669750127IN
0x93aad8d9...ec1397ee2
0 ETH0.0088311211.01071263
Deploy Gelato LQ...160458262022-11-25 8:32:23739 days ago1669365143IN
0x93aad8d9...ec1397ee2
0 ETH0.0083673810.68387505
Deploy Gelato LQ...160329032022-11-23 13:10:23741 days ago1669209023IN
0x93aad8d9...ec1397ee2
0 ETH0.0100862612.87862607
Deploy Gelato LQ...160325412022-11-23 11:57:11741 days ago1669204631IN
0x93aad8d9...ec1397ee2
0 ETH0.0088115811.25105332
Deploy Gelato LQ...160324362022-11-23 11:36:11741 days ago1669203371IN
0x93aad8d9...ec1397ee2
0 ETH0.009320311.90060438
Deploy Gelato LQ...160311782022-11-23 7:22:59741 days ago1669188179IN
0x93aad8d9...ec1397ee2
0 ETH0.0099104112.65408164
Deploy Gelato LQ...160311322022-11-23 7:13:47741 days ago1669187627IN
0x93aad8d9...ec1397ee2
0 ETH0.0100621212.84779717
Deploy Gelato LQ...160284702022-11-22 22:18:11742 days ago1669155491IN
0x93aad8d9...ec1397ee2
0 ETH0.0100605212.54353929
Deploy Gelato LQ...160237102022-11-22 6:18:23742 days ago1669097903IN
0x93aad8d9...ec1397ee2
0 ETH0.0086698910.80969296
Deploy Gelato LQ...160229932022-11-22 3:54:11743 days ago1669089251IN
0x93aad8d9...ec1397ee2
0 ETH0.0087499610.90953344
Deploy Gelato LQ...159826752022-11-16 12:46:11748 days ago1668602771IN
0x93aad8d9...ec1397ee2
0 ETH0.0120307215
Deploy Gelato LQ...159767642022-11-15 16:55:23749 days ago1668531323IN
0x93aad8d9...ec1397ee2
0 ETH0.0140758817.5499295

Latest 23 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
201999912024-06-29 21:21:23157 days ago1719696083
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
163567052023-01-07 18:29:47696 days ago1673116187
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
163551442023-01-07 13:16:35696 days ago1673097395
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777722022-11-29 19:35:35735 days ago1669750535
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777682022-11-29 19:34:47735 days ago1669750487
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777652022-11-29 19:34:11735 days ago1669750451
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777612022-11-29 19:33:23735 days ago1669750403
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777532022-11-29 19:31:47735 days ago1669750307
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777522022-11-29 19:31:35735 days ago1669750295
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777492022-11-29 19:30:59735 days ago1669750259
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777462022-11-29 19:30:23735 days ago1669750223
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160777382022-11-29 19:28:47735 days ago1669750127
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160458262022-11-25 8:32:23739 days ago1669365143
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160329032022-11-23 13:10:23741 days ago1669209023
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160325412022-11-23 11:57:11741 days ago1669204631
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160324362022-11-23 11:36:11741 days ago1669203371
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160311782022-11-23 7:22:59741 days ago1669188179
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160311322022-11-23 7:13:47741 days ago1669187627
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160284702022-11-22 22:18:11742 days ago1669155491
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160237102022-11-22 6:18:23742 days ago1669097903
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
160229932022-11-22 3:54:11743 days ago1669089251
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
159826752022-11-16 12:46:11748 days ago1668602771
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
159767642022-11-15 16:55:23749 days ago1668531323
0x93aad8d9...ec1397ee2
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GelatoLQTYArbFactory

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 8 : GelatoLQTYArbFactory.sol
pragma solidity ^0.8.14;

import "./GelatoLQTYArb.sol";


contract GelatoLQTYArbFactory {
    address constant GELATO_OPS = 0xB3f5503f93d5Ef84b06993a1975B9D21B962892F;

    event NewGelatoLQTYArb(address arbContract, address taskCreator);

    function deployGelatoLQTYArb(address _taskCreator) external returns (GelatoLQTYArb) {
        GelatoLQTYArb arbContract = new GelatoLQTYArb(GELATO_OPS, _taskCreator);
        emit NewGelatoLQTYArb(address(arbContract), _taskCreator);
        return arbContract;
    }
}

File 2 of 8 : GelatoLQTYArb.sol
// based on https://etherscan.io/address/0xf9a0e641c98f964b1c732661fab9d5b96af28d49#code
pragma solidity ^0.8.14;

import "./Gelato/OpsReady.sol";
import "../Tools/Interfaces/IUniswapReserve.sol";


interface ERC20Like {
    function approve(address spender, uint value) external returns(bool);
    function transfer(address to, uint value) external returns(bool);
    function balanceOf(address a) external view returns(uint);
}

interface WethLike is ERC20Like {
    function deposit() external payable;
    function withdraw(uint wad) external;
}

interface ReserveLike {
    function trade(
        address srcToken,
        uint256 srcAmount,
        address destToken,
        address payable destAddress,
        uint256 conversionRate,
        bool validate
    ) external payable returns (bool);
}


contract GelatoLQTYArb is OpsReady {
    address constant LQTY = 0x6DEA81C8171D0bA574754EF6F8b412F2Ed88c54D;
    address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    IUniswapReserve constant LQTYETH = IUniswapReserve(0xD1D5A4c0eA98971894772Dcd6D2f1dc71083C44E);
    uint160 constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
    uint160 constant MIN_SQRT_RATIO = 4295128739;

    constructor(address _ops, address _taskCreator) OpsReady(_ops, _taskCreator) {}

    function swap(uint lqtyQty, address reserve, address lqtyDest, uint minLqtyProfit) external payable returns(uint) {
        bytes memory data = abi.encode(reserve);
        LQTYETH.swap(address(this), true, int256(lqtyQty), MIN_SQRT_RATIO + 1, data);

        uint retVal = ERC20Like(LQTY).balanceOf(address(this));
        require(retVal >= minLqtyProfit, "insufficient arb profit");
        ERC20Like(LQTY).transfer(lqtyDest, retVal);

        return retVal;
     }

    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external {
        require(msg.sender == address(LQTYETH), "uniswapV3SwapCallback: invalid sender");
        // swap ETH to LQTY
        uint ethAmount = uint(-1 * amount1Delta);
        WethLike(WETH).withdraw(ethAmount);
        uint totalEthBal = address(this).balance;

        // pay for gelato fees
        (uint256 fee, address feeToken) = _getFeeDetails();
        _transfer(fee, feeToken);
        require(totalEthBal > fee, "Fee > ETH received");

        uint remainingEth = totalEthBal - fee;

        ReserveLike reserve = abi.decode(data, (ReserveLike));
        reserve.trade{value: remainingEth}(
            0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE,
            remainingEth,
            LQTY,
            payable(this),
            1,
            false
        );

        if(amount0Delta > 0) {
            ERC20Like(LQTY).transfer(msg.sender, uint(amount0Delta));
        }
    }

    receive() external payable {}
}

File 3 of 8 : OpsReady.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.14;

import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import "./Types.sol";

/**
 * @dev Inherit this contract to allow your smart contract to
 * - Make synchronous fee payments.
 * - Have call restrictions for functions to be automated.
 */
// solhint-disable private-vars-leading-underscore
abstract contract OpsReady {
    IOps public immutable ops;
    address public immutable dedicatedMsgSender;
    address private immutable _gelato;
    address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    address private constant OPS_PROXY_FACTORY =
        0xC815dB16D4be6ddf2685C201937905aBf338F5D7;

    /**
     * @dev
     * Only tasks created by _taskCreator defined in constructor can call
     * the functions with this modifier.
     */
    modifier onlyDedicatedMsgSender() {
        require(msg.sender == dedicatedMsgSender, "Only dedicated msg.sender");
        _;
    }

    /**
     * @dev
     * _taskCreator is the address which will create tasks for this contract.
     */
    constructor(address _ops, address _taskCreator) {
        ops = IOps(_ops);
        _gelato = IOps(_ops).gelato();
        (dedicatedMsgSender, ) = IOpsProxyFactory(OPS_PROXY_FACTORY).getProxyOf(
            _taskCreator
        );
    }

    /**
     * @dev
     * Transfers fee to gelato for synchronous fee payments.
     *
     * _fee & _feeToken should be queried from IOps.getFeeDetails()
     */
    function _transfer(uint256 _fee, address _feeToken) internal {
        if (_feeToken == ETH) {
            (bool success, ) = _gelato.call{value: _fee}("");
            require(success, "_transfer: ETH transfer failed");
        } else {
            SafeERC20.safeTransfer(IERC20(_feeToken), _gelato, _fee);
        }
    }

    function _getFeeDetails()
        internal
        view
        returns (uint256 fee, address feeToken)
    {
        (fee, feeToken) = ops.getFeeDetails();
    }
}

File 4 of 8 : IUniswapReserve.sol
pragma solidity 0.8.14;


interface IUniswapReserve {
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);
}

File 5 of 8 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 8 : Types.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.12;

enum Module {
    RESOLVER,
    TIME,
    PROXY,
    SINGLE_EXEC
}

struct ModuleData {
    Module[] modules;
    bytes[] args;
}

interface IOps {
    function createTask(
        address execAddress,
        bytes calldata execDataOrSelector,
        ModuleData calldata moduleData,
        address feeToken
    ) external returns (bytes32 taskId);

    function cancelTask(bytes32 taskId) external;

    function getFeeDetails() external view returns (uint256, address);

    function gelato() external view returns (address payable);

    function taskTreasury() external view returns (ITaskTreasuryUpgradable);
}

interface ITaskTreasuryUpgradable {
    function depositFunds(
        address receiver,
        address token,
        uint256 amount
    ) external payable;

    function withdrawFunds(
        address payable receiver,
        address token,
        uint256 amount
    ) external;
}

interface IOpsProxyFactory {
    function getProxyOf(address account) external view returns (address, bool);
}

File 7 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: 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
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 8 of 8 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "remappings": [
    "b-protocol/=lib/b-protocol/",
    "datetime/=lib/datetime/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 500
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"arbContract","type":"address"},{"indexed":false,"internalType":"address","name":"taskCreator","type":"address"}],"name":"NewGelatoLQTYArb","type":"event"},{"inputs":[{"internalType":"address","name":"_taskCreator","type":"address"}],"name":"deployGelatoLQTYArb","outputs":[{"internalType":"contract GelatoLQTYArb","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611188806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e93f4ceb14610030575b600080fd5b61004361003e366004610111565b61005f565b6040516001600160a01b03909116815260200160405180910390f35b60008073b3f5503f93d5ef84b06993a1975b9d21b962892f8360405161008490610104565b6001600160a01b03928316815291166020820152604001604051809103906000f0801580156100b7573d6000803e3d6000fd5b50604080516001600160a01b038084168252861660208201529192507f46069ab7ca18c406ee4fe8331f506c4335ff0dcb425577927cf3f5212b962339910160405180910390a192915050565b6110118061014283390190565b60006020828403121561012357600080fd5b81356001600160a01b038116811461013a57600080fd5b939250505056fe60e06040523480156200001157600080fd5b50604051620010113803806200101183398101604081905262000034916200016b565b8181816001600160a01b03166080816001600160a01b031681525050816001600160a01b031663573ea5756040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200008f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b59190620001aa565b6001600160a01b0390811660c0526040516337b6269f60e21b8152908216600482015273c815db16d4be6ddf2685c201937905abf338f5d79063ded89a7c906024016040805180830381865afa15801562000114573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013a9190620001d1565b506001600160a01b031660a052506200020992505050565b6001600160a01b03811681146200016857600080fd5b50565b600080604083850312156200017f57600080fd5b82516200018c8162000152565b60208401519092506200019f8162000152565b809150509250929050565b600060208284031215620001bd57600080fd5b8151620001ca8162000152565b9392505050565b60008060408385031215620001e557600080fd5b8251620001f28162000152565b602084015190925080151581146200019f57600080fd5b60805160a05160c051610dcc62000245600039600081816106a3015261076d01526000606101526000818160d301526105f20152610dcc6000f3fe6080604052600436106100435760003560e01c806328f150eb1461004f57806370085be0146100a0578063e70abe92146100c1578063fa461e33146100f557600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b36100ae366004610a65565b610117565b604051908152602001610097565b3480156100cd57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b34801561010157600080fd5b50610115610110366004610aad565b610331565b005b604080516001600160a01b038516602082015260009182910160408051601f19818403018152919052905073d1d5a4c0ea98971894772dcd6d2f1dc71083c44e63128acb083060018961016f6401000276a383610b43565b866040518663ffffffff1660e01b8152600401610190959493929190610bca565b60408051808303816000875af11580156101ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d29190610c04565b50506040516370a0823160e01b8152306004820152600090736dea81c8171d0ba574754ef6f8b412f2ed88c54d906370a0823190602401602060405180830381865afa158015610226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024a9190610c28565b9050838110156102a15760405162461bcd60e51b815260206004820152601760248201527f696e73756666696369656e74206172622070726f66697400000000000000000060448201526064015b60405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038616600482015260248101829052736dea81c8171d0ba574754ef6f8b412f2ed88c54d9063a9059cbb906044016020604051808303816000875af1158015610302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103269190610c41565b509695505050505050565b3373d1d5a4c0ea98971894772dcd6d2f1dc71083c44e146103a25760405162461bcd60e51b815260206004820152602560248201527f756e697377617056335377617043616c6c6261636b3a20696e76616c6964207360448201526432b73232b960d91b6064820152608401610298565b60006103b084600019610c63565b604051632e1a7d4d60e01b81526004810182905290915073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b15801561040057600080fd5b505af1158015610414573d6000803e3d6000fd5b5050505060004790506000806104286105ed565b91509150610436828261067a565b8183116104855760405162461bcd60e51b815260206004820152601260248201527f466565203e2045544820726563656976656400000000000000000000000000006044820152606401610298565b60006104918385610d03565b905060006104a187890189610d1a565b604051636cf6981160e01b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015260248101849052736dea81c8171d0ba574754ef6f8b412f2ed88c54d604482015230606482015260016084820152600060a48201529091506001600160a01b03821690636cf6981190849060c40160206040518083038185885af1158015610534573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105599190610c41565b5060008a13156105e15760405163a9059cbb60e01b8152336004820152602481018b9052736dea81c8171d0ba574754ef6f8b412f2ed88c54d9063a9059cbb906044016020604051808303816000875af11580156105bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105df9190610c41565b505b50505050505050505050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b810c6366040518163ffffffff1660e01b81526004016040805180830381865afa15801561064d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106719190610d37565b90939092509050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038216016107675760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168360405160006040518083038185875af1925050503d806000811461070c576040519150601f19603f3d011682016040523d82523d6000602084013e610711565b606091505b50509050806107625760405162461bcd60e51b815260206004820152601e60248201527f5f7472616e736665723a20455448207472616e73666572206661696c656400006044820152606401610298565b505050565b610792817f000000000000000000000000000000000000000000000000000000000000000084610796565b5050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052610762908490600061084d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108ca9092919063ffffffff16565b805190915015610762578080602001905181019061086b9190610c41565b6107625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610298565b60606108d984846000856108e3565b90505b9392505050565b6060824710156109445760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610298565b6001600160a01b0385163b61099b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610298565b600080866001600160a01b031685876040516109b79190610d67565b60006040518083038185875af1925050503d80600081146109f4576040519150601f19603f3d011682016040523d82523d6000602084013e6109f9565b606091505b5091509150610a09828286610a14565b979650505050505050565b60608315610a235750816108dc565b825115610a335782518084602001fd5b8160405162461bcd60e51b81526004016102989190610d83565b6001600160a01b0381168114610a6257600080fd5b50565b60008060008060808587031215610a7b57600080fd5b843593506020850135610a8d81610a4d565b92506040850135610a9d81610a4d565b9396929550929360600135925050565b60008060008060608587031215610ac357600080fd5b8435935060208501359250604085013567ffffffffffffffff80821115610ae957600080fd5b818701915087601f830112610afd57600080fd5b813581811115610b0c57600080fd5b886020828501011115610b1e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b60006001600160a01b03808316818516808303821115610b6557610b65610b2d565b01949350505050565b60005b83811015610b89578181015183820152602001610b71565b83811115610b98576000848401525b50505050565b60008151808452610bb6816020860160208601610b6e565b601f01601f19169290920160200192915050565b60006001600160a01b038088168352861515602084015285604084015280851660608401525060a06080830152610a0960a0830184610b9e565b60008060408385031215610c1757600080fd5b505080516020909101519092909150565b600060208284031215610c3a57600080fd5b5051919050565b600060208284031215610c5357600080fd5b815180151581146108dc57600080fd5b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615610ca457610ca4610b2d565b600160ff1b6000871282811687830589121615610cc357610cc3610b2d565b60008712925087820587128484161615610cdf57610cdf610b2d565b87850587128184161615610cf557610cf5610b2d565b505050929093029392505050565b600082821015610d1557610d15610b2d565b500390565b600060208284031215610d2c57600080fd5b81356108dc81610a4d565b60008060408385031215610d4a57600080fd5b825191506020830151610d5c81610a4d565b809150509250929050565b60008251610d79818460208701610b6e565b9190910192915050565b6020815260006108dc6020830184610b9e56fea26469706673582212208ebdce31eeaf21e0ea776375f4692ad1169419da3742cc989268723450ea8a0a64736f6c634300080e0033a26469706673582212209c56a9700e00ea65d505d439701dba18cb2639ed289d236602f484e73f556a2d64736f6c634300080e0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e93f4ceb14610030575b600080fd5b61004361003e366004610111565b61005f565b6040516001600160a01b03909116815260200160405180910390f35b60008073b3f5503f93d5ef84b06993a1975b9d21b962892f8360405161008490610104565b6001600160a01b03928316815291166020820152604001604051809103906000f0801580156100b7573d6000803e3d6000fd5b50604080516001600160a01b038084168252861660208201529192507f46069ab7ca18c406ee4fe8331f506c4335ff0dcb425577927cf3f5212b962339910160405180910390a192915050565b6110118061014283390190565b60006020828403121561012357600080fd5b81356001600160a01b038116811461013a57600080fd5b939250505056fe60e06040523480156200001157600080fd5b50604051620010113803806200101183398101604081905262000034916200016b565b8181816001600160a01b03166080816001600160a01b031681525050816001600160a01b031663573ea5756040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200008f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b59190620001aa565b6001600160a01b0390811660c0526040516337b6269f60e21b8152908216600482015273c815db16d4be6ddf2685c201937905abf338f5d79063ded89a7c906024016040805180830381865afa15801562000114573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013a9190620001d1565b506001600160a01b031660a052506200020992505050565b6001600160a01b03811681146200016857600080fd5b50565b600080604083850312156200017f57600080fd5b82516200018c8162000152565b60208401519092506200019f8162000152565b809150509250929050565b600060208284031215620001bd57600080fd5b8151620001ca8162000152565b9392505050565b60008060408385031215620001e557600080fd5b8251620001f28162000152565b602084015190925080151581146200019f57600080fd5b60805160a05160c051610dcc62000245600039600081816106a3015261076d01526000606101526000818160d301526105f20152610dcc6000f3fe6080604052600436106100435760003560e01c806328f150eb1461004f57806370085be0146100a0578063e70abe92146100c1578063fa461e33146100f557600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b36100ae366004610a65565b610117565b604051908152602001610097565b3480156100cd57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b34801561010157600080fd5b50610115610110366004610aad565b610331565b005b604080516001600160a01b038516602082015260009182910160408051601f19818403018152919052905073d1d5a4c0ea98971894772dcd6d2f1dc71083c44e63128acb083060018961016f6401000276a383610b43565b866040518663ffffffff1660e01b8152600401610190959493929190610bca565b60408051808303816000875af11580156101ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d29190610c04565b50506040516370a0823160e01b8152306004820152600090736dea81c8171d0ba574754ef6f8b412f2ed88c54d906370a0823190602401602060405180830381865afa158015610226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024a9190610c28565b9050838110156102a15760405162461bcd60e51b815260206004820152601760248201527f696e73756666696369656e74206172622070726f66697400000000000000000060448201526064015b60405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038616600482015260248101829052736dea81c8171d0ba574754ef6f8b412f2ed88c54d9063a9059cbb906044016020604051808303816000875af1158015610302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103269190610c41565b509695505050505050565b3373d1d5a4c0ea98971894772dcd6d2f1dc71083c44e146103a25760405162461bcd60e51b815260206004820152602560248201527f756e697377617056335377617043616c6c6261636b3a20696e76616c6964207360448201526432b73232b960d91b6064820152608401610298565b60006103b084600019610c63565b604051632e1a7d4d60e01b81526004810182905290915073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b15801561040057600080fd5b505af1158015610414573d6000803e3d6000fd5b5050505060004790506000806104286105ed565b91509150610436828261067a565b8183116104855760405162461bcd60e51b815260206004820152601260248201527f466565203e2045544820726563656976656400000000000000000000000000006044820152606401610298565b60006104918385610d03565b905060006104a187890189610d1a565b604051636cf6981160e01b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015260248101849052736dea81c8171d0ba574754ef6f8b412f2ed88c54d604482015230606482015260016084820152600060a48201529091506001600160a01b03821690636cf6981190849060c40160206040518083038185885af1158015610534573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105599190610c41565b5060008a13156105e15760405163a9059cbb60e01b8152336004820152602481018b9052736dea81c8171d0ba574754ef6f8b412f2ed88c54d9063a9059cbb906044016020604051808303816000875af11580156105bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105df9190610c41565b505b50505050505050505050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b810c6366040518163ffffffff1660e01b81526004016040805180830381865afa15801561064d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106719190610d37565b90939092509050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038216016107675760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168360405160006040518083038185875af1925050503d806000811461070c576040519150601f19603f3d011682016040523d82523d6000602084013e610711565b606091505b50509050806107625760405162461bcd60e51b815260206004820152601e60248201527f5f7472616e736665723a20455448207472616e73666572206661696c656400006044820152606401610298565b505050565b610792817f000000000000000000000000000000000000000000000000000000000000000084610796565b5050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052610762908490600061084d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108ca9092919063ffffffff16565b805190915015610762578080602001905181019061086b9190610c41565b6107625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610298565b60606108d984846000856108e3565b90505b9392505050565b6060824710156109445760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610298565b6001600160a01b0385163b61099b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610298565b600080866001600160a01b031685876040516109b79190610d67565b60006040518083038185875af1925050503d80600081146109f4576040519150601f19603f3d011682016040523d82523d6000602084013e6109f9565b606091505b5091509150610a09828286610a14565b979650505050505050565b60608315610a235750816108dc565b825115610a335782518084602001fd5b8160405162461bcd60e51b81526004016102989190610d83565b6001600160a01b0381168114610a6257600080fd5b50565b60008060008060808587031215610a7b57600080fd5b843593506020850135610a8d81610a4d565b92506040850135610a9d81610a4d565b9396929550929360600135925050565b60008060008060608587031215610ac357600080fd5b8435935060208501359250604085013567ffffffffffffffff80821115610ae957600080fd5b818701915087601f830112610afd57600080fd5b813581811115610b0c57600080fd5b886020828501011115610b1e57600080fd5b95989497505060200194505050565b634e487b7160e01b600052601160045260246000fd5b60006001600160a01b03808316818516808303821115610b6557610b65610b2d565b01949350505050565b60005b83811015610b89578181015183820152602001610b71565b83811115610b98576000848401525b50505050565b60008151808452610bb6816020860160208601610b6e565b601f01601f19169290920160200192915050565b60006001600160a01b038088168352861515602084015285604084015280851660608401525060a06080830152610a0960a0830184610b9e565b60008060408385031215610c1757600080fd5b505080516020909101519092909150565b600060208284031215610c3a57600080fd5b5051919050565b600060208284031215610c5357600080fd5b815180151581146108dc57600080fd5b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615610ca457610ca4610b2d565b600160ff1b6000871282811687830589121615610cc357610cc3610b2d565b60008712925087820587128484161615610cdf57610cdf610b2d565b87850587128184161615610cf557610cf5610b2d565b505050929093029392505050565b600082821015610d1557610d15610b2d565b500390565b600060208284031215610d2c57600080fd5b81356108dc81610a4d565b60008060408385031215610d4a57600080fd5b825191506020830151610d5c81610a4d565b809150509250929050565b60008251610d79818460208701610b6e565b9190910192915050565b6020815260006108dc6020830184610b9e56fea26469706673582212208ebdce31eeaf21e0ea776375f4692ad1169419da3742cc989268723450ea8a0a64736f6c634300080e0033a26469706673582212209c56a9700e00ea65d505d439701dba18cb2639ed289d236602f484e73f556a2d64736f6c634300080e0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.