ETH Price: $3,310.91 (+2.67%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00
Transaction Hash
Method
Block
From
To
Get Assets197806762024-05-02 6:33:23266 days ago1714631603IN
0x4aFf02D7...109427A07
0.00083112 ETH0.001232196.64136354
Get Assets197799132024-05-02 3:59:59266 days ago1714622399IN
0x4aFf02D7...109427A07
0.00084046 ETH0.000766664.13282341
Get Assets197785822024-05-01 23:31:11267 days ago1714606271IN
0x4aFf02D7...109427A07
0.00154882 ETH0.000866584.85485636
Get Assets197714302024-04-30 23:34:11268 days ago1714520051IN
0x4aFf02D7...109427A07
0.00091016 ETH0.00104645.70572078
Get Assets197710722024-04-30 22:21:59268 days ago1714515719IN
0x4aFf02D7...109427A07
0.00055094 ETH0.001515218.27351459
Get Assets197609352024-04-29 12:21:11269 days ago1714393271IN
0x4aFf02D7...109427A07
0.00097955 ETH0.0019980611.19548369
Get Assets197578182024-04-29 1:54:35270 days ago1714355675IN
0x4aFf02D7...109427A07
0.00353318 ETH0.000984475.12261485
Get Assets197568482024-04-28 22:38:59270 days ago1714343939IN
0x4aFf02D7...109427A07
0.01524321 ETH0.001261586.5194607
Get Assets197554752024-04-28 18:02:23270 days ago1714327343IN
0x4aFf02D7...109427A07
0.01735385 ETH0.001595588.01653514
Get Assets197513102024-04-28 4:03:59270 days ago1714277039IN
0x4aFf02D7...109427A07
0.00159197 ETH0.000928475.20106242
Get Assets197488882024-04-27 19:55:59271 days ago1714247759IN
0x4aFf02D7...109427A07
0.01726386 ETH0.001027335.45040547
Get Assets197450432024-04-27 6:59:47271 days ago1714201187IN
0x4aFf02D7...109427A07
0.00444244 ETH0.001061285.52225123
Get Assets197410052024-04-26 17:26:47272 days ago1714152407IN
0x4aFf02D7...109427A07
0.00156703 ETH0.000974185.45710892
Get Assets197393202024-04-26 11:45:47272 days ago1714131947IN
0x4aFf02D7...109427A07
0.00132042 ETH0.001324078.0353554
Get Assets197393162024-04-26 11:44:59272 days ago1714131899IN
0x4aFf02D7...109427A07
0.00132042 ETH0.001403887.86662064
Get Assets197377592024-04-26 6:29:47272 days ago1714112987IN
0x4aFf02D7...109427A07
0.00131917 ETH0.001455248.15444132
Get Assets197375622024-04-26 5:50:11272 days ago1714110611IN
0x4aFf02D7...109427A07
0.00132433 ETH0.001283577.19324606
Get Assets197334392024-04-25 16:01:11273 days ago1714060871IN
0x4aFf02D7...109427A07
0.0008882 ETH0.0052632628.37556098
Get Assets197327982024-04-25 13:52:11273 days ago1714053131IN
0x4aFf02D7...109427A07
0.00133454 ETH0.0023976313.43507221
Get Assets197278322024-04-24 21:12:23274 days ago1713993143IN
0x4aFf02D7...109427A07
0.00728849 ETH0.001637658.66203772
Get Assets197243862024-04-24 9:36:35274 days ago1713951395IN
0x4aFf02D7...109427A07
0.00734178 ETH0.0022056311.68982342
Get Assets197214882024-04-23 23:51:59275 days ago1713916319IN
0x4aFf02D7...109427A07
0.00163959 ETH0.001148226.43201967
Get Assets197179892024-04-23 12:06:59275 days ago1713874019IN
0x4aFf02D7...109427A07
0.00161064 ETH0.002332513.06600438
Get Assets197179112024-04-23 11:51:11275 days ago1713873071IN
0x4aFf02D7...109427A07
0.00758834 ETH0.001885919.9709249
Get Assets197172932024-04-23 9:47:35275 days ago1713865655IN
0x4aFf02D7...109427A07
0.00050823 ETH0.001957647.84333002
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
197806762024-05-02 6:33:23266 days ago1714631603
0x4aFf02D7...109427A07
0.00032785 ETH
197806762024-05-02 6:33:23266 days ago1714631603
0x4aFf02D7...109427A07
0.00050327 ETH
197799132024-05-02 3:59:59266 days ago1714622399
0x4aFf02D7...109427A07
0.00033709 ETH
197799132024-05-02 3:59:59266 days ago1714622399
0x4aFf02D7...109427A07
0.00050337 ETH
197785822024-05-01 23:31:11267 days ago1714606271
0x4aFf02D7...109427A07
0.00103843 ETH
197785822024-05-01 23:31:11267 days ago1714606271
0x4aFf02D7...109427A07
0.00051038 ETH
197714302024-04-30 23:34:11268 days ago1714520051
0x4aFf02D7...109427A07
0.0004061 ETH
197714302024-04-30 23:34:11268 days ago1714520051
0x4aFf02D7...109427A07
0.00050406 ETH
197710722024-04-30 22:21:59268 days ago1714515719
0x4aFf02D7...109427A07
0.00005044 ETH
197710722024-04-30 22:21:59268 days ago1714515719
0x4aFf02D7...109427A07
0.0005005 ETH
197609352024-04-29 12:21:11269 days ago1714393271
0x4aFf02D7...109427A07
0.00047481 ETH
197609352024-04-29 12:21:11269 days ago1714393271
0x4aFf02D7...109427A07
0.00050474 ETH
197578182024-04-29 1:54:35270 days ago1714355675
0x4aFf02D7...109427A07
0.00300315 ETH
197578182024-04-29 1:54:35270 days ago1714355675
0x4aFf02D7...109427A07
0.00053003 ETH
197568482024-04-28 22:38:59270 days ago1714343939
0x4aFf02D7...109427A07
0.01459724 ETH
197568482024-04-28 22:38:59270 days ago1714343939
0x4aFf02D7...109427A07
0.00064597 ETH
197554752024-04-28 18:02:23270 days ago1714327343
0x4aFf02D7...109427A07
0.01668698 ETH
197554752024-04-28 18:02:23270 days ago1714327343
0x4aFf02D7...109427A07
0.00066686 ETH
197513102024-04-28 4:03:59270 days ago1714277039
0x4aFf02D7...109427A07
0.00108116 ETH
197513102024-04-28 4:03:59270 days ago1714277039
0x4aFf02D7...109427A07
0.00051081 ETH
197488882024-04-27 19:55:59271 days ago1714247759
0x4aFf02D7...109427A07
0.01659788 ETH
197488882024-04-27 19:55:59271 days ago1714247759
0x4aFf02D7...109427A07
0.00066597 ETH
197450432024-04-27 6:59:47271 days ago1714201187
0x4aFf02D7...109427A07
0.0039034 ETH
197450432024-04-27 6:59:47271 days ago1714201187
0x4aFf02D7...109427A07
0.00053903 ETH
197410052024-04-26 17:26:47272 days ago1714152407
0x4aFf02D7...109427A07
0.00105647 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenBuyer

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : TokenBuyer.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

import { FeeDistributor } from "./utils/FeeDistributor.sol";
import { Signatures } from "./utils/Signatures.sol";
import { ITokenBuyer } from "./interfaces/ITokenBuyer.sol";
import { IUniversalRouter } from "./interfaces/external/IUniversalRouter.sol";
import { LibAddress } from "./lib/LibAddress.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title A smart contract for buying any kind of tokens and taking a fee.
contract TokenBuyer is ITokenBuyer, FeeDistributor, Signatures {
    using LibAddress for address payable;

    address payable public immutable universalRouter;
    address public immutable permit2;

    /// @param universalRouter_ The address of Uniswap's Universal router.
    /// @param universalRouter_ The address of the Permit2 contract.
    /// @param feeCollector_ The address that will receive a fee from the funds.
    /// @param feePercentBps_ The percentage of the fee expressed in basis points (e.g 500 for a 5% cut).
    constructor(
        address payable universalRouter_,
        address permit2_,
        address payable feeCollector_,
        uint96 feePercentBps_
    ) FeeDistributor(feeCollector_, feePercentBps_) {
        universalRouter = universalRouter_;
        permit2 = permit2_;
    }

    function getAssets(
        uint256 guildId,
        PayToken calldata payToken,
        bytes calldata uniCommands,
        bytes[] calldata uniInputs
    ) external payable {
        IERC20 token = IERC20(payToken.tokenAddress);

        // Get the tokens from the user and send the fee collector's share
        if (address(token) == address(0)) feeCollector.sendEther(calculateFee(address(0), msg.value));
        else {
            if (!token.transferFrom(msg.sender, address(this), payToken.amount))
                revert TransferFailed(msg.sender, address(this));
            if (!token.transfer(feeCollector, calculateFee(address(token), payToken.amount)))
                revert TransferFailed(address(this), feeCollector);
            if (token.allowance(address(this), permit2) < payToken.amount) token.approve(permit2, type(uint256).max);
        }

        IUniversalRouter(universalRouter).execute{ value: address(this).balance }(uniCommands, uniInputs);

        // Send out any remaining tokens
        if (address(token) != address(0) && !token.transfer(msg.sender, token.balanceOf(address(this))))
            revert TransferFailed(address(this), msg.sender);

        emit TokensBought(guildId);
    }

    function sweep(address token, address payable recipient, uint256 amount) external onlyFeeCollector {
        if (!IERC20(token).transfer(recipient, amount)) revert TransferFailed(address(this), feeCollector);
        emit TokensSweeped(token, recipient, amount);
    }
}

File 2 of 12 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 3 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

File 4 of 12 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 5 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * 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[EIP 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);
}

