Contract 0xbA62Dd4Eebdb6011DF3A9d09015226c3F9c77236 1

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x296d0dd5be7f2cd76e596326725ed0300b0a652cc748c3960643bf2c786410e20x60806040220003142021-12-01 4:55:46253 days 6 hrs ago0x0132613b3a1061816f4661ad301612910e3cce0b IN  Create: Multicaller0 MATIC0.0022842004032.442000002
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x669b2d91e3f5c49a6197efbb2b179d6d2b5406e7ccb694617bbf913682c5c232317646242022-08-11 10:11:5558 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c77236 QuickSwap: Router13 MATIC
0x669b2d91e3f5c49a6197efbb2b179d6d2b5406e7ccb694617bbf913682c5c232317646242022-08-11 10:11:5558 mins ago 0xfdf54f6f232dd5a6daf067628ba045a1b5a6724d 0xba62dd4eebdb6011df3a9d09015226c3f9c7723613 MATIC
0x1f36060bbe949cdcc683b07c551afd4946247b3f0df05870f250e0dc14f5a381317625142022-08-11 8:52:592 hrs 17 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360xc54b67b43f4216d4073c1dac65361978e8e22a746.058858330464920688 MATIC
0x1f36060bbe949cdcc683b07c551afd4946247b3f0df05870f250e0dc14f5a381317625142022-08-11 8:52:592 hrs 17 mins ago SushiSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c772366.058858330464920688 MATIC
0x6777cb1ff4301cf657c6e2ad6462b8d75b82f889a9468add5753187bd709cf81317614422022-08-11 8:16:042 hrs 54 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c77236 SushiSwap: Router25.558978686357303772 MATIC
0x6777cb1ff4301cf657c6e2ad6462b8d75b82f889a9468add5753187bd709cf81317614422022-08-11 8:16:042 hrs 54 mins ago 0xfdf54f6f232dd5a6daf067628ba045a1b5a6724d 0xba62dd4eebdb6011df3a9d09015226c3f9c7723625.558978686357303772 MATIC
0x23f516573620736e32970dd974a6445e7ddf73aef47f2f53a33e83b960245e0d317505942022-08-11 1:33:139 hrs 37 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360x070a32874d4cf378215f59539a4aae1e5858b1be78.757014132023799148 MATIC
0x23f516573620736e32970dd974a6445e7ddf73aef47f2f53a33e83b960245e0d317505942022-08-11 1:33:139 hrs 37 mins ago QuickSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c7723678.757014132023799148 MATIC
0x7cc2d3b4e850d95845fdad73b71b67407cf02f8db49ab04b0085e68bb0ba3978317505922022-08-11 1:33:099 hrs 37 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360x6d28d41d0b2a89c44089773372b33d07ebbc3bf525.051121305992701805 MATIC
0x7cc2d3b4e850d95845fdad73b71b67407cf02f8db49ab04b0085e68bb0ba3978317505922022-08-11 1:33:099 hrs 37 mins ago QuickSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c7723625.051121305992701805 MATIC
0x5c01d6024ac3ae75b71b6a6238841e1d6a089d9808e9a8e99243c4418865701d317483922022-08-11 0:08:5111 hrs 1 min ago 0xba62dd4eebdb6011df3a9d09015226c3f9c77236 SushiSwap: Router2 MATIC
0x5c01d6024ac3ae75b71b6a6238841e1d6a089d9808e9a8e99243c4418865701d317483922022-08-11 0:08:5111 hrs 1 min ago 0xfdf54f6f232dd5a6daf067628ba045a1b5a6724d 0xba62dd4eebdb6011df3a9d09015226c3f9c772362 MATIC
0x5621a23dbd73b287959c39e1156b58c518a9c5c327e544019f7eda0793e4cf38317394052022-08-10 18:05:5717 hrs 4 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360xeb567e7d3606eca2a6e98e9a44ea9440e738912a50.962949472013722097 MATIC
0x5621a23dbd73b287959c39e1156b58c518a9c5c327e544019f7eda0793e4cf38317394052022-08-10 18:05:5717 hrs 4 mins ago QuickSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c7723650.962949472013722097 MATIC
0x6c6795eba7882b2de8e1eaf2f840c0a96b52162d461a80ca9c9a38870c9bfdcb317366272022-08-10 16:06:2919 hrs 4 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360x294f70bee9871ba1e709c88ea3352a653ae0aeaa52.381227730159609575 MATIC
0x6c6795eba7882b2de8e1eaf2f840c0a96b52162d461a80ca9c9a38870c9bfdcb317366272022-08-10 16:06:2919 hrs 4 mins ago QuickSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c7723652.381227730159609575 MATIC
0xc4e53c6c9179d0d4fef63a54dd5df2a277203aa1593c1564f03e8bab3f4f887c317353542022-08-10 15:09:5420 hrs ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360xdd7bfaffbfe68fe20aaaa6aa1a334b1947ca222668.178230293214163221 MATIC
0xc4e53c6c9179d0d4fef63a54dd5df2a277203aa1593c1564f03e8bab3f4f887c317353542022-08-10 15:09:5420 hrs ago QuickSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c7723668.178230293214163221 MATIC
0x0a295a24a090f6d2baf6f1d0f7861aa484557a20773a62a67dcad457f9d05839317352862022-08-10 15:07:3420 hrs 3 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360x8c676ae01636241d0ab6033ee14fdff6f18737df159.795807028199326545 MATIC
0x0a295a24a090f6d2baf6f1d0f7861aa484557a20773a62a67dcad457f9d05839317352862022-08-10 15:07:3420 hrs 3 mins ago QuickSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c77236159.795807028199326545 MATIC
0x152cb91dbea31a99ab9532e4b439c0084b1e26bbd6111e5254c56a01ea5e2db2317344902022-08-10 14:31:2220 hrs 39 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360x8c676ae01636241d0ab6033ee14fdff6f18737df15.192768992411508933 MATIC
0x152cb91dbea31a99ab9532e4b439c0084b1e26bbd6111e5254c56a01ea5e2db2317344902022-08-10 14:31:2220 hrs 39 mins ago QuickSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c7723615.192768992411508933 MATIC
0x2fcf68c42c8e920070d01223833fbfd78c795f21c8acd45e050eee12182dc3d4317333002022-08-10 13:35:2621 hrs 35 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360x8c676ae01636241d0ab6033ee14fdff6f18737df15.214894579344246421 MATIC
0x2fcf68c42c8e920070d01223833fbfd78c795f21c8acd45e050eee12182dc3d4317333002022-08-10 13:35:2621 hrs 35 mins ago SushiSwap: Router 0xba62dd4eebdb6011df3a9d09015226c3f9c7723615.214894579344246421 MATIC
0x4cf5a5a4350ed1b873edbfa3ff38a9fee0098156fc8685a3aa615b4b6954469f317317972022-08-10 12:29:1222 hrs 41 mins ago 0xba62dd4eebdb6011df3a9d09015226c3f9c772360xebfc749844587d7cdbb03f6e92efadc8ce1f769c15.742189604266291979 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Multicaller

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 5 : Multicaller.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { Address } from "Address.sol";
import "SafeERC20.sol";
import "ReentrancyGuard.sol";

