ETH Price: $1,645.83 (+5.40%)
 

Overview

ETH Balance

2.54515356550329685 ETH

Eth Value

$4,188.88 (@ $1,645.83/ETH)

Token Holdings

Multichain Info

Transaction Hash
Method
Block
From
To
Swap Balance222563672025-04-13 0:08:593 mins ago1744502939IN
0x000000fe...05F2E7E1c
0 ETH0.003181151.86474317
Swap Balance222563642025-04-13 0:08:234 mins ago1744502903IN
0x000000fe...05F2E7E1c
0 ETH0.006145351.87068893
Swap Balance222563592025-04-13 0:07:235 mins ago1744502843IN
0x000000fe...05F2E7E1c
0 ETH0.002322011.93854482
Swap Balance222563552025-04-13 0:06:355 mins ago1744502795IN
0x000000fe...05F2E7E1c
0 ETH0.002988541.93980861
Swap Balance222563072025-04-12 23:56:3515 mins ago1744502195IN
0x000000fe...05F2E7E1c
0 ETH0.000221291.89608019
Swap Balance222562592025-04-12 23:46:5925 mins ago1744501619IN
0x000000fe...05F2E7E1c
0 ETH0.000214281.83600063
Swap Balance222562072025-04-12 23:36:3535 mins ago1744500995IN
0x000000fe...05F2E7E1c
0 ETH0.000215871.84980547
Swap Balance222561562025-04-12 23:26:2346 mins ago1744500383IN
0x000000fe...05F2E7E1c
0 ETH0.000218491.87209744
Swap Balance222561062025-04-12 23:16:2356 mins ago1744499783IN
0x000000fe...05F2E7E1c
0 ETH0.00044811.84728302
Swap Balance222560632025-04-12 23:07:351 hr ago1744499255IN
0x000000fe...05F2E7E1c
0 ETH0.000692651.96883907
Swap Balance222560092025-04-12 22:56:471 hr ago1744498607IN
0x000000fe...05F2E7E1c
0 ETH0.000223241.91280599
Swap Balance222559572025-04-12 22:46:231 hr ago1744497983IN
0x000000fe...05F2E7E1c
0 ETH0.000584791.9074861
Swap Balance222559082025-04-12 22:36:351 hr ago1744497395IN
0x000000fe...05F2E7E1c
0 ETH0.000218381.87113733
Swap Balance222558562025-04-12 22:26:111 hr ago1744496771IN
0x000000fe...05F2E7E1c
0 ETH0.000228141.9547424
Swap Balance222558112025-04-12 22:17:111 hr ago1744496231IN
0x000000fe...05F2E7E1c
0 ETH0.00023141.98274375
Swap Balance222557592025-04-12 22:06:352 hrs ago1744495595IN
0x000000fe...05F2E7E1c
0 ETH0.000623921.91751819
Swap Balance222557102025-04-12 21:56:472 hrs ago1744495007IN
0x000000fe...05F2E7E1c
0 ETH0.000624221.90630903
Swap Balance222556602025-04-12 21:46:472 hrs ago1744494407IN
0x000000fe...05F2E7E1c
0 ETH0.000226341.9393541
Swap Balance222556052025-04-12 21:35:472 hrs ago1744493747IN
0x000000fe...05F2E7E1c
0 ETH0.000223731.91698725
Swap Balance222555592025-04-12 21:26:352 hrs ago1744493195IN
0x000000fe...05F2E7E1c
0 ETH0.000224331.92208636
Swap Balance222555112025-04-12 21:16:592 hrs ago1744492619IN
0x000000fe...05F2E7E1c
0 ETH0.000225851.93516322
Swap Balance222554612025-04-12 21:06:593 hrs ago1744492019IN
0x000000fe...05F2E7E1c
0 ETH0.000224411.92277027
Swap Balance222554112025-04-12 20:56:473 hrs ago1744491407IN
0x000000fe...05F2E7E1c
0 ETH0.000227731.95128803
Swap Balance222553542025-04-12 20:45:233 hrs ago1744490723IN
0x000000fe...05F2E7E1c
0 ETH0.000228571.95847212
Swap Balance222553112025-04-12 20:36:473 hrs ago1744490207IN
0x000000fe...05F2E7E1c
0 ETH0.000226761.94291259
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer222563722025-04-13 0:09:592 mins ago1744502999
0x000000fe...05F2E7E1c
0.00575044 ETH
Transfer222563492025-04-13 0:05:237 mins ago1744502723
0x000000fe...05F2E7E1c
0.00005465 ETH
Transfer222562892025-04-12 23:52:5919 mins ago1744501979
0x000000fe...05F2E7E1c
0.00001952 ETH
Transfer222562852025-04-12 23:52:1120 mins ago1744501931
0x000000fe...05F2E7E1c
0.00003063 ETH
Transfer222562602025-04-12 23:47:1125 mins ago1744501631
0x000000fe...05F2E7E1c
0.00018197 ETH
Transfer222562562025-04-12 23:46:2326 mins ago1744501583
0x000000fe...05F2E7E1c
0.00302612 ETH
Transfer222562372025-04-12 23:42:3529 mins ago1744501355
0x000000fe...05F2E7E1c
0.00003756 ETH
Transfer222562322025-04-12 23:41:3530 mins ago1744501295
0x000000fe...05F2E7E1c
0.00136159 ETH
Transfer222562292025-04-12 23:40:5931 mins ago1744501259
0x000000fe...05F2E7E1c
0.00008103 ETH
Transfer222561842025-04-12 23:31:5940 mins ago1744500719
0x000000fe...05F2E7E1c
0.0030289 ETH
Transfer222561522025-04-12 23:25:3546 mins ago1744500335
0x000000fe...05F2E7E1c
0.00015111 ETH
Transfer222561512025-04-12 23:25:2347 mins ago1744500323
0x000000fe...05F2E7E1c
0.0011459 ETH
Transfer222561392025-04-12 23:22:5949 mins ago1744500179
0x000000fe...05F2E7E1c
0.00076728 ETH
Transfer222561322025-04-12 23:21:3550 mins ago1744500095
0x000000fe...05F2E7E1c
0.00000731 ETH
Transfer222561252025-04-12 23:20:1152 mins ago1744500011
0x000000fe...05F2E7E1c
0.00105963 ETH
Transfer222561122025-04-12 23:17:3554 mins ago1744499855
0x000000fe...05F2E7E1c
0.00000066 ETH
Transfer222561082025-04-12 23:16:4755 mins ago1744499807
0x000000fe...05F2E7E1c
0.00061924 ETH
Transfer222560942025-04-12 23:13:5958 mins ago1744499639
0x000000fe...05F2E7E1c
0.00037774 ETH
Transfer222560822025-04-12 23:11:351 hr ago1744499495
0x000000fe...05F2E7E1c
0.00037808 ETH
Transfer222560792025-04-12 23:10:591 hr ago1744499459
0x000000fe...05F2E7E1c
0.00049777 ETH
Transfer222560762025-04-12 23:10:231 hr ago1744499423
0x000000fe...05F2E7E1c
0.00025618 ETH
Transfer222560752025-04-12 23:10:111 hr ago1744499411
0x000000fe...05F2E7E1c
0.00000222 ETH
Transfer222560712025-04-12 23:09:231 hr ago1744499363
0x000000fe...05F2E7E1c
0.00151458 ETH
Transfer222560502025-04-12 23:04:591 hr ago1744499099
0x000000fe...05F2E7E1c
0.00072267 ETH
Transfer222560492025-04-12 23:04:471 hr ago1744499087
0x000000fe...05F2E7E1c
0.00057767 ETH
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xD66E59bA...459EF1e14
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
FeeCollector

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 8 : FeeCollector.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;

