ETH Price: $3,606.88 (+5.41%)

Contract

0xCB8fC083CBe8E486e2D18e11aE56CD76FE2C45Df
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Withdraw Eth198608002024-05-13 11:28:59198 days ago1715599739IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.000130183.65759447
Renew Subscripti...198068382024-05-05 22:21:35206 days ago1714947695IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.000173074.1668772
Renew Subscripti...197771802024-05-01 18:49:47210 days ago1714589387IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.0006846616.48394393
Renew Subscripti...197750462024-05-01 11:41:35210 days ago1714563695IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.0041535100
Free Renew Subsc...197683902024-04-30 13:21:59211 days ago1714483319IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.0011296420.68837299
Renew Subscripti...197674442024-04-30 10:10:47211 days ago1714471847IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.0005267512.60743985
Free Renew Subsc...197636672024-04-29 21:32:47212 days ago1714426367IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.000366276.67501877
Renew Subscripti...197618952024-04-29 15:35:35212 days ago1714404935IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.0004488810.81049538
Free Renew Subsc...197607982024-04-29 11:53:47212 days ago1714391627IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.0007127513.05332697
Free Renew Subsc...197605972024-04-29 11:12:59212 days ago1714389179IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.000557457.77582772
Renew Subscripti...197597732024-04-29 8:27:11212 days ago1714379231IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.0003127.51396922
Renew Subscripti...197564682024-04-28 21:22:59213 days ago1714339379IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.000244485.88796671
Transfer197480262024-04-27 17:01:59214 days ago1714237319IN
tern.crypto Plus | Pass: TCP Token
0.00099733 ETH0.000123895.89035862
Renew Subscripti...197476462024-04-27 15:45:35214 days ago1714232735IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.0004321510.34025674
Free Renew Subsc...197423702024-04-26 22:02:23215 days ago1714168943IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.000323775.90174878
Free Renew Subsc...197405182024-04-26 15:48:11215 days ago1714146491IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.000520139.52567209
Renew Subscripti...197404872024-04-26 15:41:59215 days ago1714146119IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.000380029.09308918
Renew Subscripti...197352182024-04-25 21:58:35216 days ago1714082315IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.000297967.17593266
Renew Subscripti...197337582024-04-25 17:05:35216 days ago1714064735IN
tern.crypto Plus | Pass: TCP Token
0.108 ETH0.0013722632.16219563
Renew Subscripti...197323752024-04-25 12:27:11216 days ago1714048031IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.0004408910.54955148
Mint197323712024-04-25 12:26:23216 days ago1714047983IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.001442749.7698686
Free Renew Subsc...197312852024-04-25 8:47:47216 days ago1714034867IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.000719449.99764534
Renew Subscripti...197284612024-04-24 23:19:11217 days ago1714000751IN
tern.crypto Plus | Pass: TCP Token
0.036 ETH0.000327147.83005724
Mint197251012024-04-24 12:00:35217 days ago1713960035IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.0051528634.89376101
Mint197243582024-04-24 9:30:59217 days ago1713951059IN
tern.crypto Plus | Pass: TCP Token
0 ETH0.001317548.92204636
View all transactions

