ETH Price: $3,263.23 (-2.31%)

Contract

0x37a8f295612602f2774d331e562be9e61B83a327
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

Transaction Hash
Method
Block
From
To
Swap Balance199761632024-05-29 14:38:23207 days ago1716993503IN
0x37a8f295...61B83a327
0 ETH0.0015458226.6884441
Swap Balance199761142024-05-29 14:28:23207 days ago1716992903IN
0x37a8f295...61B83a327
0 ETH0.0012150720.97820996
Swap Balance199760642024-05-29 14:18:23207 days ago1716992303IN
0x37a8f295...61B83a327
0 ETH0.0304286723.54779879
Swap Balance199274402024-05-22 19:14:35214 days ago1716405275IN
0x37a8f295...61B83a327
0 ETH0.0531310313.15517946
Swap Balance199274372024-05-22 19:13:59214 days ago1716405239IN
0x37a8f295...61B83a327
0 ETH0.0690674313.56340749
Swap Balance199273472024-05-22 18:55:47214 days ago1716404147IN
0x37a8f295...61B83a327
0 ETH0.0754898618.17923747
Swap Balance199273432024-05-22 18:54:59214 days ago1716404099IN
0x37a8f295...61B83a327
0 ETH0.0823543116.5567966
Swap Balance199272472024-05-22 18:35:35214 days ago1716402935IN
0x37a8f295...61B83a327
0 ETH0.0766907218.73959959
Swap Balance199272442024-05-22 18:34:59214 days ago1716402899IN
0x37a8f295...61B83a327
0 ETH0.0929599517.3426834
Swap Balance199271602024-05-22 18:18:11214 days ago1716401891IN
0x37a8f295...61B83a327
0 ETH0.118548124.52424727
Swap Balance199271562024-05-22 18:17:23214 days ago1716401843IN
0x37a8f295...61B83a327
0 ETH0.1234621124.18327817
Swap Balance199270632024-05-22 17:58:35214 days ago1716400715IN
0x37a8f295...61B83a327
0 ETH0.0301748916.59087102
Swap Balance199270612024-05-22 17:58:11214 days ago1716400691IN
0x37a8f295...61B83a327
0 ETH0.084706215.95138047
Swap Balance199270572024-05-22 17:57:23214 days ago1716400643IN
0x37a8f295...61B83a327
0 ETH0.0809089715.53500439
Swap Balance198779482024-05-15 21:04:11221 days ago1715807051IN
0x37a8f295...61B83a327
0 ETH0.0023255311.18992067
Swap Balance198779372024-05-15 21:01:59221 days ago1715806919IN
0x37a8f295...61B83a327
0 ETH0.0051017812.23766545
Swap Balance198779262024-05-15 20:59:47221 days ago1715806787IN
0x37a8f295...61B83a327
0 ETH0.022596999.69244868
Swap Balance198779222024-05-15 20:58:59221 days ago1715806739IN
0x37a8f295...61B83a327
0 ETH0.047993979.53088891
Swap Balance198779192024-05-15 20:58:23221 days ago1715806703IN
0x37a8f295...61B83a327
0 ETH0.0273007810.68699522
Swap Balance198779182024-05-15 20:58:11221 days ago1715806691IN
0x37a8f295...61B83a327
0 ETH0.0228543810.98413947
Swap Balance198779152024-05-15 20:57:35221 days ago1715806655IN
0x37a8f295...61B83a327
0 ETH0.0195757811.0385203
Swap Balance198779142024-05-15 20:57:23221 days ago1715806643IN
0x37a8f295...61B83a327
0 ETH0.0209289411.34393579
Swap Balance198779122024-05-15 20:56:59221 days ago1715806619IN
0x37a8f295...61B83a327
0 ETH0.0210386211.39658752
Swap Balance198779112024-05-15 20:56:47221 days ago1715806607IN
0x37a8f295...61B83a327
0 ETH0.0218808411.86927028
Swap Balance198779082024-05-15 20:56:11221 days ago1715806571IN
0x37a8f295...61B83a327
0 ETH0.022668611.53902132
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
198773662024-05-15 19:06:59221 days ago1715800019
0x37a8f295...61B83a327
0.00000144 ETH
198773482024-05-15 19:03:23221 days ago1715799803
0x37a8f295...61B83a327
0.00000144 ETH
198415972024-05-10 19:02:47226 days ago1715367767
0x37a8f295...61B83a327
0.00644913 ETH
198415602024-05-10 18:55:11226 days ago1715367311
0x37a8f295...61B83a327
0.01833428 ETH
198415452024-05-10 18:52:11226 days ago1715367131
0x37a8f295...61B83a327
0.00556034 ETH
198415352024-05-10 18:49:59226 days ago1715366999
0x37a8f295...61B83a327
0.00026691 ETH
198415312024-05-10 18:49:11226 days ago1715366951
0x37a8f295...61B83a327
0.00062188 ETH
198415222024-05-10 18:47:23226 days ago1715366843
0x37a8f295...61B83a327
0.00128747 ETH
198415152024-05-10 18:45:59226 days ago1715366759
0x37a8f295...61B83a327
0.00012433 ETH
198415142024-05-10 18:45:47226 days ago1715366747
0x37a8f295...61B83a327
0.00083457 ETH
198414982024-05-10 18:42:35226 days ago1715366555
0x37a8f295...61B83a327
0.00025 ETH
198414982024-05-10 18:42:35226 days ago1715366555
0x37a8f295...61B83a327
0.0778388 ETH
198414972024-05-10 18:42:23226 days ago1715366543
0x37a8f295...61B83a327
0.00551614 ETH
198414912024-05-10 18:41:11226 days ago1715366471
0x37a8f295...61B83a327
0.00025402 ETH
198414902024-05-10 18:40:59226 days ago1715366459
0x37a8f295...61B83a327
0.0057221 ETH
198414892024-05-10 18:40:47226 days ago1715366447
0x37a8f295...61B83a327
0.00004122 ETH
198414842024-05-10 18:39:47226 days ago1715366387
0x37a8f295...61B83a327
0.00430439 ETH
198414782024-05-10 18:38:35226 days ago1715366315
0x37a8f295...61B83a327
0.03771552 ETH
198414672024-05-10 18:36:23226 days ago1715366183
0x37a8f295...61B83a327
0.00024715 ETH
198414582024-05-10 18:34:35226 days ago1715366075
0x37a8f295...61B83a327
0.05013149 ETH
198414572024-05-10 18:34:23226 days ago1715366063
0x37a8f295...61B83a327
0.00111233 ETH
198414562024-05-10 18:34:11226 days ago1715366051
0x37a8f295...61B83a327
0.00072829 ETH
198414552024-05-10 18:33:59226 days ago1715366039
0x37a8f295...61B83a327
0.05188546 ETH
198414482024-05-10 18:32:35226 days ago1715365955
0x37a8f295...61B83a327
1.45849372 ETH
198414472024-05-10 18:32:23226 days ago1715365943
0x37a8f295...61B83a327
0.0008571 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

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;

    error UniversalRouterCallFailed();

    address private immutable universalRouter;

    ERC20 private immutable feeToken;
    IPermit2 private immutable permit2;

    uint256 private constant MAX_APPROVAL_AMOUNT = type(uint256).max;
    uint160 private constant MAX_PERMIT2_APPROVAL_AMOUNT = type(uint160).max;
    uint48 private 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 withdrawFeeToken(address feeRecipient, uint256 amount) external onlyOwner {
        feeToken.safeTransfer(feeRecipient, amount);
    }

    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";