import {Owned} from "solmate/auth/Owned.sol";
import {ERC20} from "solmate/tokens/ERC20.sol";
import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {IFeeCollector} from "./interfaces/IFeeCollector.sol";
import {IPermit2} from "./external/IPermit2.sol";

/// @notice The collector of protocol fees that will be used to swap and send to a fee recipient address.
contract FeeCollector is Owned, IFeeCollector {
    using SafeTransferLib for ERC20;

    address public universalRouter;

    ERC20 public immutable feeToken;
    IPermit2 public immutable permit2;

    uint256 public constant MAX_APPROVAL_AMOUNT = type(uint256).max;
    uint160 public constant MAX_PERMIT2_APPROVAL_AMOUNT = type(uint160).max;
    uint48 public constant MAX_PERMIT2_DEADLINE = type(uint48).max;

    constructor(address _owner, address _universalRouter, address _permit2, address _feeToken) Owned(_owner) {
        universalRouter = _universalRouter;
        feeToken = ERC20(_feeToken);
        permit2 = IPermit2(_permit2);
    }

    /// @inheritdoc IFeeCollector
    function swapBalance(bytes calldata swapData, uint256 nativeValue) external onlyOwner {
        _execute(swapData, nativeValue);
    }

    /// @inheritdoc IFeeCollector
    function swapBalance(bytes calldata swapData, uint256 nativeValue, ERC20[] calldata tokensToApprove)
        external
        onlyOwner
    {
        unchecked {
            for (uint256 i = 0; i < tokensToApprove.length; i++) {
                tokensToApprove[i].safeApprove(address(permit2), MAX_APPROVAL_AMOUNT);
                permit2.approve(
                    address(tokensToApprove[i]), universalRouter, MAX_PERMIT2_APPROVAL_AMOUNT, MAX_PERMIT2_DEADLINE
                );
            }
        }

        _execute(swapData, nativeValue);
    }

    /// @notice Helper function to call UniversalRouter.
    /// @param swapData The bytes call data to be forwarded to UniversalRouter.
    /// @param nativeValue The amount of native currency to send to UniversalRouter.
    function _execute(bytes calldata swapData, uint256 nativeValue) internal {
        (bool success,) = universalRouter.call{value: nativeValue}(swapData);
        if (!success) revert UniversalRouterCallFailed();
    }

    /// @inheritdoc IFeeCollector
    function revokeTokenApprovals(ERC20[] calldata tokensToRevoke) external onlyOwner {
        unchecked {
            for (uint256 i = 0; i < tokensToRevoke.length; i++) {
                tokensToRevoke[i].safeApprove(address(permit2), 0);
            }
        }
    }

    /// @inheritdoc IFeeCollector
    function revokePermit2Approvals(IPermit2.TokenSpenderPair[] calldata approvals) external onlyOwner {
        permit2.lockdown(approvals);
    }

    /// @inheritdoc IFeeCollector
    function withdrawFeeToken(address feeRecipient, uint256 amount) external onlyOwner {
        feeToken.safeTransfer(feeRecipient, amount);
    }

    /// @inheritdoc IFeeCollector
    function setUniversalRouter(address _universalRouter) external onlyOwner {
        emit UniversalRouterChanged(universalRouter, _universalRouter);
        universalRouter = _universalRouter;
    }

    receive() external payable {}
}

