POL Price: $0.107322 (-3.66%)
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

Transaction Hash
Block
From
To
0x2213bc0b830477382026-02-16 4:18:191 min ago1771215499IN
0x00000000...072C22734
0 POL0.12461774380.64003736
0x2213bc0b830477332026-02-16 4:18:091 min ago1771215489IN
0x00000000...072C22734
0 POL0.10275519381.71711927
0x2213bc0b830477162026-02-16 4:17:351 min ago1771215455IN
0x00000000...072C22734
0 POL0.04756426270.07657801
0x2213bc0b830476712026-02-16 4:16:053 mins ago1771215365IN
0x00000000...072C22734
0 POL0.20753731711.21429697
0x2213bc0b830476422026-02-16 4:15:074 mins ago1771215307IN
0x00000000...072C22734
0 POL0.7861742,000
0x2213bc0b830476382026-02-16 4:14:594 mins ago1771215299IN
0x00000000...072C22734
0 POL0.7049862,000
0x2213bc0b830476342026-02-16 4:14:514 mins ago1771215291IN
0x00000000...072C22734
0 POL0.13271851307.56549968
0x2213bc0b830475912026-02-16 4:13:255 mins ago1771215205IN
0x00000000...072C22734
0 POL0.06601944350.57424627
0x2213bc0b830475582026-02-16 4:12:197 mins ago1771215139IN
0x00000000...072C22734
10 POL0.10818851340.66646656
0x2213bc0b830475342026-02-16 4:11:317 mins ago1771215091IN
0x00000000...072C22734
0 POL0.04881183262.46307078
0x2213bc0b830475202026-02-16 4:11:038 mins ago1771215063IN
0x00000000...072C22734
374.18147801 POL0.12229913270.80997673
0x2213bc0b830474982026-02-16 4:10:199 mins ago1771215019IN
0x00000000...072C22734
0 POL0.06332961363.90262993
0x2213bc0b830474812026-02-16 4:09:459 mins ago1771214985IN
0x00000000...072C22734
18.70606763 POL0.08386167279.91121197
0x2213bc0b830474762026-02-16 4:09:359 mins ago1771214975IN
0x00000000...072C22734
18.70571247 POL0.10378228284.94864499
0x2213bc0b830474582026-02-16 4:08:5910 mins ago1771214939IN
0x00000000...072C22734
0 POL0.7715422,000
0x2213bc0b830474572026-02-16 4:08:5710 mins ago1771214937IN
0x00000000...072C22734
18.70992976 POL0.0502436295.93009388
0x2213bc0b830474542026-02-16 4:08:5110 mins ago1771214931IN
0x00000000...072C22734
0 POL0.11490407389.40104853
0x2213bc0b830474522026-02-16 4:08:4710 mins ago1771214927IN
0x00000000...072C22734
18.7104146 POL0.0492439301.68972421
0x2213bc0b830474372026-02-16 4:08:1711 mins ago1771214897IN
0x00000000...072C22734
0 POL0.15299635383.36112705
0x2213bc0b830474352026-02-16 4:08:1311 mins ago1771214893IN
0x00000000...072C22734
0 POL0.6122822,000
0x2213bc0b830474192026-02-16 4:07:4111 mins ago1771214861IN
0x00000000...072C22734
18.70854012 POL0.05196648339.01872152
0x2213bc0b830474032026-02-16 4:07:0912 mins ago1771214829IN
0x00000000...072C22734
0 POL0.12413797353.85090216
0x2213bc0b830473742026-02-16 4:06:1113 mins ago1771214771IN
0x00000000...072C22734
0 POL0.20811272456.77321141
0x2213bc0b830473522026-02-16 4:05:2713 mins ago1771214727IN
0x00000000...072C22734
0 POL0.10555807335.94327155
0x2213bc0b830473402026-02-16 4:05:0314 mins ago1771214703IN
0x00000000...072C22734
0 POL0.04466043318.72990132
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
830477262026-02-16 4:17:551 min ago1771215475
0x00000000...072C22734
42.91424334 POL
830477262026-02-16 4:17:551 min ago1771215475
0x00000000...072C22734
42.91424334 POL
830476282026-02-16 4:14:394 mins ago1771215279
0x00000000...072C22734
374.29372415 POL
830476282026-02-16 4:14:394 mins ago1771215279
0x00000000...072C22734
374.29372415 POL
830475932026-02-16 4:13:295 mins ago1771215209
0x00000000...072C22734
2,244.10717128 POL
830475932026-02-16 4:13:295 mins ago1771215209
0x00000000...072C22734
2,244.10717128 POL
830475802026-02-16 4:13:036 mins ago1771215183
0x00000000...072C22734
19.27710056 POL
830475802026-02-16 4:13:036 mins ago1771215183
0x00000000...072C22734
19.27710056 POL
830475582026-02-16 4:12:197 mins ago1771215139
0x00000000...072C22734
10 POL
830475532026-02-16 4:12:097 mins ago1771215129
0x00000000...072C22734
100 POL
830475532026-02-16 4:12:097 mins ago1771215129
0x00000000...072C22734
100 POL
830475202026-02-16 4:11:038 mins ago1771215063
0x00000000...072C22734
374.18147801 POL
830474812026-02-16 4:09:459 mins ago1771214985
0x00000000...072C22734
18.70606763 POL
830474762026-02-16 4:09:359 mins ago1771214975
0x00000000...072C22734
18.70571247 POL
830474572026-02-16 4:08:5710 mins ago1771214937
0x00000000...072C22734
18.70992976 POL
830474522026-02-16 4:08:4710 mins ago1771214927
0x00000000...072C22734
18.7104146 POL
830474432026-02-16 4:08:2910 mins ago1771214909
0x00000000...072C22734
489.40063327 POL
830474432026-02-16 4:08:2910 mins ago1771214909
0x00000000...072C22734
489.40063327 POL
830474242026-02-16 4:07:5111 mins ago1771214871
0x00000000...072C22734
28.64588408 POL
830474242026-02-16 4:07:5111 mins ago1771214871
0x00000000...072C22734
28.64588408 POL
830474192026-02-16 4:07:4111 mins ago1771214861
0x00000000...072C22734
18.70854012 POL
830473752026-02-16 4:06:1313 mins ago1771214773
0x00000000...072C22734
0.89130719 POL
830473752026-02-16 4:06:1313 mins ago1771214773
0x00000000...072C22734
0.89130719 POL
830473752026-02-16 4:06:1313 mins ago1771214773
0x00000000...072C22734
0.89130719 POL
830473752026-02-16 4:06:1313 mins ago1771214773
0x00000000...072C22734
0.89130719 POL
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AllowanceHolder

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import {AllowanceHolderBase} from "./AllowanceHolderBase.sol";
import {TransientStorage} from "./TransientStorage.sol";