File 6 of 12 : IRewardsCollector.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.15;

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

/// @title LooksRare Rewards Collector
/// @notice Implements a permissionless call to fetch LooksRare rewards earned by Universal Router users
/// and transfers them to an external rewards distributor contract
interface IRewardsCollector {
    /// @notice Fetches users' LooksRare rewards and sends them to the distributor contract
    /// @param looksRareClaim The data required by LooksRare to claim reward tokens
    function collectRewards(bytes calldata looksRareClaim) external;
}

File 7 of 12 : IUniversalRouter.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.17;

import { IERC721Receiver } from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import { IERC1155Receiver } from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import { IRewardsCollector } from "./IRewardsCollector.sol";

interface IUniversalRouter is IRewardsCollector, IERC721Receiver, IERC1155Receiver {
    /// @notice Thrown when a required command has failed
    error ExecutionFailed(uint256 commandIndex, bytes message);

    /// @notice Thrown when attempting to send ETH directly to the contract
    error ETHNotAccepted();

    /// @notice Thrown executing commands with an expired deadline
    error TransactionDeadlinePassed();

    /// @notice Thrown executing commands with an expired deadline
    error LengthMismatch();

    /// @notice Executes encoded commands along with provided inputs. Reverts if deadline has expired.
    /// @param commands A set of concatenated commands, each 1 byte in length
    /// @param inputs An array of byte strings containing abi encoded inputs for each command
    /// @param deadline The deadline by which the transaction must be executed
    function execute(bytes calldata commands, bytes[] calldata inputs, uint256 deadline) external payable;