File 2 of 8 : Owned.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event OwnershipTransferred(address indexed user, address indexed newOwner);

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnershipTransferred(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function transferOwnership(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnershipTransferred(msg.sender, newOwner);
    }
}

File 3 of 8 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 4 of 8 : SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

File 5 of 8 : IFeeCollector.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.13;

import {ERC20} from "solmate/tokens/ERC20.sol";
import {IPermit2} from "../external/IPermit2.sol";

/// @notice The collector of protocol fees that will be used to swap and send to a fee recipient address.
interface IFeeCollector {
    /// @notice Error thrown when the call to UniversalRouter fails.
    error UniversalRouterCallFailed();

    /// @notice Emitted when the UniversalRouter address is changed.
    /// @param oldUniversalRouter The old router address.
    /// @param newUniversalRouter The new router address.
    event UniversalRouterChanged(address oldUniversalRouter, address newUniversalRouter);

    /// @notice Swaps the contract balance.
    /// @param swapData The bytes call data to be forwarded to UniversalRouter.
    /// @param nativeValue The amount of native currency to send to UniversalRouter.
    function swapBalance(bytes calldata swapData, uint256 nativeValue) external;

    /// @notice Approves tokens for swapping and then swaps the contract balance.
    /// @param swapData The bytes call data to be forwarded to UniversalRouter.
    /// @param nativeValue The amount of native currency to send to UniversalRouter.
    /// @param tokensToApprove An array of ERC20 tokens to approve for spending.
    function swapBalance(bytes calldata swapData, uint256 nativeValue, ERC20[] calldata tokensToApprove) external;

    /// @notice Revokes approvals on tokens by setting their allowance to 0.
    /// @param tokensToRevoke The token to revoke the approval for.
    function revokeTokenApprovals(ERC20[] calldata tokensToRevoke) external;

    /// @notice Revokes the permit2 allowance of a spender by setting token allowances to 0.
    /// @param approvals The approvals to revoke.
    function revokePermit2Approvals(IPermit2.TokenSpenderPair[] calldata approvals) external;

    /// @notice Transfers the fee token balance from this contract to the fee recipient.
    /// @param feeRecipient The address to send the fee token balance to.
    /// @param amount The amount to withdraw.
    function withdrawFeeToken(address feeRecipient, uint256 amount) external;

    /// @notice Sets the address of the UniversalRouter contract.
    /// @param _universalRouter The address of the UniversalRouter contract.
    function setUniversalRouter(address _universalRouter) external;
}

File 6 of 8 : IPermit2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IAllowanceTransfer} from "./IAllowanceTransfer.sol";