/// @custom:security-contact [email protected]
contract AllowanceHolder is TransientStorage, AllowanceHolderBase {
    constructor() {
        require(address(this) == 0x0000000000001fF3684f28c67538d4D072C22734 || block.chainid == 31337);
    }

    /// @inheritdoc AllowanceHolderBase
    function exec(address operator, address token, uint256 amount, address payable target, bytes calldata data)
        internal
        override
        returns (bytes memory)
    {
        (bytes memory result, address sender, TSlot allowance) = _exec(operator, token, amount, target, data);
        // EIP-3074 seems unlikely
        if (sender != tx.origin) {
            _set(allowance, 0);
        }
        return result;
    }
}

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

import {IAllowanceHolder} from "./IAllowanceHolder.sol";
import {IERC20} from "../IERC20.sol";
import {SafeTransferLib} from "../vendor/SafeTransferLib.sol";
import {CheckCall} from "../utils/CheckCall.sol";
import {FreeMemory} from "../utils/FreeMemory.sol";
import {TransientStorageLayout} from "./TransientStorageLayout.sol";

/// @notice Thrown when validating the target, avoiding executing against an ERC20 directly
error ConfusedDeputy();

abstract contract AllowanceHolderBase is TransientStorageLayout, FreeMemory {
    using SafeTransferLib for IERC20;
    using CheckCall for address payable;

    function _rejectIfERC20(address payable maybeERC20, bytes calldata data) private view DANGEROUS_freeMemory {
        // We could just choose a random address for this check, but to make
        // confused deputy attacks harder for tokens that might be badly behaved
        // (e.g. tokens with blacklists), we choose to copy the first argument
        // out of `data` and mask it as an address. If there isn't enough
        // `data`, we use 0xdead instead.
        address target;
        if (data.length > 0x10) {
            target = address(uint160(bytes20(data[0x10:])));
        }
        // EIP-1352 (not adopted) specifies 0xffff as the maximum precompile
        if (target <= address(0xffff)) {
            // 0xdead is a conventional burn address; we assume that it is not treated specially
            target = address(0xdead);
        }
        bytes memory testData = abi.encodeCall(IERC20.balanceOf, target);
        if (maybeERC20.checkCall(testData, 0x20)) revert ConfusedDeputy();
    }

    function _msgSender() private view returns (address sender) {
        if ((sender = msg.sender) == address(this)) {
            assembly ("memory-safe") {
                sender := shr(0x60, calldataload(sub(calldatasize(), 0x14)))
            }
        }
    }

    /// @dev This virtual function provides the implementation for the function
    ///      of the same name in `IAllowanceHolder`. It is unimplemented in this
    ///      base contract to accommodate the customization required to support
    ///      both chains that have EIP-1153 (transient storage) and those that
    ///      don't.
    function exec(address operator, address token, uint256 amount, address payable target, bytes calldata data)
        internal
        virtual
        returns (bytes memory result);

    /// @dev This is the majority of the implementation of IAllowanceHolder.exec
    ///      . The arguments have the same meaning as documented there.
    /// @return result
    /// @return sender The (possibly forwarded) message sender that is
    ///                requesting the allowance be set. Provided to avoid
    ///                duplicated computation in customized `exec`
    /// @return allowance The slot where the ephemeral allowance is
    ///                   stored. Provided to avoid duplicated computation in
    ///                   customized `exec`
    function _exec(address operator, address token, uint256 amount, address payable target, bytes calldata data)
        internal
        returns (bytes memory result, address sender, TSlot allowance)
    {
        // This contract has no special privileges, except for the allowances it
        // holds. In order to prevent abusing those allowances, we prohibit
        // sending arbitrary calldata (doing `target.call(data)`) to any
        // contract that might be an ERC20.
        _rejectIfERC20(target, data);

        sender = _msgSender();
        allowance = _ephemeralAllowance(operator, sender, token);
        _set(allowance, amount);

        // For gas efficiency we're omitting a bunch of checks here. Notably,
        // we're omitting the check that `address(this)` has sufficient value to
        // send (we know it does), and we're omitting the check that `target`
        // contains code (we already checked in `_rejectIfERC20`).
        assembly ("memory-safe") {
            result := mload(0x40)
            calldatacopy(result, data.offset, data.length)
            // ERC-2771 style msgSender forwarding https://eips.ethereum.org/EIPS/eip-2771
            mstore(add(result, data.length), shl(0x60, sender))
            let success := call(gas(), target, callvalue(), result, add(data.length, 0x14), 0x00, 0x00)
            let ptr := add(result, 0x20)
            returndatacopy(ptr, 0x00, returndatasize())
            switch success
            case 0 { revert(ptr, returndatasize()) }
            default {
                mstore(result, returndatasize())
                mstore(0x40, add(ptr, returndatasize()))
            }
        }
    }

    /// @dev This provides the implementation of the function of the same name
    ///      in `IAllowanceHolder`.
    function transferFrom(address token, address owner, address recipient, uint256 amount) internal {
        // msg.sender is the assumed and later validated operator
        TSlot allowance = _ephemeralAllowance(msg.sender, owner, token);
        // validation of the ephemeral allowance for operator, owner, token via
        // uint underflow
        _set(allowance, _get(allowance) - amount);
        // `safeTransferFrom` does not check that `token` actually contains
        // code. It is the responsibility of integrating code to check for that
        // if vacuous success is a security concern.
        IERC20(token).safeTransferFrom(owner, recipient, amount);
    }

    fallback() external payable {
        uint256 selector;
        assembly ("memory-safe") {
            selector := shr(0xe0, calldataload(0x00))
        }
        if (selector == uint256(uint32(IAllowanceHolder.transferFrom.selector))) {
            address token;
            address owner;
            address recipient;
            uint256 amount;
            assembly ("memory-safe") {
                // We do not validate `calldatasize()`. If the calldata is short
                // enough that `amount` is null, this call is a harmless no-op.
                let err := callvalue()
                token := calldataload(0x04)
                err := or(err, shr(0xa0, token))
                owner := calldataload(0x24)
                err := or(err, shr(0xa0, owner))
                recipient := calldataload(0x44)
                err := or(err, shr(0xa0, recipient))
                if err { revert(0x00, 0x00) }
                amount := calldataload(0x64)
            }

            transferFrom(token, owner, recipient, amount);

            // return true;
            assembly ("memory-safe") {
                mstore(0x00, 0x01)
                return(0x00, 0x20)
            }
        } else if (selector == uint256(uint32(IAllowanceHolder.exec.selector))) {
            address operator;
            address token;
            uint256 amount;
            address payable target;
            bytes calldata data;
            assembly ("memory-safe") {
                // We do not validate `calldatasize()`. If the calldata is short
                // enough that `data` is null, it will alias `operator`. This
                // results in either an OOG (because `operator` encodes a
                // too-long `bytes`) or is a harmless no-op (because `operator`
                // encodes a valid length, but not an address capable of making
                // calls). If the calldata is _so_ sort that `target` is null,
                // we will revert because it contains no code.
                operator := calldataload(0x04)
                let err := shr(0xa0, operator)
                token := calldataload(0x24)
                err := or(err, shr(0xa0, token))
                amount := calldataload(0x44)
                target := calldataload(0x64)
                err := or(err, shr(0xa0, target))
                if err { revert(0x00, 0x00) }
                // We perform no validation that `data` is reasonable.
                data.offset := add(0x04, calldataload(0x84))
                data.length := calldataload(data.offset)
                data.offset := add(0x20, data.offset)
            }

            bytes memory result = exec(operator, token, amount, target, data);

            // return result;
            assembly ("memory-safe") {
                let returndata := sub(result, 0x20)
                mstore(returndata, 0x20)
                return(returndata, add(0x40, mload(result)))
            }
        } else if (selector == uint256(uint32(IERC20.balanceOf.selector))) {
            // balanceOf(address) reverts with a single byte of returndata,
            // making it more gas efficient to pass the `_rejectERC20` check
            assembly ("memory-safe") {
                revert(0x00, 0x01)
            }
        } else {
            // emulate standard Solidity behavior
            assembly ("memory-safe") {
                revert(0x00, 0x00)
            }
        }
    }
}

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