    /// @notice Executes encoded commands along with provided inputs.
    /// @param commands A set of concatenated commands, each 1 byte in length
    /// @param inputs An array of byte strings containing abi encoded inputs for each command
    function execute(bytes calldata commands, bytes[] calldata inputs) external payable;
}

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

interface IFeeDistributor {
    /// @notice The base fee of a swap on top of the percentual fee.
    /// @param token The token whose base fee is queried.
    /// @return baseFee The amount of the fee in wei.
    function baseFee(address token) external returns (uint256 baseFee);

    /// @notice Sets the base fee for a given token.
    /// @dev Callable only by the current fee collector.
    /// @param token The token whose base fee is set.
    /// @param newFee The new base fee in wei.
    function setBaseFee(address token, uint256 newFee) external;

    /// @notice Sets the address that receives the fee from the funds.
    /// @dev Callable only by the current fee collector.
    /// @param newFeeCollector The new address of feeCollector.
    function setFeeCollector(address payable newFeeCollector) external;

    /// @notice Sets the fee's amount from the funds.
    /// @dev Callable only by the fee collector.
    /// @param newShare The percentual value expressed in basis points.
    function setFeePercentBps(uint96 newShare) external;

    /// @notice Returns the address that receives the fee from the funds.
    function feeCollector() external view returns (address payable);

    /// @notice Returns the percentage of the fee expressed in basis points.
    function feePercentBps() external view returns (uint96);

    /// @notice Event emitted when a token's base fee is changed.
    /// @param token The address of the token whose fee was changed. 0 for ether.
    /// @param newFee The new amount of base fee in wei.
    event BaseFeeChanged(address token, uint256 newFee);

