Contract 0x31B121BD5D548ee183be4F4F5B6a75d833bc778F 1

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb3bbd31d73e928732ac3a1885ec94121887785703801fc986c088531db55d643Set Approval For...280753802022-05-08 14:37:4117 days 13 hrs ago0x8e7bd3dc5a41971455a7e5af99c3ab77766b964e IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.003070563014 60.051690026
0x1769532f4148ce19427d6493a7d9f3959f013281c4393b26bd99346c95ee7427Set Approval For...280537382022-05-08 1:23:3818 days 2 hrs ago0xf471fc08303a55ee4da0b7a12915e612b8a12bea IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.000127830001 2.500000025
0x98a2dfc78c21c522f33fda882f0e90967ca186aa2edd58003b754d780e979400Set Approval For...279023572022-05-04 5:36:5121 days 22 hrs ago0xb1a86de663d581e4f5e964d9f6b9af4dc3720d25 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.00178627341 34.934550006
0x55b340059d40d9ac75b4d4251ef1866b6a707e54e34c12f60dea526f0b56726aSafe Transfer Fr...277418942022-04-30 4:11:4926 days 7 mins ago0xcf79cafc90b3307f0e1474ee4d0c14e7f212b0ed IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.00282612324530.886255288
0xd1807f01904864781302452f1408a6acedfd50d5f5a1beb9319b648dcb0e4ae0Set Approval For...277240362022-04-29 17:14:2826 days 11 hrs ago0x00c0f1e2b164d625bbec7c5264147bed9f36a654 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.003266388437 63.881491785
0x7fd8a1d28c87ec280aa4bf6f014b732a73c80eae07c0ebe7fd709aee3700d6b4Transfer From276601312022-04-28 2:34:3828 days 1 hr ago0x877417636ef58f737e8167455564b3300a998d85 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001316277348 37.839284425
0x9ffdf475452c58930a82f5cb9be1364acc1bcd1376e2ede062717b57a463ab6eSet Approval For...276569472022-04-28 0:32:0928 days 3 hrs ago0x1ffaf539d269b99342efef17fcc562b7cac45fec IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.000078080001 2.500000034
0xaf54e6a126774f844269163fd21497beabaeabbcf0b7178cbb4232c5f7b9b13cSet Approval For...276569472022-04-28 0:32:0928 days 3 hrs ago0x1ffaf539d269b99342efef17fcc562b7cac45fec IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.000993742293 31.818080591
0xa1c1136584f5734e59858ea0f50b0685dcb88999f622140c3a381f0d426d8ec7Set Approval For...276569472022-04-28 0:32:0928 days 3 hrs ago0x1ffaf539d269b99342efef17fcc562b7cac45fec IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.000078080001 2.500000042
0x6141075e26d58cae557c262c29b24eec0420de0dd550191558eba7305cc716e7Set Approval For...276569472022-04-28 0:32:0928 days 3 hrs ago0x1ffaf539d269b99342efef17fcc562b7cac45fec IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.00007808 2.500000026
0x7a743b227addfd89bb3b65b7baa0badbbe1e65e10d0138ee466dd8e37f223324Set Approval For...275970592022-04-26 12:14:0229 days 16 hrs ago0xf2dcd1878ab5106350efa973c889c7a181bf22c1 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001699802824 33.243425343
0xc8330a573e60142441e4ff2da26e846ed918420aa73ff004e1e8e29fd1661460Set Approval For...274022182022-04-21 12:57:4034 days 15 hrs ago0x32bb3d11df5ee4d1966cf08ace3e603c35b48ad3 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001943637755 62.256174115
0x82bc2224cf3a7054a4f9fc247f710bfefc733e9e360c0d3fb2ff984cab979a55Set Approval For...274022182022-04-21 12:57:4034 days 15 hrs ago0x32bb3d11df5ee4d1966cf08ace3e603c35b48ad3 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001868913935 59.862714141
0x7dc1b3340ea7946a7ddb538f7fb11e2149e975273ef00d6ddc21503df1c48c4fSet Approval For...274022182022-04-21 12:57:4034 days 15 hrs ago0x32bb3d11df5ee4d1966cf08ace3e603c35b48ad3 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001874497099 64.151166985
0x72f68d53605dabcf6f4c90f955f2ae660da09bd2151d10f397b066190c02feabSet Approval For...269924362022-04-11 3:07:3045 days 1 hr ago0x1ffaf539d269b99342efef17fcc562b7cac45fec IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.002004374399 39.199999984
0x054c9ff9fecb49564f91400a3a5cd3c3388df862516a01962f1751af45b5cc57Set Approval For...268084292022-04-06 9:35:2749 days 18 hrs ago0x6708aedd67cca8e158ea802cd78dfacdbaf5804f IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001567569612 30.657310737
0x0fb690a7ef314d1a60a3b5e6f79d9d65bc883a20a0428d6110acc62c5cd125a8Set Approval For...267688192022-04-05 9:53:4550 days 18 hrs ago0xc2dcc49bc4c4115d0212ea318e2143c891c9d2eb IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.0015616 50
0x233475d68cc3c94e6b88f92691845ea7a74ec05c683bfc041c08f6075e887a15Set Approval For...267643072022-04-05 7:06:2850 days 21 hrs ago0xc2dcc49bc4c4115d0212ea318e2143c891c9d2eb IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001633844746 31.953468413
0x34bc17eb1aaca57f80375df0dbf6a2454b13a980647ad3c6b3d6497b26c29ef8Set Approval For...265645182022-03-31 4:28:0455 days 23 hrs ago0xb50fe6bdd3a14d5260de6cc5d821774ecfa52d1e IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.000127830022 2.500000448
0xb1711b4083316e86a95926e93b07488ee9e9ad21e028cc19395fc74b437481edSet Approval For...263839632022-03-26 13:14:2860 days 15 hrs ago0x2c94f01098c8af8fb65b5c3dbcf18f811c846038 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.000956520443 30.626294929
0xaed0d22d60352e1f02dc1b48a1738bc128738c157a0283a8dd1e1d4dfd8f5a32Set Approval For...263839632022-03-26 13:14:2860 days 15 hrs ago0x2c94f01098c8af8fb65b5c3dbcf18f811c846038 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001653608879 32.339999997
0x448cedea82b02bba6a0655dbd1d0f69dc6acc1b8553c28564f25b6efa77e62d9Transfer From263712102022-03-26 5:16:4560 days 23 hrs ago0x877417636ef58f737e8167455564b3300a998d85 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.00273369505 30.858873768
0x37a79aa7433683832654a4ad634e789155d3a7ef7f91673fdb085bde6c64f47cSet Approval For...262955382022-03-24 6:07:5962 days 22 hrs ago0x6cc4ead03b6fda979fa33b40546ba5d09c35396a IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.0178962 350.000000017
0x53cac9d99bde77618a076b39f89914c605bc59751157a303d7b1f21cdef3fab2Set Approval For...261835292022-03-21 9:56:4065 days 18 hrs ago0xcddbca45d24c868579dc2df93400f98c95c5dbc7 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.001535714698 30.034317032
0x7f6fa511da61a079efe314432edda384a1bd2bbc35b40821d4a369fba0fcf320Safe Transfer Fr...261787172022-03-21 6:57:3065 days 21 hrs ago0x4fd43b2eea4353b3b6d6839edfc7840b91fdc4f4 IN  0x31b121bd5d548ee183be4f4f5b6a75d833bc778f0 MATIC0.003086918885 32.730576752
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NftProxy

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-12-30
*/