import {TransientStorageBase} from "./TransientStorageBase.sol";

abstract contract TransientStorage is TransientStorageBase {
    function _get(TSlot s) internal view override returns (uint256 r) {
        assembly ("memory-safe") {
            r := tload(s)
        }
    }

    function _set(TSlot s, uint256 v) internal override {
        assembly ("memory-safe") {
            tstore(s, v)
        }
    }
}

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

interface IAllowanceHolder {
    /// @notice Executes against `target` with the `data` payload. Prior to execution, token permits
    ///         are temporarily stored for the duration of the transaction. These permits can be
    ///         consumed by the `operator` during the execution
    /// @notice `operator` consumes the funds during its operations by calling back into
    ///         `AllowanceHolder` with `transferFrom`, consuming a token permit.
    /// @dev Neither `exec` nor `transferFrom` check that `token` contains code.
    /// @dev msg.sender is forwarded to target appended to the msg data (similar to ERC-2771)
    /// @param operator An address which is allowed to consume the token permits
    /// @param token The ERC20 token the caller has authorised to be consumed
    /// @param amount The quantity of `token` the caller has authorised to be consumed
    /// @param target A contract to execute operations with `data`
    /// @param data The data to forward to `target`
    /// @return result The returndata from calling `target` with `data`
    /// @notice If calling `target` with `data` reverts, the revert is propagated
    function exec(address operator, address token, uint256 amount, address payable target, bytes calldata data)
        external
        payable
        returns (bytes memory result);

