ETH Price: $3,339.88 (-0.71%)

Token

Zero Player Game (ZPG)
 

Overview

Max Total Supply

715 ZPG

Holders

517

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 ZPG
0x4c7fb62375258b1cdfc5b37fe73d63011b6d85d5
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
ZeroPlayerGame

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 4 of 4: UpgradeProxy.sol
// SPDX-License-Identifier: GPL-3.0   

pragma solidity ^0.8.7;
import "./ERC1967Proxy.sol";

contract ZeroPlayerGame is ERC1967Proxy {
    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _PROXY_ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104;
    /**
     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
     * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.
     */
    constructor(address _logic) payable ERC1967Proxy(_logic, bytes("")) {
        _setProxyAdmin(msg.sender);
    }

    function upgradeTo(address newImplementation) public {
        require(_getProxyAdmin() == msg.sender, "No Proxy Admin");
        _upgradeTo(newImplementation);
    }


    function implementation() public view returns (address) {
        return _implementation();
    }

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

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

File 1 of 4: ERC1967Proxy.sol
// SPDX-License-Identifier: GPL-3.0                                                                                                                                                                                                                                                          
// --- ZoraERC721 Contract. --- 

pragma solidity ^0.8.7;
import "./proxy.sol";
import "./ERC1967Upgrade.sol";

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 initializing the storage of the proxy like a Solidity constructor.
     */
    constructor(address _logic, bytes memory _data) payable {
        _upgradeToAndCall(_logic, _data, false);
    }

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

File 2 of 4: ERC1967Upgrade.sol
// SPDX-License-Identifier: GPL-3.0                                                                                                                                                                                                                                                          
// --- ZoraERC721 Contract. --- 

pragma solidity ^0.8.7;

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 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");
        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) {
        //     functionDelegateCall(newImplementation, data, "Address: low-level delegate call failed");
        // }
    }

    struct AddressSlot {
        address value;
    }
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }
}

File 3 of 4: proxy.sol
// SPDX-License-Identifier: GPL-3.0                                                                                                                                                                                                                                                          

pragma solidity ^0.8.7;