Latest 16 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
198608002024-05-13 11:28:59198 days ago1715599739
tern.crypto Plus | Pass: TCP Token
1.40499733 ETH
196244672024-04-10 9:54:11231 days ago1712742851
tern.crypto Plus | Pass: TCP Token
2.92 ETH
193748042024-03-06 8:01:47267 days ago1709712107
tern.crypto Plus | Pass: TCP Token
2.411 ETH
191817172024-02-08 6:39:59294 days ago1707374399
tern.crypto Plus | Pass: TCP Token
5.445 ETH
188837642023-12-28 11:18:35335 days ago1703762315
tern.crypto Plus | Pass: TCP Token
3.025 ETH
187857912023-12-14 17:13:35349 days ago1702574015
tern.crypto Plus | Pass: TCP Token
4.95 ETH
184694922023-10-31 10:23:47393 days ago1698747827
tern.crypto Plus | Pass: TCP Token
1.65 ETH
183055992023-10-08 11:55:11416 days ago1696766111
tern.crypto Plus | Pass: TCP Token
0.605 ETH
182332042023-09-28 9:00:35426 days ago1695891635
tern.crypto Plus | Pass: TCP Token
2.53 ETH
176202152023-07-04 11:18:47512 days ago1688469527
tern.crypto Plus | Pass: TCP Token
0.55 ETH
175990382023-07-01 11:54:35515 days ago1688212475
tern.crypto Plus | Pass: TCP Token
0.66 ETH
175143542023-06-19 14:21:47527 days ago1687184507
tern.crypto Plus | Pass: TCP Token
1.76 ETH
173652032023-05-29 14:21:47548 days ago1685370107
tern.crypto Plus | Pass: TCP Token
2.97 ETH
172258422023-05-09 22:26:35568 days ago1683671195
tern.crypto Plus | Pass: TCP Token
3.08 ETH
170026302023-04-08 8:54:35599 days ago1680944075
tern.crypto Plus | Pass: TCP Token
3.52 ETH
167790952023-03-07 21:28:59631 days ago1678224539
tern.crypto Plus | Pass: TCP Token
1.54 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x08614a52...CBe1ff835
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Diamond

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : Diamond.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { IERC165 } from "./@openzeppelin/contracts/interfaces/IERC165.sol";
import { IERC721 } from "./@openzeppelin/contracts/interfaces/IERC721.sol";
import { LibDiamond } from "./libraries/LibDiamond.sol";
import { IDiamondCut } from "./interfaces/IDiamondCut.sol";

contract Diamond {    

    constructor(address _contractOwner, address _diamondCutFacet) payable {        
        LibDiamond.flipContractOwnerStatus(_contractOwner);

		LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
		ds.supportedInterfaces[type(IERC721).interfaceId] = true;

        // Add the diamondCut external function from the diamondCutFacet
        IDiamondCut.FacetCut[] memory cuts = new IDiamondCut.FacetCut[](1);
        
		bytes4[] memory diamondCutFunctionSelectors = new bytes4[](1);
        diamondCutFunctionSelectors[0] = IDiamondCut.diamondCut.selector;
		cuts[0] = IDiamondCut.FacetCut({
            facetAddress: _diamondCutFacet, 
            action: IDiamondCut.FacetCutAction.Add, 
            functionSelectors: diamondCutFunctionSelectors
        });

        LibDiamond.diamondCut(cuts, address(0), "");        
    }

    // Find facet for function that is called and execute the
    // function if a facet is found and return any value.
    fallback() external payable {
        LibDiamond.DiamondStorage storage ds;
        bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;
        // get diamond storage
        assembly {
            ds.slot := position
        }
        // get facet from function selector
        address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;
        require(facet != address(0), "Diamond: Function does not exist");
        // Execute external function from facet using delegatecall and return any value.
        assembly {
            // copy function selector and any arguments
            calldatacopy(0, 0, calldatasize())
            // execute function call using the facet
            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
            // get any return value
            returndatacopy(0, 0, returndatasize())
            // return any return value or error back to the caller
            switch result
                case 0 {
                    revert(0, returndatasize())
                }
                default {
                    return(0, returndatasize())
                }
        }
    }

    receive() external payable {}
}

File 2 of 7 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

File 3 of 7 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721.sol";

File 4 of 7 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 5 of 7 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 6 of 7 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/******************************************************************************/

interface IDiamondCut {
    enum FacetCutAction {Add, Replace, Remove}
    // Add=0, Replace=1, Remove=2

    struct FacetCut {
        address facetAddress;
        FacetCutAction action;
        bytes4[] functionSelectors;
    }

    /// @notice Add/replace/remove any number of functions and optionally execute
    ///         a function with delegatecall
    /// @param _diamondCut Contains the facet addresses and function selectors
    /// @param _init The address of the contract or facet to execute _calldata
    /// @param _calldata A function call, including function selector and arguments
    ///                  _calldata is executed with delegatecall on _init
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
    ) external;

    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}

File 7 of 7 : LibDiamond.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
/******************************************************************************/
import { IDiamondCut } from "../interfaces/IDiamondCut.sol";

// Remember to add the loupe functions from DiamondLoupeFacet to the diamond.
// The loupe functions are required by the EIP2535 Diamonds standard