/// @notice The collector of protocol fees that will be used to swap and send to a fee recipient address.
interface IFeeCollector {
    /// @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 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;
}

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 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;
}

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-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/permit2/lib/openzeppelin-contracts/",
    "permit2/=lib/permit2/",
    "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",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"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"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e060405234801561001057600080fd5b506040516108df3803806108df83398101604081905261002f916100b1565b600080546001600160a01b0319166001600160a01b03861690811782556040518692907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b03928316608052821660a0521660c05250610105565b80516001600160a01b03811681146100ac57600080fd5b919050565b600080600080608085870312156100c757600080fd5b6100d085610095565b93506100de60208601610095565b92506100ec60408601610095565b91506100fa60608601610095565b905092959194509250565b60805160a05160c05161079d610142600039600081816101f70152610252015260006101920152600081816102cc01526103d3015261079d6000f3fe60806040526004361061004e5760003560e01c80631ac169861461005a5780638da5cb5b1461007c578063b2ef14e3146100b8578063bbf20c15146100d8578063f2fde38b146100f857600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a6100753660046105c0565b610118565b005b34801561008857600080fd5b5060005461009c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c457600080fd5b5061007a6100d3366004610624565b61015b565b3480156100e457600080fd5b5061007a6100f3366004610650565b6101bd565b34801561010457600080fd5b5061007a6101133660046106f7565b61035a565b6000546001600160a01b0316331461014b5760405162461bcd60e51b81526004016101429061071b565b60405180910390fd5b6101568383836103cf565b505050565b6000546001600160a01b031633146101855760405162461bcd60e51b81526004016101429061071b565b6101b96001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383610476565b5050565b6000546001600160a01b031633146101e75760405162461bcd60e51b81526004016101429061071b565b60005b81811015610347576102507f000000000000000000000000000000000000000000000000000000000000000060001985858581811061022b5761022b610741565b905060200201602081019061024091906106f7565b6001600160a01b031691906104f7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166387517c4584848481811061029157610291610741565b90506020020160208101906102a691906106f7565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000082166024820152604481019190915265ffffffffffff6064820152608401600060405180830381600087803b15801561032357600080fd5b505af1158015610337573d6000803e3d6000fd5b5050600190920191506101ea9050565b506103538585856103cf565b5050505050565b6000546001600160a01b031633146103845760405162461bcd60e51b81526004016101429061071b565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031682858560405161040c929190610757565b60006040518083038185875af1925050503d8060008114610449576040519150601f19603f3d011682016040523d82523d6000602084013e61044e565b606091505b50509050806104705760405163cee8b77760e01b815260040160405180910390fd5b50505050565b600060405163a9059cbb60e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806104705760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610142565b600060405163095ea7b360e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806104705760405162461bcd60e51b815260206004820152600e60248201526d1054141493d59157d1905253115160921b6044820152606401610142565b60008083601f84011261058957600080fd5b50813567ffffffffffffffff8111156105a157600080fd5b6020830191508360208285010111156105b957600080fd5b9250929050565b6000806000604084860312156105d557600080fd5b833567ffffffffffffffff8111156105ec57600080fd5b6105f886828701610577565b909790965060209590950135949350505050565b6001600160a01b038116811461062157600080fd5b50565b6000806040838503121561063757600080fd5b82356106428161060c565b946020939093013593505050565b60008060008060006060868803121561066857600080fd5b853567ffffffffffffffff8082111561068057600080fd5b61068c89838a01610577565b90975095506020880135945060408801359150808211156106ac57600080fd5b818801915088601f8301126106c057600080fd5b8135818111156106cf57600080fd5b8960208260051b85010111156106e457600080fd5b9699959850939650602001949392505050565b60006020828403121561070957600080fd5b81356107148161060c565b9392505050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b818382376000910190815291905056fea264697066735822122037bdcf04c668f6b3803f7db34f6a1d9cca1083f77a1b65ee311aec8d127d7abb64736f6c634300081300330000000000000000000000003c6d5c150ee29b698c6c821b53886c41d239669c0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Deployed Bytecode

