ETH Price: $1,578.93 (-1.46%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Transaction Hash
Method
Block
From
To
Deposit212238052024-11-19 19:14:59149 days ago1732043699IN
0x27abF5aE...3f4efcCC1
0.26777671 ETH0.0006457518.56805522
Deposit212224162024-11-19 14:36:23149 days ago1732026983IN
0x27abF5aE...3f4efcCC1
0.60296971 ETH0.0006781719.5
Deposit Token212218592024-11-19 12:44:35149 days ago1732020275IN
0x27abF5aE...3f4efcCC1
0 ETH0.0007223310.34214115
Deposit Token212216652024-11-19 12:05:47149 days ago1732017947IN
0x27abF5aE...3f4efcCC1
0 ETH0.00088511.85628487
Deposit212211072024-11-19 10:13:47149 days ago1732011227IN
0x27abF5aE...3f4efcCC1
1.05384351 ETH0.000279158.02688909
Deposit Token212186212024-11-19 1:54:47150 days ago1731981287IN
0x27abF5aE...3f4efcCC1
0 ETH0.000745759.98916828
Deposit212168312024-11-18 19:55:47150 days ago1731959747IN
0x27abF5aE...3f4efcCC1
0.46308035 ETH0.0005612216.13739842
Deposit212141702024-11-18 11:01:35150 days ago1731927695IN
0x27abF5aE...3f4efcCC1
0.99589163 ETH0.0004735213.6157216
Deposit212118902024-11-18 3:23:59151 days ago1731900239IN
0x27abF5aE...3f4efcCC1
0.00592609 ETH0.0003981911.44967101
Deposit212117942024-11-18 3:04:47151 days ago1731899087IN
0x27abF5aE...3f4efcCC1
0.07118713 ETH0.0004042811.62460495
Deposit212113572024-11-18 1:37:11151 days ago1731893831IN
0x27abF5aE...3f4efcCC1
0.10051758 ETH0.0003821610.98868049
Deposit Token212113542024-11-18 1:36:35151 days ago1731893795IN
0x27abF5aE...3f4efcCC1
0 ETH0.0008571311.48114046
Deposit212094752024-11-17 19:19:47151 days ago1731871187IN
0x27abF5aE...3f4efcCC1
0.10152672 ETH0.0004798613.79796675
Deposit212071892024-11-17 11:40:35151 days ago1731843635IN
0x27abF5aE...3f4efcCC1
0.51330183 ETH0.00034529.92584066
Deposit212047432024-11-17 3:28:59152 days ago1731814139IN
0x27abF5aE...3f4efcCC1
0.30874857 ETH0.0003927511.29317361
Deposit212017672024-11-16 17:31:35152 days ago1731778295IN
0x27abF5aE...3f4efcCC1
0.99609826 ETH0.000568516.34664535
Deposit212013792024-11-16 16:13:47152 days ago1731773627IN
0x27abF5aE...3f4efcCC1
1.33427566 ETH0.0005795916.66548174
Deposit Token212002102024-11-16 12:18:47152 days ago1731759527IN
0x27abF5aE...3f4efcCC1
0 ETH0.0011081813.92623848
Deposit212001662024-11-16 12:09:59152 days ago1731758999IN
0x27abF5aE...3f4efcCC1
0.25817213 ETH0.0005467115.72017463
Deposit211961952024-11-15 22:52:35153 days ago1731711155IN
0x27abF5aE...3f4efcCC1
0.30317816 ETH0.0007863722.61120073
Deposit211950922024-11-15 19:10:23153 days ago1731697823IN
0x27abF5aE...3f4efcCC1
1.00644216 ETH0.0006806319.57072991
Deposit211942232024-11-15 16:15:11153 days ago1731687311IN
0x27abF5aE...3f4efcCC1
0.99730294 ETH0.0009882928.41710632
Deposit211937342024-11-15 14:37:23153 days ago1731681443IN
0x27abF5aE...3f4efcCC1
0.00510395 ETH0.0009087726.13085901
Deposit Token211936062024-11-15 14:11:47153 days ago1731679907IN
0x27abF5aE...3f4efcCC1
0 ETH0.0024969835.75083763
Deposit Token211930412024-11-15 12:17:11153 days ago1731673031IN
0x27abF5aE...3f4efcCC1
0 ETH0.0013004418.61601094
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer212238052024-11-19 19:14:59149 days ago1732043699
0x27abF5aE...3f4efcCC1
0.26777671 ETH
Transfer212224162024-11-19 14:36:23149 days ago1732026983
0x27abF5aE...3f4efcCC1
0.60296971 ETH
Transfer212211072024-11-19 10:13:47149 days ago1732011227
0x27abF5aE...3f4efcCC1
1.05384351 ETH
Transfer212168312024-11-18 19:55:47150 days ago1731959747
0x27abF5aE...3f4efcCC1
0.46308035 ETH
Transfer212141702024-11-18 11:01:35150 days ago1731927695
0x27abF5aE...3f4efcCC1
0.99589163 ETH
Transfer212118902024-11-18 3:23:59151 days ago1731900239
0x27abF5aE...3f4efcCC1
0.00592609 ETH
Transfer212117942024-11-18 3:04:47151 days ago1731899087
0x27abF5aE...3f4efcCC1
0.07118713 ETH
Transfer212113572024-11-18 1:37:11151 days ago1731893831
0x27abF5aE...3f4efcCC1
0.10051758 ETH
Transfer212094752024-11-17 19:19:47151 days ago1731871187
0x27abF5aE...3f4efcCC1
0.10152672 ETH
Transfer212071892024-11-17 11:40:35151 days ago1731843635
0x27abF5aE...3f4efcCC1
0.51330183 ETH
Transfer212047432024-11-17 3:28:59152 days ago1731814139
0x27abF5aE...3f4efcCC1
0.30874857 ETH
Transfer212017672024-11-16 17:31:35152 days ago1731778295
0x27abF5aE...3f4efcCC1
0.99609826 ETH
Transfer212013792024-11-16 16:13:47152 days ago1731773627
0x27abF5aE...3f4efcCC1
1.33427566 ETH
Transfer212001662024-11-16 12:09:59152 days ago1731758999
0x27abF5aE...3f4efcCC1
0.25817213 ETH
Transfer211961952024-11-15 22:52:35153 days ago1731711155
0x27abF5aE...3f4efcCC1
0.30317816 ETH
Transfer211950922024-11-15 19:10:23153 days ago1731697823
0x27abF5aE...3f4efcCC1
1.00644216 ETH
Transfer211942232024-11-15 16:15:11153 days ago1731687311
0x27abF5aE...3f4efcCC1
0.99730294 ETH
Transfer211937342024-11-15 14:37:23153 days ago1731681443
0x27abF5aE...3f4efcCC1
0.00510395 ETH
Transfer211928002024-11-15 11:28:23153 days ago1731670103
0x27abF5aE...3f4efcCC1
0.26379341 ETH
Transfer211927202024-11-15 11:12:11153 days ago1731669131
0x27abF5aE...3f4efcCC1
0.99612138 ETH
Transfer211877292024-11-14 18:29:47154 days ago1731608987
0x27abF5aE...3f4efcCC1
0.00770656 ETH
Transfer211864552024-11-14 14:13:11154 days ago1731593591
0x27abF5aE...3f4efcCC1
0.05857403 ETH
Transfer211861522024-11-14 13:12:23154 days ago1731589943
0x27abF5aE...3f4efcCC1
0.99750865 ETH
Transfer211860832024-11-14 12:58:23154 days ago1731589103
0x27abF5aE...3f4efcCC1
0.06955797 ETH
Transfer211859182024-11-14 12:25:23154 days ago1731587123
0x27abF5aE...3f4efcCC1
1.29873432 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WhirlDeposit

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 2 : WhirlDeposit.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import {Ownable} from "solady/src/auth/Ownable.sol";

contract WhirlDeposit is Ownable {
    error PausedContract();
    error ZeroAddress();
    error UnsupportedToken();
    error TransferFailed();
    error NativeDisabled();

    bytes32 private constant DEPOSIT_EVT_SIG
        = 0x5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62;
    address private constant NATIVE
        = 0x0000000000000000000000000000000000000000;

    address public relayer;
    bool public paused;
    bool public nativeEnabled;

    mapping(address => bool) supportedTokens;

    event RelayerUpdated(address);
    event PausedUpdated(bool);
    event NativeEnabledUpdated(bool);
    event SupportedTokensUpdated(address, bool);
    event Deposit(address indexed user, address indexed token, uint256 amount);

    constructor(address relayer_, bool _nativeEnabled) {
        _initializeOwner(msg.sender);

        relayer = relayer_;
        nativeEnabled = _nativeEnabled;
    }

    // OWNER

    function updateRelayer(address relayer_) external {
        _checkOwner();

        if (relayer_ == NATIVE)
            _revert(ZeroAddress.selector);

        relayer = relayer_;

        emit RelayerUpdated(relayer_);
    }

    function updateSupportedTokens(address token_, bool enabled_) external {
        _checkOwner();

        if (token_ == NATIVE)
            _revert(ZeroAddress.selector);

        supportedTokens[token_] = enabled_;

        emit SupportedTokensUpdated(token_, enabled_);
    }

    function updatePaused(bool paused_) external {
        _checkOwner();

        paused = paused_;

        emit PausedUpdated(paused_);
    }

    function updateNativeEnabled(bool enabled_) external {
        _checkOwner();

        nativeEnabled = enabled_;

        emit NativeEnabledUpdated(enabled_);
    }

    function withdraw(uint256 amount_) external {
        _checkOwner();

        _safeTransferETH(owner(), amount_);
    }

    function withdrawToken(address token_, uint256 amount_) external {
        _checkOwner();

        _safeTransfer(token_, owner(), amount_);
    }

    // PUB/EXTERNAL

    function deposit() external payable {
        if (paused) _revert(PausedContract.selector);
        if (!nativeEnabled) _revert(NativeDisabled.selector);

        _safeTransferETH(relayer, msg.value);

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, callvalue())
            log3(0x00, 0x20, DEPOSIT_EVT_SIG, caller(), 0x0)
        }
    }

    function depositToken(address token_, uint256 amount_) external payable {
        if (paused) _revert(PausedContract.selector);
        if (!supportedTokens[token_]) _revert(UnsupportedToken.selector);

        _safeTransferFrom(
            token_,
            msg.sender,
            relayer,
            amount_
        );

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, amount_)
            log3(0x00, 0x20, DEPOSIT_EVT_SIG, caller(), token_)
        }
    }

    // PRV/INTERNAL

    function _safeTransferETH(address to_, uint256 amount_) private {
        /// @solidity memory-safe-assembly
        assembly {
            if iszero(call(gas(), to_, amount_, 0, 0, 0, 0)) {
                mstore(0x0, 0x90b8ec18)
                revert(0x0, 0x4)
            }
        }
    }

    function _safeTransfer(
        address token_,
        address to_,
        uint256 amount_
    ) private {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x14, to_) // Store the `to` argument.
            mstore(0x34, amount_) // Store the `amount` argument.
            mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`.
            // Perform the transfer, reverting upon failure.
            if iszero(
                and( // The arguments of `and` are evaluated from right to left.
                    or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing.
                    call(gas(), token_, 0, 0x10, 0x44, 0x00, 0x20)
                )
            ) {
                mstore(0x00, 0x90b8ec18) // `TransferFailed()`.
                revert(0x1c, 0x04)
            }
            mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten.
        }
    }

    function _safeTransferFrom(
        address token_,
        address from_,
        address to_,
        uint256 amount_
    ) private {
        /// @solidity memory-safe-assembly
        assembly {
            let m := mload(0x40) // Cache the free memory pointer.
            mstore(0x60, amount_) // Store the `amount` argument.
            mstore(0x40, to_) // Store the `to` argument.
            mstore(0x2c, shl(96, from_)) // Store the `from` argument.
            mstore(0x0c, 0x23b872dd000000000000000000000000) // `transferFrom(address,address,uint256)`.
            // Perform the transfer, reverting upon failure.
            if iszero(
                and( // The arguments of `and` are evaluated from right to left.
                    or(eq(mload(0x00), 1), iszero(returndatasize())), // Returned 1 or nothing.
                    call(gas(), token_, 0, 0x1c, 0x64, 0x00, 0x20)
                )
            ) {
                mstore(0x00, 0x90b8ec18) // `TransferFailed()`.
                revert(0x1c, 0x04)
            }
            mstore(0x60, 0) // Restore the zero slot to zero.
            mstore(0x40, m) // Restore the free memory pointer.
        }
    }

    function _revert(bytes4 code) private pure {
        assembly {
            mstore(0x0, code)
            revert(0x0, 0x4)
        }
    }
}

File 2 of 2 : Ownable.sol
// 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();
        _;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"relayer_","type":"address"},{"internalType":"bool","name":"_nativeEnabled","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"NativeDisabled","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"PausedContract","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsupportedToken","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"NativeEnabledUpdated","type":"event"},{"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":"bool","name":"","type":"bool"}],"name":"PausedUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"RelayerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"SupportedTokensUpdated","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":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"depositToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"nativeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"relayer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled_","type":"bool"}],"name":"updateNativeEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"paused_","type":"bool"}],"name":"updatePaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"relayer_","type":"address"}],"name":"updateRelayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"bool","name":"enabled_","type":"bool"}],"name":"updateSupportedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610b0f380380610b0f83398101604081905261002f916100a5565b61003833610069565b60008054911515600160a81b02600161ff0160a01b03199092166001600160a01b03909316929092171790556100f0565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b600080604083850312156100b857600080fd5b82516001600160a01b03811681146100cf57600080fd5b602084015190925080151581146100e557600080fd5b809150509250929050565b610a10806100ff6000396000f3fe6080604052600436106101295760003560e01c80638da5cb5b116100a5578063d0e30db011610074578063f04e283e11610059578063f04e283e146102cb578063f2fde38b146102de578063fee81cf4146102f157600080fd5b8063d0e30db0146102a3578063e148b6f9146102ab57600080fd5b80638da5cb5b1461022a5780638f83ab13146102435780639df5a211146102635780639e281a981461028357600080fd5b806354d1f13d116100fc578063715018a6116100e1578063715018a6146101c957806377ab2cf3146101d15780638406c079146101f257600080fd5b806354d1f13d1461018b5780635c975abb1461019357600080fd5b806308cdc2a81461012e57806325692962146101505780632e1a7d4d14610158578063338b5dea14610178575b600080fd5b34801561013a57600080fd5b5061014e610149366004610910565b610332565b005b61014e6103ad565b34801561016457600080fd5b5061014e610173366004610932565b6103fd565b61014e610186366004610962565b61041e565b61014e6104d3565b34801561019f57600080fd5b506000546101b490600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b61014e61050f565b3480156101dd57600080fd5b506000546101b490600160a81b900460ff1681565b3480156101fe57600080fd5b50600054610212906001600160a01b031681565b6040516001600160a01b0390911681526020016101c0565b34801561023657600080fd5b50638b78c6d81954610212565b34801561024f57600080fd5b5061014e61025e36600461098c565b610523565b34801561026f57600080fd5b5061014e61027e366004610910565b6105af565b34801561028f57600080fd5b5061014e61029e366004610962565b61061f565b61014e610642565b3480156102b757600080fd5b5061014e6102c63660046109a7565b6106e3565b61014e6102d936600461098c565b61076c565b61014e6102ec36600461098c565b6107a9565b3480156102fd57600080fd5b5061032461030c36600461098c565b63389a75e1600c908152600091909152602090205490565b6040519081526020016101c0565b61033a6107d0565b60008054821515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f31311016d7204faff81880133e3db244ae8a8b9ce15e83e2432258226d15f942906103a290831515815260200190565b60405180910390a150565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6104056107d0565b61041b610415638b78c6d8195490565b826107eb565b50565b600054600160a01b900460ff161561044057610440637991559360e11b610807565b6001600160a01b03821660009081526001602052604090205460ff16610489576104897f6a17288200000000000000000000000000000000000000000000000000000000610807565b6000546104a390839033906001600160a01b031684610811565b8060005281337f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6260206000a35050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6105176107d0565b610521600061086e565b565b61052b6107d0565b6001600160a01b0381166105495761054963d92e233d60e01b610807565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f09bf35b7806e61e7baf86e6547c4221f69d130ccc0a19215d064685a89464a70906020016103a2565b6105b76107d0565b60008054821515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff9091161790556040517f9b785b55a29c7516e65b58e4b1e9dde8357e60eeff643ebdf809e10285ae51d5906103a290831515815260200190565b6106276107d0565b61063e82610638638b78c6d8195490565b836108ac565b5050565b600054600160a01b900460ff161561066457610664637991559360e11b610807565b600054600160a81b900460ff1661069e5761069e7fa46d276e00000000000000000000000000000000000000000000000000000000610807565b6000546106b4906001600160a01b0316346107eb565b346000526000337f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6260206000a3565b6106eb6107d0565b6001600160a01b0382166107095761070963d92e233d60e01b610807565b6001600160a01b038216600081815260016020908152604091829020805460ff19168515159081179091558251938452908301527f489797db9aeb42e7a22617b6a32bd384ce4295e0d8dcb981d246c1f916da2aac910160405180910390a15050565b6107746107d0565b63389a75e1600c52806000526020600c20805442111561079c57636f5e88186000526004601cfd5b6000905561041b8161086e565b6107b16107d0565b8060601b6107c757637448fbae6000526004601cfd5b61041b8161086e565b638b78c6d819543314610521576382b429006000526004601cfd5b60008060008084865af161063e576390b8ec1860005260046000fd5b8060005260046000fd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c52602060006064601c6000895af13d156001600051141716610860576390b8ec186000526004601cfd5b600060605260405250505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166108f1576390b8ec186000526004601cfd5b6000603452505050565b8035801515811461090b57600080fd5b919050565b60006020828403121561092257600080fd5b61092b826108fb565b9392505050565b60006020828403121561094457600080fd5b5035919050565b80356001600160a01b038116811461090b57600080fd5b6000806040838503121561097557600080fd5b61097e8361094b565b946020939093013593505050565b60006020828403121561099e57600080fd5b61092b8261094b565b600080604083850312156109ba57600080fd5b6109c38361094b565b91506109d1602084016108fb565b9050925092905056fea264697066735822122093a44cd5f50dfef2b779f674d55280b3957eb0e8eb5cfd985479715a171b8d2d64736f6c6343000818003300000000000000000000000000000031c14b66700f588dcadc6be0128f4a16ff0000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x6080604052600436106101295760003560e01c80638da5cb5b116100a5578063d0e30db011610074578063f04e283e11610059578063f04e283e146102cb578063f2fde38b146102de578063fee81cf4146102f157600080fd5b8063d0e30db0146102a3578063e148b6f9146102ab57600080fd5b80638da5cb5b1461022a5780638f83ab13146102435780639df5a211146102635780639e281a981461028357600080fd5b806354d1f13d116100fc578063715018a6116100e1578063715018a6146101c957806377ab2cf3146101d15780638406c079146101f257600080fd5b806354d1f13d1461018b5780635c975abb1461019357600080fd5b806308cdc2a81461012e57806325692962146101505780632e1a7d4d14610158578063338b5dea14610178575b600080fd5b34801561013a57600080fd5b5061014e610149366004610910565b610332565b005b61014e6103ad565b34801561016457600080fd5b5061014e610173366004610932565b6103fd565b61014e610186366004610962565b61041e565b61014e6104d3565b34801561019f57600080fd5b506000546101b490600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b61014e61050f565b3480156101dd57600080fd5b506000546101b490600160a81b900460ff1681565b3480156101fe57600080fd5b50600054610212906001600160a01b031681565b6040516001600160a01b0390911681526020016101c0565b34801561023657600080fd5b50638b78c6d81954610212565b34801561024f57600080fd5b5061014e61025e36600461098c565b610523565b34801561026f57600080fd5b5061014e61027e366004610910565b6105af565b34801561028f57600080fd5b5061014e61029e366004610962565b61061f565b61014e610642565b3480156102b757600080fd5b5061014e6102c63660046109a7565b6106e3565b61014e6102d936600461098c565b61076c565b61014e6102ec36600461098c565b6107a9565b3480156102fd57600080fd5b5061032461030c36600461098c565b63389a75e1600c908152600091909152602090205490565b6040519081526020016101c0565b61033a6107d0565b60008054821515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f31311016d7204faff81880133e3db244ae8a8b9ce15e83e2432258226d15f942906103a290831515815260200190565b60405180910390a150565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6104056107d0565b61041b610415638b78c6d8195490565b826107eb565b50565b600054600160a01b900460ff161561044057610440637991559360e11b610807565b6001600160a01b03821660009081526001602052604090205460ff16610489576104897f6a17288200000000000000000000000000000000000000000000000000000000610807565b6000546104a390839033906001600160a01b031684610811565b8060005281337f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6260206000a35050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6105176107d0565b610521600061086e565b565b61052b6107d0565b6001600160a01b0381166105495761054963d92e233d60e01b610807565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f09bf35b7806e61e7baf86e6547c4221f69d130ccc0a19215d064685a89464a70906020016103a2565b6105b76107d0565b60008054821515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff9091161790556040517f9b785b55a29c7516e65b58e4b1e9dde8357e60eeff643ebdf809e10285ae51d5906103a290831515815260200190565b6106276107d0565b61063e82610638638b78c6d8195490565b836108ac565b5050565b600054600160a01b900460ff161561066457610664637991559360e11b610807565b600054600160a81b900460ff1661069e5761069e7fa46d276e00000000000000000000000000000000000000000000000000000000610807565b6000546106b4906001600160a01b0316346107eb565b346000526000337f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6260206000a3565b6106eb6107d0565b6001600160a01b0382166107095761070963d92e233d60e01b610807565b6001600160a01b038216600081815260016020908152604091829020805460ff19168515159081179091558251938452908301527f489797db9aeb42e7a22617b6a32bd384ce4295e0d8dcb981d246c1f916da2aac910160405180910390a15050565b6107746107d0565b63389a75e1600c52806000526020600c20805442111561079c57636f5e88186000526004601cfd5b6000905561041b8161086e565b6107b16107d0565b8060601b6107c757637448fbae6000526004601cfd5b61041b8161086e565b638b78c6d819543314610521576382b429006000526004601cfd5b60008060008084865af161063e576390b8ec1860005260046000fd5b8060005260046000fd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c52602060006064601c6000895af13d156001600051141716610860576390b8ec186000526004601cfd5b600060605260405250505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166108f1576390b8ec186000526004601cfd5b6000603452505050565b8035801515811461090b57600080fd5b919050565b60006020828403121561092257600080fd5b61092b826108fb565b9392505050565b60006020828403121561094457600080fd5b5035919050565b80356001600160a01b038116811461090b57600080fd5b6000806040838503121561097557600080fd5b61097e8361094b565b946020939093013593505050565b60006020828403121561099e57600080fd5b61092b8261094b565b600080604083850312156109ba57600080fd5b6109c38361094b565b91506109d1602084016108fb565b9050925092905056fea264697066735822122093a44cd5f50dfef2b779f674d55280b3957eb0e8eb5cfd985479715a171b8d2d64736f6c63430008180033

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

00000000000000000000000000000031c14b66700f588dcadc6be0128f4a16ff0000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : relayer_ (address): 0x00000031C14b66700F588DCADc6Be0128F4a16fF
Arg [1] : _nativeEnabled (bool): True

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000031c14b66700f588dcadc6be0128f4a16ff
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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