/// @title Multicaller helps swap assets through designated routes of pools stated in calls array
/// @notice Use `multiswap` to swap assets by `calls` array and receiver address
contract Multicaller is ReentrancyGuard {

    using SafeERC20 for IERC20;

    /* ========== STRUCTURE ========== */

    // Call describes a swap for multicaller
    struct Call {
        // the contract to execute the swap
        address target;
        // prefix of the swap bytecode
        bytes prefix;
        // suffix of the swap bytecode
        bytes suffix;
        // from token address
        address fromToken;
        // to token address
        address toToken;
        // amount of the token to swap (optional, use non-zero value to specified amount to swap if needed)
        uint256 amountIn;
    }

    receive() external payable {}
    address constant public ETHER_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    /* ========== INTERNAL FUNCTIONS ========== */

    /// @notice Get balance of the desired account address of the given token
    /// @param token The token address to be checked
    /// @param account The address to be checked
    /// @return The token balance of the desired account address
    function uniBalanceOf(IERC20 token, address account) internal view returns (uint256) {
        if (address(token) == ETHER_ADDRESS) {
            return account.balance;
        } else {
            return token.balanceOf(account);
        }
    }

    /// @notice Infinite approval to spender address if needed
    /// @param token the token contract address to execute `approve` method
    /// @param spender the address allowed to spend
    function approveIfNeeded(IERC20 token, address spender) internal {
        if (address(token) != ETHER_ADDRESS && token.allowance(address(this), spender) == 0) {
            token.safeApprove(spender, 2**256 - 1);
        }
    }

    /* ========== WRITE FUNCTIONS ========== */

    /// @notice Multi-swap through array of calls by sequence and then transfer final swapped token to receiver
    /// @dev Since the output amount of every swap will differ based on exchange conditions, the amount to swap
    /// of next `Call` needs dynamically changed based on the output of the previous swap. In order to support this,
    /// pre-generated bytecode only contains partial call signature excluding input amount param. The complete
    /// calldata will be packed in runtime.
    /// @param calls the array of calls to swap through different pools (See definition of `Call` in this file)
    /// @param receiver the address to receive final swapped token
    function multiswap(Call[] memory calls, address payable receiver) public payable nonReentrant returns (uint256 blockNumber, bytes[] memory returnData) {
        blockNumber = block.number;
        returnData = new bytes[](calls.length);

        // `calls` contain only swap actions
        uint256 amountIn;
        for(uint256 i = 0; i < calls.length; i++) {
            approveIfNeeded(IERC20(calls[i].fromToken), calls[i].target);

            if (calls[i].amountIn > 0) {
                amountIn = calls[i].amountIn;
            }
            uint256 value = 0;
            bytes memory callData;
            if (calls[i].fromToken == ETHER_ADDRESS) {
                value = amountIn;
                callData = abi.encodePacked(calls[i].prefix, calls[i].suffix);
            } else {
                callData = abi.encodePacked(calls[i].prefix, amountIn, calls[i].suffix);
            }
            uint256 balance = uniBalanceOf(IERC20(calls[i].toToken), address(this));
            bytes memory ret = Address.functionCallWithValue(calls[i].target, callData, value, "Multicall multiswap: call failed");
            amountIn = uniBalanceOf(IERC20(calls[i].toToken), address(this)) - balance;
            returnData[i] = ret;
        }

        Call memory lastCall = calls[calls.length - 1];
        if (lastCall.toToken == ETHER_ADDRESS) {
            receiver.transfer(address(this).balance);
        } else {
            uint256 balance = IERC20(lastCall.toToken).balanceOf(address(this));
            IERC20(lastCall.toToken).safeTransfer(receiver, balance);
        }
    }
}

