Source Code
Latest 25 from a total of 266,968 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer And Mul... | 76082632 | 141 days ago | IN | 0 POL | 0.0426965 | ||||
| Transfer And Mul... | 75699811 | 150 days ago | IN | 0 POL | 0.0023511 | ||||
| Transfer And Mul... | 74344362 | 184 days ago | IN | 0 POL | 0.03795145 | ||||
| Transfer And Mul... | 74329548 | 184 days ago | IN | 0 POL | 0.02109916 | ||||
| Transfer And Mul... | 74324490 | 184 days ago | IN | 0 POL | 0.02338008 | ||||
| Transfer And Mul... | 74315958 | 184 days ago | IN | 0 POL | 0.02496229 | ||||
| Transfer And Mul... | 74314787 | 184 days ago | IN | 0 POL | 0.02461149 | ||||
| Transfer And Mul... | 74313622 | 184 days ago | IN | 0 POL | 0.02976197 | ||||
| Transfer And Mul... | 74309712 | 185 days ago | IN | 0 POL | 0.0334873 | ||||
| Transfer And Mul... | 74306431 | 185 days ago | IN | 0 POL | 0.02828807 | ||||
| Transfer And Mul... | 74273440 | 185 days ago | IN | 0 POL | 0.03424765 | ||||
| Transfer And Mul... | 74270224 | 186 days ago | IN | 0 POL | 0.02461059 | ||||
| Transfer And Mul... | 74203033 | 187 days ago | IN | 0 POL | 0.02121329 | ||||
| Transfer And Mul... | 74195675 | 187 days ago | IN | 0 POL | 0.03942439 | ||||
| Transfer And Mul... | 74187286 | 188 days ago | IN | 0 POL | 0.03324743 | ||||
| Transfer And Mul... | 74185068 | 188 days ago | IN | 0 POL | 0.03889071 | ||||
| Transfer And Mul... | 74183511 | 188 days ago | IN | 0 POL | 0.02462651 | ||||
| Transfer And Mul... | 74179029 | 188 days ago | IN | 0 POL | 0.03922154 | ||||
| Transfer And Mul... | 74174837 | 188 days ago | IN | 0 POL | 0.02896398 | ||||
| Transfer And Mul... | 74173667 | 188 days ago | IN | 0 POL | 0.02385464 | ||||
| Transfer And Mul... | 74165787 | 188 days ago | IN | 0 POL | 0.03206875 | ||||
| Transfer And Mul... | 74155106 | 188 days ago | IN | 0 POL | 0.02849551 | ||||
| Transfer And Mul... | 74154143 | 188 days ago | IN | 0 POL | 0.0400327 | ||||
| Transfer And Mul... | 74145109 | 189 days ago | IN | 0 POL | 0.02575682 | ||||
| Transfer And Mul... | 74142688 | 189 days ago | IN | 0 POL | 0.03396684 |
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 68409069 | 331 days ago | Contract Creation | 0 POL |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ApprovalProxy
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {Ownable} from "solady/src/auth/Ownable.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20Router} from "./interfaces/IERC20Router.sol";
contract ApprovalProxy is Ownable {
using SafeERC20 for IERC20;
error ArrayLengthsMismatch();
error ERC20TransferFromFailed();
error NativeTransferFailed();
event RouterUpdated(address newRouter);
address public router;
receive() external payable {}
constructor(address _owner, address _router) {
_initializeOwner(_owner);
router = _router;
}
/// @notice Withdraw function in case funds get stuck in contract
function withdraw() external onlyOwner {
_send(msg.sender, address(this).balance);
}
/// @notice Set the router address
/// @param _router The address of the router contract
function setRouter(address _router) external onlyOwner {
router = _router;
emit RouterUpdated(_router);
}
/// @notice Transfer tokens to ERC20Router and perform multicall in a single tx
/// @dev This contract must be approved to transfer msg.sender's tokens to the ERC20Router
/// @param tokens An array of token addresses to transfer
/// @param amounts An array of token amounts to transfer
/// @param targets An array of target addresses to pass to the multicall
/// @param datas An array of calldata to pass to the multicall
/// @param values An array of msg values to pass to the multicall
/// @param refundTo The address to refund any leftover ETH to
function transferAndMulticall(
address[] calldata tokens,
uint256[] calldata amounts,
address[] calldata targets,
bytes[] calldata datas,
uint256[] calldata values,
address refundTo
) external payable returns (bytes[] memory) {
// Revert if array lengths do not match
if ((tokens.length != amounts.length)) {
revert ArrayLengthsMismatch();
}
// Revert if array lengths do not match (split from above for readability)
if (targets.length != datas.length || datas.length != values.length) {
revert ArrayLengthsMismatch();
}
// Transfer the tokens to the router
for (uint256 i = 0; i < tokens.length; i++) {
IERC20(tokens[i]).safeTransferFrom(msg.sender, router, amounts[i]);
}
// Call delegatecallMulticall on the router.
// @dev The router does not perform a delegatecall. It is called
// `delegatecallMulticall` to not break integrations with the
// previous router. Note that msg.sender for the calls to targets
// will be the router.
bytes[] memory data = IERC20Router(router).delegatecallMulticall{
value: msg.value
}(targets, datas, values, refundTo);
return data;
}
function _send(address to, uint256 value) internal {
bool success;
assembly {
// Save gas by avoiding copying the return data to memory.
// Provide at most 100k gas to the internal call, which is
// more than enough to cover common use-cases of logic for
// receiving native tokens (eg. SCW payable fallbacks).
success := call(100000, to, value, 0, 0, 0, 0)
}
if (!success) {
revert NativeTransferFailed();
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @notice Simple single owner authorization mixin.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol)
///
/// @dev Note:
/// This implementation does NOT auto-initialize the owner to `msg.sender`.
/// You MUST call the `_initializeOwner` in the constructor / initializer.
///
/// While the ownable portion follows
/// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility,
/// the nomenclature for the 2-step ownership handover may be unique to this codebase.
abstract contract Ownable {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CUSTOM ERRORS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The caller is not authorized to call the function.
error Unauthorized();
/// @dev The `newOwner` cannot be the zero address.
error NewOwnerIsZeroAddress();
/// @dev The `pendingOwner` does not have a valid handover request.
error NoHandoverRequest();
/// @dev Cannot double-initialize.
error AlreadyInitialized();
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* EVENTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The ownership is transferred from `oldOwner` to `newOwner`.
/// This event is intentionally kept the same as OpenZeppelin's Ownable to be
/// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173),
/// despite it not being as lightweight as a single argument event.
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
/// @dev An ownership handover to `pendingOwner` has been requested.
event OwnershipHandoverRequested(address indexed pendingOwner);
/// @dev The ownership handover to `pendingOwner` has been canceled.
event OwnershipHandoverCanceled(address indexed pendingOwner);
/// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`.
uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE =
0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0;
/// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`.
uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE =
0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d;
/// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`.
uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE =
0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* STORAGE */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev The owner slot is given by:
/// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`.
/// It is intentionally chosen to be a high value
/// to avoid collision with lower slots.
/// The choice of manual storage layout is to enable compatibility
/// with both regular and upgradeable contracts.
bytes32 internal constant _OWNER_SLOT =
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927;
/// The ownership handover slot of `newOwner` is given by:
/// ```
/// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED))
/// let handoverSlot := keccak256(0x00, 0x20)
/// ```
/// It stores the expiry timestamp of the two-step ownership handover.
uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* INTERNAL FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Override to return true to make `_initializeOwner` prevent double-initialization.
function _guardInitializeOwner() internal pure virtual returns (bool guard) {}
/// @dev Initializes the owner directly without authorization guard.
/// This function must be called upon initialization,
/// regardless of whether the contract is upgradeable or not.
/// This is to enable generalization to both regular and upgradeable contracts,
/// and to save gas in case the initial owner is not the caller.
/// For performance reasons, this function will not check if there
/// is an existing owner.
function _initializeOwner(address newOwner) internal virtual {
if (_guardInitializeOwner()) {
/// @solidity memory-safe-assembly
assembly {
let ownerSlot := _OWNER_SLOT
if sload(ownerSlot) {
mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`.
revert(0x1c, 0x04)
}
// Clean the upper 96 bits.
newOwner := shr(96, shl(96, newOwner))
// Store the new value.
sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner))))
// Emit the {OwnershipTransferred} event.
log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
}
} else {
/// @solidity memory-safe-assembly
assembly {
// Clean the upper 96 bits.
newOwner := shr(96, shl(96, newOwner))
// Store the new value.
sstore(_OWNER_SLOT, newOwner)
// Emit the {OwnershipTransferred} event.
log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
}
}
}
/// @dev Sets the owner directly without authorization guard.
function _setOwner(address newOwner) internal virtual {
if (_guardInitializeOwner()) {
/// @solidity memory-safe-assembly
assembly {
let ownerSlot := _OWNER_SLOT
// Clean the upper 96 bits.
newOwner := shr(96, shl(96, newOwner))
// Emit the {OwnershipTransferred} event.
log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
// Store the new value.
sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner))))
}
} else {
/// @solidity memory-safe-assembly
assembly {
let ownerSlot := _OWNER_SLOT
// Clean the upper 96 bits.
newOwner := shr(96, shl(96, newOwner))
// Emit the {OwnershipTransferred} event.
log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
// Store the new value.
sstore(ownerSlot, newOwner)
}
}
}
/// @dev Throws if the sender is not the owner.
function _checkOwner() internal view virtual {
/// @solidity memory-safe-assembly
assembly {
// If the caller is not the stored owner, revert.
if iszero(eq(caller(), sload(_OWNER_SLOT))) {
mstore(0x00, 0x82b42900) // `Unauthorized()`.
revert(0x1c, 0x04)
}
}
}
/// @dev Returns how long a two-step ownership handover is valid for in seconds.
/// Override to return a different value if needed.
/// Made internal to conserve bytecode. Wrap it in a public function if needed.
function _ownershipHandoverValidFor() internal view virtual returns (uint64) {
return 48 * 3600;
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* PUBLIC UPDATE FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Allows the owner to transfer the ownership to `newOwner`.
function transferOwnership(address newOwner) public payable virtual onlyOwner {
/// @solidity memory-safe-assembly
assembly {
if iszero(shl(96, newOwner)) {
mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`.
revert(0x1c, 0x04)
}
}
_setOwner(newOwner);
}
/// @dev Allows the owner to renounce their ownership.
function renounceOwnership() public payable virtual onlyOwner {
_setOwner(address(0));
}
/// @dev Request a two-step ownership handover to the caller.
/// The request will automatically expire in 48 hours (172800 seconds) by default.
function requestOwnershipHandover() public payable virtual {
unchecked {
uint256 expires = block.timestamp + _ownershipHandoverValidFor();
/// @solidity memory-safe-assembly
assembly {
// Compute and set the handover slot to `expires`.
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, caller())
sstore(keccak256(0x0c, 0x20), expires)
// Emit the {OwnershipHandoverRequested} event.
log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller())
}
}
}
/// @dev Cancels the two-step ownership handover to the caller, if any.
function cancelOwnershipHandover() public payable virtual {
/// @solidity memory-safe-assembly
assembly {
// Compute and set the handover slot to 0.
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, caller())
sstore(keccak256(0x0c, 0x20), 0)
// Emit the {OwnershipHandoverCanceled} event.
log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller())
}
}
/// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`.
/// Reverts if there is no existing ownership handover requested by `pendingOwner`.
function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner {
/// @solidity memory-safe-assembly
assembly {
// Compute and set the handover slot to 0.
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, pendingOwner)
let handoverSlot := keccak256(0x0c, 0x20)
// If the handover does not exist, or has expired.
if gt(timestamp(), sload(handoverSlot)) {
mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`.
revert(0x1c, 0x04)
}
// Set the handover slot to 0.
sstore(handoverSlot, 0)
}
_setOwner(pendingOwner);
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* PUBLIC READ FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Returns the owner of the contract.
function owner() public view virtual returns (address result) {
/// @solidity memory-safe-assembly
assembly {
result := sload(_OWNER_SLOT)
}
}
/// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.
function ownershipHandoverExpiresAt(address pendingOwner)
public
view
virtual
returns (uint256 result)
{
/// @solidity memory-safe-assembly
assembly {
// Compute the handover slot.
mstore(0x0c, _HANDOVER_SLOT_SEED)
mstore(0x00, pendingOwner)
// Load the handover slot.
result := sload(keccak256(0x0c, 0x20))
}
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* MODIFIERS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Marks a function as only callable by the owner.
modifier onlyOwner() virtual {
_checkOwner();
_;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev An operation with an ERC20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {ISignatureTransfer} from "permit2-relay/src/interfaces/ISignatureTransfer.sol";
interface IERC20Router {
function permitMulticall(
address user,
ISignatureTransfer.PermitBatchTransferFrom memory permit,
address[] calldata targets,
bytes[] calldata datas,
uint256[] calldata values,
address refundTo,
bytes memory permitSignature
) external payable returns (bytes[] memory);
function delegatecallMulticall(
address[] calldata targets,
bytes[] calldata datas,
uint256[] calldata values,
address refundTo
) external payable returns (bytes[] memory);
function cleanupERC20(address token, address refundTo) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IEIP712} from "./IEIP712.sol";
/// @title SignatureTransfer
/// @notice Handles ERC20 token transfers through signature based actions
/// @dev Requires user's token approval on the Permit2 contract
interface ISignatureTransfer is IEIP712 {
/// @notice Thrown when the requested amount for a transfer is larger than the permissioned amount
/// @param maxAmount The maximum amount a spender can request to transfer
error InvalidAmount(uint256 maxAmount);
/// @notice Thrown when the number of tokens permissioned to a spender does not match the number of tokens being transferred
/// @dev If the spender does not need to transfer the number of tokens permitted, the spender can request amount 0 to be transferred
error LengthMismatch();
/// @notice Emits an event when the owner successfully invalidates an unordered nonce.
event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask);
/// @notice The token and amount details for a transfer signed in the permit transfer signature
struct TokenPermissions {
// ERC20 token address
address token;
// the maximum amount that can be spent
uint256 amount;
}
/// @notice The signed permit message for a single token transfer
struct PermitTransferFrom {
TokenPermissions permitted;
// a unique value for every token owner's signature to prevent signature replays
uint256 nonce;
// deadline on the permit signature
uint256 deadline;
}
/// @notice Specifies the recipient address and amount for batched transfers.
/// @dev Recipients and amounts correspond to the index of the signed token permissions array.
/// @dev Reverts if the requested amount is greater than the permitted signed amount.
struct SignatureTransferDetails {
// recipient address
address to;
// spender requested amount
uint256 requestedAmount;
}
/// @notice Used to reconstruct the signed permit message for multiple token transfers
/// @dev Do not need to pass in spender address as it is required that it is msg.sender
/// @dev Note that a user still signs over a spender address
struct PermitBatchTransferFrom {
// the tokens and corresponding amounts permitted for a transfer
TokenPermissions[] permitted;
// a unique value for every token owner's signature to prevent signature replays
uint256 nonce;
// deadline on the permit signature
uint256 deadline;
}
/// @notice A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection
/// @dev Uses unordered nonces so that permit messages do not need to be spent in a certain order
/// @dev The mapping is indexed first by the token owner, then by an index specified in the nonce
/// @dev It returns a uint256 bitmap
/// @dev The index, or wordPosition is capped at type(uint248).max
function nonceBitmap(address, uint256) external view returns (uint256);
/// @notice Transfers a token using a signed permit message
/// @dev Reverts if the requested amount is greater than the permitted signed amount
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails The spender's requested transfer details for the permitted token
/// @param signature The signature to verify
function permitTransferFrom(
PermitTransferFrom memory permit,
SignatureTransferDetails calldata transferDetails,
address owner,
bytes calldata signature
) external;
/// @notice Transfers a token using a signed permit message
/// @notice Includes extra data provided by the caller to verify signature over
/// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
/// @dev Reverts if the requested amount is greater than the permitted signed amount
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails The spender's requested transfer details for the permitted token
/// @param witness Extra data to include when checking the user signature
/// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
/// @param signature The signature to verify
function permitWitnessTransferFrom(
PermitTransferFrom memory permit,
SignatureTransferDetails calldata transferDetails,
address owner,
bytes32 witness,
string calldata witnessTypeString,
bytes calldata signature
) external;
/// @notice Transfers multiple tokens using a signed permit message
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails Specifies the recipient and requested amount for the token transfer
/// @param signature The signature to verify
function permitTransferFrom(
PermitBatchTransferFrom memory permit,
SignatureTransferDetails[] calldata transferDetails,
address owner,
bytes calldata signature
) external;
/// @notice Transfers multiple tokens using a signed permit message
/// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
/// @notice Includes extra data provided by the caller to verify signature over
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails Specifies the recipient and requested amount for the token transfer
/// @param witness Extra data to include when checking the user signature
/// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
/// @param signature The signature to verify
function permitWitnessTransferFrom(
PermitBatchTransferFrom memory permit,
SignatureTransferDetails[] calldata transferDetails,
address owner,
bytes32 witness,
string calldata witnessTypeString,
bytes calldata signature
) external;
/// @notice Invalidates the bits specified in mask for the bitmap at the word position
/// @dev The wordPos is maxed at type(uint248).max
/// @param wordPos A number to index the nonceBitmap at
/// @param mask A bitmap masked against msg.sender's current bitmap at the word position
function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IEIP712 {
function DOMAIN_SEPARATOR() external view returns (bytes32);
}{
"remappings": [
"@openzeppelin/=lib/openzeppelin-contracts/contracts/",
"solady/=lib/solady/",
"multicaller/=lib/Multicaller/",
"v2-core/=lib/v2-core/",
"v2-periphery/=lib/v2-periphery/",
"tstorish/=lib/tstorish/",
"permit2-relay/=lib/permit2-relay/",
"solmate/=lib/solmate/",
"@matterlabs/zksync-contracts/=/lib/v2-testnet-contracts/",
"@uniswap/v3-core/=lib/v3-core/",
"@uniswap/v2-core/=lib/v2-core/",
"0x-settler/=lib/0x-settler/",
"seaport-1.5/=lib/seaport-1.5/",
"trustlessPermit/=lib/trustlessPermit/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@rari-capital/solmate/=lib/seaport-1.5/lib/solmate/",
"Multicaller/=lib/Multicaller/src/",
"ds-test/=lib/seaport-1.5/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/0x-settler/lib/forge-gas-snapshot/src/",
"forge-std/=lib/forge-std/src/",
"murky/=lib/seaport-1.5/lib/murky/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"permit2/=lib/0x-settler/lib/permit2/",
"seaport-core/=lib/seaport-core/src/",
"seaport-sol/=lib/seaport-sol/src/",
"seaport-types/=lib/seaport-core/lib/seaport-types/",
"seaport/=lib/seaport-sol/lib/seaport/contracts/",
"solarray/=lib/seaport-1.5/lib/solarray/src/",
"v3-core/=lib/v3-core/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": true,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ArrayLengthsMismatch","type":"error"},{"inputs":[],"name":"ERC20TransferFromFailed","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"NativeTransferFailed","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRouter","type":"address"}],"name":"RouterUpdated","type":"event"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bytes[]","name":"datas","type":"bytes[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"address","name":"refundTo","type":"address"}],"name":"transferAndMulticall","outputs":[{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60803460a257601f610b7438819003918201601f19168301916001600160401b0383118484101760a657808492604094855283398101031260a257604b602060458360ba565b920160ba565b6001600160a01b03918216638b78c6d8198190555f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a31660018060a01b03195f5416175f55604051610aa690816100ce8239f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820360a25756fe6080604052600436101561001a575b3615610018575f80fd5b005b5f3560e01c806325692962146100c95780633ccfd60b146100c457806354d1f13d146100bf5780635caab55a146100ba578063715018a6146100b55780638da5cb5b146100b0578063c0d78655146100ab578063f04e283e146100a6578063f2fde38b146100a1578063f887ea401461009c5763fee81cf40361000e576104af565b610488565b610449565b6103f8565b610389565b61035d565b610319565b610260565b610152565b610116565b5f3660031901126101125763389a75e1600c52335f526202a30042016020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a2005b5f80fd5b34610112575f3660031901126101125761012e6108c0565b5f8080804733620186a0f11561014057005b604051633d2cec6f60e21b8152600490fd5b5f3660031901126101125763389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2005b9181601f840112156101125782359167ffffffffffffffff8311610112576020808501948460051b01011161011257565b6001600160a01b0381160361011257565b60a435906101e5826101c7565b565b602080820190808352835180925260408301928160408460051b8301019501935f915b84831061021a5750505050505090565b909192939495848080600193603f19868203018752818b518051918291828552018484015e5f828201840152601f01601f1916010198019695949190910192019061020a565b60c03660031901126101125767ffffffffffffffff600480358281116101125761028d9036908301610196565b602435848111610112576102a49036908501610196565b604492919235868111610112576102be9036908701610196565b606492919235888111610112576102d89036908901610196565b939092608435998a11610112576102f8610309996103159b369101610196565b9790966103036101d8565b996107b3565b604051918291826101e7565b0390f35b5f3660031901126101125761032c6108c0565b5f638b78c6d8198181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a355005b34610112575f36600319011261011257638b78c6d819546040516001600160a01b039091168152602090f35b34610112576020366003190112610112577f7aed1d3e8155a07ccf395e44ea3109a0e2d6c9b29bbbe9f142d9790596f4dc8060206004356103c9816101c7565b6103d16108c0565b5f80546001600160a01b0319166001600160a01b03929092169182179055604051908152a1005b602036600319011261011257600435610410816101c7565b6104186108c0565b63389a75e1600c52805f526020600c20908154421161043c575f61001892556109bd565b636f5e88185f526004601cfd5b602036600319011261011257600435610461816101c7565b6104696108c0565b8060601b1561047b57610018906109bd565b637448fbae5f526004601cfd5b34610112575f366003190112610112575f546040516001600160a01b039091168152602090f35b34610112576020366003190112610112576004356104cc816101c7565b63389a75e1600c525f52602080600c2054604051908152f35b91908110156104f55760051b0190565b634e487b7160e01b5f52603260045260245ffd5b35610513816101c7565b90565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff82111761054657604052565b610516565b90601f8019910116810190811067ffffffffffffffff82111761054657604052565b67ffffffffffffffff811161054657601f01601f191660200190565b602090818184031261011257805167ffffffffffffffff9182821161011257019083601f8301121561011257815193818511610546578460051b90604092604051966105d78785018961054b565b875285808801938601019482861161011257868101935b86851061060057505050505050505090565b845183811161011257820184603f820112156101125788810151916106248361056d565b6106308951918261054b565b83815286898585010111610112575f8b8581968c8397018386015e830101528152019401936105ee565b908060209392818452848401375f828201840152601f01601f1916010190565b81835290916001600160fb1b0383116101125760209260051b809284830137010190565b97969593909492918060808a0160808b525260a0890195905f5b818110610779575050506020888603818a015281865280860195818360051b82010196845f925b85841061071957505050505050508260609261070692886101e597960360408a015261067a565b6001600160a01b03909216940193909352565b90919293949598601f198282030184528935601e198436030181121561011257830186810191903567ffffffffffffffff8111610112578036038313610112576107688892839260019561065a565b9b01940194019295949391906106df565b9091929396600190843561078c816101c7565b60a083901b8390031681526020908101989594019291016106b8565b6040513d5f823e3d90fd5b9291909a999a989394959796988281036108a4578987148015906108b6575b6108a4575f5b8181106108635750505050505f95969761082b9161080e6108026108028a5460018060a01b031690565b6001600160a01b031690565b95604051998a988997889762dc60bf60e71b89526004890161069e565b039134905af190811561085e575f91610842575090565b61051391503d805f833e610856818361054b565b810190610589565b6107a8565b8061089e61087f61080261087a600195878b6104e5565b610509565b5f546001600160a01b03166108958489896104e5565b359133906108dc565b016107d8565b604051631dc0052360e11b8152600490fd5b50848a14156107d2565b638b78c6d8195433036108cf57565b6382b429005f526004601cfd5b6040516323b872dd60e01b602082019081526001600160a01b039384166024830152938316604482015260648082019590955293845261095a925f9283926109238761052a565b1694519082865af13d156109b5573d9061093c8261056d565b9161094a604051938461054b565b82523d5f602084013e5b83610a0d565b8051908115159182610993575b50506109705750565b604051635274afe760e01b81526001600160a01b03919091166004820152602490fd5b6109ae9250906020806109aa9383010191016109f5565b1590565b5f80610967565b606090610954565b60018060a01b0316638b78c6d8198181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b90816020910312610112575180151581036101125790565b90610a345750805115610a2257805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610a67575b610a45575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15610a3d56fea26469706673582212204e52398eefcf4ea013435b6004176f8e13149721cd632dd9b7701c6ff67e6e7b64736f6c63430008190033000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e000000000000000000000000eeeeee9ec4769a09a76a83c7bc42b185872860ee
Deployed Bytecode
0x6080604052600436101561001a575b3615610018575f80fd5b005b5f3560e01c806325692962146100c95780633ccfd60b146100c457806354d1f13d146100bf5780635caab55a146100ba578063715018a6146100b55780638da5cb5b146100b0578063c0d78655146100ab578063f04e283e146100a6578063f2fde38b146100a1578063f887ea401461009c5763fee81cf40361000e576104af565b610488565b610449565b6103f8565b610389565b61035d565b610319565b610260565b610152565b610116565b5f3660031901126101125763389a75e1600c52335f526202a30042016020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a2005b5f80fd5b34610112575f3660031901126101125761012e6108c0565b5f8080804733620186a0f11561014057005b604051633d2cec6f60e21b8152600490fd5b5f3660031901126101125763389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2005b9181601f840112156101125782359167ffffffffffffffff8311610112576020808501948460051b01011161011257565b6001600160a01b0381160361011257565b60a435906101e5826101c7565b565b602080820190808352835180925260408301928160408460051b8301019501935f915b84831061021a5750505050505090565b909192939495848080600193603f19868203018752818b518051918291828552018484015e5f828201840152601f01601f1916010198019695949190910192019061020a565b60c03660031901126101125767ffffffffffffffff600480358281116101125761028d9036908301610196565b602435848111610112576102a49036908501610196565b604492919235868111610112576102be9036908701610196565b606492919235888111610112576102d89036908901610196565b939092608435998a11610112576102f8610309996103159b369101610196565b9790966103036101d8565b996107b3565b604051918291826101e7565b0390f35b5f3660031901126101125761032c6108c0565b5f638b78c6d8198181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a355005b34610112575f36600319011261011257638b78c6d819546040516001600160a01b039091168152602090f35b34610112576020366003190112610112577f7aed1d3e8155a07ccf395e44ea3109a0e2d6c9b29bbbe9f142d9790596f4dc8060206004356103c9816101c7565b6103d16108c0565b5f80546001600160a01b0319166001600160a01b03929092169182179055604051908152a1005b602036600319011261011257600435610410816101c7565b6104186108c0565b63389a75e1600c52805f526020600c20908154421161043c575f61001892556109bd565b636f5e88185f526004601cfd5b602036600319011261011257600435610461816101c7565b6104696108c0565b8060601b1561047b57610018906109bd565b637448fbae5f526004601cfd5b34610112575f366003190112610112575f546040516001600160a01b039091168152602090f35b34610112576020366003190112610112576004356104cc816101c7565b63389a75e1600c525f52602080600c2054604051908152f35b91908110156104f55760051b0190565b634e487b7160e01b5f52603260045260245ffd5b35610513816101c7565b90565b634e487b7160e01b5f52604160045260245ffd5b60a0810190811067ffffffffffffffff82111761054657604052565b610516565b90601f8019910116810190811067ffffffffffffffff82111761054657604052565b67ffffffffffffffff811161054657601f01601f191660200190565b602090818184031261011257805167ffffffffffffffff9182821161011257019083601f8301121561011257815193818511610546578460051b90604092604051966105d78785018961054b565b875285808801938601019482861161011257868101935b86851061060057505050505050505090565b845183811161011257820184603f820112156101125788810151916106248361056d565b6106308951918261054b565b83815286898585010111610112575f8b8581968c8397018386015e830101528152019401936105ee565b908060209392818452848401375f828201840152601f01601f1916010190565b81835290916001600160fb1b0383116101125760209260051b809284830137010190565b97969593909492918060808a0160808b525260a0890195905f5b818110610779575050506020888603818a015281865280860195818360051b82010196845f925b85841061071957505050505050508260609261070692886101e597960360408a015261067a565b6001600160a01b03909216940193909352565b90919293949598601f198282030184528935601e198436030181121561011257830186810191903567ffffffffffffffff8111610112578036038313610112576107688892839260019561065a565b9b01940194019295949391906106df565b9091929396600190843561078c816101c7565b60a083901b8390031681526020908101989594019291016106b8565b6040513d5f823e3d90fd5b9291909a999a989394959796988281036108a4578987148015906108b6575b6108a4575f5b8181106108635750505050505f95969761082b9161080e6108026108028a5460018060a01b031690565b6001600160a01b031690565b95604051998a988997889762dc60bf60e71b89526004890161069e565b039134905af190811561085e575f91610842575090565b61051391503d805f833e610856818361054b565b810190610589565b6107a8565b8061089e61087f61080261087a600195878b6104e5565b610509565b5f546001600160a01b03166108958489896104e5565b359133906108dc565b016107d8565b604051631dc0052360e11b8152600490fd5b50848a14156107d2565b638b78c6d8195433036108cf57565b6382b429005f526004601cfd5b6040516323b872dd60e01b602082019081526001600160a01b039384166024830152938316604482015260648082019590955293845261095a925f9283926109238761052a565b1694519082865af13d156109b5573d9061093c8261056d565b9161094a604051938461054b565b82523d5f602084013e5b83610a0d565b8051908115159182610993575b50506109705750565b604051635274afe760e01b81526001600160a01b03919091166004820152602490fd5b6109ae9250906020806109aa9383010191016109f5565b1590565b5f80610967565b606090610954565b60018060a01b0316638b78c6d8198181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b90816020910312610112575180151581036101125790565b90610a345750805115610a2257805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610a67575b610a45575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15610a3d56fea26469706673582212204e52398eefcf4ea013435b6004176f8e13149721cd632dd9b7701c6ff67e6e7b64736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e000000000000000000000000eeeeee9ec4769a09a76a83c7bc42b185872860ee
-----Decoded View---------------
Arg [0] : _owner (address): 0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e
Arg [1] : _router (address): 0xeeeeee9eC4769A09a76A83C7bC42b185872860eE
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e
Arg [1] : 000000000000000000000000eeeeee9ec4769a09a76a83c7bc42b185872860ee
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$33.43
Net Worth in POL
Token Allocations
ETH
94.02%
USDC
5.98%
POL
0.00%
Multichain Portfolio | 35 Chains
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.