    /// @notice Event emitted when the fee collector address is changed.
    /// @param newFeeCollector The new address of feeCollector.
    event FeeCollectorChanged(address newFeeCollector);

    /// @notice Event emitted when the share of the fee collector changes.
    /// @param newShare The new value of feePercentBps.
    event FeePercentBpsChanged(uint96 newShare);

    /// @notice Error thrown when a function is attempted to be called by the wrong address.
    /// @param sender The address that sent the transaction.
    /// @param owner The address that is allowed to call the function.
    error AccessDenied(address sender, address owner);
}

File 9 of 12 : ITokenBuyer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { IFeeDistributor } from "./IFeeDistributor.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title A smart contract for buying any kind of tokens and taking a fee.
interface ITokenBuyer is IFeeDistributor {
    /// @notice A token address-amount pair.
    struct PayToken {
        address tokenAddress;
        uint256 amount;
    }

    /// @notice Executes token swaps and takes a fee.
    /// @param guildId The id of the guild where the payment was made. Used only for analytics.
    /// @param payToken The address and the amount of the token that's used for paying. 0 for ether.
    /// @param uniCommands A set of concatenated commands, each 1 byte in length.
    /// @param uniInputs An array of byte strings containing abi encoded inputs for each command.
    function getAssets(
        uint256 guildId,
        PayToken calldata payToken,
        bytes calldata uniCommands,
        bytes[] calldata uniInputs
    ) external payable;

    /// @notice Allows the feeCollector to withdraw any tokens stuck in the contract. Used to rescue funds.
    /// @param token The address of the token to sweep. 0 for ether.
    /// @param recipient The recipient of the tokens.
    /// @param amount The amount of the tokens to sweep.
    function sweep(address token, address payable recipient, uint256 amount) external;

    /// @notice Returns the address of Uniswap's Universal Router.
    function universalRouter() external view returns (address payable);

    /// @notice Returns the address the Permit2 contract.
    function permit2() external view returns (address);

    /// @notice Event emitted when a call to {getAssets} succeeds.
    /// @param guildId The id of the guild where the payment was made. Used only for analytics.
    event TokensBought(uint256 guildId);

    /// @notice Event emitted when tokens are sweeped from the contract.
    /// @dev Callable only by the current fee collector.
    /// @param token The address of the token sweeped. 0 for ether.
    /// @param recipient The recipient of the tokens.
    /// @param amount The amount of the tokens sweeped.
    event TokensSweeped(address token, address payable recipient, uint256 amount);

    /// @notice Error thrown when an ERC20 transfer failed.
    /// @param from The sender of the token.
    /// @param to The recipient of the token.
    error TransferFailed(address from, address to);
}

File 10 of 12 : LibAddress.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Library for functions related to addresses.
library LibAddress {
    /// @notice Error thrown when sending ether fails.
    /// @param recipient The address that could not receive the ether.
    error FailedToSendEther(address recipient);

    /// @notice Send ether to an address, forwarding all available gas and reverting on errors.
    /// @param recipient The recipient of the ether.
    /// @param amount The amount of ether to send in wei.
    function sendEther(address payable recipient, uint256 amount) internal {
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, ) = recipient.call{ value: amount }("");
        if (!success) revert FailedToSendEther(recipient);
    }
}

File 11 of 12 : FeeDistributor.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

import { IFeeDistributor } from "../interfaces/IFeeDistributor.sol";

contract FeeDistributor is IFeeDistributor {
    address payable public feeCollector;
    uint96 public feePercentBps;

    mapping(address => uint256) public baseFee;

    /// @param feeCollector_ The address that will receive a fee from the funds.
    /// @param feePercentBps_ The percentage of the fee expressed in basis points (e.g 500 for a 5% cut).
    constructor(address payable feeCollector_, uint96 feePercentBps_) {
        feeCollector = feeCollector_;
        feePercentBps = feePercentBps_;
    }

    modifier onlyFeeCollector() {
        if (msg.sender != feeCollector) revert AccessDenied(msg.sender, feeCollector);
        _;
    }

    function setBaseFee(address token, uint256 newFee) external onlyFeeCollector {
        baseFee[token] = newFee;
        emit BaseFeeChanged(token, newFee);
    }

    function setFeeCollector(address payable newFeeCollector) external onlyFeeCollector {
        feeCollector = newFeeCollector;
        emit FeeCollectorChanged(newFeeCollector);
    }

    function setFeePercentBps(uint96 newShare) external onlyFeeCollector {
        feePercentBps = newShare;
        emit FeePercentBpsChanged(newShare);
    }

    /// @notice Calculate the fee from the full amount + fee
    function calculateFee(address token, uint256 amount) internal view returns (uint256 fee) {
        uint256 baseFeeAmount = baseFee[token];
        uint256 withoutBaseFee = amount - baseFeeAmount;
        return withoutBaseFee - ((withoutBaseFee / (10000 + feePercentBps)) * 10000) + baseFeeAmount;
    }
}