// Sources flattened with hardhat v2.8.0 https://hardhat.org

// File @openzeppelin/contracts/proxy/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/Proxy.sol)

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
 * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
 * be specified by overriding the virtual {_implementation} function.
 *
 * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
 * different contract through the {_delegate} function.
 *
 * The success and return data of the delegated call will be returned back to the caller of the proxy.
 */
abstract contract Proxy {
    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internall call site, it will return directly to the external caller.
     */
    function _delegate(address implementation) internal virtual {
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function
     * and {_fallback} should delegate.
     */
    function _implementation() internal view virtual returns (address);

    /**
     * @dev Delegates the current call to the address returned by `_implementation()`.
     *
     * This function does not return to its internall call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _beforeFallback();
        _delegate(_implementation());
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
     * function in the contract matches the call data.
     */
    fallback() external payable virtual {
        _fallback();
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
     * is empty.
     */
    receive() external payable virtual {
        _fallback();
    }

    /**
     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
     * call, or as part of the Solidity `fallback` or `receive` functions.
     *
     * If overriden should call `super._beforeFallback()`.
     */
    function _beforeFallback() internal virtual {}
}


// File @openzeppelin/contracts/proxy/beacon/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}


// File @openzeppelin/contracts/utils/[email protected]

// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


// File @openzeppelin/contracts/utils/[email protected]

// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly {
            r.slot := slot
        }
    }
}


// File @openzeppelin/contracts/proxy/ERC1967/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;