    /// @notice The counterpart to `exec` which allows for the consumption of token permits later
    ///         during execution
    /// @dev *DOES NOT* check that `token` contains code. This function vacuously succeeds if
    ///      `token` is empty.
    /// @dev can only be called by the `operator` previously registered in `exec`
    /// @param token The ERC20 token to transfer
    /// @param owner The owner of tokens to transfer
    /// @param recipient The destination/beneficiary of the ERC20 `transferFrom`
    /// @param amount The quantity of `token` to transfer`
    /// @return true
    function transferFrom(address token, address owner, address recipient, uint256 amount) external returns (bool);
}

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

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address) external view returns (uint256);
    function transfer(address, uint256) external returns (bool);
    function transferFrom(address, address, uint256) external returns (bool);
    function approve(address, uint256) external returns (bool);
    function allowance(address, address) external view returns (uint256);

    event Transfer(address indexed, address indexed, uint256);
    event Approval(address indexed, address indexed, uint256);
}

interface IERC20Meta is IERC20 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
}

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.25;

import {IERC20} from "../IERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    uint32 private constant _TRANSFER_FROM_FAILED_SELECTOR = 0x7939f424; // bytes4(keccak256("TransferFromFailed()"))
    uint32 private constant _TRANSFER_FAILED_SELECTOR = 0x90b8ec18; // bytes4(keccak256("TransferFailed()"))
    uint32 private constant _APPROVE_FAILED_SELECTOR = 0x3e3f8f73; // bytes4(keccak256("ApproveFailed()"))

    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address payable to, uint256 amount) internal {
        assembly ("memory-safe") {
            // Transfer the ETH and store if it succeeded or not.
            if iszero(call(gas(), to, amount, 0, 0, 0, 0)) {
                let freeMemoryPointer := mload(0x40)
                returndatacopy(freeMemoryPointer, 0, returndatasize())
                revert(freeMemoryPointer, returndatasize())
            }
        }
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal {
        assembly ("memory-safe") {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            if iszero(call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)) {
                returndatacopy(freeMemoryPointer, 0, returndatasize())
                revert(freeMemoryPointer, returndatasize())
            }
            // We check that the call either returned exactly 1 (can't just be non-zero data), or had no
            // return data.
            if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) {
                mstore(0, _TRANSFER_FROM_FAILED_SELECTOR)
                revert(0x1c, 0x04)
            }
        }
    }

    function safeTransfer(IERC20 token, address to, uint256 amount) internal {
        assembly ("memory-safe") {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)) {
                returndatacopy(freeMemoryPointer, 0, returndatasize())
                revert(freeMemoryPointer, returndatasize())
            }
            // We check that the call either returned exactly 1 (can't just be non-zero data), or had no
            // return data.
            if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) {
                mstore(0, _TRANSFER_FAILED_SELECTOR)
                revert(0x1c, 0x04)
            }
        }
    }

    function safeApprove(IERC20 token, address to, uint256 amount) internal {
        assembly ("memory-safe") {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
            if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)) {
                returndatacopy(freeMemoryPointer, 0, returndatasize())
                revert(freeMemoryPointer, returndatasize())
            }
            // We check that the call either returned exactly 1 (can't just be non-zero data), or had no
            // return data.
            if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) {
                mstore(0, _APPROVE_FAILED_SELECTOR)
                revert(0x1c, 0x04)
            }
        }
    }

    function safeApproveIfBelow(IERC20 token, address spender, uint256 amount) internal {
        uint256 allowance = token.allowance(address(this), spender);
        if (allowance < amount) {
            if (allowance != 0) {
                safeApprove(token, spender, 0);
            }
            safeApprove(token, spender, type(uint256).max);
        }
    }
}

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