File 12 of 12 : Signatures.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

import { ITokenBuyer } from "../interfaces/ITokenBuyer.sol";

contract Signatures {
    // bytes4(keccak256("isValidSignature(bytes32,bytes)")
    bytes4 internal constant MAGICVALUE = 0x1626ba7e;

    /// @notice Accepts signatures from permit2, rejects otherwise.
    /// @param hash Hash of the data to be signed.
    /// @param signature Signature byte array associated with hash.
    /// @return magicValue The function selector if the function passes.
    function isValidSignature(bytes32 hash, bytes memory signature) public view returns (bytes4 magicValue) {
        if (msg.sender == ITokenBuyer(address(this)).permit2()) return MAGICVALUE;

        hash;
        signature;
        return bytes4(0);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"universalRouter_","type":"address"},{"internalType":"address","name":"permit2_","type":"address"},{"internalType":"address payable","name":"feeCollector_","type":"address"},{"internalType":"uint96","name":"feePercentBps_","type":"uint96"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"AccessDenied","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"FailedToSendEther","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"BaseFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newFeeCollector","type":"address"}],"name":"FeeCollectorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint96","name":"newShare","type":"uint96"}],"name":"FeePercentBpsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"guildId","type":"uint256"}],"name":"TokensBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address payable","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensSweeped","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"baseFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercentBps","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"guildId","type":"uint256"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ITokenBuyer.PayToken","name":"payToken","type":"tuple"},{"internalType":"bytes","name":"uniCommands","type":"bytes"},{"internalType":"bytes[]","name":"uniInputs","type":"bytes[]"}],"name":"getAssets","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"magicValue","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"permit2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setBaseFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newFeeCollector","type":"address"}],"name":"setFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"newShare","type":"uint96"}],"name":"setFeePercentBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"universalRouter","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b506040516111a33803806111a383398101604081905261002f91610074565b6001600160601b0316600160a01b026001600160a01b03918216176000559182166080521660a0526100df565b6001600160a01b038116811461007157600080fd5b50565b6000806000806080858703121561008a57600080fd5b84516100958161005c565b60208601519094506100a68161005c565b60408601519093506100b78161005c565b60608601519092506001600160601b03811681146100d457600080fd5b939692955090935050565b60805160a05161108b6101186000396000818160b30152818161073e01526107c4015260008181610178015261085a015261108b6000f3fe60806040526004361061009c5760003560e01c806362c067671161006457806362c06767146101bc57806378974c7f146101dc578063a42dce801461021b578063b333ad801461023b578063c415b95c1461024e578063e162d98b1461026e57600080fd5b806312261ee7146100a1578063123b9a0b146100f25780631626ba7e1461012d57806335a9e4df14610166578063541e004b1461019a575b600080fd5b3480156100ad57600080fd5b506100d57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100fe57600080fd5b5061011f61010d366004610bd1565b60016020526000908152604090205481565b6040519081526020016100e9565b34801561013957600080fd5b5061014d610148366004610c0b565b61028e565b6040516001600160e01b031990911681526020016100e9565b34801561017257600080fd5b506100d57f000000000000000000000000000000000000000000000000000000000000000081565b3480156101a657600080fd5b506101ba6101b5366004610cc6565b610319565b005b3480156101c857600080fd5b506101ba6101d7366004610cef565b6103bb565b3480156101e857600080fd5b5060005461020390600160a01b90046001600160601b031681565b6040516001600160601b0390911681526020016100e9565b34801561022757600080fd5b506101ba610236366004610bd1565b6104e8565b6101ba610249366004610d7c565b610572565b34801561025a57600080fd5b506000546100d5906001600160a01b031681565b34801561027a57600080fd5b506101ba610289366004610e40565b610a1d565b6000306001600160a01b03166312261ee76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f29190610e6c565b6001600160a01b0316330361030f5750630b135d3f60e11b610313565b5060005b92915050565b6000546001600160a01b0316331461035e5760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b60405180910390fd5b600080546001600160a01b0316600160a01b6001600160601b038416908102919091179091556040519081527fd18d6fd346cac73f7e29b01be80fa48548630ffec408fd3685bac8965961f147906020015b60405180910390a150565b6000546001600160a01b031633146103f75760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a9190610ea3565b6104985760005460405163291e1d5560e11b81526103559130916001600160a01b0390911690600401610e89565b604080516001600160a01b038086168252841660208201529081018290527ff9db6e7779f8587d77404ba3722a213b06891b7663ebb902856503d678b2ecd79060600160405180910390a1505050565b6000546001600160a01b031633146105245760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f9c1996a14d26c3ecd833c10222d012447ef07b09b15000f3a34318ff039c0bdc906020016103b0565b60006105816020870187610bd1565b90506001600160a01b0381166105b6576105b161059f600034610ab1565b6000546001600160a01b031690610b35565b610843565b6040516323b872dd60e01b8152336004820152306024820152602087013560448201526001600160a01b038216906323b872dd906064016020604051808303816000875af115801561060c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106309190610ea3565b61065157333060405163291e1d5560e11b8152600401610355929190610e89565b6000546001600160a01b038083169163a9059cbb91166106758460208b0135610ab1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156106c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e49190610ea3565b6107125760005460405163291e1d5560e11b81526103559130916001600160a01b0390911690600401610e89565b604051636eb1769f60e11b81526020870135906001600160a01b0383169063dd62ed3e906107669030907f000000000000000000000000000000000000000000000000000000000000000090600401610e89565b602060405180830381865afa158015610783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a79190610ec5565b10156108435760405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600019602483015282169063095ea7b3906044016020604051808303816000875af115801561081d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108419190610ea3565b505b6040516324856bc360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906324856bc3904790610897908990899089908990600401610f07565b6000604051808303818588803b1580156108b057600080fd5b505af11580156108c4573d6000803e3d6000fd5b50505050506001600160a01b038116158015906109bf57506040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa15801561092a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094e9190610ec5565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd9190610ea3565b155b156109e157303360405163291e1d5560e11b8152600401610355929190610e89565b6040518781527f6ac79300fdc15433d6baf4670095e0ccb0ea9ce0e461056a51b917f25165188c9060200160405180910390a150505050505050565b6000546001600160a01b03163314610a595760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b6001600160a01b038216600081815260016020908152604091829020849055815192835282018390527fd156ca316d26c3ef349214cf79162a57b8271f66b5f38910a27a76a768f06d83910160405180910390a15050565b6001600160a01b03821660009081526001602052604081205481610ad58285610fcf565b6000549091508290610af990600160a01b90046001600160601b0316612710610fe2565b610b0c906001600160601b031683611009565b610b189061271061102b565b610b229083610fcf565b610b2c9190611042565b95945050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610b82576040519150601f19603f3d011682016040523d82523d6000602084013e610b87565b606091505b5050905080610bb457604051632499e3bb60e11b81526001600160a01b0384166004820152602401610355565b505050565b6001600160a01b0381168114610bce57600080fd5b50565b600060208284031215610be357600080fd5b8135610bee81610bb9565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c1e57600080fd5b82359150602083013567ffffffffffffffff80821115610c3d57600080fd5b818501915085601f830112610c5157600080fd5b813581811115610c6357610c63610bf5565b604051601f8201601f19908116603f01168101908382118183101715610c8b57610c8b610bf5565b81604052828152886020848701011115610ca457600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610cd857600080fd5b81356001600160601b0381168114610bee57600080fd5b600080600060608486031215610d0457600080fd5b8335610d0f81610bb9565b92506020840135610d1f81610bb9565b929592945050506040919091013590565b60008083601f840112610d4257600080fd5b50813567ffffffffffffffff811115610d5a57600080fd5b6020830191508360208260051b8501011115610d7557600080fd5b9250929050565b60008060008060008086880360a0811215610d9657600080fd5b873596506040601f1982011215610dac57600080fd5b50602087019450606087013567ffffffffffffffff80821115610dce57600080fd5b818901915089601f830112610de257600080fd5b813581811115610df157600080fd5b8a6020828501011115610e0357600080fd5b602083019650809550506080890135915080821115610e2157600080fd5b50610e2e89828a01610d30565b979a9699509497509295939492505050565b60008060408385031215610e5357600080fd5b8235610e5e81610bb9565b946020939093013593505050565b600060208284031215610e7e57600080fd5b8151610bee81610bb9565b6001600160a01b0392831681529116602082015260400190565b600060208284031215610eb557600080fd5b81518015158114610bee57600080fd5b600060208284031215610ed757600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000610f1b604083018688610ede565b602083820381850152818583528183019050818660051b8401018760005b88811015610fa957858303601f190184528135368b9003601e19018112610f5f57600080fd5b8a01858101903567ffffffffffffffff811115610f7b57600080fd5b803603821315610f8a57600080fd5b610f95858284610ede565b958701959450505090840190600101610f39565b50909a9950505050505050505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561031357610313610fb9565b6001600160601b0381811683821601908082111561100257611002610fb9565b5092915050565b60008261102657634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761031357610313610fb9565b8082018082111561031357610313610fb956fea26469706673582212200699d5074054a67128c0b7499f7763fe82a0a3eb7d373552b4e399fb89b9379f64736f6c63430008120033000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba30000000000000000000000001d7da3d9bc8fcff7953d91e721531d6dc69f09f60000000000000000000000000000000000000000000000000000000000000064

