ETH Price: $1,946.65 (-0.83%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

ContractCreator

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer244906562026-02-19 11:40:4710 days ago1771501247IN
0xbedFAC74...80Fe0477e
0 ETH0.000001110.05323604
Transfer244881562026-02-19 3:19:1110 days ago1771471151IN
0xbedFAC74...80Fe0477e
0 ETH0.000001060.050717
Transfer244881302026-02-19 3:13:5910 days ago1771470839IN
0xbedFAC74...80Fe0477e
0 ETH0.000001270.06088257
Transfer244870392026-02-18 23:34:1111 days ago1771457651IN
0xbedFAC74...80Fe0477e
0 ETH0.00000110.05280162
Transfer244861212026-02-18 20:29:5911 days ago1771446599IN
0xbedFAC74...80Fe0477e
0 ETH0.000002670.12749244
Transfer244841352026-02-18 13:51:2311 days ago1771422683IN
0xbedFAC74...80Fe0477e
0 ETH0.000002540.12102049
Transfer244807622026-02-18 2:34:2311 days ago1771382063IN
0xbedFAC74...80Fe0477e
0 ETH0.000000830.03987201
Transfer244706252026-02-16 16:37:5913 days ago1771259879IN
0xbedFAC74...80Fe0477e
0 ETH0.000001080.05171356
Transfer244679272026-02-16 7:36:1113 days ago1771227371IN
0xbedFAC74...80Fe0477e
0 ETH0.000000860.04104423
Transfer244640422026-02-15 18:37:2314 days ago1771180643IN
0xbedFAC74...80Fe0477e
0 ETH0.000001120.05343985
Transfer244615772026-02-15 10:22:2314 days ago1771150943IN
0xbedFAC74...80Fe0477e
0 ETH0.000000920.04381645
Transfer244578532026-02-14 21:55:1115 days ago1771106111IN
0xbedFAC74...80Fe0477e
0 ETH0.000001130.05408746
Transfer244543592026-02-14 10:13:4715 days ago1771064027IN
0xbedFAC74...80Fe0477e
0 ETH0.000001190.05689314
Transfer244521582026-02-14 2:52:1115 days ago1771037531IN
0xbedFAC74...80Fe0477e
0 ETH0.000001170.05573746
Transfer244464122026-02-13 7:36:5916 days ago1770968219IN
0xbedFAC74...80Fe0477e
0 ETH0.000001290.06181128
Transfer244430712026-02-12 20:26:2317 days ago1770927983IN
0xbedFAC74...80Fe0477e
0 ETH0.00000150.07146096
Transfer244403752026-02-12 11:23:2317 days ago1770895403IN
0xbedFAC74...80Fe0477e
0 ETH0.000001420.06787206
Transfer244396712026-02-12 9:02:1117 days ago1770886931IN
0xbedFAC74...80Fe0477e
0 ETH0.000001410.06752777
0xb7994e1d244332892026-02-11 11:39:5918 days ago1770809999IN
0xbedFAC74...80Fe0477e
0.00000001 ETH0.000001980.08888564
Transfer244332832026-02-11 11:38:4718 days ago1770809927IN
0xbedFAC74...80Fe0477e
0 ETH0.000001720.08214939
Transfer244293322026-02-10 22:24:2319 days ago1770762263IN
0xbedFAC74...80Fe0477e
0 ETH0.00000160.07612776
Transfer244148082026-02-08 21:41:5921 days ago1770586919IN
0xbedFAC74...80Fe0477e
0 ETH0.000001560.07455418

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Exec245658692026-03-01 23:25:111 hr ago1772407511
0xbedFAC74...80Fe0477e
2 ETH
Swap With Limit245658692026-03-01 23:25:111 hr ago1772407511
0xbedFAC74...80Fe0477e
2 ETH
Transfer245658112026-03-01 23:13:351 hr ago1772406815
0xbedFAC74...80Fe0477e
1.3869474 ETH
Transfer245658112026-03-01 23:13:351 hr ago1772406815
0xbedFAC74...80Fe0477e
1.3869474 ETH
Exec245657972026-03-01 23:10:471 hr ago1772406647
0xbedFAC74...80Fe0477e
2 ETH
Swap With Limit245657972026-03-01 23:10:471 hr ago1772406647
0xbedFAC74...80Fe0477e
2 ETH
Exec245657852026-03-01 23:08:231 hr ago1772406503
0xbedFAC74...80Fe0477e
2 ETH
Swap With Limit245657852026-03-01 23:08:231 hr ago1772406503
0xbedFAC74...80Fe0477e
2 ETH
Route Single245657002026-03-01 22:51:231 hr ago1772405483
0xbedFAC74...80Fe0477e
1.88 ETH
Swap With Limit245657002026-03-01 22:51:231 hr ago1772405483
0xbedFAC74...80Fe0477e
1.88 ETH
Transfer245656852026-03-01 22:48:231 hr ago1772405303
0xbedFAC74...80Fe0477e
0.01404357 ETH
Transfer245656852026-03-01 22:48:231 hr ago1772405303
0xbedFAC74...80Fe0477e
0.00002536 ETH
Transfer245656852026-03-01 22:48:231 hr ago1772405303
0xbedFAC74...80Fe0477e
0.01406894 ETH
Route Single245655892026-03-01 22:29:112 hrs ago1772404151
0xbedFAC74...80Fe0477e
0.1 ETH
Swap With Limit245655892026-03-01 22:29:112 hrs ago1772404151
0xbedFAC74...80Fe0477e
0.1 ETH
Transfer245654172026-03-01 21:54:472 hrs ago1772402087
0xbedFAC74...80Fe0477e
0.0231431 ETH
Transfer245654172026-03-01 21:54:472 hrs ago1772402087
0xbedFAC74...80Fe0477e
0.0231431 ETH
Exec245652902026-03-01 21:29:233 hrs ago1772400563
0xbedFAC74...80Fe0477e
2 ETH
Swap With Limit245652902026-03-01 21:29:233 hrs ago1772400563
0xbedFAC74...80Fe0477e
2 ETH
Exec245652792026-03-01 21:27:113 hrs ago1772400431
0xbedFAC74...80Fe0477e
2 ETH
Swap With Limit245652792026-03-01 21:27:113 hrs ago1772400431
0xbedFAC74...80Fe0477e
2 ETH
Exec245652642026-03-01 21:24:113 hrs ago1772400251
0xbedFAC74...80Fe0477e
2 ETH
Swap With Limit245652642026-03-01 21:24:113 hrs ago1772400251
0xbedFAC74...80Fe0477e
2 ETH
Swap245642582026-03-01 18:02:476 hrs ago1772388167
0xbedFAC74...80Fe0477e
0.08 ETH
Swap With Limit245642582026-03-01 18:02:476 hrs ago1772388167
0xbedFAC74...80Fe0477e
0.08 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SwapHelpers

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import { IERC20, SafeERC20 } from "openzeppelin-contracts/token/ERC20/utils/SafeERC20.sol";

/**
 * @notice Helper contract to update swap data on-chain
 */
contract SwapHelpers {
    using SafeERC20 for IERC20;

    uint256 public constant VERSION = 5;
    IERC20 private constant _ETH = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);

    error IncorrectValue(uint256 expected, uint256 actual);
    error TransferFailed(address receiver);

    function swapWithLimit(
        address primary,
        address operator,
        IERC20 tokenIn,
        IERC20 tokenOut,
        uint256 amountIn,
        uint256 maxAmountOut,
        address receiver,
        address feeReceiver,
        bytes memory data,
        uint256[] memory pointers
    )
        public
        payable
        returns (uint256 amountOut)
    {
        uint256 balanceBefore = _balance(tokenOut, receiver);
        _swap(primary, operator, tokenIn, amountIn, data, pointers);
        amountOut = _balance(tokenOut, address(this));
        if (maxAmountOut > 0 && amountOut > maxAmountOut) {
            uint256 fee = amountOut - maxAmountOut;
            _transfer(tokenOut, feeReceiver, fee);
            amountOut = maxAmountOut;
        }
        _transfer(tokenOut, receiver, amountOut);
        uint256 balanceAfter = _balance(tokenOut, receiver);
        amountOut = balanceAfter - balanceBefore;
    }

    function swap(
        address primary,
        address operator,
        IERC20 tokenIn,
        IERC20 tokenOut,
        uint256 amountIn,
        address receiver,
        bytes memory data,
        uint256[] memory pointers
    )
        public
        payable
        returns (uint256 amountOut)
    {
        uint256 balanceBefore = _balance(tokenOut, receiver);
        _swap(primary, operator, tokenIn, amountIn, data, pointers);
        _transfer(tokenOut, receiver, _balance(tokenOut, address(this)));
        uint256 balanceAfter = _balance(tokenOut, receiver);
        amountOut = balanceAfter - balanceBefore;
    }

    function swap(
        address primary,
        IERC20 tokenIn,
        IERC20 tokenOut,
        uint256 amountIn,
        address receiver,
        bytes memory data,
        uint256[] memory pointers
    )
        external
        payable
        returns (uint256)
    {
        return swap(primary, primary, tokenIn, tokenOut, amountIn, receiver, data, pointers);
    }

    function insertAmount(
        bytes memory data,
        uint256[] memory pointers,
        uint256 amount
    )
        public
        pure
        returns (bytes memory)
    {
        uint256 length = pointers.length;
        assembly {
            for { let i := 0 } lt(i, length) { i := add(i, 1) } {
                let pointer := mload(add(pointers, mul(32, add(i, 1))))
                mstore(add(data, add(36, pointer)), amount)
            }
        }
        return data;
    }

    function _swap(
        address primary,
        address operator,
        IERC20 tokenIn,
        uint256 amountIn,
        bytes memory data,
        uint256[] memory pointers
    )
        public
        payable
    {
        if (pointers.length != 0) insertAmount(data, pointers, amountIn);
        if (tokenIn == _ETH) {
            if (msg.value != amountIn) revert IncorrectValue(amountIn, msg.value);
        } else {
            if (msg.value != 0) revert IncorrectValue(0, msg.value);
            tokenIn.safeTransferFrom(msg.sender, address(this), amountIn);
            tokenIn.forceApprove(operator, amountIn);
        }
        (bool success, bytes memory response) = primary.call{ value: msg.value }(data);
        if (!success) {
            assembly {
                revert(add(response, 0x20), mload(response))
            }
        }
    }
    
    function _transfer(
        IERC20 token,
        address receiver,
        uint256 amount
    )
        internal
    {
        if (token == _ETH) {
            (bool success,) = receiver.call{ value: amount }("");
            if (!success) revert TransferFailed(receiver);
        } else {
            token.safeTransfer(receiver, amount);
        }
    }

    function _balance(
        IERC20 token,
        address account
    )
        internal
        view
        returns (uint256 balance)
    {
        balance = token == _ETH
            ? account.balance
            : token.balanceOf(account);
    }

    receive() external payable { }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 5 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 6 of 7 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [
    "@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/",
    "@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/",
    "@layerzerolabs/lz-evm-oapp-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/oapp/",
    "@uniswap/v4-core/=lib/v4-core/",
    "@uniswap/v4-periphery/=lib/v4-periphery/",
    "devtools/=lib/devtools/packages/toolbox-foundry/src/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "enso-weiroll/=lib/enso-weiroll/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "layerzero-v2/=lib/layerzero-v2/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "safe-contracts/=lib/safe-tools/lib/safe-contracts/contracts/",
    "safe-tools/=lib/safe-tools/src/",
    "solady/=lib/solady/src/",
    "solmate/=lib/solady/lib/solmate/src/",
    "@ensdomains/=lib/v4-core/node_modules/@ensdomains/",
    "@openzeppelin/=lib/v4-core/lib/openzeppelin-contracts/",
    "forge-gas-snapshot/=lib/v4-periphery/lib/permit2/lib/forge-gas-snapshot/src/",
    "hardhat/=lib/v4-core/node_modules/hardhat/",
    "permit2/=lib/v4-periphery/lib/permit2/",
    "v4-core/=lib/v4-core/src/",
    "v4-periphery/=lib/v4-periphery/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": false
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"IncorrectValue","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"primary","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256[]","name":"pointers","type":"uint256[]"}],"name":"_swap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256[]","name":"pointers","type":"uint256[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"insertAmount","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"primary","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"internalType":"contract IERC20","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256[]","name":"pointers","type":"uint256[]"}],"name":"swap","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"primary","type":"address"},{"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"internalType":"contract IERC20","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256[]","name":"pointers","type":"uint256[]"}],"name":"swap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"primary","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"internalType":"contract IERC20","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"maxAmountOut","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"feeReceiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256[]","name":"pointers","type":"uint256[]"}],"name":"swapWithLimit","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60808060405234601557610970908161001a8239f35b5f80fdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f3560e01c806301f9f42314610079578063346387bf146100745780637cbb0c4f1461006f57806383d1eb841461006a57806391c9d3f6146100655763ffa1ad740361000e576104b2565b610435565b6103a6565b610319565b61027b565b6101003660031901126101215760043561009281610125565b6024359061009f82610125565b604435906100ac82610125565b6100b461015f565b6084356100bf610136565b9060c4356001600160401b038111610121576100df9036906004016101ce565b9260e435956001600160401b0387116101215761011d9761010761010d983690600401610214565b966104ee565b6040519081529081906020820190565b0390f35b5f80fd5b6001600160a01b0381160361012157565b60a4359061014382610125565b565b60c4359061014382610125565b60e4359061014382610125565b6064359061014382610125565b6044359061014382610125565b634e487b7160e01b5f52604160045260245ffd5b90601f801991011681019081106001600160401b038211176101ae57604052565b610179565b6001600160401b0381116101ae57601f01601f191660200190565b81601f82011215610121578035906101e5826101b3565b926101f3604051948561018d565b8284526020838301011161012157815f926020809301838601378301015290565b9080601f83011215610121578135916001600160401b0383116101ae578260051b9060405193610247602084018661018d565b845260208085019282010192831161012157602001905b82821061026b5750505090565b813581526020918201910161025e565b6101403660031901126101215760043561029481610125565b602435906102a182610125565b6102a961016c565b906102b261015f565b60843560a4356102c0610145565b906102c9610152565b92610104356001600160401b038111610121576102ea9036906004016101ce565b9461012435976001600160401b0389116101215761011d9961031361010d9a3690600401610214565b9861052e565b34610121576060366003190112610121576004356001600160401b038111610121576103499036906004016101ce565b602435906001600160401b0382116101215761037a6040916103716020943690600401610214565b6044359161059a565b815192839181835280519182918282860152018484015e5f828201840152601f01601f19168101030190f35b60e0366003190112610121576004356103be81610125565b602435906103cb82610125565b604435906103d882610125565b6064356084356103e781610125565b60a4356001600160401b038111610121576104069036906004016101ce565b9160c435946001600160401b0386116101215761011d9661042e61010d973690600401610214565b95806104ee565b60c03660031901126101215760043561044d81610125565b6024359061045a82610125565b60443561046681610125565b6064356084356001600160401b038111610121576104889036906004016101ce565b9160a435946001600160401b038611610121576104ac610018963690600401610214565b946105f5565b34610121575f36600319011261012157602060405160058152f35b919082039182116104da57565b634e487b7160e01b5f52601160045260245ffd5b95610526959461050d9361052b999361050788886106c4565b996105f5565b61052161051a30836106c4565b8383610761565b6106c4565b6104cd565b90565b979861052b9961052195610526999597946105539461054d8b8b6106c4565b9c6105f5565b61055d30856106c4565b9181151580610591575b610575575b50508383610761565b6105838261058a93946104cd565b9085610761565b5f8061056c565b50818311610567565b918151915f5b8381106105ae575050505090565b600101600581901b82015185016024018390526105a0565b3d156105f0573d906105d7826101b3565b916105e5604051938461018d565b82523d5f602084013e565b606090565b93949190918381516106b2575b50506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0361067157505080340361065b57505f9182915b6020825192019034905af161064a6105c6565b90156106535750565b602081519101fd5b635928816d60e11b5f526004523460245260445ffd5b9391939290923461069a575f9485946106959261069083303384610804565b610848565b610637565b635928816d60e11b5f9081526004523460245260445ffd5b6106bc918761059a565b505f83610602565b6001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81036106ed57503190565b6040516370a0823160e01b81526001600160a01b039092166004830152602090829060249082905afa908115610756575f91610727575090565b90506020813d60201161074e575b816107426020938361018d565b81010312610121575190565b3d9150610735565b6040513d5f823e3d90fd5b9091906001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036107c257505f80808093855af16107996105c6565b50156107a25750565b6339f1c8d960e01b5f9081526001600160a01b0391909116600452602490fd5b60405163a9059cbb60e01b60208201526001600160a01b0393909316602484015260448084019290925290825261014391906107ff60648361018d565b610918565b6040516323b872dd60e01b60208201526001600160a01b039283166024820152929091166044830152606480830193909352918152610143916107ff60848361018d565b60405163095ea7b360e01b60208083019182526001600160a01b0385166024840152604480840196909652948252929390925f9061088760648661018d565b84519082855af15f51903d816108ec575b501590505b6108a657505050565b60405163095ea7b360e01b60208201526001600160a01b039390931660248401525f6044808501919091528352610143926107ff906108e660648261018d565b82610918565b1515905061090c575061089d6001600160a01b0382163b15155b5f610898565b600161089d9114610906565b905f602091828151910182855af115610756575f513d61096757506001600160a01b0381163b155b6109475750565b635274afe760e01b5f9081526001600160a01b0391909116600452602490fd5b6001141561094056