abstract contract Proxy {
    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internal 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 overridden 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 internal call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _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();
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_logic","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526040516106b53803806106b583398181016040528101906100259190610223565b80604051806020016040528060008152506100488282600061005f60201b60201c565b50506100593361007360201b60201c565b50610250565b61006e836100ea60201b60201c565b505050565b806100a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610460001b61013f60201b60201c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6100f98161014960201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b6000819050919050565b8061017c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61013f60201b60201c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006101f0826101c5565b9050919050565b610200816101e5565b811461020b57600080fd5b50565b60008151905061021d816101f7565b92915050565b600060208284031215610239576102386101c0565b5b60006102478482850161020e565b91505092915050565b6104568061025f6000396000f3fe60806040526004361061002d5760003560e01c80633659cfe6146100465780635c60da1b1461006f5761003c565b3661003c5761003a61009a565b005b61004461009a565b005b34801561005257600080fd5b5061006d6004803603810190610068919061034c565b6100ac565b005b34801561007b57600080fd5b5061008461012d565b6040516100919190610388565b60405180910390f35b6100aa6100a561013c565b61014b565b565b3373ffffffffffffffffffffffffffffffffffffffff166100cb610171565b73ffffffffffffffffffffffffffffffffffffffff1614610121576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011890610400565b60405180910390fd5b61012a816101c8565b50565b600061013761013c565b905090565b6000610146610217565b905090565b3660008037600080366000845af43d6000803e806000811461016c573d6000f35b3d6000fd5b600061019f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610460001b61026e565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6101d181610278565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60006102457f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61026e565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000819050919050565b806102a57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61026e565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610319826102ee565b9050919050565b6103298161030e565b811461033457600080fd5b50565b60008135905061034681610320565b92915050565b600060208284031215610362576103616102e9565b5b600061037084828501610337565b91505092915050565b6103828161030e565b82525050565b600060208201905061039d6000830184610379565b92915050565b600082825260208201905092915050565b7f4e6f2050726f78792041646d696e000000000000000000000000000000000000600082015250565b60006103ea600e836103a3565b91506103f5826103b4565b602082019050919050565b60006020820190508181036000830152610419816103dd565b905091905056fea2646970667358221220d36942a42d0ee144de048d955e536be00299528ae0b210d5d84c1eafac54acef64736f6c6343000812003300000000000000000000000002e2c2314eee894d6caa1d86c877b117542fbc72

Deployed Bytecode

0x60806040526004361061002d5760003560e01c80633659cfe6146100465780635c60da1b1461006f5761003c565b3661003c5761003a61009a565b005b61004461009a565b005b34801561005257600080fd5b5061006d6004803603810190610068919061034c565b6100ac565b005b34801561007b57600080fd5b5061008461012d565b6040516100919190610388565b60405180910390f35b6100aa6100a561013c565b61014b565b565b3373ffffffffffffffffffffffffffffffffffffffff166100cb610171565b73ffffffffffffffffffffffffffffffffffffffff1614610121576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011890610400565b60405180910390fd5b61012a816101c8565b50565b600061013761013c565b905090565b6000610146610217565b905090565b3660008037600080366000845af43d6000803e806000811461016c573d6000f35b3d6000fd5b600061019f7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610460001b61026e565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6101d181610278565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b60006102457f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61026e565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000819050919050565b806102a57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61026e565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610319826102ee565b9050919050565b6103298161030e565b811461033457600080fd5b50565b60008135905061034681610320565b92915050565b600060208284031215610362576103616102e9565b5b600061037084828501610337565b91505092915050565b6103828161030e565b82525050565b600060208201905061039d6000830184610379565b92915050565b600082825260208201905092915050565b7f4e6f2050726f78792041646d696e000000000000000000000000000000000000600082015250565b60006103ea600e836103a3565b91506103f5826103b4565b602082019050919050565b60006020820190508181036000830152610419816103dd565b905091905056fea2646970667358221220d36942a42d0ee144de048d955e536be00299528ae0b210d5d84c1eafac54acef64736f6c63430008120033

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

00000000000000000000000002e2c2314eee894d6caa1d86c877b117542fbc72

-----Decoded View---------------
Arg [0] : _logic (address): 0x02E2c2314eee894D6cAa1d86C877b117542FBC72

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000002e2c2314eee894d6caa1d86c877b117542fbc72


Deployed Bytecode Sourcemap

94:1501:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2460:11:3;:9;:11::i;:::-;94:1501:2;;2237:11:3;:9;:11::i;:::-;94:1501:2;800:166;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;973:97;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1911:83:3;1959:28;1969:17;:15;:17::i;:::-;1959:9;:28::i;:::-;1911:83::o;800:166:2:-;891:10;871:30;;:16;:14;:16::i;:::-;:30;;;863:57;;;;;;;;;;;;:::i;:::-;;;;;;;;;930:29;941:17;930:10;:29::i;:::-;800:166;:::o;973:97::-;1020:7;1046:17;:15;:17::i;:::-;1039:24;;973:97;:::o;979:140:0:-;1046:12;1077:35;:33;:35::i;:::-;1070:42;;979:140;:::o;537:895:3:-;875:14;872:1;869;856:34;1089:1;1086;1070:14;1067:1;1051:14;1044:5;1031:60;1165:16;1162:1;1159;1144:38;1203:6;1275:1;1270:66;;;;1385:16;1382:1;1375:27;1270:66;1305:16;1302:1;1295:27;1472:121:2;1521:7;1547:33;396:66;1562:17;;1547:14;:33::i;:::-;:39;;;;;;;;;;;;1540:46;;1472:121;:::o;1692:152:1:-;1758:37;1777:17;1758:18;:37::i;:::-;1819:17;1810:27;;;;;;;;;;;;1692:152;:::o;1117:128::-;1170:7;1196:36;846:66;1211:20;;1196:14;:36::i;:::-;:42;;;;;;;;;;;;1189:49;;1117:128;:::o;2347:190::-;2408:21;2517:4;2507:14;;2347:190;;;:::o;1336:250::-;1562:17;1517:36;846:66;1532:20;;1517:14;:36::i;:::-;:42;;;:62;;;;;;;;;;;;;;;;;;1336:250;:::o;88:117:4:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:139::-;742:5;780:6;767:20;758:29;;796:33;823:5;796:33;:::i;:::-;696:139;;;;:::o;841:329::-;900:6;949:2;937:9;928:7;924:23;920:32;917:119;;;955:79;;:::i;:::-;917:119;1075:1;1100:53;1145:7;1136:6;1125:9;1121:22;1100:53;:::i;:::-;1090:63;;1046:117;841:329;;;;:::o;1176:118::-;1263:24;1281:5;1263:24;:::i;:::-;1258:3;1251:37;1176:118;;:::o;1300:222::-;1393:4;1431:2;1420:9;1416:18;1408:26;;1444:71;1512:1;1501:9;1497:17;1488:6;1444:71;:::i;:::-;1300:222;;;;:::o;1528:169::-;1612:11;1646:6;1641:3;1634:19;1686:4;1681:3;1677:14;1662:29;;1528:169;;;;:::o;1703:164::-;1843:16;1839:1;1831:6;1827:14;1820:40;1703:164;:::o;1873:366::-;2015:3;2036:67;2100:2;2095:3;2036:67;:::i;:::-;2029:74;;2112:93;2201:3;2112:93;:::i;:::-;2230:2;2225:3;2221:12;2214:19;;1873:366;;;:::o;2245:419::-;2411:4;2449:2;2438:9;2434:18;2426:26;;2498:9;2492:4;2488:20;2484:1;2473:9;2469:17;2462:47;2526:131;2652:4;2526:131;:::i;:::-;2518:139;;2245:419;;;:::o

Swarm Source

ipfs://d36942a42d0ee144de048d955e536be00299528ae0b210d5d84c1eafac54acef
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.