0x60806040526004361061004e5760003560e01c80631ac169861461005a5780638da5cb5b1461007c578063b2ef14e3146100b8578063bbf20c15146100d8578063f2fde38b146100f857600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a6100753660046105c0565b610118565b005b34801561008857600080fd5b5060005461009c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c457600080fd5b5061007a6100d3366004610624565b61015b565b3480156100e457600080fd5b5061007a6100f3366004610650565b6101bd565b34801561010457600080fd5b5061007a6101133660046106f7565b61035a565b6000546001600160a01b0316331461014b5760405162461bcd60e51b81526004016101429061071b565b60405180910390fd5b6101568383836103cf565b505050565b6000546001600160a01b031633146101855760405162461bcd60e51b81526004016101429061071b565b6101b96001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168383610476565b5050565b6000546001600160a01b031633146101e75760405162461bcd60e51b81526004016101429061071b565b60005b81811015610347576102507f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba360001985858581811061022b5761022b610741565b905060200201602081019061024091906106f7565b6001600160a01b031691906104f7565b7f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba36001600160a01b03166387517c4584848481811061029157610291610741565b90506020020160208101906102a691906106f7565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201527f0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad82166024820152604481019190915265ffffffffffff6064820152608401600060405180830381600087803b15801561032357600080fd5b505af1158015610337573d6000803e3d6000fd5b5050600190920191506101ea9050565b506103538585856103cf565b5050505050565b6000546001600160a01b031633146103845760405162461bcd60e51b81526004016101429061071b565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b60007f0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad6001600160a01b031682858560405161040c929190610757565b60006040518083038185875af1925050503d8060008114610449576040519150601f19603f3d011682016040523d82523d6000602084013e61044e565b606091505b50509050806104705760405163cee8b77760e01b815260040160405180910390fd5b50505050565b600060405163a9059cbb60e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806104705760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610142565b600060405163095ea7b360e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806104705760405162461bcd60e51b815260206004820152600e60248201526d1054141493d59157d1905253115160921b6044820152606401610142565b60008083601f84011261058957600080fd5b50813567ffffffffffffffff8111156105a157600080fd5b6020830191508360208285010111156105b957600080fd5b9250929050565b6000806000604084860312156105d557600080fd5b833567ffffffffffffffff8111156105ec57600080fd5b6105f886828701610577565b909790965060209590950135949350505050565b6001600160a01b038116811461062157600080fd5b50565b6000806040838503121561063757600080fd5b82356106428161060c565b946020939093013593505050565b60008060008060006060868803121561066857600080fd5b853567ffffffffffffffff8082111561068057600080fd5b61068c89838a01610577565b90975095506020880135945060408801359150808211156106ac57600080fd5b818801915088601f8301126106c057600080fd5b8135818111156106cf57600080fd5b8960208260051b85010111156106e457600080fd5b9699959850939650602001949392505050565b60006020828403121561070957600080fd5b81356107148161060c565b9392505050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b818382376000910190815291905056fea264697066735822122037bdcf04c668f6b3803f7db34f6a1d9cca1083f77a1b65ee311aec8d127d7abb64736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003c6d5c150ee29b698c6c821b53886c41d239669c0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

