Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,780 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Get Assets | 19780676 | 266 days ago | IN | 0.00083112 ETH | 0.00123219 | ||||
Get Assets | 19779913 | 266 days ago | IN | 0.00084046 ETH | 0.00076666 | ||||
Get Assets | 19778582 | 267 days ago | IN | 0.00154882 ETH | 0.00086658 | ||||
Get Assets | 19771430 | 268 days ago | IN | 0.00091016 ETH | 0.0010464 | ||||
Get Assets | 19771072 | 268 days ago | IN | 0.00055094 ETH | 0.00151521 | ||||
Get Assets | 19760935 | 269 days ago | IN | 0.00097955 ETH | 0.00199806 | ||||
Get Assets | 19757818 | 270 days ago | IN | 0.00353318 ETH | 0.00098447 | ||||
Get Assets | 19756848 | 270 days ago | IN | 0.01524321 ETH | 0.00126158 | ||||
Get Assets | 19755475 | 270 days ago | IN | 0.01735385 ETH | 0.00159558 | ||||
Get Assets | 19751310 | 270 days ago | IN | 0.00159197 ETH | 0.00092847 | ||||
Get Assets | 19748888 | 271 days ago | IN | 0.01726386 ETH | 0.00102733 | ||||
Get Assets | 19745043 | 271 days ago | IN | 0.00444244 ETH | 0.00106128 | ||||
Get Assets | 19741005 | 272 days ago | IN | 0.00156703 ETH | 0.00097418 | ||||
Get Assets | 19739320 | 272 days ago | IN | 0.00132042 ETH | 0.00132407 | ||||
Get Assets | 19739316 | 272 days ago | IN | 0.00132042 ETH | 0.00140388 | ||||
Get Assets | 19737759 | 272 days ago | IN | 0.00131917 ETH | 0.00145524 | ||||
Get Assets | 19737562 | 272 days ago | IN | 0.00132433 ETH | 0.00128357 | ||||
Get Assets | 19733439 | 273 days ago | IN | 0.0008882 ETH | 0.00526326 | ||||
Get Assets | 19732798 | 273 days ago | IN | 0.00133454 ETH | 0.00239763 | ||||
Get Assets | 19727832 | 274 days ago | IN | 0.00728849 ETH | 0.00163765 | ||||
Get Assets | 19724386 | 274 days ago | IN | 0.00734178 ETH | 0.00220563 | ||||
Get Assets | 19721488 | 275 days ago | IN | 0.00163959 ETH | 0.00114822 | ||||
Get Assets | 19717989 | 275 days ago | IN | 0.00161064 ETH | 0.0023325 | ||||
Get Assets | 19717911 | 275 days ago | IN | 0.00758834 ETH | 0.00188591 | ||||
Get Assets | 19717293 | 275 days ago | IN | 0.00050823 ETH | 0.00195764 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19780676 | 266 days ago | 0.00032785 ETH | ||||
19780676 | 266 days ago | 0.00050327 ETH | ||||
19779913 | 266 days ago | 0.00033709 ETH | ||||
19779913 | 266 days ago | 0.00050337 ETH | ||||
19778582 | 267 days ago | 0.00103843 ETH | ||||
19778582 | 267 days ago | 0.00051038 ETH | ||||
19771430 | 268 days ago | 0.0004061 ETH | ||||
19771430 | 268 days ago | 0.00050406 ETH | ||||
19771072 | 268 days ago | 0.00005044 ETH | ||||
19771072 | 268 days ago | 0.0005005 ETH | ||||
19760935 | 269 days ago | 0.00047481 ETH | ||||
19760935 | 269 days ago | 0.00050474 ETH | ||||
19757818 | 270 days ago | 0.00300315 ETH | ||||
19757818 | 270 days ago | 0.00053003 ETH | ||||
19756848 | 270 days ago | 0.01459724 ETH | ||||
19756848 | 270 days ago | 0.00064597 ETH | ||||
19755475 | 270 days ago | 0.01668698 ETH | ||||
19755475 | 270 days ago | 0.00066686 ETH | ||||
19751310 | 270 days ago | 0.00108116 ETH | ||||
19751310 | 270 days ago | 0.00051081 ETH | ||||
19748888 | 271 days ago | 0.01659788 ETH | ||||
19748888 | 271 days ago | 0.00066597 ETH | ||||
19745043 | 271 days ago | 0.0039034 ETH | ||||
19745043 | 271 days ago | 0.00053903 ETH | ||||
19741005 | 272 days ago | 0.00105647 ETH |
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
Contract Source Code (Solidity Standard Json-Input format)
// 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); } }
// 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); }
// 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); }
// 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); }
// 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); }
// 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; }
// 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; }
// 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); }
// 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); }
// 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); } }
// 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; } }
// 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); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.