library LibDiamond {
    bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");

    struct FacetAddressAndPosition {
        address facetAddress;
        uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array
    }

    struct FacetFunctionSelectors {
        bytes4[] functionSelectors;
        uint256 facetAddressPosition; // position of facetAddress in facetAddresses array
    }

    struct DiamondStorage {
        // maps function selector to the facet address and
        // the position of the selector in the facetFunctionSelectors.selectors array
        mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;
        // maps facet addresses to function selectors
        mapping(address => FacetFunctionSelectors) facetFunctionSelectors;
        // facet addresses
        address[] facetAddresses;
        // Used to query if a contract implements an interface.
        // Used to implement ERC-165.
        mapping(bytes4 => bool) supportedInterfaces;
        // owner of the contract
        mapping(address => bool) contractOwner;
    }

    function diamondStorage() internal pure returns (DiamondStorage storage ds) {
        bytes32 position = DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }

    event OwnershipTransferred(bool indexed state, address indexed newOwner);

    function flipContractOwnerStatus(address _newOwner) internal {
        DiamondStorage storage ds = diamondStorage();
        bool previousState = ds.contractOwner[_newOwner];
        ds.contractOwner[_newOwner] = !ds.contractOwner[_newOwner];
        emit OwnershipTransferred(previousState, _newOwner);
    }

    function contractOwner(address addr) internal view returns (bool contractOwner_) {
        contractOwner_ = diamondStorage().contractOwner[addr];
    }

    function enforceIsContractOwner() internal view {
        require(diamondStorage().contractOwner[msg.sender], "LibDiamond: Must be contract owner");
    }

    event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);

    // Internal function version of diamondCut
    function diamondCut(
        IDiamondCut.FacetCut[] memory _diamondCut,
        address _init,
        bytes memory _calldata
    ) internal {
        for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {
            IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;
            if (action == IDiamondCut.FacetCutAction.Add) {
                addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
            } else if (action == IDiamondCut.FacetCutAction.Replace) {
                replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
            } else if (action == IDiamondCut.FacetCutAction.Remove) {
                removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
            } else {
                revert("LibDiamondCut: Incorrect FacetCutAction");
            }
        }
        emit DiamondCut(_diamondCut, _init, _calldata);
        initializeDiamondCut(_init, _calldata);
    }

    function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
        DiamondStorage storage ds = diamondStorage();        
        require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)");
        uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            addFacet(ds, _facetAddress);            
        }
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            require(oldFacetAddress == address(0), "LibDiamondCut: Can't add function that already exists");
            addFunction(ds, selector, selectorPosition, _facetAddress);
            selectorPosition++;
        }
    }

    function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
        DiamondStorage storage ds = diamondStorage();
        require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)");
        uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            addFacet(ds, _facetAddress);
        }
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            require(oldFacetAddress != _facetAddress, "LibDiamondCut: Can't replace function with same function");
            removeFunction(ds, oldFacetAddress, selector);
            addFunction(ds, selector, selectorPosition, _facetAddress);
            selectorPosition++;
        }
    }

    function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
        DiamondStorage storage ds = diamondStorage();
        // if function does not exist then do nothing and return
        require(_facetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            removeFunction(ds, oldFacetAddress, selector);
        }
    }

    function addFacet(DiamondStorage storage ds, address _facetAddress) internal {
        enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code");
        ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;
        ds.facetAddresses.push(_facetAddress);
    }    


    function addFunction(DiamondStorage storage ds, bytes4 _selector, uint96 _selectorPosition, address _facetAddress) internal {
        ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;
        ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);
        ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;
    }

    function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {        
        require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
        // an immutable function is a function defined directly in a diamond
        require(_facetAddress != address(this), "LibDiamondCut: Can't remove immutable function");
        // replace selector with last selector, then delete last selector
        uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;
        uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;
        // if not the same then replace _selector with lastSelector
        if (selectorPosition != lastSelectorPosition) {
            bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];
            ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;
            ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);
        }
        // delete the last selector
        ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();
        delete ds.selectorToFacetAndPosition[_selector];

        // if no more selectors for facet address then delete the facet address
        if (lastSelectorPosition == 0) {
            // replace facet address with last facet address and delete last facet address
            uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;
            uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;
            if (facetAddressPosition != lastFacetAddressPosition) {
                address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];
                ds.facetAddresses[facetAddressPosition] = lastFacetAddress;
                ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;
            }
            ds.facetAddresses.pop();
            delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;
        }
    }

    function initializeDiamondCut(address _init, bytes memory _calldata) internal {
        if (_init == address(0)) {
            require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty");
        } else {
            require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)");
            if (_init != address(this)) {
                enforceHasContractCode(_init, "LibDiamondCut: _init address has no code");
            }
            (bool success, bytes memory error) = _init.delegatecall(_calldata);
            if (!success) {
                if (error.length > 0) {
                    // bubble up the error
                    revert(string(error));
                } else {
                    revert("LibDiamondCut: _init function reverted");
                }
            }
        }
    }

    function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
        uint256 contractSize;
        assembly {
            contractSize := extcodesize(_contract)
        }
        require(contractSize > 0, _errorMessage);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_contractOwner","type":"address"},{"internalType":"address","name":"_diamondCutFacet","type":"address"}],"stateMutability":"payable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013890611743565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610162573d6000f35b3d6000fd5b60006101716102b9565b905060008160040160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690508160040160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158260040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508273ffffffffffffffffffffffffffffffffffffffff168115157fdbddbc3351fc91dac345e399b81115b2788accaa73296e9d6711a58572510cb460405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60005b83518110156104ca57600084828151811061030757610306611763565b5b60200260200101516020015190506000600281111561032957610328611792565b5b81600281111561033c5761033b611792565b5b0361038c5761038785838151811061035757610356611763565b5b60200260200101516000015186848151811061037657610375611763565b5b602002602001015160400151610515565b6104b6565b600160028111156103a05761039f611792565b5b8160028111156103b3576103b2611792565b5b03610403576103fe8583815181106103ce576103cd611763565b5b6020026020010151600001518684815181106103ed576103ec611763565b5b60200260200101516040015161078c565b6104b5565b60028081111561041657610415611792565b5b81600281111561042957610428611792565b5b036104795761047485838151811061044457610443611763565b5b60200260200101516000015186848151811061046357610462611763565b5b602002602001015160400151610a0d565b6104b4565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ab90611833565b60405180910390fd5b5b5b5080806104c29061188c565b9150506102e9565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738383836040516104fe93929190611bf8565b60405180910390a16105108282610b98565b505050565b6000815111610559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055090611caf565b60405180910390fd5b60006105636102b9565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036105d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cb90611d41565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1603610641576106408285610daa565b5b60005b835181101561078557600084828151811061066257610661611763565b5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074d90611dd3565b60405180910390fd5b6107628583868a610e85565b838061076d90611e0b565b9450505050808061077d9061188c565b915050610644565b5050505050565b60008151116107d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c790611caf565b60405180910390fd5b60006107da6102b9565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361084b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084290611d41565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16036108b8576108b78285610daa565b5b60005b8351811015610a065760008482815181106108d9576108d8611763565b5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c390611eb1565b60405180910390fd5b6109d7858284611032565b6109e38583868a610e85565b83806109ee90611e0b565b945050505080806109fe9061188c565b9150506108bb565b5050505050565b6000815111610a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4890611caf565b60405180910390fd5b6000610a5b6102b9565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac390611f43565b60405180910390fd5b60005b8251811015610b92576000838281518110610aed57610aec611763565b5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610b7d848284611032565b50508080610b8a9061188c565b915050610acf565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c15576000815114610c10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0790611fd5565b60405180910390fd5b610da6565b6000815111610c59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5090612067565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610caf57610cae8260405180606001604052806028815260200161235a60289139611694565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610cd791906120c3565b600060405180830381855af49150503d8060008114610d12576040519150601f19603f3d011682016040523d82523d6000602084013e610d17565b606091505b509150915081610da357600081511115610d6857806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5f919061211e565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9a906121b2565b60405180910390fd5b50505b5050565b610dcc8160405180606001604052806024815260200161238260249139611694565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036110a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109890612244565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361110f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611106906122d6565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506111e691906122f6565b905080821461137a5760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061124757611246611763565b5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184815481106112c3576112c2611763565b5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806113ce576113cd61232a565b5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff021916905550506000810361168d576000600186600201805490506114b891906122f6565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146115f957600087600201838154811061152257611521611763565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508088600201838154811061156657611565611763565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b8660020180548061160d5761160c61232a565b5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906116e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d7919061211e565b60405180910390fd5b50505050565b600082825260208201905092915050565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b600061172d6020836116e6565b9150611738826116f7565b602082019050919050565b6000602082019050818103600083015261175c81611720565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b600061181d6027836116e6565b9150611828826117c1565b604082019050919050565b6000602082019050818103600083015261184c81611810565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b600061189782611882565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036118c9576118c8611853565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061192b82611900565b9050919050565b61193b81611920565b82525050565b6003811061195257611951611792565b5b50565b600081905061196382611941565b919050565b600061197382611955565b9050919050565b61198381611968565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6119ea816119b5565b82525050565b60006119fc83836119e1565b60208301905092915050565b6000602082019050919050565b6000611a2082611989565b611a2a8185611994565b9350611a35836119a5565b8060005b83811015611a66578151611a4d88826119f0565b9750611a5883611a08565b925050600181019050611a39565b5085935050505092915050565b6000606083016000830151611a8b6000860182611932565b506020830151611a9e602086018261197a565b5060408301518482036040860152611ab68282611a15565b9150508091505092915050565b6000611acf8383611a73565b905092915050565b6000602082019050919050565b6000611aef826118d4565b611af981856118df565b935083602082028501611b0b856118f0565b8060005b85811015611b475784840389528151611b288582611ac3565b9450611b3383611ad7565b925060208a01995050600181019050611b0f565b50829750879550505050505092915050565b611b6281611920565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611ba2578082015181840152602081019050611b87565b60008484015250505050565b6000601f19601f8301169050919050565b6000611bca82611b68565b611bd48185611b73565b9350611be4818560208601611b84565b611bed81611bae565b840191505092915050565b60006060820190508181036000830152611c128186611ae4565b9050611c216020830185611b59565b8181036040830152611c338184611bbf565b9050949350505050565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b6000611c99602b836116e6565b9150611ca482611c3d565b604082019050919050565b60006020820190508181036000830152611cc881611c8c565b9050919050565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b6000611d2b602c836116e6565b9150611d3682611ccf565b604082019050919050565b60006020820190508181036000830152611d5a81611d1e565b9050919050565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b6000611dbd6035836116e6565b9150611dc882611d61565b604082019050919050565b60006020820190508181036000830152611dec81611db0565b9050919050565b60006bffffffffffffffffffffffff82169050919050565b6000611e1682611df3565b91506bffffffffffffffffffffffff8203611e3457611e33611853565b5b600182019050919050565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b6000611e9b6038836116e6565b9150611ea682611e3f565b604082019050919050565b60006020820190508181036000830152611eca81611e8e565b9050919050565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b6000611f2d6036836116e6565b9150611f3882611ed1565b604082019050919050565b60006020820190508181036000830152611f5c81611f20565b9050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b6000611fbf603c836116e6565b9150611fca82611f63565b604082019050919050565b60006020820190508181036000830152611fee81611fb2565b9050919050565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b6000612051603d836116e6565b915061205c82611ff5565b604082019050919050565b6000602082019050818103600083015261208081612044565b9050919050565b600081905092915050565b600061209d82611b68565b6120a78185612087565b93506120b7818560208601611b84565b80840191505092915050565b60006120cf8284612092565b915081905092915050565b600081519050919050565b60006120f0826120da565b6120fa81856116e6565b935061210a818560208601611b84565b61211381611bae565b840191505092915050565b6000602082019050818103600083015261213881846120e5565b905092915050565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b600061219c6026836116e6565b91506121a782612140565b604082019050919050565b600060208201905081810360008301526121cb8161218f565b9050919050565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b600061222e6037836116e6565b9150612239826121d2565b604082019050919050565b6000602082019050818103600083015261225d81612221565b9050919050565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b60006122c0602e836116e6565b91506122cb82612264565b604082019050919050565b600060208201905081810360008301526122ef816122b3565b9050919050565b600061230182611882565b915061230c83611882565b925082820390508181111561232457612323611853565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a264697066735822122012e580817fa8675238b13cb4b5500e0568013946b6cd8f3312b44b6ee27541dc64736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

Exclusive community of the most ambitious Developers, Builders, NFT Investors and Artists in the Web3 space. Holders get access to up-to-date alpha information about all ongoing NFT-sales, investment ideas, tools and more.Visit our website: https://nft.terncrypto.plus for mo...

Validator Index Block Amount
View All Withdrawals

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

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