/// @notice Permit2 handles signature-based transfers in SignatureTransfer and allowance-based transfers in AllowanceTransfer.
/// @dev Users must approve Permit2 before calling any of the transfer functions.
interface IPermit2 is IAllowanceTransfer {
// IPermit2 unifies the two interfaces so users have maximal flexibility with their approval.
}

File 7 of 8 : IAllowanceTransfer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IEIP712} from "./IEIP712.sol";

/// @title AllowanceTransfer
/// @notice Handles ERC20 token permissions through signature based allowance setting and ERC20 token transfers by checking allowed amounts
/// @dev Requires user's token approval on the Permit2 contract
interface IAllowanceTransfer is IEIP712 {
    /// @notice A token spender pair.
    struct TokenSpenderPair {
        // the token the spender is approved
        address token;
        // the spender address
        address spender;
    }

    /// @notice A mapping from owner address to token address to spender address to PackedAllowance struct, which contains details and conditions of the approval.
    /// @notice The mapping is indexed in the above order see: allowance[ownerAddress][tokenAddress][spenderAddress]
    /// @dev The packed slot holds the allowed amount, expiration at which the allowed amount is no longer valid, and current nonce thats updated on any signature based approvals.
    function allowance(address user, address token, address spender)
        external
        view
        returns (uint160 amount, uint48 expiration, uint48 nonce);

    /// @notice Approves the spender to use up to amount of the specified token up until the expiration
    /// @param token The token to approve
    /// @param spender The spender address to approve
    /// @param amount The approved amount of the token
    /// @param expiration The timestamp at which the approval is no longer valid
    /// @dev The packed allowance also holds a nonce, which will stay unchanged in approve
    /// @dev Setting amount to type(uint160).max sets an unlimited approval
    function approve(address token, address spender, uint160 amount, uint48 expiration) external;

    /// @notice Enables performing a "lockdown" of the sender's Permit2 identity
    /// by batch revoking approvals
    /// @param approvals Array of approvals to revoke.
    function lockdown(TokenSpenderPair[] calldata approvals) external;
}