File 2 of 5 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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);
            }
        }
    }
}

File 3 of 5 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "IERC20.sol";
import "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 4 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        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 5 of 5 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ETHER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"prefix","type":"bytes"},{"internalType":"bytes","name":"suffix","type":"bytes"},{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"internalType":"struct Multicaller.Call[]","name":"calls","type":"tuple[]"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"multiswap","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes[]","name":"returnData","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506001600055610f8f806100256000396000f3fe60806040526004361061002d5760003560e01c8063969da00014610039578063cf1d21c01461006357610034565b3661003457005b600080fd5b61004c610047366004610bf2565b6100a3565b60405161005a929190610e32565b60405180910390f35b34801561006f57600080fd5b5061008b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b6040516001600160a01b03909116815260200161005a565b60006060600260005414156100ff5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055835143925067ffffffffffffffff81111561012f57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561016257816020015b606081526020019060019003908161014d5790505b5090506000805b85518110156104ad576101d286828151811061019557634e487b7160e01b600052603260045260246000fd5b6020026020010151606001518783815181106101c157634e487b7160e01b600052603260045260246000fd5b602002602001015160000151610600565b60008682815181106101f457634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015111156102355785818151811061022657634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015191505b6000606073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031688848151811061027757634e487b7160e01b600052603260045260246000fd5b6020026020010151606001516001600160a01b03161415610314578391508783815181106102b557634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518884815181106102e157634e487b7160e01b600052603260045260246000fd5b6020026020010151604001516040516020016102fe929190610db9565b6040516020818303038152906040529050610391565b87838151811061033457634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518489858151811061036157634e487b7160e01b600052603260045260246000fd5b60200260200101516040015160405160200161037f93929190610de8565b60405160208183030381529060405290505b60006103c88985815181106103b657634e487b7160e01b600052603260045260246000fd5b602002602001015160800151306106c8565b905060006104388a86815181106103ef57634e487b7160e01b600052603260045260246000fd5b60200260200101516000015184866040518060400160405280602081526020017f4d756c746963616c6c206d756c7469737761703a2063616c6c206661696c6564815250610782565b90508161045e8b87815181106103b657634e487b7160e01b600052603260045260246000fd5b6104689190610ecb565b95508087868151811061048b57634e487b7160e01b600052603260045260246000fd5b60200260200101819052505050505080806104a590610f12565b915050610169565b50600085600187516104bf9190610ecb565b815181106104dd57634e487b7160e01b600052603260045260246000fd5b6020026020010151905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031681608001516001600160a01b03161415610554576040516001600160a01b038616904780156108fc02916000818181858888f1935050505015801561054e573d6000803e3d6000fd5b506105f0565b60808101516040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561059a57600080fd5b505afa1580156105ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d29190610d59565b60808301519091506105ee906001600160a01b031687836108b1565b505b5050600160005590939092509050565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee148015906106a95750604051636eb1769f60e11b81523060048201526001600160a01b03828116602483015283169063dd62ed3e9060440160206040518083038186803b15801561066f57600080fd5b505afa158015610683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a79190610d59565b155b156106c4576106c46001600160a01b03831682600019610919565b5050565b60006001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561070057506001600160a01b0381163161077c565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a082319060240160206040518083038186803b15801561074157600080fd5b505afa158015610755573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107799190610d59565b90505b92915050565b6060824710156107e35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016100f6565b6107ec85610a3d565b6108385760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100f6565b600080866001600160a01b031685876040516108549190610d9d565b60006040518083038185875af1925050503d8060008114610891576040519150601f19603f3d011682016040523d82523d6000602084013e610896565b606091505b50915091506108a6828286610a47565b979650505050505050565b6040516001600160a01b03831660248201526044810182905261091490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610a87565b505050565b8015806109a25750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561096857600080fd5b505afa15801561097c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a09190610d59565b155b610a0d5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016100f6565b6040516001600160a01b03831660248201526044810182905261091490849063095ea7b360e01b906064016108dd565b803b15155b919050565b60608315610a56575081610a80565b825115610a665782518084602001fd5b8160405162461bcd60e51b81526004016100f69190610e1f565b9392505050565b6000610adc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b599092919063ffffffff16565b8051909150156109145780806020019051810190610afa9190610d39565b6109145760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016100f6565b6060610b688484600085610782565b949350505050565b80356001600160a01b0381168114610a4257600080fd5b600082601f830112610b97578081fd5b813567ffffffffffffffff811115610bb157610bb1610f43565b610bc4601f8201601f1916602001610e9a565b818152846020838601011115610bd8578283fd5b816020850160208301379081016020019190915292915050565b60008060408385031215610c04578182fd5b823567ffffffffffffffff80821115610c1b578384fd5b818501915085601f830112610c2e578384fd5b8135602082821115610c4257610c42610f43565b610c4f8182840201610e9a565b82815281810190858301885b85811015610d1a578135880160c0818e03601f19011215610c7a578a8bfd5b610c8460c0610e9a565b610c8f878301610b70565b8152604082013589811115610ca2578c8dfd5b610cb08f8983860101610b87565b8883015250606082013589811115610cc6578c8dfd5b610cd48f8983860101610b87565b604083015250610ce660808301610b70565b6060820152610cf760a08301610b70565b608082015260c0919091013560a082015284529284019290840190600101610c5b565b50508097505050610d2c818801610b70565b9450505050509250929050565b600060208284031215610d4a578081fd5b81518015158114610a80578182fd5b600060208284031215610d6a578081fd5b5051919050565b60008151808452610d89816020860160208601610ee2565b601f01601f19169290920160200192915050565b60008251610daf818460208701610ee2565b9190910192915050565b60008351610dcb818460208801610ee2565b835190830190610ddf818360208801610ee2565b01949350505050565b60008451610dfa818460208901610ee2565b82018481528351610e12816020808501908801610ee2565b0160200195945050505050565b600060208252610a806020830184610d71565b600060408201848352602060408185015281855180845260608601915060608382028701019350828701855b82811015610e8c57605f19888703018452610e7a868351610d71565b95509284019290840190600101610e5e565b509398975050505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715610ec357610ec3610f43565b604052919050565b600082821015610edd57610edd610f2d565b500390565b60005b83811015610efd578181015183820152602001610ee5565b83811115610f0c576000848401525b50505050565b6000600019821415610f2657610f26610f2d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122022ea9840ac3a86e0fce972980b80a6fea47ff687f92116d7e8cec8d77ab929f064736f6c63430008020033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.