Sepolia Testnet

Contract Diff Checker

Contract Name:
NFT_Proxy

Contract Source Code:

File 1 of 1 : NFT_Proxy

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

contract NFT_Proxy {
    address public logic;
    address public owner;
    bool public isPause;
    address[] public proxies;

    event CreateNEWContract(address indexed newNFTContract, address indexed Creator, uint256 TimeStamp);

    constructor(address _logicContract){
        logic = _logicContract;
        owner = msg.sender;
    }

    modifier OnlyOnwer() {
        require(msg.sender == owner,"Only Owner");
        _;
    }

    function transferOwnership(address _newOwner) external OnlyOnwer {
        owner = _newOwner;
    }

    function setLogicContract(address _newLogic) external OnlyOnwer {
        logic = _newLogic;
    }

    function pause() external OnlyOnwer {
        isPause = true;
    }

     function unPause() external OnlyOnwer {
        isPause = false;
    }

    function createClone(string memory _name, string memory _symbol, address _owner) external {
        require(!isPause,"contract paused");

        bytes20 implementationContractInBytes = bytes20(
            logic
        );

        address proxy;

        assembly {
            
            let clone := mload(0x40)
            mstore(
                clone,
                0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000
            )

            mstore(add(clone, 0x14), implementationContractInBytes)

            mstore(
                add(clone, 0x28),
                0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
            )

            proxy := create(0, clone, 0x37)
        }
           
        INFTContract(proxy).initilize(_name, _symbol, _owner);
        proxies.push(proxy);
        emit CreateNEWContract(proxy, msg.sender, block.timestamp);
    }

}

interface INFTContract {

    //initializer function that will be called once, during deployment.
    function initilize(string memory name, string memory symbol, address owner) external;

}

Please enter a contract address above to load the contract details and source code.

Context size (optional):