/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967Upgrade {
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallSecure(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        address oldImplementation = _getImplementation();

        // Initial upgrade and setup call
        _setImplementation(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }

        // Perform rollback test if not already in progress
        StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);
        if (!rollbackTesting.value) {
            // Trigger rollback using upgradeTo from the new implementation
            rollbackTesting.value = true;
            Address.functionDelegateCall(
                newImplementation,
                abi.encodeWithSignature("upgradeTo(address)", oldImplementation)
            );
            rollbackTesting.value = false;
            // Check rollback was effective
            require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades");
            // Finally reset to the new implementation and log the upgrade
            _upgradeTo(newImplementation);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Emitted when the beacon is upgraded.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            Address.isContract(IBeacon(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        }
    }
}


// File @openzeppelin/contracts/proxy/ERC1967/[email protected]

// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)

pragma solidity ^0.8.0;


/**
 * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
 * implementation address that can be changed. This address is stored in storage in the location specified by
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
 * implementation behind the proxy.
 */
contract ERC1967Proxy is Proxy, ERC1967Upgrade {
    /**
     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
     *
     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
     * function call, and allows initializating the storage of the proxy like a Solidity constructor.
     */
    constructor(address _logic, bytes memory _data) payable {
        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
        _upgradeToAndCall(_logic, _data, false);
    }

    /**
     * @dev Returns the current implementation address.
     */
    function _implementation() internal view virtual override returns (address impl) {
        return ERC1967Upgrade._getImplementation();
    }
}


// File contracts/nftProxy/proxy.sol

pragma solidity ^0.8.4;

contract NftProxy is ERC1967Proxy {
    address private delegate;

    constructor(address _delegate, bytes memory _data)
        ERC1967Proxy(_delegate, _data)
    {
        delegate = _delegate;
    }

    function _implementation() internal view override returns (address) {
        return delegate;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_delegate","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5060405161078138038061078183398101604081905261002f91610334565b818161005c60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61044c565b60008051602061073a8339815191521461008657634e487b7160e01b600052600160045260246000fd5b610092828260006100bb565b5050600080546001600160a01b0319166001600160a01b039390931692909217909155506104b1565b6100c4836100f1565b6000825111806100d15750805b156100ec576100ea838361013160201b6100331760201c565b505b505050565b6100fa8161015d565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610156838360405180606001604052806027815260200161075a6027913961021d565b9392505050565b610170816102f260201b61005f1760201c565b6101d75760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101fc60008051602061073a83398151915260001b6102f860201b6100651760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060833b61027c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016101ce565b600080856001600160a01b03168560405161029791906103fd565b600060405180830381855af49150503d80600081146102d2576040519150601f19603f3d011682016040523d82523d6000602084013e6102d7565b606091505b5090925090506102e88282866102fb565b9695505050505050565b3b151590565b90565b6060831561030a575081610156565b82511561031a5782518084602001fd5b8160405162461bcd60e51b81526004016101ce9190610419565b60008060408385031215610346578182fd5b82516001600160a01b038116811461035c578283fd5b60208401519092506001600160401b0380821115610378578283fd5b818501915085601f83011261038b578283fd5b81518181111561039d5761039d61049b565b604051601f8201601f19908116603f011681019083821181831017156103c5576103c561049b565b816040528281528860208487010111156103dd578586fd5b6103ee83602083016020880161046f565b80955050505050509250929050565b6000825161040f81846020870161046f565b9190910192915050565b602081526000825180602084015261043881604085016020870161046f565b601f01601f19169190910160400192915050565b60008282101561046a57634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561048a578181015183820152602001610472565b838111156100ea5750506000910152565b634e487b7160e01b600052604160045260246000fd5b61027a806104c06000396000f3fe60806040523661001357610011610017565b005b6100115b61003161002c6000546001600160a01b031690565b610068565b565b6060610058838360405180606001604052806027815260200161021e6027913961008c565b9392505050565b3b151590565b90565b3660008037600080366000845af43d6000803e808015610087573d6000f35b3d6000fd5b6060833b6100f05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161010b919061019e565b600060405180830381855af49150503d8060008114610146576040519150601f19603f3d011682016040523d82523d6000602084013e61014b565b606091505b509150915061015b828286610165565b9695505050505050565b60608315610174575081610058565b8251156101845782518084602001fd5b8160405162461bcd60e51b81526004016100e791906101ba565b600082516101b08184602087016101ed565b9190910192915050565b60208152600082518060208401526101d98160408501602087016101ed565b601f01601f19169190910160400192915050565b60005b838110156102085781810151838201526020016101f0565b83811115610217576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220364b146a73378ae286b08326096773eeaecb297f6fcab892a98a9c36ef1bcdaa64736f6c63430008040033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000009d75ce4224ae1faa5e9635765a4e6017c50a908e00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000144a6487c53000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000029504152415a454e202d2074686520626c696e6420626f78206f662050696f6e6565722073657269657300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017426c696e6420626f78206f6620505a2050696f6e656572000000000000000000000000000000000000000000000000000000000000000000000000000000001c68747470733a2f2f73746f726167652e71756269632e6d61726b65740000000000000000000000000000000000000000000000000000000000000000

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

0000000000000000000000009d75ce4224ae1faa5e9635765a4e6017c50a908e00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000144a6487c53000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000029504152415a454e202d2074686520626c696e6420626f78206f662050696f6e6565722073657269657300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017426c696e6420626f78206f6620505a2050696f6e656572000000000000000000000000000000000000000000000000000000000000000000000000000000001c68747470733a2f2f73746f726167652e71756269632e6d61726b65740000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _delegate (address): 0x9d75ce4224ae1faa5e9635765a4e6017c50a908e
Arg [1] : _data (bytes): 0xa6487c53000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000029504152415a454e202d2074686520626c696e6420626f78206f662050696f6e6565722073657269657300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017426c696e6420626f78206f6620505a2050696f6e656572000000000000000000000000000000000000000000000000000000000000000000000000000000001c68747470733a2f2f73746f726167652e71756269632e6d61726b657400000000

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000009d75ce4224ae1faa5e9635765a4e6017c50a908e
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000144
Arg [3] : a6487c5300000000000000000000000000000000000000000000000000000000
Arg [4] : 0000006000000000000000000000000000000000000000000000000000000000
Arg [5] : 000000c000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000010000000000000000000000000000000000000000000000000000000000
Arg [7] : 00000029504152415a454e202d2074686520626c696e6420626f78206f662050
Arg [8] : 696f6e6565722073657269657300000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [10] : 00000017426c696e6420626f78206f6620505a2050696f6e6565720000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [12] : 0000001c68747470733a2f2f73746f726167652e71756269632e6d61726b6574
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000


Deployed ByteCode Sourcemap

23049:322:0:-:0;;;;;;3083:11;:9;:11::i;:::-;23049:322;;2852:11;2489:113;2566:28;2576:17;23325:7;23352:8;-1:-1:-1;;;;;23352:8:0;;23266:102;2576:17;2566:9;:28::i;:::-;2489:113::o;10368:200::-;10451:12;10483:77;10504:6;10512:4;10483:77;;;;;;;;;;;;;;;;;:20;:77::i;:::-;10476:84;10368:200;-1:-1:-1;;;10368:200:0:o;4774:387::-;5097:20;5145:8;;;4774:387::o;13788:151::-;13917:4;13892:40::o;1079:918::-;1422:14;1419:1;1416;1403:34;1640:1;1637;1621:14;1618:1;1602:14;1595:5;1582:60;1719:16;1716:1;1713;1698:38;1759:6;1828:68;;;;1947:16;1944:1;1937:27;1828:68;1864:16;1861:1;1854:27;10762:396;10907:12;5097:20;;10932:69;;;;-1:-1:-1;;;10932:69:0;;883:2:1;10932:69:0;;;865:21:1;922:2;902:18;;;895:30;961:34;941:18;;;934:62;-1:-1:-1;;;1012:18:1;;;1005:36;1058:19;;10932:69:0;;;;;;;;;11015:12;11029:23;11056:6;-1:-1:-1;;;;;11056:19:0;11076:4;11056:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11014:67;;;;11099:51;11116:7;11125:10;11137:12;11099:16;:51::i;:::-;11092:58;10762:396;-1:-1:-1;;;;;;10762:396:0:o;11386:712::-;11536:12;11565:7;11561:530;;;-1:-1:-1;11596:10:0;11589:17;;11561:530;11710:17;;:21;11706:374;;11908:10;11902:17;11969:15;11956:10;11952:2;11948:19;11941:44;11856:148;12051:12;12044:20;;-1:-1:-1;;;12044:20:0;;;;;;;;:::i;14:274:1:-;143:3;181:6;175:13;197:53;243:6;238:3;231:4;223:6;219:17;197:53;:::i;:::-;266:16;;;;;151:137;-1:-1:-1;;151:137:1:o;293:383::-;442:2;431:9;424:21;405:4;474:6;468:13;517:6;512:2;501:9;497:18;490:34;533:66;592:6;587:2;576:9;572:18;567:2;559:6;555:15;533:66;:::i;:::-;660:2;639:15;-1:-1:-1;;635:29:1;620:45;;;;667:2;616:54;;414:262;-1:-1:-1;;414:262:1:o;1088:258::-;1160:1;1170:113;1184:6;1181:1;1178:13;1170:113;;;1260:11;;;1254:18;1241:11;;;1234:39;1206:2;1199:10;1170:113;;;1301:6;1298:1;1295:13;1292:2;;;1336:1;1327:6;1322:3;1318:16;1311:27;1292:2;;1141:205;;;:::o

Swarm Source

ipfs://364b146a73378ae286b08326096773eeaecb297f6fcab892a98a9c36ef1bcdaa
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.