ETH Price: $1,968.38 (-5.34%)

Contract

0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Unstake4324216522026-02-15 17:11:3544 mins ago1771175495IN
0x2CFa72E7...91db7d8e2
0 ETH0.000007090.020116
Stake4321914292026-02-15 1:15:3816 hrs ago1771118138IN
0x2CFa72E7...91db7d8e2
0 ETH0.000006990.020098
Unstake4321589642026-02-14 23:00:4118 hrs ago1771110041IN
0x2CFa72E7...91db7d8e2
0 ETH0.000001190.02016
Compound All4319368572026-02-14 7:37:2434 hrs ago1771054644IN
0x2CFa72E7...91db7d8e2
0 ETH0.000015740.020036
Compound MP4318701752026-02-14 2:59:5738 hrs ago1771037997IN
0x2CFa72E7...91db7d8e2
0 ETH0.000004790.020032
Compound MP4318700822026-02-14 2:59:3438 hrs ago1771037974IN
0x2CFa72E7...91db7d8e2
0 ETH0.000005810.02001
Unstake4318449932026-02-14 1:15:1540 hrs ago1771031715IN
0x2CFa72E7...91db7d8e2
0 ETH0.000007250.02019
Compound All4315310552026-02-13 3:31:312 days ago1770953491IN
0x2CFa72E7...91db7d8e2
0 ETH0.000015780.020102
Unstake4314982592026-02-13 1:15:162 days ago1770945316IN
0x2CFa72E7...91db7d8e2
0 ETH0.000007190.020022
Unstake4313123082026-02-12 12:24:383 days ago1770899078IN
0x2CFa72E7...91db7d8e2
0 ETH0.000006950.02019
Compound MP4312360992026-02-12 7:08:093 days ago1770880089IN
0x2CFa72E7...91db7d8e2
0 ETH0.000005480.020026
Compound MP4312356922026-02-12 7:06:273 days ago1770879987IN
0x2CFa72E7...91db7d8e2
0 ETH0.000005490.020064
Unstake4311511922026-02-12 1:15:163 days ago1770858916IN
0x2CFa72E7...91db7d8e2
0 ETH0.000007190.020022
Stake4311214272026-02-11 23:11:423 days ago1770851502IN
0x2CFa72E7...91db7d8e2
0 ETH0.00000650.02
Unstake4310919562026-02-11 21:09:223 days ago1770844162IN
0x2CFa72E7...91db7d8e2
0 ETH0.00000620.020106
Stake4310220892026-02-11 16:19:474 days ago1770826787IN
0x2CFa72E7...91db7d8e2
0 ETH0.000007030.02022
Unstake4308385042026-02-11 3:38:304 days ago1770781110IN
0x2CFa72E7...91db7d8e2
0 ETH0.000006080.02
Unstake4308040322026-02-11 1:15:144 days ago1770772514IN
0x2CFa72E7...91db7d8e2
0 ETH0.000007180.02
Unstake4306925472026-02-10 17:32:215 days ago1770744741IN
0x2CFa72E7...91db7d8e2
0 ETH0.000006490.02
Stake4305564202026-02-10 8:07:345 days ago1770710854IN
0x2CFa72E7...91db7d8e2
0 ETH0.000008450.020052
Stake4304572282026-02-10 1:15:415 days ago1770686141IN
0x2CFa72E7...91db7d8e2
0 ETH0.000006950.02
Compound All4303942872026-02-09 20:53:575 days ago1770670437IN
0x2CFa72E7...91db7d8e2
0 ETH0.000016010.020044
Unstake4301906682026-02-09 6:48:596 days ago1770619739IN
0x2CFa72E7...91db7d8e2
0 ETH0.00000690.020034
Unstake4301102992026-02-09 1:15:146 days ago1770599714IN
0x2CFa72E7...91db7d8e2
0 ETH0.000007280.020282
Unstake4300286662026-02-08 19:35:556 days ago1770579355IN
0x2CFa72E7...91db7d8e2
0 ETH0.000006490.02
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WooStakingLocal

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import {IWooStakingLocal} from "./interfaces/IWooStakingLocal.sol";
import {IWooStakingManager} from "./interfaces/IWooStakingManager.sol";
import {BaseAdminOperation} from "./BaseAdminOperation.sol";
import {TransferHelper} from "./util/TransferHelper.sol";