File 8 of 8 : IEIP712.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IEIP712 {
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "solmate/=lib/solmate/src/",
    "v2-core/=lib/v2-core/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_universalRouter","type":"address"},{"internalType":"address","name":"_permit2","type":"address"},{"internalType":"address","name":"_feeToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"UniversalRouterCallFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldUniversalRouter","type":"address"},{"indexed":false,"internalType":"address","name":"newUniversalRouter","type":"address"}],"name":"UniversalRouterChanged","type":"event"},{"inputs":[],"name":"MAX_APPROVAL_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PERMIT2_APPROVAL_AMOUNT","outputs":[{"internalType":"uint160","name":"","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PERMIT2_DEADLINE","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"permit2","outputs":[{"internalType":"contract IPermit2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"internalType":"struct IAllowanceTransfer.TokenSpenderPair[]","name":"approvals","type":"tuple[]"}],"name":"revokePermit2Approvals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20[]","name":"tokensToRevoke","type":"address[]"}],"name":"revokeTokenApprovals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_universalRouter","type":"address"}],"name":"setUniversalRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"uint256","name":"nativeValue","type":"uint256"}],"name":"swapBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"uint256","name":"nativeValue","type":"uint256"},{"internalType":"contract ERC20[]","name":"tokensToApprove","type":"address[]"}],"name":"swapBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"universalRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106100e15760003560e01c80638da5cb5b1161007f578063b4a25ce711610059578063b4a25ce714610273578063bbf20c15146102a4578063d88d35de146102c4578063f2fde38b146102e457600080fd5b80638da5cb5b1461020f57806394a228b51461022f578063b2ef14e31461025357600080fd5b8063481fb142116100bb578063481fb14214610180578063628a4b2f1461019b578063647846a5146101bb57806365d82753146101ef57600080fd5b806312261ee7146100ed5780631ac169861461013e57806335a9e4df1461016057600080fd5b366100e857005b600080fd5b3480156100f957600080fd5b506101217f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba381565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014a57600080fd5b5061015e61015936600461092a565b610304565b005b34801561016c57600080fd5b50600154610121906001600160a01b031681565b34801561018c57600080fd5b506101216001600160a01b0381565b3480156101a757600080fd5b5061015e6101b636600461098e565b610347565b3480156101c757600080fd5b506101217f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b3480156101fb57600080fd5b5061015e61020a3660046109f7565b6103da565b34801561021b57600080fd5b50600054610121906001600160a01b031681565b34801561023b57600080fd5b5061024560001981565b604051908152602001610135565b34801561025f57600080fd5b5061015e61026e366004610a39565b610474565b34801561027f57600080fd5b5061028d65ffffffffffff81565b60405165ffffffffffff9091168152602001610135565b3480156102b057600080fd5b5061015e6102bf366004610a65565b6104d6565b3480156102d057600080fd5b5061015e6102df366004610adf565b610631565b3480156102f057600080fd5b5061015e6102ff36600461098e565b6106df565b6000546001600160a01b031633146103375760405162461bcd60e51b815260040161032e90610b54565b60405180910390fd5b610342838383610754565b505050565b6000546001600160a01b031633146103715760405162461bcd60e51b815260040161032e90610b54565b600154604080516001600160a01b03928316815291831660208301527f736ee8e49f5bc52c4483e2bf96ce5c99a25af7c12037267ccde543b28ab63071910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146104045760405162461bcd60e51b815260040161032e90610b54565b60005b818110156103425761046c7f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3600085858581811061044757610447610b7a565b905060200201602081019061045c919061098e565b6001600160a01b031691906107e0565b600101610407565b6000546001600160a01b0316331461049e5760405162461bcd60e51b815260040161032e90610b54565b6104d26001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168383610860565b5050565b6000546001600160a01b031633146105005760405162461bcd60e51b815260040161032e90610b54565b60005b8181101561061e576105447f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba360001985858581811061044757610447610b7a565b7f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba36001600160a01b03166387517c4584848481811061058557610585610b7a565b905060200201602081019061059a919061098e565b60015460405160e084901b6001600160e01b03191681526001600160a01b0392831660048201529082166024820152604481019190915265ffffffffffff6064820152608401600060405180830381600087803b1580156105fa57600080fd5b505af115801561060e573d6000803e3d6000fd5b5050600190920191506105039050565b5061062a858585610754565b5050505050565b6000546001600160a01b0316331461065b5760405162461bcd60e51b815260040161032e90610b54565b60405163cc53287f60e01b81526001600160a01b037f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3169063cc53287f906106a99085908590600401610b90565b600060405180830381600087803b1580156106c357600080fd5b505af11580156106d7573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633146107095760405162461bcd60e51b815260040161032e90610b54565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6001546040516000916001600160a01b03169083906107769087908790610bf6565b60006040518083038185875af1925050503d80600081146107b3576040519150601f19603f3d011682016040523d82523d6000602084013e6107b8565b606091505b50509050806107da5760405163cee8b77760e01b815260040160405180910390fd5b50505050565b600060405163095ea7b360e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806107da5760405162461bcd60e51b815260206004820152600e60248201526d1054141493d59157d1905253115160921b604482015260640161032e565b600060405163a9059cbb60e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806107da5760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b604482015260640161032e565b60008083601f8401126108f357600080fd5b50813567ffffffffffffffff81111561090b57600080fd5b60208301915083602082850101111561092357600080fd5b9250929050565b60008060006040848603121561093f57600080fd5b833567ffffffffffffffff81111561095657600080fd5b610962868287016108e1565b909790965060209590950135949350505050565b6001600160a01b038116811461098b57600080fd5b50565b6000602082840312156109a057600080fd5b81356109ab81610976565b9392505050565b60008083601f8401126109c457600080fd5b50813567ffffffffffffffff8111156109dc57600080fd5b6020830191508360208260051b850101111561092357600080fd5b60008060208385031215610a0a57600080fd5b823567ffffffffffffffff811115610a2157600080fd5b610a2d858286016109b2565b90969095509350505050565b60008060408385031215610a4c57600080fd5b8235610a5781610976565b946020939093013593505050565b600080600080600060608688031215610a7d57600080fd5b853567ffffffffffffffff80821115610a9557600080fd5b610aa189838a016108e1565b9097509550602088013594506040880135915080821115610ac157600080fd5b50610ace888289016109b2565b969995985093965092949392505050565b60008060208385031215610af257600080fd5b823567ffffffffffffffff80821115610b0a57600080fd5b818501915085601f830112610b1e57600080fd5b813581811115610b2d57600080fd5b8660208260061b8501011115610b4257600080fd5b60209290920196919550909350505050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252818101839052600090604080840186845b87811015610be9578135610bb981610976565b6001600160a01b0390811684528286013590610bd482610976565b16838601529183019190830190600101610ba6565b5090979650505050505050565b818382376000910190815291905056fea26469706673582212209ca59ca3b1a45c0142169edc7d5c3e7051782a57f49a40db6fa82c782f3349f864736f6c63430008130033

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
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.