library CheckCall {
    /**
     * @notice `staticcall` another contract. Check the length of the return without reading it.
     * @dev contains protections against EIP-150-induced insufficient gas griefing
     * @dev reverts iff the target is not a contract or we encounter an out-of-gas
     * @return success true iff the call succeeded and returned at least `minReturnBytes` of return
     *                 data
     * @param target the contract (reverts if non-contract) on which to make the `staticcall`
     * @param data the calldata to pass
     * @param minReturnBytes `success` is false if the call doesn't return at least this much return
     *                       data
     */
    function checkCall(address target, bytes memory data, uint256 minReturnBytes)
        internal
        view
        returns (bool success)
    {
        assembly ("memory-safe") {
            let beforeGas
            {
                let offset := add(data, 0x20)
                let length := mload(data)
                beforeGas := gas()
                success := staticcall(gas(), target, offset, length, 0x00, 0x00)
            }

            // `verbatim` can't work in inline assembly. Assignment of a value to a variable costs
            // gas (although how much is unpredictable because it depends on the Yul/IR optimizer),
            // as does the `GAS` opcode itself. Therefore, the `gas()` below returns less than the
            // actual amount of gas available for computation at the end of the call. Also
            // `beforeGas` above is exclusive of the preparing of the stack for `staticcall` as well
            // as the gas costs of the `staticcall` paid by the caller (e.g. cold account
            // access). All this makes the check below slightly too conservative. However, we do not
            // correct this because the correction would become outdated (possibly too permissive)
            // if the opcodes are repriced.
            let afterGas := gas()

            for {} 1 {} {
                if iszero(returndatasize()) {
                    // The absence of returndata means that it's possible that either we called an
                    // address without code or that the call reverted due to out-of-gas. We must
                    // check.
                    switch success
                    case 0 {
                        // Check whether the call reverted due to out-of-gas.
                        // https://eips.ethereum.org/EIPS/eip-150
                        // https://ronan.eth.limo/blog/ethereum-gas-dangers/
                        // We apply the "all but one 64th" rule twice because `target` could
                        // plausibly be a proxy. We apply it only twice because we assume only a
                        // single level of indirection.
                        let remainingGas := shr(6, beforeGas)
                        remainingGas := add(remainingGas, shr(6, sub(beforeGas, remainingGas)))
                        if iszero(lt(remainingGas, afterGas)) {
                            // The call failed due to not enough gas left. We deliberately consume
                            // all remaining gas with `invalid` (instead of `revert`) to make this
                            // failure distinguishable to our caller.
                            invalid()
                        }
                        // `success` is false because the call reverted
                    }
                    default {
                        // Check whether we called an address with no code (gas expensive).
                        if iszero(extcodesize(target)) { revert(0x00, 0x00) }
                        // We called a contract which returned no data; this is only a success if we
                        // were expecting no data.
                        success := iszero(minReturnBytes)
                    }
                    break
                }
                // The presence of returndata indicates that we definitely executed code. It also
                // means that the call didn't revert due to out-of-gas, if it reverted. We can omit
                // a bunch of checks.
                success := gt(success, lt(returndatasize(), minReturnBytes))
                break
            }
        }
    }
}

File 8 of 10 : FreeMemory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

abstract contract FreeMemory {
    modifier DANGEROUS_freeMemory() {
        uint256 freeMemPtr;
        assembly ("memory-safe") {
            freeMemPtr := mload(0x40)
        }
        _;
        assembly ("memory-safe") {
            mstore(0x40, freeMemPtr)
        }
    }
}

File 9 of 10 : TransientStorageLayout.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import {TransientStorageBase} from "./TransientStorageBase.sol";

abstract contract TransientStorageLayout is TransientStorageBase {
    /// @dev The key for this ephemeral allowance is keccak256(abi.encodePacked(operator, owner, token)).
    function _ephemeralAllowance(address operator, address owner, address token) internal pure returns (TSlot r) {
        assembly ("memory-safe") {
            let ptr := mload(0x40)
            mstore(0x28, token)
            mstore(0x14, owner)
            mstore(0x00, operator)
            // allowance slot is keccak256(abi.encodePacked(operator, owner, token))
            r := keccak256(0x0c, 0x3c)
            // restore dirtied free pointer
            mstore(0x40, ptr)
        }
    }
}

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

abstract contract TransientStorageBase {
    type TSlot is bytes32;

    function _get(TSlot s) internal view virtual returns (uint256);

    function _set(TSlot s, uint256 v) internal virtual;
}