contract WooStakingLocal is IWooStakingLocal, BaseAdminOperation, ReentrancyGuard {
    using SafeERC20 for IERC20;

    bool public isEmergency;
    IWooStakingManager public stakingManager;
    IERC20 public immutable want;

    mapping(address => uint256) public balances;

    constructor(address _want, address _stakingManager) {
        require(_want != address(0), "WooStakingLocal: !_want");
        require(_stakingManager != address(0), "WooStakingLocal: !_stakingManager");

        want = IERC20(_want);
        stakingManager = IWooStakingManager(_stakingManager);
        isEmergency = false;
    }

    function stake(uint256 _amount) external whenNotPaused nonReentrant {
        _stake(msg.sender, _amount);
    }

    // CAUTION: nonReentrant cannot be placed here:
    // https://dashboard.tenderly.co/tx/fantom/0x80cf10fd96e3cce75391c2067e25dd73b0fe27621088d8fa111f24b57d3d1341
    function stake(address _user, uint256 _amount) external whenNotPaused onlyAdmin {
        _stake(_user, _amount);
    }

    function stakeForUsers(
        address[] memory _users,
        uint256[] memory _amounts,
        uint256 _total
    ) external whenNotPaused onlyAdmin {
        uint256 len = _users.length;
        want.safeTransferFrom(msg.sender, address(this), _total);
        for (uint256 i = 0; i < len; ++i) {
            address _user = _users[i];
            balances[_user] += _amounts[i];
            stakingManager.stakeWoo(_user, _amounts[i]);
        }
        emit StakeForUsersOnLocal(_users, _amounts, _total);
    }

    function _stake(address _user, uint256 _amount) internal {
        want.safeTransferFrom(msg.sender, address(this), _amount);
        balances[_user] += _amount;
        emit StakeOnLocal(_user, _amount);
        stakingManager.stakeWoo(_user, _amount);
    }

    function unstake(uint256 _amount) external nonReentrant {
        _unstake(msg.sender, _amount);
    }

    function unstakeAll() external nonReentrant {
        _unstake(msg.sender, balances[msg.sender]);
    }

    function emergencyUnstake() external {
        require(isEmergency, "WooStakingLocal: !allow");
        uint256 _amount = balances[msg.sender];
        balances[msg.sender] -= _amount;
        want.safeTransfer(msg.sender, _amount);
        emit UnstakeOnLocal(msg.sender, _amount);
    }

    function _unstake(address _user, uint256 _amount) internal {
        require(balances[_user] >= _amount, "WooStakingLocal: !BALANCE");
        balances[_user] -= _amount;
        want.safeTransfer(_user, _amount);
        emit UnstakeOnLocal(_user, _amount);
        stakingManager.unstakeWoo(_user, _amount);
    }

    function setAutoCompound(bool _flag) external whenNotPaused nonReentrant {
        address _user = msg.sender;
        stakingManager.setAutoCompound(_user, _flag);
        emit SetAutoCompoundOnLocal(_user, _flag);
    }

    function compoundMP() external whenNotPaused nonReentrant {
        address _user = msg.sender;
        stakingManager.compoundMP(_user);
        emit CompoundMPOnLocal(_user);
    }

    function compoundAll() external whenNotPaused nonReentrant {
        address _user = msg.sender;
        stakingManager.compoundAll(_user);
        emit CompoundAllOnLocal(_user);
    }

    // --------------------- Admin Functions --------------------- //

    function setStakingManager(address _stakingManager) external onlyAdmin {
        stakingManager = IWooStakingManager(_stakingManager);
        // NOTE: don't forget to set stakingLocal as the admin of stakingManager
        emit SetStakingManagerOnLocal(_stakingManager);
    }

    function setIsEmergency(bool _isEmergency) external onlyOwner {
        isEmergency = _isEmergency;
    }

    function inCaseTokenGotStuck(address stuckToken) external override onlyOwner {
        require(stuckToken != address(want), "WooStakingLocal: !want");
        if (stuckToken == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) {
            TransferHelper.safeTransferETH(_msgSender(), address(this).balance);
        } else {
            uint256 amount = IERC20(stuckToken).balanceOf(address(this));
            TransferHelper.safeTransfer(stuckToken, _msgSender(), amount);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @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.
 */
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].
     */
    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 v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../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;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @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, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * 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.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @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`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";

import {TransferHelper} from "./util/TransferHelper.sol";

abstract contract BaseAdminOperation is Pausable, Ownable {
    event AdminUpdated(address indexed addr, bool flag);

    mapping(address => bool) public isAdmin;

    modifier onlyAdmin() {
        require(_msgSender() == owner() || isAdmin[_msgSender()], "BaseAdminOperation: !admin");
        _;
    }

    function pause() public onlyAdmin {
        _pause();
    }

    function unpause() public onlyAdmin {
        _unpause();
    }

    function setAdmin(address addr, bool flag) public onlyAdmin {
        isAdmin[addr] = flag;
        emit AdminUpdated(addr, flag);
    }

    function inCaseTokenGotStuck(address stuckToken) external virtual onlyOwner {
        if (stuckToken == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) {
            TransferHelper.safeTransferETH(_msgSender(), address(this).balance);
        } else {
            uint256 amount = IERC20(stuckToken).balanceOf(address(this));
            TransferHelper.safeTransfer(stuckToken, _msgSender(), amount);
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

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

interface IWooStakingLocal {
    /* ----- Events ----- */

    event StakeOnLocal(address indexed user, uint256 amount);
    event StakeForUsersOnLocal(address[] users, uint256[] amounts, uint256 total);
    event UnstakeOnLocal(address indexed user, uint256 amount);
    event SetAutoCompoundOnLocal(address indexed user, bool flag);
    event CompoundMPOnLocal(address indexed user);
    event CompoundAllOnLocal(address indexed user);
    event SetStakingManagerOnLocal(address indexed manager);

    /* ----- State Variables ----- */

    function want() external view returns (IERC20);

    function balances(address user) external view returns (uint256 balance);

    /* ----- Functions ----- */

    function stake(uint256 _amount) external;

    function stake(address _user, uint256 _amount) external;

    function stakeForUsers(address[] memory _users, uint256[] memory _amounts, uint256 _total) external;

    function unstake(uint256 _amount) external;

    function unstakeAll() external;

    function setAutoCompound(bool _flag) external;

    function compoundMP() external;

    function compoundAll() external;
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IWooStakingManager {
    /* ----- Events ----- */

    event StakeWooOnStakingManager(address indexed user, uint256 amount);
    event UnstakeWooOnStakingManager(address indexed user, uint256 amount);
    event AddMPOnStakingManager(address indexed user, uint256 amount);
    event CompoundMPOnStakingManager(address indexed user);
    event CompoundRewardsOnStakingManager(address indexed user, uint256 wooAmount);
    event CompoundAllOnStakingManager(address indexed user);
    event CompoundAllForUsersOnStakingManager(address[] users, uint256[] wooRewards);
    event SetAutoCompoundOnStakingManager(address indexed user, bool flag);
    event SetMPRewarderOnStakingManager(address indexed rewarder);
    event SetWooPPOnStakingManager(address indexed wooPP);
    event SetStakingLocalOnStakingManager(address indexed stakingProxy);
    event SetCompounderOnStakingManager(address indexed compounder);
    event AddRewarderOnStakingManager(address indexed rewarder);
    event RemoveRewarderOnStakingManager(address indexed rewarder);
    event ClaimRewardsOnStakingManager(address indexed user);

    /* ----- State Variables ----- */

    /* ----- Functions ----- */

    function stakeWoo(address _user, uint256 _amount) external;

    function unstakeWoo(address _user, uint256 _amount) external;

    function mpBalance(address _user) external view returns (uint256);

    function wooBalance(address _user) external view returns (uint256);

    function wooTotalBalance() external view returns (uint256);

    function totalBalance(address _user) external view returns (uint256);

    function totalBalance() external view returns (uint256);

    function compoundMP(address _user) external;

    function addMP(address _user, uint256 _amount) external;

    function compoundRewards(address _user) external;

    function compoundAll(address _user) external;

    function compoundAllForUsers(address[] memory _users) external;

    function setAutoCompound(address _user, bool _flag) external;

    function pendingRewards(
        address _user
    ) external view returns (uint256 mpRewardAmount, address[] memory rewardTokens, uint256[] memory amounts);
}

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint256 value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::safeApprove: approve failed"
        );
    }

    function safeTransfer(address token, address to, uint256 value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::safeTransfer: transfer failed"
        );
    }

    function safeTransferFrom(address token, address from, address to, uint256 value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::transferFrom: transferFrom failed"
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, "TransferHelper::safeTransferETH: ETH transfer failed");
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_want","type":"address"},{"internalType":"address","name":"_stakingManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"AdminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"CompoundAllOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"CompoundMPOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"SetAutoCompoundOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"}],"name":"SetStakingManagerOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"users","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"StakeForUsersOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnstakeOnLocal","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compoundAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compoundMP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stuckToken","type":"address"}],"name":"inCaseTokenGotStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEmergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"flag","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setAutoCompound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEmergency","type":"bool"}],"name":"setIsEmergency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingManager","type":"address"}],"name":"setStakingManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256","name":"_total","type":"uint256"}],"name":"stakeForUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingManager","outputs":[{"internalType":"contract IWooStakingManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakeAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b50604051620026f4380380620026f48339810160408190526200003491620001b9565b6000805460ff19169055620000493362000143565b60016002556001600160a01b038216620000aa5760405162461bcd60e51b815260206004820152601760248201527f576f6f5374616b696e674c6f63616c3a20215f77616e7400000000000000000060448201526064015b60405180910390fd5b6001600160a01b0381166200010c5760405162461bcd60e51b815260206004820152602160248201527f576f6f5374616b696e674c6f63616c3a20215f7374616b696e674d616e6167656044820152603960f91b6064820152608401620000a1565b6001600160a01b03918216608052600380546001600160a81b031916610100929093169190910260ff1916919091179055620001f1565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b80516001600160a01b0381168114620001b457600080fd5b919050565b60008060408385031215620001cd57600080fd5b620001d8836200019c565b9150620001e8602084016200019c565b90509250929050565b6080516124c462000230600039600081816101a2015281816107fe01528181610e4201528181611029015281816113be015261180801526124c46000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c8063715018a6116100e3578063a694fc3a1161008c578063baddbe4911610066578063baddbe491461036e578063e1a4e72a14610381578063f2fde38b1461039457600080fd5b8063a694fc3a14610335578063adc9772e14610348578063b00bba6a1461035b57600080fd5b806386593454116100bd57806386593454146102f75780638da5cb5b1461030a5780639b05ddb31461032d57600080fd5b8063715018a6146102df5780637589cf2f146102e75780638456cb59146102ef57600080fd5b80633debccfa116101455780635c975abb1161011f5780635c975abb146102b45780635f9e8f82146102bf57806360aec637146102cc57600080fd5b80633debccfa146102915780633f4ba83a146102995780634b0bddd2146102a157600080fd5b806327e235e31161017657806327e235e3146102465780632e17de781461027457806335322f371461028957600080fd5b80631f1fcd511461019d57806322828cc2146101ee57806324d7806c14610213575b600080fd5b6101c47f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546101c490610100900473ffffffffffffffffffffffffffffffffffffffff1681565b610236610221366004611fce565b60016020526000908152604090205460ff1681565b60405190151581526020016101e5565b610266610254366004611fce565b60046020526000908152604090205481565b6040519081526020016101e5565b610287610282366004611ff0565b6103a7565b005b6102876103c6565b6102876103f4565b6102876104d9565b6102876102af366004612017565b6105b2565b60005460ff16610236565b6003546102369060ff1681565b6102876102da36600461204e565b610708565b610287610741565b610287610753565b61028761085d565b61028761030536600461204e565b610931565b600054610100900473ffffffffffffffffffffffffffffffffffffffff166101c4565b610287610a2f565b610287610343366004611ff0565b610b14565b61028761035636600461206b565b610b2e565b610287610369366004611fce565b610c10565b61028761037c3660046121a2565b610d52565b61028761038f366004611fce565b61101f565b6102876103a2366004611fce565b6111b5565b6103af611269565b6103b933826112da565b6103c36001600255565b50565b6103ce611269565b336000818152600460205260409020546103e891906112da565b6103f26001600255565b565b6103fc6114cc565b610404611269565b6003546040517f24a1ad95000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff16906324a1ad9590602401600060405180830381600087803b15801561047557600080fd5b505af1158015610489573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507fb088cc85d2ed06bb33bc2112efa493e4a9050b1490dfb96e57f024ee3a1dc1559150600090a2506103f26001600255565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061053f57503360009081526001602052604090205460ff165b6105aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064015b60405180910390fd5b6103f2611539565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061061857503360009081526001602052604090205460ff165b61067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f235bc17e7930760029e9f4d860a2a8089976de5b381cf8380fc11c1d88a11133910160405180910390a25050565b6107106115b6565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6107496115b6565b6103f2600061163d565b60035460ff166107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f576f6f5374616b696e674c6f63616c3a2021616c6c6f7700000000000000000060448201526064016105a1565b3360009081526004602052604081208054918291906107de838061229a565b90915550610825905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633836116ba565b60405181815233907fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a9060200160405180910390a250565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108c357503360009081526001602052604090205460ff165b610929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b6103f2611793565b6109396114cc565b610941611269565b6003546040517f601c26690000000000000000000000000000000000000000000000000000000081523360048201819052831515602483015291610100900473ffffffffffffffffffffffffffffffffffffffff169063601c266990604401600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff167ffbde27c6924feb14f42da6b37636eab64a51385afb5462e0f0990251b3a3dbbb83604051610a1c911515815260200190565b60405180910390a2506103c36001600255565b610a376114cc565b610a3f611269565b6003546040517fd32f79de000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff169063d32f79de90602401600060405180830381600087803b158015610ab057600080fd5b505af1158015610ac4573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507f9b44e7dabc2536afd9ad4d6e12ad7f2a62effeffe8192e6e0b456f6bfc7060589150600090a2506103f26001600255565b610b1c6114cc565b610b24611269565b6103b933826117ee565b610b366114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610b9c57503360009081526001602052604090205460ff165b610c02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b610c0c82826117ee565b5050565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c7657503360009081526001602052604090205460ff165b610cdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040517fc95f57fb4cfc6ad8247eda12deb45012e894816aebdf7305e40ba95ef83b326790600090a250565b610d5a6114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610dc057503360009081526001602052604090205460ff165b610e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b8251610e6a73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308561191a565b60005b81811015610fdd576000858281518110610e8957610e896122b3565b60200260200101519050848281518110610ea557610ea56122b3565b6020026020010151600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610efb91906122e2565b92505081905550600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b946104e82878581518110610f5357610f536122b3565b60200260200101516040518363ffffffff1660e01b8152600401610f9992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060405180830381600087803b158015610fb357600080fd5b505af1158015610fc7573d6000803e3d6000fd5b505050505080610fd6906122f5565b9050610e6d565b507fd50749b86acca50b3fa503360ef9856906c87f618a418a50416eae9633fa19da8484846040516110119392919061232d565b60405180910390a150505050565b6110276115b6565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f576f6f5374616b696e674c6f63616c3a202177616e740000000000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03611117576103c3334761197e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a891906123c7565b9050610c0c823383611a88565b6111bd6115b6565b73ffffffffffffffffffffffffffffffffffffffff8116611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105a1565b6103c38161163d565b60028054036112d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a1565b60028055565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054811115611369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576f6f5374616b696e674c6f63616c3a202142414c414e43450000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120805483929061139e90849061229a565b909155506113e5905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001683836116ba565b8173ffffffffffffffffffffffffffffffffffffffff167fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a8260405161142d91815260200190565b60405180910390a26003546040517fd317c6ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063d317c6ce906044015b600060405180830381600087803b1580156114b057600080fd5b505af11580156114c4573d6000803e3d6000fd5b505050505050565b60005460ff16156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105a1565b611541611c1e565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60005473ffffffffffffffffffffffffffffffffffffffff6101009091041633146103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261178e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c8a565b505050565b61179b6114cc565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861158c3390565b61183073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461191a565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040812080548392906118659084906122e2565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316907fb80198f3dce5b44c7655dc02c2d1e8af243e943a75d350bab8b566c62beadd119060200160405180910390a26003546040517fb946104e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063b946104e90604401611496565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526119789085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161170c565b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516119b59190612404565b60006040518083038185875af1925050503d80600081146119f2576040519150601f19603f3d011682016040523d82523d6000602084013e6119f7565b606091505b505090508061178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c656400000000000000000000000060648201526084016105a1565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691611b1f9190612404565b6000604051808303816000865af19150503d8060008114611b5c576040519150601f19603f3d011682016040523d82523d6000602084013e611b61565b606091505b5091509150818015611b8b575080511580611b8b575080806020019051810190611b8b9190612420565b611c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016105a1565b5050505050565b60005460ff166103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105a1565b6000611cec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611d969092919063ffffffff16565b80519091501561178e5780806020019051810190611d0a9190612420565b61178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105a1565b6060611da58484600085611dad565b949350505050565b606082471015611e3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105a1565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611e689190612404565b60006040518083038185875af1925050503d8060008114611ea5576040519150601f19603f3d011682016040523d82523d6000602084013e611eaa565b606091505b5091509150611ebb87838387611ec6565b979650505050505050565b60608315611f5c578251600003611f555773ffffffffffffffffffffffffffffffffffffffff85163b611f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a1565b5081611da5565b611da58383815115611f715781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a1919061243d565b803573ffffffffffffffffffffffffffffffffffffffff81168114611fc957600080fd5b919050565b600060208284031215611fe057600080fd5b611fe982611fa5565b9392505050565b60006020828403121561200257600080fd5b5035919050565b80151581146103c357600080fd5b6000806040838503121561202a57600080fd5b61203383611fa5565b9150602083013561204381612009565b809150509250929050565b60006020828403121561206057600080fd5b8135611fe981612009565b6000806040838503121561207e57600080fd5b61208783611fa5565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561210b5761210b612095565b604052919050565b600067ffffffffffffffff82111561212d5761212d612095565b5060051b60200190565b600082601f83011261214857600080fd5b8135602061215d61215883612113565b6120c4565b82815260059290921b8401810191818101908684111561217c57600080fd5b8286015b848110156121975780358352918301918301612180565b509695505050505050565b6000806000606084860312156121b757600080fd5b833567ffffffffffffffff808211156121cf57600080fd5b818601915086601f8301126121e357600080fd5b813560206121f361215883612113565b82815260059290921b8401810191818101908a84111561221257600080fd5b948201945b838610156122375761222886611fa5565b82529482019490820190612217565b9750508701359250508082111561224d57600080fd5b5061225a86828701612137565b925050604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156122ad576122ad61226b565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156122ad576122ad61226b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123265761232661226b565b5060010190565b606080825284519082018190526000906020906080840190828801845b8281101561237c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161234a565b5050508381038285015285518082528683019183019060005b818110156123b157835183529284019291840191600101612395565b5050809350505050826040830152949350505050565b6000602082840312156123d957600080fd5b5051919050565b60005b838110156123fb5781810151838201526020016123e3565b50506000910152565b600082516124168184602087016123e0565b9190910192915050565b60006020828403121561243257600080fd5b8151611fe981612009565b602081526000825180602084015261245c8160408501602087016123e0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212203fcf999a44a68fe6cc4259b4c9aa52ac7128eaf56067f634d4f18971d145e2df64736f6c63430008110033000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b000000000000000000000000a9e245c1fa7e17263cc7c896488a3da8072924fb

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101985760003560e01c8063715018a6116100e3578063a694fc3a1161008c578063baddbe4911610066578063baddbe491461036e578063e1a4e72a14610381578063f2fde38b1461039457600080fd5b8063a694fc3a14610335578063adc9772e14610348578063b00bba6a1461035b57600080fd5b806386593454116100bd57806386593454146102f75780638da5cb5b1461030a5780639b05ddb31461032d57600080fd5b8063715018a6146102df5780637589cf2f146102e75780638456cb59146102ef57600080fd5b80633debccfa116101455780635c975abb1161011f5780635c975abb146102b45780635f9e8f82146102bf57806360aec637146102cc57600080fd5b80633debccfa146102915780633f4ba83a146102995780634b0bddd2146102a157600080fd5b806327e235e31161017657806327e235e3146102465780632e17de781461027457806335322f371461028957600080fd5b80631f1fcd511461019d57806322828cc2146101ee57806324d7806c14610213575b600080fd5b6101c47f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546101c490610100900473ffffffffffffffffffffffffffffffffffffffff1681565b610236610221366004611fce565b60016020526000908152604090205460ff1681565b60405190151581526020016101e5565b610266610254366004611fce565b60046020526000908152604090205481565b6040519081526020016101e5565b610287610282366004611ff0565b6103a7565b005b6102876103c6565b6102876103f4565b6102876104d9565b6102876102af366004612017565b6105b2565b60005460ff16610236565b6003546102369060ff1681565b6102876102da36600461204e565b610708565b610287610741565b610287610753565b61028761085d565b61028761030536600461204e565b610931565b600054610100900473ffffffffffffffffffffffffffffffffffffffff166101c4565b610287610a2f565b610287610343366004611ff0565b610b14565b61028761035636600461206b565b610b2e565b610287610369366004611fce565b610c10565b61028761037c3660046121a2565b610d52565b61028761038f366004611fce565b61101f565b6102876103a2366004611fce565b6111b5565b6103af611269565b6103b933826112da565b6103c36001600255565b50565b6103ce611269565b336000818152600460205260409020546103e891906112da565b6103f26001600255565b565b6103fc6114cc565b610404611269565b6003546040517f24a1ad95000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff16906324a1ad9590602401600060405180830381600087803b15801561047557600080fd5b505af1158015610489573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507fb088cc85d2ed06bb33bc2112efa493e4a9050b1490dfb96e57f024ee3a1dc1559150600090a2506103f26001600255565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061053f57503360009081526001602052604090205460ff165b6105aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064015b60405180910390fd5b6103f2611539565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061061857503360009081526001602052604090205460ff165b61067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f235bc17e7930760029e9f4d860a2a8089976de5b381cf8380fc11c1d88a11133910160405180910390a25050565b6107106115b6565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6107496115b6565b6103f2600061163d565b60035460ff166107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f576f6f5374616b696e674c6f63616c3a2021616c6c6f7700000000000000000060448201526064016105a1565b3360009081526004602052604081208054918291906107de838061229a565b90915550610825905073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1633836116ba565b60405181815233907fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a9060200160405180910390a250565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108c357503360009081526001602052604090205460ff165b610929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b6103f2611793565b6109396114cc565b610941611269565b6003546040517f601c26690000000000000000000000000000000000000000000000000000000081523360048201819052831515602483015291610100900473ffffffffffffffffffffffffffffffffffffffff169063601c266990604401600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff167ffbde27c6924feb14f42da6b37636eab64a51385afb5462e0f0990251b3a3dbbb83604051610a1c911515815260200190565b60405180910390a2506103c36001600255565b610a376114cc565b610a3f611269565b6003546040517fd32f79de000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff169063d32f79de90602401600060405180830381600087803b158015610ab057600080fd5b505af1158015610ac4573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507f9b44e7dabc2536afd9ad4d6e12ad7f2a62effeffe8192e6e0b456f6bfc7060589150600090a2506103f26001600255565b610b1c6114cc565b610b24611269565b6103b933826117ee565b610b366114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610b9c57503360009081526001602052604090205460ff165b610c02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b610c0c82826117ee565b5050565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c7657503360009081526001602052604090205460ff165b610cdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040517fc95f57fb4cfc6ad8247eda12deb45012e894816aebdf7305e40ba95ef83b326790600090a250565b610d5a6114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610dc057503360009081526001602052604090205460ff165b610e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b8251610e6a73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1633308561191a565b60005b81811015610fdd576000858281518110610e8957610e896122b3565b60200260200101519050848281518110610ea557610ea56122b3565b6020026020010151600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610efb91906122e2565b92505081905550600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b946104e82878581518110610f5357610f536122b3565b60200260200101516040518363ffffffff1660e01b8152600401610f9992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060405180830381600087803b158015610fb357600080fd5b505af1158015610fc7573d6000803e3d6000fd5b505050505080610fd6906122f5565b9050610e6d565b507fd50749b86acca50b3fa503360ef9856906c87f618a418a50416eae9633fa19da8484846040516110119392919061232d565b60405180910390a150505050565b6110276115b6565b7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f576f6f5374616b696e674c6f63616c3a202177616e740000000000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03611117576103c3334761197e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a891906123c7565b9050610c0c823383611a88565b6111bd6115b6565b73ffffffffffffffffffffffffffffffffffffffff8116611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105a1565b6103c38161163d565b60028054036112d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a1565b60028055565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054811115611369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576f6f5374616b696e674c6f63616c3a202142414c414e43450000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120805483929061139e90849061229a565b909155506113e5905073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1683836116ba565b8173ffffffffffffffffffffffffffffffffffffffff167fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a8260405161142d91815260200190565b60405180910390a26003546040517fd317c6ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063d317c6ce906044015b600060405180830381600087803b1580156114b057600080fd5b505af11580156114c4573d6000803e3d6000fd5b505050505050565b60005460ff16156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105a1565b611541611c1e565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60005473ffffffffffffffffffffffffffffffffffffffff6101009091041633146103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261178e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c8a565b505050565b61179b6114cc565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861158c3390565b61183073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1633308461191a565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040812080548392906118659084906122e2565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316907fb80198f3dce5b44c7655dc02c2d1e8af243e943a75d350bab8b566c62beadd119060200160405180910390a26003546040517fb946104e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063b946104e90604401611496565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526119789085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161170c565b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516119b59190612404565b60006040518083038185875af1925050503d80600081146119f2576040519150601f19603f3d011682016040523d82523d6000602084013e6119f7565b606091505b505090508061178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c656400000000000000000000000060648201526084016105a1565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691611b1f9190612404565b6000604051808303816000865af19150503d8060008114611b5c576040519150601f19603f3d011682016040523d82523d6000602084013e611b61565b606091505b5091509150818015611b8b575080511580611b8b575080806020019051810190611b8b9190612420565b611c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016105a1565b5050505050565b60005460ff166103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105a1565b6000611cec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611d969092919063ffffffff16565b80519091501561178e5780806020019051810190611d0a9190612420565b61178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105a1565b6060611da58484600085611dad565b949350505050565b606082471015611e3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105a1565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611e689190612404565b60006040518083038185875af1925050503d8060008114611ea5576040519150601f19603f3d011682016040523d82523d6000602084013e611eaa565b606091505b5091509150611ebb87838387611ec6565b979650505050505050565b60608315611f5c578251600003611f555773ffffffffffffffffffffffffffffffffffffffff85163b611f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a1565b5081611da5565b611da58383815115611f715781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a1919061243d565b803573ffffffffffffffffffffffffffffffffffffffff81168114611fc957600080fd5b919050565b600060208284031215611fe057600080fd5b611fe982611fa5565b9392505050565b60006020828403121561200257600080fd5b5035919050565b80151581146103c357600080fd5b6000806040838503121561202a57600080fd5b61203383611fa5565b9150602083013561204381612009565b809150509250929050565b60006020828403121561206057600080fd5b8135611fe981612009565b6000806040838503121561207e57600080fd5b61208783611fa5565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561210b5761210b612095565b604052919050565b600067ffffffffffffffff82111561212d5761212d612095565b5060051b60200190565b600082601f83011261214857600080fd5b8135602061215d61215883612113565b6120c4565b82815260059290921b8401810191818101908684111561217c57600080fd5b8286015b848110156121975780358352918301918301612180565b509695505050505050565b6000806000606084860312156121b757600080fd5b833567ffffffffffffffff808211156121cf57600080fd5b818601915086601f8301126121e357600080fd5b813560206121f361215883612113565b82815260059290921b8401810191818101908a84111561221257600080fd5b948201945b838610156122375761222886611fa5565b82529482019490820190612217565b9750508701359250508082111561224d57600080fd5b5061225a86828701612137565b925050604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156122ad576122ad61226b565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156122ad576122ad61226b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123265761232661226b565b5060010190565b606080825284519082018190526000906020906080840190828801845b8281101561237c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161234a565b5050508381038285015285518082528683019183019060005b818110156123b157835183529284019291840191600101612395565b5050809350505050826040830152949350505050565b6000602082840312156123d957600080fd5b5051919050565b60005b838110156123fb5781810151838201526020016123e3565b50506000910152565b600082516124168184602087016123e0565b9190910192915050565b60006020828403121561243257600080fd5b8151611fe981612009565b602081526000825180602084015261245c8160408501602087016123e0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212203fcf999a44a68fe6cc4259b4c9aa52ac7128eaf56067f634d4f18971d145e2df64736f6c63430008110033

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

000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b000000000000000000000000a9e245c1fa7e17263cc7c896488a3da8072924fb

-----Decoded View---------------
Arg [0] : _want (address): 0xcAFcD85D8ca7Ad1e1C6F82F651fA15E33AEfD07b
Arg [1] : _stakingManager (address): 0xa9E245C1FA7E17263Cc7C896488A3da8072924Fb

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b
Arg [1] : 000000000000000000000000a9e245c1fa7e17263cc7c896488a3da8072924fb


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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  ]

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.

`; } let ensZeroWidthWarningHtml = ""; if ($("#hdnIsEnsContainZeroWidthChars").val() == "true") { ensZeroWidthWarningHtml = `
${zeroWidthWarningMessage} Check the actual text at ENS.
`; } const ensOnL2NoteHtml = ensOnL2Note != "" ? `
  • ${ensOnL2Note}
  • ` : ""; const contentHtml = `
    Additional Info
    Full Name:
    ${ensNameForkIconSrc}


    Note:
    • Name tag is displayed due to forward and reverse resolution. Find out more.
    • ${ensOnL2NoteHtml}
    ${ensUnicodeWarningHtml} ${ensZeroWidthWarningHtml}
    `; $('#ensName').popover({ html: true, content: contentHtml, trigger: 'manual', placement: 'right' }); $('#ensName').click(function (event) { $("#udName").popover('hide') $("#ensName").popover('toggle'); event.stopPropagation(); }); $('#ensName').on('shown.bs.popover', async () => { //disable tooltip when hovering over ens name in the main page $("[rel='tooltipEns']").each(function () { $(this).tooltip('hide'); $(this).tooltip('disable'); }); //call ajax here to get result if (!otherENSNamesHtml) { const resolvedAddressesModel = await getEnsResolvedAddress($("#hdnAddress").val(), primaryDomainNameLabel); otherENSNamesHtml = generateEnsPopoverGrid(resolvedAddressesModel.d); if (!otherENSNamesHtml) { otherENSNamesHtml = "There are no other names resolving to this address." } } $(".popOverEnsOwnedAddressTable").html(otherENSNamesHtml); $("#divENSDisplayName").html(ensDisplayName); // append more copy button for ENS let domainName = $("#hdnEnsText").val(); const copyEnsButtonHtml = ` `; $("#spanCopyENSAddress").html(copyEnsButtonHtml); $("[data-bs-toggle='tooltip']").tooltip(); }); $('#ensName').on('hidden.bs.popover', () => { $("[rel='tooltipEns']").each(function () { $(this).tooltip('enable'); }); }); $('#ensName').on('hide.bs.popover', () => { $("[data-bs-toggle='tooltip']").tooltip('hide'); }); $(document).click(function (e) { const popoverElement = document.getElementById('popover-ens-preview'); const popoverTrigger = document.getElementById('ensName'); if (!popoverTrigger.contains(e.target) && (!popoverElement || !popoverElement.contains(e.target))) { $("#ensName").popover('hide'); } }) } async function getEnsResolvedAddress(address, currentEnsText) { try { const requestModel = { "lookupAddress": address, "primaryDomainName": currentEnsText, "provider": ensNameProvider }; const response = await $.ajax({ url: "/name-lookup-search.aspx/GetOtherDomainNameForAddress", type: "POST", contentType: "application/json", dataType: "json", data: JSON.stringify({ requestModel: requestModel }) }) return response; } catch { return ""; } } function generateEnsPopoverGrid(model) { if (!model || model.DomainNames.length == 0) { return ""; } let listOtherENSNames = ""; model.DomainNames.forEach(x => listOtherENSNames += x.Name); let moreOtherENSNames = ""; if (model.Total > 5) { moreOtherENSNames = `More ` } const result = `
    Other names resolving to this address:
    ${listOtherENSNames} ${moreOtherENSNames}
    `; return result; } // ===== UD name tag const displayUDName = ''; const primaryUDName = ''; const showUDPublicNote = 'false'; let otherUDNamesHtml = ""; function initUDNamePopOver() { //required to allow bootstrap popover to support table $.fn.popover.Constructor.Default.allowList.table = []; $.fn.popover.Constructor.Default.allowList.tr = []; $.fn.popover.Constructor.Default.allowList.td = []; $.fn.popover.Constructor.Default.allowList.th = []; $.fn.popover.Constructor.Default.allowList.div = []; $.fn.popover.Constructor.Default.allowList.tbody = []; $.fn.popover.Constructor.Default.allowList.thead = []; //allowList my inline styling for bootstrap $.fn.popover.Constructor.Default.allowList['*'].push('style') let unicodeWarningHtml = ""; if ($("#hdnIsUDContainUnicodeChars").val() == "true") { unicodeWarningHtml = `
    ${unicodeWarningMessage} Check the actual text at Unstoppable Domains.
    `; } let zeroWidthWarningHtml = ""; if ($("#hdnIsUDContainZeroWidthChars").val() == "true") { zeroWidthWarningHtml = `
    ${unicodeWarningMessage} Check the actual text at Unstoppable Domains.
    `; } const contentHtml = `
    Additional Info
    Full Name:
    Unstoppable Domains Name


    Note:
    • Name tag is displayed due to forward and reverse resolution. Find out more
    ${unicodeWarningHtml} ${zeroWidthWarningHtml}
    `; $('#udName').popover({ html: true, content: contentHtml, trigger: 'manual' }); $('#udName').click(function (event) { $("#ensName").popover('hide'); $("#udName").popover('toggle'); event.stopPropagation(); }); $('#udName').on('shown.bs.popover', async () => { //disable tooltip when hovering over SID name in the main page $("[rel='tooltipUDName']").each(function () { $(this).tooltip('hide'); $(this).tooltip('disable'); }); //call ajax here to get result if (!otherUDNamesHtml) { const resolvedAddressesModel = await getUDNamesResolvedAddress($("#hdnAddress").val(), primaryUDName); //format the ajax to otherUDNamesHtml otherUDNamesHtml = generateUDPopoverGrid(resolvedAddressesModel.d); if (!otherUDNamesHtml) { otherUDNamesHtml = "There are no other names resolving to this address." } } $(".popoverUDNamesOwnedByAddress").html(otherUDNamesHtml); $("#divDisplayUDName").html(displayUDName); if (showUDPublicNote == true) { $("#noteUD").html('The Unstoppable Domains NFT is minted on the Ethereum blockchain. View and verify its details on Etherscan.'); $("#noteUD").show(); } $("[data-bs-toggle='tooltip']").tooltip(); }); $('#udName').on('hidden.bs.popover', () => { $("[rel='tooltipUDName']").each(function () { $(this).tooltip('enable'); }); }); $('#udName').on('hide.bs.popover', () => { $("[data-bs-toggle='tooltip']").tooltip('hide'); }); // Hide Unstoppable Domains Name popover when click outside the popover popup. $(document).click(function () { $("#udName").popover('hide') }); } async function getUDNamesResolvedAddress(address, primaryUDName) { try { const requestModel = { "lookupAddress": address, "primaryDomainName": primaryUDName, "provider": "UD" }; const response = await $.ajax({ url: "/name-lookup-search.aspx/GetOtherDomainNameForAddress", type: "POST", contentType: "application/json", dataType: "json", data: JSON.stringify({ requestModel: requestModel }) }) return response; } catch { return ""; } } function generateUDPopoverGrid(model) { if (!model || model.DomainNames.length == 0) { return ""; } let listOtherUDNames = ""; model.DomainNames.forEach(x => listOtherUDNames += x.Name); let moreOtherUDNames = ""; if (model.Total > 5) { moreOtherUDNames = `More `; } const result = `
    Other names resolving to this address:
    ${listOtherUDNames} ${moreOtherUDNames}
    `; return result; } // ===== end UD name tag const tooltipForTokenHolding = '46 Token Contracts'; var adjustPosition = 0; $(document).ready(function () { switchAmountToValue(document.getElementById("headerAmountValue"), 'Value (USD)', 'Amount', true); switchAmountToValue(document.getElementById("headerIntAmountValue"), 'Value (USD)', 'Amount', true); switchMethodColumn(document.getElementById("headerMethod"), 'Method', 'Action', true); onDocumentReady(); $("[rel='tooltip']").tooltip(); $("[data-bs-toggle-second='tooltip']").tooltip({ trigger: 'hover' }); $("[rel='tooltipEns']").each(function () { $(this).tooltip({ title: $(this).attr("tooltip-title") }); }); if (hash != '') { activaTab(hash); }; onAddressDocReady(); // Note: this is causing "Copied" tooltip not showing when copy button is clicked in V3, and seems like not applicable to v3, comment out first in case there is issue //$('[data-bs-toggle="tooltip"]').click(function () { // $('[data-bs-toggle="tooltip"]').tooltip("hide"); //}); document.getElementById("copyaddressbutton").classList.remove("disabled"); if ($("#txtSearchContract").length) { initialiseKeyupOnDocReady(); } if (!!$('#ensName')[0]) { initEnsNamePopOver(); } if (!!$("#udName")[0]) { initUDNamePopOver(); } handleToggle(); if (window.matchMedia("(max-width: 767px)").matches) { // Mobile adjustPosition = 90; } else { // Others adjustPosition = 50; } if (tooltipForTokenHolding) { const dropdownMenuBalance = document.getElementById("dropdownMenuBalance"); if (dropdownMenuBalance) { const dropdownWrapper = dropdownMenuBalance.closest(".dropdown"); if (dropdownWrapper) { dropdownWrapper.setAttribute("title", tooltipForTokenHolding); new bootstrap.Tooltip(dropdownWrapper); } } } }); function displayAudit() { $('html, body').animate({ scrollTop: $("#auditReportId").offset().top - adjustPosition }); } var cThemeMode = getCookie('displaymode'); function handleToggle() { var className = document.getElementsByClassName('editor'); var classNameCount = className.length; for (var j = 0; j t.innerWidth()) { if (mb + d > tb) { t.css('padding-bottom', ((mb + d) - tb)); } } else { t.css('overflow', 'visible'); } }).on('hidden.bs.dropdown', function () { $(this).css({ 'padding-bottom': '', 'overflow': '' }); }); var btn_ERC20_sort = { count: 0, reminder_count: 2, list: [], default_list: [], ERC20_sort_start: function (count) { if (document.getElementsByClassName('list-custom-divider-ERC20')[0]) { var self = this if (count != undefined) { self.count = count } var before_el = document.getElementsByClassName('list-custom-divider-ERC20')[0] var parent_el = before_el.parentNode var element_selector = parent_el.querySelectorAll(".list-custom-ERC20"); if (self.list.length == 0) { element_selector.forEach(function (e) { self.list.push(e); self.default_list.push(e); }); } $(".list-custom-ERC20").remove() var type = self.count % self.reminder_count self.sortList(type, parent_el, before_el); self.count++ } }, sortList: function (type, parent_el, before_el) { var self = this var sorted_list = [] var icon_el = $(before_el).find('button').find('i') switch (type) { case 1: icon_el.attr("class", "fad fa-sort-up") sorted_list = self.sortUsdAsc() break; default: icon_el.attr("class", "fad fa-sort-down") sorted_list = self.sortUsdDesc() } for (var i = sorted_list.length - 1; i >= 0; i--) { before_el.insertAdjacentElement('afterend', sorted_list[i]) } }, sortUsdAsc: function () { var self = this var sort_list = self.list sort_list.sort(function (a, b) { var target_a_value = self.formatCurrencyToNumber(a.querySelector('.list-usd-value').textContent.trim() || -1); var target_b_value = self.formatCurrencyToNumber(b.querySelector('.list-usd-value').textContent.trim() || -1); if (target_a_value == -1 || target_b_value == -1) { return 1; } if (target_a_value target_b_value) { return 1; } return 0 }); return sort_list }, sortUsdDesc: function () { var self = this var sort_list = self.list sort_list.sort(function (a, b) { var target_a_value = self.formatCurrencyToNumber(a.querySelector('.list-usd-value').textContent.trim() || -1); var target_b_value = self.formatCurrencyToNumber(b.querySelector('.list-usd-value').textContent.trim() || -1); if (target_a_value target_b_value) { return -1; } return 0 }); return sort_list }, formatCurrencyToNumber: function (strCurrency) { if (typeof strCurrency == "number") return strCurrency else return Number(strCurrency.replace(/[^0-9.-]+/g, "")); }, } function hrefTokenHolding() { var location = "/tokenholdings?a=0x2cfa72e7f58dc82b990529450ffa83791db7d8e2" var queryString = $("input.form-control.form-control-xs.search.mb-3")[0].value if (queryString) { location += "&q=" + queryString } window.location.href = location } $(document).ready(function () { $("#btn_ERC20_sort").on("click", function (event) { event.preventDefault(); setTimeout(function () { btn_ERC20_sort.ERC20_sort_start() }, 10) }) btn_ERC20_sort.ERC20_sort_start() var mainAddress = $("#hdnAddress").val(); // user search for method filters var searchFuncTimeOut; $("#ContentPlaceHolder1_inputMethodName").on("keyup", function ($event) { if (searchFuncTimeOut) { clearTimeout(searchFuncTimeOut) } var searchTerm = $(this).val(); searchFuncTimeOut = setTimeout(function () { searchFunctions( searchTerm); }, 350); }); var isSearchFunctions = false; $("#dropdownMethod").on("click", function (e) { if (isSearchFunctions === false) { searchFunctions(''); isSearchFunctions = true; } }); const litDefaultMethodFilterHtml = ''; function searchFunctions(searchTerm) { if (searchTerm === '' || searchTerm.length > 3) { const curPath = encodeURIComponent(window.location.search); $.ajax({ type: 'Get', url: `/functionSearchHandler.ashx?ca=${mainAddress}&func=${searchTerm ?? ''}&curPath=${curPath}`, success: function (response) { $("#searchFunctionResult").html(''); if (response && response.length > 0) { for (var i = 0; i ${response[i].name} ${response[i].methodId} ` ); } $("[data-bs-toggle='tooltip']").tooltip(); } else { $("#searchFunctionResult").append( `` ); } $("#inputMethodSpinner").hide(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { $("#searchFunctionResult").html(''); $("#inputMethodSpinner").hide(); } }); } else { $("#inputMethodSpinner").hide(); $("#searchFunctionResult").html(litDefaultMethodFilterHtml); } } // Resize window for analytic tab let isBusy = false; $(window).resize(function () { isBusy = true; if (isBusy) { let analyticFrame = document.getElementById('analytics_pageiframe'); if (analyticFrame && analyticFrame.contentWindow != undefined) { let navtab = analyticFrame.contentWindow.document.getElementsByClassName("nav_tabs1"); let hIframe = "0px"; if (navtab != null && navtab != undefined && navtab.length > 0) { let navH = Number(navtab[0].scrollHeight); hIframe = (Number(analyticFrame.contentWindow.document.getElementsByClassName("tab-content")[0].scrollHeight) + navH + 20) + 'px'; } else { hIframe = analyticFrame.contentWindow.document.body.scrollHeight + 'px'; } analyticFrame.style.height = hIframe } } }); // detect tooltip for token holding dropdown if ($(".addresses-tooltip-over").length > 0) { if (!isMobile()) { $(".addresses-tooltip-over").attr("data-bs-trigger", "hover"); let tooltip = bootstrap.Tooltip.getInstance(".addresses-tooltip-over"); if (tooltip !== null) { tooltip.dispose(); tooltip = new bootstrap.Tooltip($(".addresses-tooltip-over")); tooltip._config.trigger = 'hover'; tooltip.update(); } } } // Quick export transaction csv const quickExportCsvData = '[{"Txhash":"0x69ee0cc1716510caa4a4bc7531730d0016d0bf6f95fd8be8be02098b90a6ba3f","Status":"Success","Method":"Unstake","Blockno":"432421652","DateTime":"2026-02-15 17:11:35","Sender":"0x499520C73e130E5b7E45ed5fd81541b7eeDb3E54","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000709"},{"Txhash":"0x324f9de724e968bcfe6c2861e8a233cd76bdc0065a62d7e9a985be81224b8b64","Status":"Success","Method":"Stake","Blockno":"432191429","DateTime":"2026-02-15 01:15:38","Sender":"0xde5D26Ad782C0084664309a07040f5C69a20092C","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000699"},{"Txhash":"0xa157f102523970e9d9277784e4b8c4f63c5bc47fbf8916e2a0375f67a6f9a2ae","Status":"Success","Method":"Unstake","Blockno":"432158964","DateTime":"2026-02-14 23:00:41","Sender":"0xcC4F16BeCF382CbaD42816831AEC8789a2FE4c83","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000119"},{"Txhash":"0x50ee63abb9af1e471a996445ba576c4373c14d59775e9a7dfc625628f6953e47","Status":"Success","Method":"Compound All","Blockno":"431936857","DateTime":"2026-02-14 07:37:24","Sender":"0x251cECf9a7dac6946950E9548e29Faf53BeC8fB3","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00001574"},{"Txhash":"0x301a11ca1557ab8bcd6049c89153eb009f96516a22cf75d8b6bc8d5451af397f","Status":"Success","Method":"Compound MP","Blockno":"431870175","DateTime":"2026-02-14 02:59:57","Sender":"0x6fE99a5d45D9b0FB653192a2664bce310666b8Dc","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000479"},{"Txhash":"0x5d8ddd0b28222e32fe2cab257f0acdde2ac442b6022dca0431137b5cc5c198fe","Status":"Success","Method":"Compound MP","Blockno":"431870082","DateTime":"2026-02-14 02:59:34","Sender":"0xf2620ADF6BA69CF2b4e4092fbd29601B02779c61","SenderLable":"morpheuschen.eth","Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000581"},{"Txhash":"0x14bc2ebf790e62e6325170b07aa83d6558e503bf0054d3069904c954d608783d","Status":"Success","Method":"Unstake","Blockno":"431844993","DateTime":"2026-02-14 01:15:15","Sender":"0xde5D26Ad782C0084664309a07040f5C69a20092C","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000725"},{"Txhash":"0xf8e56cfdaeceacdf5aa41e143aa0bbaa75a792920367053f6787d3956d6cf88c","Status":"Success","Method":"Compound All","Blockno":"431531055","DateTime":"2026-02-13 03:31:31","Sender":"0x2E7036baae35d224c73B9bCaC0767378B7EA1440","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00001578"},{"Txhash":"0x2b5febb701e236d59998b697c3e557cb929417f22cd38268682959271d405a21","Status":"Success","Method":"Unstake","Blockno":"431498259","DateTime":"2026-02-13 01:15:16","Sender":"0xde5D26Ad782C0084664309a07040f5C69a20092C","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000719"},{"Txhash":"0x67c7307cb55276ea31ca92e4b7963da640edba9d1dbe65b4e32a674f52bd055a","Status":"Success","Method":"Unstake","Blockno":"431312308","DateTime":"2026-02-12 12:24:38","Sender":"0x3CE13Bef82E375765316b07378531c850A915eFa","SenderLable":"0x3ce15efa.eth","Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000695"},{"Txhash":"0x8232b64bf7041e19d38a24314c98ca3ef7ceb2d117ca1f2291586d191e7c7ffd","Status":"Success","Method":"Compound MP","Blockno":"431236099","DateTime":"2026-02-12 07:08:09","Sender":"0x683D8c97965a7CCD29F02DC65cE5C96ef2B0d248","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000548"},{"Txhash":"0x745ecd8dcde4d073136f66be771d88c58f8be9538884712c79f53839c4afc102","Status":"Success","Method":"Compound MP","Blockno":"431235692","DateTime":"2026-02-12 07:06:27","Sender":"0xa47F30b38a815Ab4e3b5675897971188e0cb80D8","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000549"},{"Txhash":"0x5cc05b4adbaa6d737ede3710e2cf8eb242604963ca9eb32ef3a91037ce158899","Status":"Success","Method":"Unstake","Blockno":"431151192","DateTime":"2026-02-12 01:15:16","Sender":"0xde5D26Ad782C0084664309a07040f5C69a20092C","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000719"},{"Txhash":"0xbfba94592ba636eaf39020d60da06628e56cd689843f80154933a2c2807d871b","Status":"Success","Method":"Stake","Blockno":"431121427","DateTime":"2026-02-11 23:11:42","Sender":"0x6441d72CcbFCc0874406881C0626A06D8e5794Bc","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.0000065"},{"Txhash":"0xedc6523a875514908575a533a1ecf55de56993254927e504df00d58039317a0a","Status":"Success","Method":"Unstake","Blockno":"431091956","DateTime":"2026-02-11 21:09:22","Sender":"0x0572969Beb67B6C9424962D4a505bC266974fD4f","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.0000062"},{"Txhash":"0xbf359a721ff122a5090c5fdc0f00083e97e130fa5e18c2abf4d77663f5129588","Status":"Success","Method":"Stake","Blockno":"431022089","DateTime":"2026-02-11 16:19:47","Sender":"0xE725bEEB54fDBb59a034C1c46e7b381F6cbDD034","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000703"},{"Txhash":"0x934d28723f63e381b1f152965cadd15b0716ae5f2f02b1410e2c0369e8cc0cc1","Status":"Success","Method":"Unstake","Blockno":"430838504","DateTime":"2026-02-11 03:38:30","Sender":"0xE7fC8bE8dA315129694A722473B3c501EF41bD54","SenderLable":"bdcrypto.eth","Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000608"},{"Txhash":"0xfebfc139bc9f2fca0068fede59473c1c3a261ffd680d83fc6bd4b8dd44514758","Status":"Success","Method":"Unstake","Blockno":"430804032","DateTime":"2026-02-11 01:15:14","Sender":"0xde5D26Ad782C0084664309a07040f5C69a20092C","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000718"},{"Txhash":"0x0348b843663e5462e8fbcba8ce1689ea855c3a92432a975f88262bfa6578ed42","Status":"Success","Method":"Unstake","Blockno":"430692547","DateTime":"2026-02-10 17:32:21","Sender":"0xE2BFC7257B51048F73D2220e18683B0716c31cB6","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000649"},{"Txhash":"0x7de7c251fd0c16c1d0a4647d33079436dd872e1a4f26cf7f18269fc277da3432","Status":"Success","Method":"Stake","Blockno":"430556420","DateTime":"2026-02-10 08:07:34","Sender":"0xBAeb7F4CEcb37D5DcCfa8D6ae883250E95baFB5b","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000845"},{"Txhash":"0x39d762e8ef9f26e801408717865facf3ccac4bed8f81ebdeca761feb9387b8c7","Status":"Success","Method":"Stake","Blockno":"430457228","DateTime":"2026-02-10 01:15:41","Sender":"0xde5D26Ad782C0084664309a07040f5C69a20092C","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000695"},{"Txhash":"0xe11b62aca20189b547671b48147d6b28b29ff6c934115382949a79f96a9a061e","Status":"Success","Method":"Compound All","Blockno":"430394287","DateTime":"2026-02-09 20:53:57","Sender":"0x1078eF34749e8fE27d9B3D6660Acfdd842D6dc43","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00001601"},{"Txhash":"0xbdd9eaa7d110dd038b83d9b4b090453b82d43ef17a8e71366eac3caccc95ad4d","Status":"Success","Method":"Unstake","Blockno":"430190668","DateTime":"2026-02-09 06:48:59","Sender":"0xD97614cCdeD601EEfa5aCCF91228B5De5DB275E5","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.0000069"},{"Txhash":"0xe849450ca7c10c97a71981597a3d2e5088d0f7822ec738c65429ef7cb2958ab9","Status":"Success","Method":"Unstake","Blockno":"430110299","DateTime":"2026-02-09 01:15:14","Sender":"0xde5D26Ad782C0084664309a07040f5C69a20092C","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000728"},{"Txhash":"0xab5573412ce5b1ffea16f3ae8ac1782e56d05a6b3b4c5b3656130ea79c4abc47","Status":"Success","Method":"Unstake","Blockno":"430028666","DateTime":"2026-02-08 19:35:55","Sender":"0x0031ae1b2fC85eb2d6C97AEC2C695f1D61D7F4AD","SenderLable":null,"Receiver":"0x2CFa72E7f58dc82B990529450Ffa83791db7d8e2","ReceiverLable":null,"Amount":"0 ETH","Value":"$0.00","TxnFee":"0.00000649"}]'; const quickExportCsvTitle = 'Transaction Hash,Status,Method,Blockno,"DateTime (UTC)",From,From_Nametag,To,To_Nametag,Amount,Value (USD),Txn Fee'; let isExportFinish = true; if ($("#btnExportQuickTableToCSV").length > 0 && quickExportCsvData) { $("#btnExportQuickTableToCSV").click(function () { if (isExportFinish == true) { isExportFinish = false; $("#btnExportQuickTableToCSV").append(''); let lstTxsObj = JSON.parse(quickExportCsvData); if (lstTxsObj.length > 0) { let csvRows = []; csvRows.push(quickExportCsvTitle.replace(/"/g, "")); for (let i = 0; i 0 && quickExportInternalTxsData) { $("#ContentPlaceHolder1_btnQuickExportInternalTxs").click(function () { if (isExportFinish == true) { isExportFinish = false; $("#ContentPlaceHolder1_btnQuickExportInternalTxs").append(''); let lstTxsObj = JSON.parse(quickExportInternalTxsData); if (lstTxsObj.length > 0) { let csvRows = []; csvRows.push(quickExportInternalTxsTitle.replace(/"/g, "")); for (let i = 0; i { if (x.startsWith("F")) { file = x.replace("F", ""); } else if (x.startsWith("L")) { line = x.replace("L", ""); } }) var editorId = "editor" + file var editorElem = $("#" + editorId); if (!editorElem.length) { return; } if (!line) { return; } var editor = ace.edit(editorId); editor.resize(true); editor.scrollToLine(line, true, true, function () { }); editor.gotoLine(line); var Range = ace.require('ace/range').Range $(document).scrollTop($("#" + editorId).offset().top - 95); //document.getElementById(editorId).scrollIntoView(); editor.session.addMarker(new Range(line - 1, 0, line - 1, 1), "myMarker", "fullLine"); //window.onbeforeunload = function () { $(document).scrollTop($("#" + editorId).offset().top); }; } setTimeout(function () { editorGoToLine(); }, 500); }); $("body,html").click(function (evt) { let elm = $(evt.target).attr("id"); let isClickedMode = elm === "darkModaBtn" || elm === "darkModaBtnIcon"; if (isClickedMode) { let isClickedSunMode = false; let clrBorder = "#112641"; if (elm === "darkModaBtn") isClickedSunMode = $(evt.target).find("#darkModaBtnIcon").hasClass("fa-moon"); if (elm === "darkModaBtnIcon") isClickedSunMode = $(evt.target).hasClass("fa-moon"); if (isClickedSunMode) { clrBorder = "#fff"; } let iframes = document.getElementById('analytics_pageiframe'); let heatcell = iframes.contentWindow.document.getElementsByClassName("ch-day").length; for (let i = 0; i