Deployed Bytecode

0x60806040526004361061009c5760003560e01c806362c067671161006457806362c06767146101bc57806378974c7f146101dc578063a42dce801461021b578063b333ad801461023b578063c415b95c1461024e578063e162d98b1461026e57600080fd5b806312261ee7146100a1578063123b9a0b146100f25780631626ba7e1461012d57806335a9e4df14610166578063541e004b1461019a575b600080fd5b3480156100ad57600080fd5b506100d57f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba381565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100fe57600080fd5b5061011f61010d366004610bd1565b60016020526000908152604090205481565b6040519081526020016100e9565b34801561013957600080fd5b5061014d610148366004610c0b565b61028e565b6040516001600160e01b031990911681526020016100e9565b34801561017257600080fd5b506100d57f000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b81565b3480156101a657600080fd5b506101ba6101b5366004610cc6565b610319565b005b3480156101c857600080fd5b506101ba6101d7366004610cef565b6103bb565b3480156101e857600080fd5b5060005461020390600160a01b90046001600160601b031681565b6040516001600160601b0390911681526020016100e9565b34801561022757600080fd5b506101ba610236366004610bd1565b6104e8565b6101ba610249366004610d7c565b610572565b34801561025a57600080fd5b506000546100d5906001600160a01b031681565b34801561027a57600080fd5b506101ba610289366004610e40565b610a1d565b6000306001600160a01b03166312261ee76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f29190610e6c565b6001600160a01b0316330361030f5750630b135d3f60e11b610313565b5060005b92915050565b6000546001600160a01b0316331461035e5760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b60405180910390fd5b600080546001600160a01b0316600160a01b6001600160601b038416908102919091179091556040519081527fd18d6fd346cac73f7e29b01be80fa48548630ffec408fd3685bac8965961f147906020015b60405180910390a150565b6000546001600160a01b031633146103f75760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015610446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046a9190610ea3565b6104985760005460405163291e1d5560e11b81526103559130916001600160a01b0390911690600401610e89565b604080516001600160a01b038086168252841660208201529081018290527ff9db6e7779f8587d77404ba3722a213b06891b7663ebb902856503d678b2ecd79060600160405180910390a1505050565b6000546001600160a01b031633146105245760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f9c1996a14d26c3ecd833c10222d012447ef07b09b15000f3a34318ff039c0bdc906020016103b0565b60006105816020870187610bd1565b90506001600160a01b0381166105b6576105b161059f600034610ab1565b6000546001600160a01b031690610b35565b610843565b6040516323b872dd60e01b8152336004820152306024820152602087013560448201526001600160a01b038216906323b872dd906064016020604051808303816000875af115801561060c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106309190610ea3565b61065157333060405163291e1d5560e11b8152600401610355929190610e89565b6000546001600160a01b038083169163a9059cbb91166106758460208b0135610ab1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156106c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e49190610ea3565b6107125760005460405163291e1d5560e11b81526103559130916001600160a01b0390911690600401610e89565b604051636eb1769f60e11b81526020870135906001600160a01b0383169063dd62ed3e906107669030907f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba390600401610e89565b602060405180830381865afa158015610783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a79190610ec5565b10156108435760405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba381166004830152600019602483015282169063095ea7b3906044016020604051808303816000875af115801561081d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108419190610ea3565b505b6040516324856bc360e01b81526001600160a01b037f000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b16906324856bc3904790610897908990899089908990600401610f07565b6000604051808303818588803b1580156108b057600080fd5b505af11580156108c4573d6000803e3d6000fd5b50505050506001600160a01b038116158015906109bf57506040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa15801561092a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094e9190610ec5565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd9190610ea3565b155b156109e157303360405163291e1d5560e11b8152600401610355929190610e89565b6040518781527f6ac79300fdc15433d6baf4670095e0ccb0ea9ce0e461056a51b917f25165188c9060200160405180910390a150505050505050565b6000546001600160a01b03163314610a595760005460405163c21bbf9d60e01b81526103559133916001600160a01b0390911690600401610e89565b6001600160a01b038216600081815260016020908152604091829020849055815192835282018390527fd156ca316d26c3ef349214cf79162a57b8271f66b5f38910a27a76a768f06d83910160405180910390a15050565b6001600160a01b03821660009081526001602052604081205481610ad58285610fcf565b6000549091508290610af990600160a01b90046001600160601b0316612710610fe2565b610b0c906001600160601b031683611009565b610b189061271061102b565b610b229083610fcf565b610b2c9190611042565b95945050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610b82576040519150601f19603f3d011682016040523d82523d6000602084013e610b87565b606091505b5050905080610bb457604051632499e3bb60e11b81526001600160a01b0384166004820152602401610355565b505050565b6001600160a01b0381168114610bce57600080fd5b50565b600060208284031215610be357600080fd5b8135610bee81610bb9565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610c1e57600080fd5b82359150602083013567ffffffffffffffff80821115610c3d57600080fd5b818501915085601f830112610c5157600080fd5b813581811115610c6357610c63610bf5565b604051601f8201601f19908116603f01168101908382118183101715610c8b57610c8b610bf5565b81604052828152886020848701011115610ca457600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215610cd857600080fd5b81356001600160601b0381168114610bee57600080fd5b600080600060608486031215610d0457600080fd5b8335610d0f81610bb9565b92506020840135610d1f81610bb9565b929592945050506040919091013590565b60008083601f840112610d4257600080fd5b50813567ffffffffffffffff811115610d5a57600080fd5b6020830191508360208260051b8501011115610d7557600080fd5b9250929050565b60008060008060008086880360a0811215610d9657600080fd5b873596506040601f1982011215610dac57600080fd5b50602087019450606087013567ffffffffffffffff80821115610dce57600080fd5b818901915089601f830112610de257600080fd5b813581811115610df157600080fd5b8a6020828501011115610e0357600080fd5b602083019650809550506080890135915080821115610e2157600080fd5b50610e2e89828a01610d30565b979a9699509497509295939492505050565b60008060408385031215610e5357600080fd5b8235610e5e81610bb9565b946020939093013593505050565b600060208284031215610e7e57600080fd5b8151610bee81610bb9565b6001600160a01b0392831681529116602082015260400190565b600060208284031215610eb557600080fd5b81518015158114610bee57600080fd5b600060208284031215610ed757600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000610f1b604083018688610ede565b602083820381850152818583528183019050818660051b8401018760005b88811015610fa957858303601f190184528135368b9003601e19018112610f5f57600080fd5b8a01858101903567ffffffffffffffff811115610f7b57600080fd5b803603821315610f8a57600080fd5b610f95858284610ede565b958701959450505090840190600101610f39565b50909a9950505050505050505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561031357610313610fb9565b6001600160601b0381811683821601908082111561100257611002610fb9565b5092915050565b60008261102657634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761031357610313610fb9565b8082018082111561031357610313610fb956fea26469706673582212200699d5074054a67128c0b7499f7763fe82a0a3eb7d373552b4e399fb89b9379f64736f6c63430008120033

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

000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba30000000000000000000000001d7da3d9bc8fcff7953d91e721531d6dc69f09f60000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : universalRouter_ (address): 0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B
Arg [1] : permit2_ (address): 0x000000000022D473030F116dDEE9F6B43aC78BA3
Arg [2] : feeCollector_ (address): 0x1d7dA3D9BC8fcFf7953D91E721531D6Dc69F09f6
Arg [3] : feePercentBps_ (uint96): 100

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000ef1c6e67703c7bd7107eed8303fbe6ec2554bf6b
Arg [1] : 000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3
Arg [2] : 0000000000000000000000001d7da3d9bc8fcff7953d91e721531d6dc69f09f6
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000064


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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