Settings
{
  "remappings": [
    "solmate/=lib/solmate/",
    "permit2/=lib/permit2/",
    "forge-std/=lib/forge-std/src/",
    "forge-gas-snapshot/=lib/forge-gas-snapshot/src/",
    "ds-test/=lib/forge-std/lib/ds-test/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000,
    "details": {
      "constantOptimizer": true,
      "yul": true
    }
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": false
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ConfusedDeputy","type":"error"},{"stateMutability":"payable","type":"fallback"}]

608080604052346030576d1ff3684f28c67538d4d072c22734301480156034575b156030576103f1908161003f8239f35b5f80fd5b50617a694614602056fe608060408181525f3560e01c6315dacbea81036101245750600435602435604435928360a01c8260a01c8460a01c34171717610120576040805160288590526014849052335f52603c600c2091526064359290805c928484039384116100f3576020955f9560649587945d73ffffffffffffffffffffffffffffffffffffffff80998194519a8b977f23b872dd0000000000000000000000000000000000000000000000000000000089521660048801521660248601526044850152165af1156100eb573d15601f3d1160015f51141617156100de5760015f5260205ff35b637939f4245f526004601cfd5b3d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f80fd5b632213bc0b81036103e2575060043560243590606435918260a01c8160a01c8360a01c171761012057608435928360040135935f9260108611610360575b73ffffffffffffffffffffffffffffffffffffffff9361ffff8582161115610357575b8460208a01917f70a082310000000000000000000000000000000000000000000000000000000083521660248a0152602489526060890189811067ffffffffffffffff82111761032a5788528484165f808b515a94845afa905a60203d10933d156102fb57505050115b6102d257602497875233943033146102a4575b9160146102295f959388879690929192604051936028526014525f52603c600c2091604052565b97604435895d808a519b8c940184378760601b81840152019134905af160208601903d5f833e156102a057503d855260203d860101845232911603610297575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082019160208352510190f35b5f905d5f610269565b3d90fd5b367fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec013560601c9550610202565b600487517fe758b8d5000000000000000000000000000000000000000000000000000000008152fd5b919350908215610314575050503b15610120575f6101ef565b90919250600681811c809203901c01106101ef57fe5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5061dead610185565b9250846010116101205760348101357fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008082169160147ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08901106103ca575b505060601c92610162565b908092506010886014030160031b1b16165f806103bf565b6370a08231036101205760015ffd

Deployed Bytecode

0x608060408181525f3560e01c6315dacbea81036101245750600435602435604435928360a01c8260a01c8460a01c34171717610120576040805160288590526014849052335f52603c600c2091526064359290805c928484039384116100f3576020955f9560649587945d73ffffffffffffffffffffffffffffffffffffffff80998194519a8b977f23b872dd0000000000000000000000000000000000000000000000000000000089521660048801521660248601526044850152165af1156100eb573d15601f3d1160015f51141617156100de5760015f5260205ff35b637939f4245f526004601cfd5b3d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f80fd5b632213bc0b81036103e2575060043560243590606435918260a01c8160a01c8360a01c171761012057608435928360040135935f9260108611610360575b73ffffffffffffffffffffffffffffffffffffffff9361ffff8582161115610357575b8460208a01917f70a082310000000000000000000000000000000000000000000000000000000083521660248a0152602489526060890189811067ffffffffffffffff82111761032a5788528484165f808b515a94845afa905a60203d10933d156102fb57505050115b6102d257602497875233943033146102a4575b9160146102295f959388879690929192604051936028526014525f52603c600c2091604052565b97604435895d808a519b8c940184378760601b81840152019134905af160208601903d5f833e156102a057503d855260203d860101845232911603610297575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082019160208352510190f35b5f905d5f610269565b3d90fd5b367fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec013560601c9550610202565b600487517fe758b8d5000000000000000000000000000000000000000000000000000000008152fd5b919350908215610314575050503b15610120575f6101ef565b90919250600681811c809203901c01106101ef57fe5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5061dead610185565b9250846010116101205760348101357fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008082169160147ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08901106103ca575b505060601c92610162565b908092506010886014030160031b1b16165f806103bf565b6370a08231036101205760015ffd

Block Transaction 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
0x0000000000001fF3684f28c67538d4D072C22734
Net Worth in USD
$2,243,496,822.64

Net Worth in POL
Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo 20,904,412,561.522312

Token Allocations
LUIGI 100.00%
DHN 0.00%
FREYA 0.00%
Others 0.00%
Chain Token Portfolio % Price Amount Value
BSC100.00%$0.0002967,580,669,599,479.208$2,243,490,553.63
BSC$4.441,000$4,440
BSC$0.999635488.6086$488.43
BSC$0.999916155.602$155.59
BSC$0.00000713,196,946.7952$87.14
BSC$1.4638.77$56.76
BSC$0.000369151,708.0033$56.03
BSC$0.000024579,253.1036$14.09
BSC$0.9987417.3645$7.36
BSC$0.012176306.3535$3.73
BSC$0.006291560.6775$3.53
BSC$0.0552258.771$0.4843
BSC$0.01000725$0.2501
BSC$0.000625200$0.125
BASE$0.01180170,845.6803$836.08
BASE$76,3310.00003111$2.37
BASE$0.9999890.5$0.4999
BASE$0.00001511,641.7011$0.1743
ETH$2,181.440.00964142$21.03
ETH$0.0000072,500,000$16.47
ETH$0.99953313.7014$13.69
ETH$0.0020925,651.1134$11.82
ETH796,214,557,531,121,660$7.96
ETH6,655,290,430.649$1.34
ETH$11$1
ETH$0.00644757.0281$0.3676
ETH$76,1490.00000319$0.2429
ABSTRACT$1,964.230.0156$30.62
LINEA$1,967.410.006001$11.81
OPBNB$616.060.000000008318$0.000005
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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

`; } 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.
    • A Domain Name is not necessarily held by a person popularly associated with the name.
    • ${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; } function removeSpecificDomain(url, domain) { return url.replace(new RegExp(domain + '$'), ''); } // ===== 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
    • A Domain Name is not necessarily held by a person popularly associated with the name.
    ${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 = 'More than 201 tokens found, listing and displaying the total balance of the first 100 tokens only. Click on the Coins icon to see the full list and balance.'; 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=0x0000000000001fF3684f28c67538d4D072C22734" 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":"0xc5e1bbdc82ff3886f03a469a43a8fae9bf704bd4a300639ed2f45f3da81de3a7","Status":"Success","Method":"Delegate","Blockno":"83047738","DateTime":"2026-02-16 04:18:19","Sender":"0x2e3ec91f87A783196E5CD612D7d0443B34AC0DD5","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.12461774"},{"Txhash":"0x3c863b046b4b43ae6040f5ebfecb4c731b232f81ad50c183bfc8bce3fd7b0943","Status":"Success","Method":"Delegate","Blockno":"83047733","DateTime":"2026-02-16 04:18:09","Sender":"0x8dae4590a745B5a8Eb1625905618F0E91dbFb191","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.10275519"},{"Txhash":"0xee8a592a3356b53b37f382f3a4ed5c6c8ea436e2d992c66f71b970d8a142618b","Status":"Success","Method":"Delegate","Blockno":"83047716","DateTime":"2026-02-16 04:17:35","Sender":"0x681077DA6cbaA3534ebaeba285Fef2075c5706c1","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.04756426"},{"Txhash":"0xd691c7f3f11e4ffeb0877605643f501a35a46ffb3e8f6c26d4c76441832e1d76","Status":"Success","Method":"Delegate","Blockno":"83047671","DateTime":"2026-02-16 04:16:05","Sender":"0xB5Eb5f94E6eD6F865B46381E7E6DEc1bA805aEB1","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.20753731"},{"Txhash":"0xba26900cabffacc93b0d89dfd1cf4578def3d8be4567ea9badf33c33f9a793dc","Status":"Success","Method":"Delegate","Blockno":"83047642","DateTime":"2026-02-16 04:15:07","Sender":"0x9539B9E9253136f7a7EBdEb32FC51393Ebc3a0A8","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.786174"},{"Txhash":"0xc74f8e54946c8ec92a686d7b6e0122302917fbf7f64060c6b84b667bbdb2aef2","Status":"Error in Main Txn : execution reverted","Method":"Delegate","Blockno":"83047638","DateTime":"2026-02-16 04:14:59","Sender":"0x9539B9E9253136f7a7EBdEb32FC51393Ebc3a0A8","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.704986"},{"Txhash":"0x1df298596e1c16766233b631dfe80e0f7ecc84b2614b8cd30d5ea27c39f3278e","Status":"Success","Method":"Delegate","Blockno":"83047634","DateTime":"2026-02-16 04:14:51","Sender":"0xabDBa4996C49801c8E347405A570e05c4b8b8Bed","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.13271851"},{"Txhash":"0xffdcd8afa3488337a11ff4f52fef48bba3d6e7a0851bb99a2cc053b7c3d142c0","Status":"Success","Method":"Delegate","Blockno":"83047591","DateTime":"2026-02-16 04:13:25","Sender":"0x21C48C3A7bea1702Da473598733295CeC409A1Bc","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.06601944"},{"Txhash":"0x55954946ce7ebc72b99cfdbc15d033bf8d112ecb2cb9fc8ec1ca52c0c169f0b9","Status":"Success","Method":"Delegate","Blockno":"83047558","DateTime":"2026-02-16 04:12:19","Sender":"0x44d03a669Ca210E9b2527875ca8551f93ac6D5f7","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"10 POL","Value":"$1.07","TxnFee":"0.10818851"},{"Txhash":"0x0b09d1213baa232bd9bb35e9870924d7a9e98aee9c190f705e061a9580529950","Status":"Success","Method":"Delegate","Blockno":"83047534","DateTime":"2026-02-16 04:11:31","Sender":"0xc72FAfA21A17c158f9da9dBc29B0Aa5afDcfDBD1","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.04881183"},{"Txhash":"0x8cc2a167e004caef00d108e343a50c4c327a9b309f4ac41d347bfb7593612014","Status":"Success","Method":"Delegate","Blockno":"83047520","DateTime":"2026-02-16 04:11:03","Sender":"0xc72FAfA21A17c158f9da9dBc29B0Aa5afDcfDBD1","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"374.18147801 POL","Value":"$40.16","TxnFee":"0.12229913"},{"Txhash":"0xce70b36899799ac61d3e5f83f1e27b7ae0b56f86aa9711d212bef28d86d78f21","Status":"Success","Method":"Delegate","Blockno":"83047498","DateTime":"2026-02-16 04:10:19","Sender":"0xd0D64178f10fb17066Faed0bcf1d2C2Fff72857C","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.06332961"},{"Txhash":"0x79e69ec7803436c11ca2e51631982fb49d6c68932516fa940a9cfb90544a33da","Status":"Success","Method":"Delegate","Blockno":"83047481","DateTime":"2026-02-16 04:09:45","Sender":"0x9E6644E0babAc06F0F5995ec0891C0818c6D62BA","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"18.70606763 POL","Value":"$2.01","TxnFee":"0.08386167"},{"Txhash":"0x8eeae27269bdaa155e0b1067830092525a94797703950f854e05531b2229a207","Status":"Success","Method":"Delegate","Blockno":"83047476","DateTime":"2026-02-16 04:09:35","Sender":"0x9E6644E0babAc06F0F5995ec0891C0818c6D62BA","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"18.70571247 POL","Value":"$2.01","TxnFee":"0.10378228"},{"Txhash":"0x2638f54fb35ed23966843dfffbd94f6c260cb900c0f8c609049e41a1a6b466b1","Status":"Success","Method":"Delegate","Blockno":"83047458","DateTime":"2026-02-16 04:08:59","Sender":"0x9539B9E9253136f7a7EBdEb32FC51393Ebc3a0A8","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.771542"},{"Txhash":"0xe1b96e51cc7e85ea7d6bb6cd2f1c0cbaf4b571bf5e8335ff357e5da39179d037","Status":"Success","Method":"Delegate","Blockno":"83047457","DateTime":"2026-02-16 04:08:57","Sender":"0x9E6644E0babAc06F0F5995ec0891C0818c6D62BA","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"18.70992976 POL","Value":"$2.01","TxnFee":"0.0502436"},{"Txhash":"0x187fb28a4df52b1ad5172efd10c0942856f0d2b436bb91184bb700985957592d","Status":"Success","Method":"Delegate","Blockno":"83047454","DateTime":"2026-02-16 04:08:51","Sender":"0xB5Eb5f94E6eD6F865B46381E7E6DEc1bA805aEB1","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.11490407"},{"Txhash":"0xb16faf535bbd56d776ae914d2b1b7aebda14c87aec538864df4905b201eed916","Status":"Success","Method":"Delegate","Blockno":"83047452","DateTime":"2026-02-16 04:08:47","Sender":"0x9E6644E0babAc06F0F5995ec0891C0818c6D62BA","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"18.7104146 POL","Value":"$2.01","TxnFee":"0.0492439"},{"Txhash":"0xddbde1e9f3e6b209636d8ff8bd2e4a1d679b92b504ebc0640cbdeb999b66924e","Status":"Success","Method":"Delegate","Blockno":"83047437","DateTime":"2026-02-16 04:08:17","Sender":"0x34A445C6ECDeFB2c0929241Ce129165835E4E11E","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.15299635"},{"Txhash":"0x4dadaa04a5aaa0ffacd489f810ff460fff6cb4074d2d438917c93d81d24d0d9b","Status":"Success","Method":"Delegate","Blockno":"83047435","DateTime":"2026-02-16 04:08:13","Sender":"0x9539B9E9253136f7a7EBdEb32FC51393Ebc3a0A8","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.612282"},{"Txhash":"0xc7d7dbe1090930b6f292de0b221d2caa3731c50ce71ea432f55df7f13ab1a0be","Status":"Success","Method":"Delegate","Blockno":"83047419","DateTime":"2026-02-16 04:07:41","Sender":"0x9E6644E0babAc06F0F5995ec0891C0818c6D62BA","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"18.70854012 POL","Value":"$2.01","TxnFee":"0.05196648"},{"Txhash":"0x4075bbf3b8e6669929f47919e271fece359fc00aa63f22a8700c6e1f770b89da","Status":"Success","Method":"Delegate","Blockno":"83047403","DateTime":"2026-02-16 04:07:09","Sender":"0x7CDf0e2869b260158dED1F1cF68DF308aE60fB83","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.12413797"},{"Txhash":"0x83b42676b00b88dd1ee33145396e9b4d768553e0ef4dffed2f7c4c7b46be5044","Status":"Success","Method":"Delegate","Blockno":"83047374","DateTime":"2026-02-16 04:06:11","Sender":"0x08C0A9e01948bb00803c6b98f66A126d539F34BC","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.20811272"},{"Txhash":"0x281b95e2bd7ac18ec6f383ffc6c601879f191ad8771b4f5d95a625d96562ff7c","Status":"Success","Method":"Delegate","Blockno":"83047352","DateTime":"2026-02-16 04:05:27","Sender":"0x9E6644E0babAc06F0F5995ec0891C0818c6D62BA","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.10555807"},{"Txhash":"0x6ab35913c72388ffa8aa34fbd666a074c152b927c6c135434f4dbc79b024278e","Status":"Success","Method":"Delegate","Blockno":"83047340","DateTime":"2026-02-16 04:05:03","Sender":"0x9E6644E0babAc06F0F5995ec0891C0818c6D62BA","SenderLable":null,"Receiver":"0x0000000000001fF3684f28c67538d4D072C22734","ReceiverLable":null,"Amount":"0 POL","Value":"$0.00","TxnFee":"0.04466043"}]'; 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