Deployed Bytecode

0x6080604052600436101561001a575b3615610018575f80fd5b005b5f3560e01c806301f9f42314610079578063346387bf146100745780637cbb0c4f1461006f57806383d1eb841461006a57806391c9d3f6146100655763ffa1ad740361000e576104b2565b610435565b6103a6565b610319565b61027b565b6101003660031901126101215760043561009281610125565b6024359061009f82610125565b604435906100ac82610125565b6100b461015f565b6084356100bf610136565b9060c4356001600160401b038111610121576100df9036906004016101ce565b9260e435956001600160401b0387116101215761011d9761010761010d983690600401610214565b966104ee565b6040519081529081906020820190565b0390f35b5f80fd5b6001600160a01b0381160361012157565b60a4359061014382610125565b565b60c4359061014382610125565b60e4359061014382610125565b6064359061014382610125565b6044359061014382610125565b634e487b7160e01b5f52604160045260245ffd5b90601f801991011681019081106001600160401b038211176101ae57604052565b610179565b6001600160401b0381116101ae57601f01601f191660200190565b81601f82011215610121578035906101e5826101b3565b926101f3604051948561018d565b8284526020838301011161012157815f926020809301838601378301015290565b9080601f83011215610121578135916001600160401b0383116101ae578260051b9060405193610247602084018661018d565b845260208085019282010192831161012157602001905b82821061026b5750505090565b813581526020918201910161025e565b6101403660031901126101215760043561029481610125565b602435906102a182610125565b6102a961016c565b906102b261015f565b60843560a4356102c0610145565b906102c9610152565b92610104356001600160401b038111610121576102ea9036906004016101ce565b9461012435976001600160401b0389116101215761011d9961031361010d9a3690600401610214565b9861052e565b34610121576060366003190112610121576004356001600160401b038111610121576103499036906004016101ce565b602435906001600160401b0382116101215761037a6040916103716020943690600401610214565b6044359161059a565b815192839181835280519182918282860152018484015e5f828201840152601f01601f19168101030190f35b60e0366003190112610121576004356103be81610125565b602435906103cb82610125565b604435906103d882610125565b6064356084356103e781610125565b60a4356001600160401b038111610121576104069036906004016101ce565b9160c435946001600160401b0386116101215761011d9661042e61010d973690600401610214565b95806104ee565b60c03660031901126101215760043561044d81610125565b6024359061045a82610125565b60443561046681610125565b6064356084356001600160401b038111610121576104889036906004016101ce565b9160a435946001600160401b038611610121576104ac610018963690600401610214565b946105f5565b34610121575f36600319011261012157602060405160058152f35b919082039182116104da57565b634e487b7160e01b5f52601160045260245ffd5b95610526959461050d9361052b999361050788886106c4565b996105f5565b61052161051a30836106c4565b8383610761565b6106c4565b6104cd565b90565b979861052b9961052195610526999597946105539461054d8b8b6106c4565b9c6105f5565b61055d30856106c4565b9181151580610591575b610575575b50508383610761565b6105838261058a93946104cd565b9085610761565b5f8061056c565b50818311610567565b918151915f5b8381106105ae575050505090565b600101600581901b82015185016024018390526105a0565b3d156105f0573d906105d7826101b3565b916105e5604051938461018d565b82523d5f602084013e565b606090565b93949190918381516106b2575b50506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0361067157505080340361065b57505f9182915b6020825192019034905af161064a6105c6565b90156106535750565b602081519101fd5b635928816d60e11b5f526004523460245260445ffd5b9391939290923461069a575f9485946106959261069083303384610804565b610848565b610637565b635928816d60e11b5f9081526004523460245260445ffd5b6106bc918761059a565b505f83610602565b6001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81036106ed57503190565b6040516370a0823160e01b81526001600160a01b039092166004830152602090829060249082905afa908115610756575f91610727575090565b90506020813d60201161074e575b816107426020938361018d565b81010312610121575190565b3d9150610735565b6040513d5f823e3d90fd5b9091906001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee036107c257505f80808093855af16107996105c6565b50156107a25750565b6339f1c8d960e01b5f9081526001600160a01b0391909116600452602490fd5b60405163a9059cbb60e01b60208201526001600160a01b0393909316602484015260448084019290925290825261014391906107ff60648361018d565b610918565b6040516323b872dd60e01b60208201526001600160a01b039283166024820152929091166044830152606480830193909352918152610143916107ff60848361018d565b60405163095ea7b360e01b60208083019182526001600160a01b0385166024840152604480840196909652948252929390925f9061088760648661018d565b84519082855af15f51903d816108ec575b501590505b6108a657505050565b60405163095ea7b360e01b60208201526001600160a01b039390931660248401525f6044808501919091528352610143926107ff906108e660648261018d565b82610918565b1515905061090c575061089d6001600160a01b0382163b15155b5f610898565b600161089d9114610906565b905f602091828151910182855af115610756575f513d61096757506001600160a01b0381163b155b6109475750565b635274afe760e01b5f9081526001600160a01b0391909116600452602490fd5b6001141561094056

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.