-----Decoded View---------------
Arg [0] : _owner (address): 0x3c6D5c150EE29B698c6C821B53886C41d239669c
Arg [1] : _universalRouter (address): 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
Arg [2] : _permit2 (address): 0x000000000022D473030F116dDEE9F6B43aC78BA3
Arg [3] : _feeToken (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c6d5c150ee29b698c6c821b53886c41d239669c
Arg [1] : 0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad
Arg [2] : 000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3
Arg [3] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48


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
Chain Token Portfolio % Price Amount Value
ETH39.61%$0.05866918,878.1731$1,107.56
ETH33.15%$0.000004219,731,355.5702$927.03
ETH10.86%$0.02625811,570.0476$303.81
ETH1.70%$0.0190152,500$47.54
ETH1.58%$0.053261827.0434$44.05
ETH1.21%$0.210086161.7221$33.98
ETH1.14%$0.0000181,788,356$31.92
ETH0.94%$0.035877731$26.23
ETH0.57%<$0.00000137,851,929.9442$15.85
ETH0.56%$0.074492212.1075$15.8
ETH0.45%$0.37174534$12.64
ETH0.41%$3.823$11.47
ETH0.40%$0.00039928,199.6445$11.25
ETH0.35%$0.21140745.6747$9.66
ETH0.33%<$0.0000011,721,712,983.0957$9.2
ETH0.25%$0.17986739.5793$7.12
ETH0.23%$0.00040915,984.35$6.53
ETH0.22%$0.000019317,496.3343$6.17
ETH0.21%$0.0027242,192.7069$5.97
ETH0.19%<$0.00000134,755,463,961.5351$5.4
ETH0.15%$3.471.175$4.08
ETH0.14%$0.599096.6775$4
ETH0.13%$0.06434955.8444$3.59
ETH0.12%$0.003808910.0657$3.47
ETH0.12%$0.0003489,466.3466$3.29
ETH0.11%$3.390.9437$3.2
ETH0.11%$0.011698268.3449$3.14
ETH0.11%$0.3717458$2.97
ETH0.10%$3,521.280.00081946$2.89
ETH0.09%$0.009179275.3923$2.53
ETH0.09%$0.5114924.8625$2.49
ETH0.08%$0.10648121.3303$2.27
ETH0.08%<$0.000001284,594,997,327$2.26
ETH0.08%$0.00876250.6365$2.2
ETH0.08%$0.000002929,348.9788$2.13
ETH0.07%$0.0006013,480.6487$2.09
ETH0.07%$0.003597562.5$2.02
ETH0.07%$0.01589125.9774$2
ETH0.07%$0.015135129.4907$1.96
ETH0.07%$0.007877248$1.95
ETH0.07%$2.990.649$1.94
ETH0.07%$0.0000012,195,934.4337$1.92
ETH0.07%$0.02231284.953$1.9
ETH0.07%$0.00010617,886.915$1.89
ETH0.07%$0.004825390.9139$1.89
ETH0.07%<$0.0000012,243,929,896.3129$1.86
ETH0.07%$0.0000011,724,517.7959$1.85
ETH0.06%$0.3517615.0327$1.77
ETH0.06%$0.00655261.0677$1.71
ETH0.06%$13.610.1246$1.7
ETH0.06%<$0.0000011,693,144,804.8192$1.67
ETH0.06%$0.006174269.0074$1.66
ETH0.06%$1.041.5625$1.62
ETH0.06%$0.00035,340.7438$1.6
ETH0.06%$0.02578361.599$1.59
ETH0.06%$0.009312168.1239$1.57
ETH0.06%$0.00005726,930.7245$1.55
ETH0.05%$0.04470334.1376$1.53
ETH0.05%$0.000003496,970.3952$1.47
ETH0.05%$0.010053145.9575$1.47
ETH0.05%$0.0003873,641.5561$1.41
ETH0.05%$0.000911,520.071$1.38
ETH0.05%$0.02683450$1.34
ETH0.05%<$0.0000016,906,536.8412$1.31
ETH0.05%$0.00001493,268.1172$1.31
ETH0.05%$0.7830071.6593$1.3
ETH0.05%$0.0007941,634.2636$1.3
ETH0.04%$0.1649547.4318$1.23
ETH0.04%$0.02035257.6261$1.17
ETH0.04%$0.05030923.2377$1.17
ETH0.04%$0.00005520,702.7616$1.15
ETH0.04%$0.009032126.1341$1.14
ETH0.04%$0.0005312,145.7561$1.14
ETH0.04%$0.005455202.1231$1.1
ETH0.04%$0.00178613.8464$1.09
ETH0.04%$0.04948721.7315$1.08
ETH0.04%$0.07862413.5137$1.06
ETH0.04%$0.00003332,217$1.06
ETH0.04%$0.0009291,129.8341$1.05
ETH0.04%$12.320.0834$1.03
ETH0.04%$0.001998508.4295$1.02
ETH0.04%$0.0008541,173.0738$1
ETH0.03%$0.0002134,537.771$0.966
ETH0.03%$0.01858851.5776$0.9587
ETH0.03%$0.01253374.9042$0.9387
ETH0.03%$0.005487170.6592$0.9364
ETH0.03%<$0.00000153,111,285,821,791.938$0.9302
ETH0.03%$0.3867472.3907$0.9245
ETH0.03%$0.006161147.7972$0.9105
ETH0.03%$0.00002240,380.5206$0.8745
ETH0.03%$0.0008191,048.6357$0.8588
ETH0.03%$0.0001028,407.2167$0.8575
ETH0.03%$0.02501833.2213$0.8311
ETH0.03%$0.0006311,208.2068$0.7619
ETH0.03%<$0.0000016,874,353.5073$0.7559
ETH0.03%$3.810.1954$0.7444
ETH0.03%$0.00781693.4289$0.7302
ETH0.03%$0.001649432.6663$0.7133
ETH0.02%$0.05513912.5806$0.6936
ETH0.02%$0.002256300.1308$0.6771
ETH0.02%$0.001174555.1193$0.6518
ETH0.02%$7.020.0913$0.641
ETH0.02%$0.0002552,469.0685$0.6294
ETH0.02%$0.02239528.0263$0.6276
ETH0.02%$0.01049354.9736$0.5768
ETH0.02%$0.310241.8507$0.5741
ETH0.02%$0.0090562.5$0.5656
ETH0.02%$0.0002212,506.0553$0.5549
ETH0.02%$0.001562350$0.5466
ETH0.02%$0.000763711.7439$0.5433
ETH0.02%$0.0000886,177.625$0.5417
ETH0.02%$19.710.0261$0.5152
ETH0.02%$0.003211159.2695$0.5114
ETH0.02%$0.004545103.2304$0.4691
ETH0.02%$0.01020845.9427$0.4689
ETH0.02%$0.01779826.1103$0.4647
ETH0.02%$1.190.369$0.4391
ETH0.01%$0.0002072,022.6829$0.419
ETH0.01%$0.0002052,016$0.4125
ETH0.01%<$0.0000014,579,089$0.3893
ETH0.01%$0.02570314.8117$0.3807
ETH0.01%$0.1838952$0.3677
ETH0.01%$0.000002214,313.3641$0.3601
ETH0.01%$0.000556643$0.3576
ETH0.01%$0.00829440.4269$0.3352
ETH0.01%$0.0001372,441.5154$0.3342
ETH0.01%$0.00641450$0.3207
ETH0.01%$3,266.710.00009613$0.314
ETH0.01%$0.00473864.1611$0.3039
ETH0.01%<$0.0000012,999,726,838.522$0.2999
ETH<0.01%$0.00428959.813$0.2565
ETH<0.01%$23.120.01$0.2312
ETH<0.01%$3,792.640.00006092$0.231
ETH<0.01%<$0.000001100,697,125.2647$0.2125
ETH<0.01%$0.001123181.431$0.2037
ETH<0.01%$0.0259947.6436$0.1986
ETH<0.01%$0.000317619.3352$0.1966
ETH<0.01%$0.00332358.7925$0.1953
ETH<0.01%$0.000029,895.7479$0.1935
ETH<0.01%$0.00560433.3496$0.1868
ETH<0.01%$0.000763222.2942$0.1695
ETH<0.01%$0.000178892.4186$0.1587
ETH<0.01%$0.041683.5256$0.1469
ETH<0.01%$0.0142429$0.1281
ETH<0.01%$0.00821115.5867$0.1279
ETH<0.01%$0.000167750.4072$0.125
ETH<0.01%$78.610.00156163$0.1227
ETH<0.01%$0.00954312.1517$0.1159
ETH<0.01%$45.240.0025$0.1131
ETH<0.01%$0.000137783.0805$0.1072
ETH<0.01%$0.0000422,500$0.1054
ETH<0.01%$20.390.00513527$0.1046
BASE0.14%$0.0007955,067$4.03
BASE0.07%$0.0010711,784.59$1.91
BASE0.01%<$0.00000111,111,111$0.4033
POL0.06%$94,8070.00001913$1.81
POL0.02%$3,294.090.00013866$0.4567
POL<0.01%$0.9976020.1653$0.1648
ARB0.02%$94,5430.00000728$0.6882
ARB0.01%$3,275.70.00011557$0.3785
ARB<0.01%$0.9976750.2183$0.2177
ARB<0.01%$0.9966460.1947$0.194
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.