ERC-721
NFT
Overview
Max Total Supply
5,124 PE
Holders
932
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
15 PELoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ProjectEnvisionProxy
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {UpgradeableProxyOwnable} from "@solidstate-solidity/proxy/upgradeable/UpgradeableProxyOwnable.sol"; import {OwnableStorage} from "@solidstate-solidity/access/ownable/OwnableStorage.sol"; contract ProjectEnvisionProxy is UpgradeableProxyOwnable { constructor(address implementation) { _setImplementation(implementation); OwnableStorage.layout().owner = msg.sender; } /** * @dev suppress compiler warning */ receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC173Internal } from '../../interfaces/IERC173Internal.sol'; interface IOwnableInternal is IERC173Internal { error Ownable__NotOwner(); error Ownable__NotTransitiveOwner(); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC173 } from '../../interfaces/IERC173.sol'; import { AddressUtils } from '../../utils/AddressUtils.sol'; import { IOwnableInternal } from './IOwnableInternal.sol'; import { OwnableStorage } from './OwnableStorage.sol'; abstract contract OwnableInternal is IOwnableInternal { using AddressUtils for address; modifier onlyOwner() { if (msg.sender != _owner()) revert Ownable__NotOwner(); _; } modifier onlyTransitiveOwner() { if (msg.sender != _transitiveOwner()) revert Ownable__NotTransitiveOwner(); _; } function _owner() internal view virtual returns (address) { return OwnableStorage.layout().owner; } function _transitiveOwner() internal view virtual returns (address owner) { owner = _owner(); while (owner.isContract()) { try IERC173(owner).owner() returns (address transitiveOwner) { owner = transitiveOwner; } catch { break; } } } function _transferOwnership(address account) internal virtual { _setOwner(account); } function _setOwner(address account) internal virtual { OwnableStorage.Layout storage l = OwnableStorage.layout(); emit OwnershipTransferred(l.owner, account); l.owner = account; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; library OwnableStorage { struct Layout { address owner; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.Ownable'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC173Internal } from './IERC173Internal.sol'; /** * @title Contract ownership standard interface * @dev see https://eips.ethereum.org/EIPS/eip-173 */ interface IERC173 is IERC173Internal { /** * @notice get the ERC173 contract owner * @return contract owner */ function owner() external view returns (address); /** * @notice transfer contract ownership to new account * @param account address of new owner */ function transferOwnership(address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title Partial ERC173 interface needed by internal functions */ interface IERC173Internal { event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; interface IProxy { error Proxy__ImplementationIsNotContract(); fallback() external payable; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { AddressUtils } from '../utils/AddressUtils.sol'; import { IProxy } from './IProxy.sol'; /** * @title Base proxy contract */ abstract contract Proxy is IProxy { using AddressUtils for address; /** * @notice delegate all calls to implementation contract * @dev reverts if implementation address contains no code, for compatibility with metamorphic contracts * @dev memory location in use by assembly may be unsafe in other contexts */ fallback() external payable virtual { address implementation = _getImplementation(); if (!implementation.isContract()) revert Proxy__ImplementationIsNotContract(); assembly { calldatacopy(0, 0, calldatasize()) let result := delegatecall( gas(), implementation, 0, calldatasize(), 0, 0 ) returndatacopy(0, 0, returndatasize()) switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @notice get logic implementation address * @return implementation address */ function _getImplementation() internal virtual returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IProxy } from '../IProxy.sol'; interface IUpgradeableProxy is IProxy {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IUpgradeableProxy } from './IUpgradeableProxy.sol'; interface IUpgradeableProxyOwnable is IUpgradeableProxy { /** * TODO: add to IUpgradeableProxy or remove from here */ function setImplementation(address implementation) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { Proxy } from '../Proxy.sol'; import { IUpgradeableProxy } from './IUpgradeableProxy.sol'; import { UpgradeableProxyStorage } from './UpgradeableProxyStorage.sol'; /** * @title Proxy with upgradeable implementation */ abstract contract UpgradeableProxy is IUpgradeableProxy, Proxy { /** * @inheritdoc Proxy */ function _getImplementation() internal view override returns (address) { // inline storage layout retrieval uses less gas UpgradeableProxyStorage.Layout storage l; bytes32 slot = UpgradeableProxyStorage.STORAGE_SLOT; assembly { l.slot := slot } return l.implementation; } /** * @notice set logic implementation address * @param implementation implementation address */ function _setImplementation(address implementation) internal { UpgradeableProxyStorage.layout().implementation = implementation; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { OwnableInternal } from '../../access/ownable/OwnableInternal.sol'; import { IUpgradeableProxyOwnable } from './IUpgradeableProxyOwnable.sol'; import { UpgradeableProxy } from './UpgradeableProxy.sol'; /** * @title Proxy with upgradeable implementation controlled by ERC171 owner */ abstract contract UpgradeableProxyOwnable is IUpgradeableProxyOwnable, UpgradeableProxy, OwnableInternal { /** * @notice set logic implementation address * @param implementation implementation address */ function setImplementation(address implementation) external onlyOwner { _setImplementation(implementation); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; library UpgradeableProxyStorage { struct Layout { address implementation; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.UpgradeableProxy'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { UintUtils } from './UintUtils.sol'; library AddressUtils { using UintUtils for uint256; error AddressUtils__InsufficientBalance(); error AddressUtils__NotContract(); error AddressUtils__SendValueFailed(); function toString(address account) internal pure returns (string memory) { return uint256(uint160(account)).toHexString(20); } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable account, uint256 amount) internal { (bool success, ) = account.call{ value: amount }(''); if (!success) revert AddressUtils__SendValueFailed(); } function functionCall( address target, bytes memory data ) internal returns (bytes memory) { return functionCall(target, data, 'AddressUtils: failed low-level call'); } function functionCall( address target, bytes memory data, string memory error ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, error); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, 'AddressUtils: failed low-level call with value' ); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) internal returns (bytes memory) { if (value > address(this).balance) revert AddressUtils__InsufficientBalance(); return _functionCallWithValue(target, data, value, error); } /** * @notice execute arbitrary external call with limited gas usage and amount of copied return data * @dev derived from https://github.com/nomad-xyz/ExcessivelySafeCall (MIT License) * @param target recipient of call * @param gasAmount gas allowance for call * @param value native token value to include in call * @param maxCopy maximum number of bytes to copy from return data * @param data encoded call data * @return success whether call is successful * @return returnData copied return data */ function excessivelySafeCall( address target, uint256 gasAmount, uint256 value, uint16 maxCopy, bytes memory data ) internal returns (bool success, bytes memory returnData) { returnData = new bytes(maxCopy); assembly { // execute external call via assembly to avoid automatic copying of return data success := call( gasAmount, target, value, add(data, 0x20), mload(data), 0, 0 ) // determine whether to limit amount of data to copy let toCopy := returndatasize() if gt(toCopy, maxCopy) { toCopy := maxCopy } // store the length of the copied bytes mstore(returnData, toCopy) // copy the bytes from returndata[0:toCopy] returndatacopy(add(returnData, 0x20), 0, toCopy) } } function _functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) private returns (bytes memory) { if (!isContract(target)) revert AddressUtils__NotContract(); (bool success, bytes memory returnData) = target.call{ value: value }( data ); if (success) { return returnData; } else if (returnData.length > 0) { assembly { let returnData_size := mload(returnData) revert(add(32, returnData), returnData_size) } } else { revert(error); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title utility functions for uint256 operations * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts/ (MIT license) */ library UintUtils { error UintUtils__InsufficientHexLength(); bytes16 private constant HEX_SYMBOLS = '0123456789abcdef'; function add(uint256 a, int256 b) internal pure returns (uint256) { return b < 0 ? sub(a, -b) : a + uint256(b); } function sub(uint256 a, int256 b) internal pure returns (uint256) { return b < 0 ? add(a, -b) : a - uint256(b); } function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0'; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0x00'; } uint256 length = 0; for (uint256 temp = value; temp != 0; temp >>= 8) { unchecked { length++; } } return toHexString(value, length); } function toHexString( uint256 value, uint256 length ) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = '0'; buffer[1] = 'x'; unchecked { for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_SYMBOLS[value & 0xf]; value >>= 4; } } if (value != 0) revert UintUtils__InsufficientHexLength(); return string(buffer); } }
{ "remappings": [ "@closedsea/=lib/closedsea/src/", "@erc721a-upgradable/=lib/ERC721A-Upgradeable/contracts/", "@erc721a/=lib/ERC721A/contracts/", "@os/=lib/operator-filter-registry/src/", "@solady/=lib/solady/src/", "@solidstate-solidity/=lib/solidstate-solidity/contracts/", "@std/=lib/forge-std/src/", "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/", "ERC721A/=lib/ERC721A/contracts/", "closedsea/=lib/closedsea/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/closedsea/lib/openzeppelin-contracts/lib/erc4626-tests/", "erc721a-upgradeable/=lib/closedsea/lib/erc721a-upgradeable/contracts/", "erc721a/=lib/closedsea/lib/erc721a/contracts/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/closedsea/lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/closedsea/lib/openzeppelin-contracts/contracts/", "operator-filter-registry/=lib/operator-filter-registry/src/", "solady/=lib/solady/src/", "solidstate-solidity/=lib/solidstate-solidity/contracts/", "solmate/=lib/solady/lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Ownable__NotOwner","type":"error"},{"inputs":[],"name":"Ownable__NotTransitiveOwner","type":"error"},{"inputs":[],"name":"Proxy__ImplementationIsNotContract","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161032738038061032783398101604081905261002f916100eb565b6100388161006f565b3361004b6100a360201b61010c1760201c565b80546001600160a01b0319166001600160a01b03929092169190911790555061011b565b806100826100c760201b6101301760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b7ff7f483ff1916e63c14790f9c8bd1f715e1ffa6a089843b606bbc96607229b80490565b6000602082840312156100fd57600080fd5b81516001600160a01b038116811461011457600080fd5b9392505050565b6101fd8061012a6000396000f3fe6080604052600436106100225760003560e01c8063d784d426146100ac57610029565b3661002957005b600061005c7ff7f483ff1916e63c14790f9c8bd1f715e1ffa6a089843b606bbc96607229b804546001600160a01b031690565b90506001600160a01b0381163b610086576040516321f27f0d60e21b815260040160405180910390fd5b3660008037600080366000845af43d6000803e8080156100a5573d6000f35b3d6000fd5b005b3480156100b857600080fd5b506100aa6100c7366004610197565b6100cf610154565b6001600160a01b0316336001600160a01b03161461010057604051632f7a8ee160e01b815260040160405180910390fd5b6101098161016d565b50565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b7ff7f483ff1916e63c14790f9c8bd1f715e1ffa6a089843b606bbc96607229b80490565b600061015e61010c565b546001600160a01b0316919050565b80610176610130565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6000602082840312156101a957600080fd5b81356001600160a01b03811681146101c057600080fd5b939250505056fea2646970667358221220262fed0912083a96b1bfdd7e1fd167cdab27ce893abef70fea2cf17b20130c0d64736f6c63430008110033000000000000000000000000bafe0a0e0693af1c5cdbad5a0b114611b4de7240
Deployed Bytecode
0x6080604052600436106100225760003560e01c8063d784d426146100ac57610029565b3661002957005b600061005c7ff7f483ff1916e63c14790f9c8bd1f715e1ffa6a089843b606bbc96607229b804546001600160a01b031690565b90506001600160a01b0381163b610086576040516321f27f0d60e21b815260040160405180910390fd5b3660008037600080366000845af43d6000803e8080156100a5573d6000f35b3d6000fd5b005b3480156100b857600080fd5b506100aa6100c7366004610197565b6100cf610154565b6001600160a01b0316336001600160a01b03161461010057604051632f7a8ee160e01b815260040160405180910390fd5b6101098161016d565b50565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b7ff7f483ff1916e63c14790f9c8bd1f715e1ffa6a089843b606bbc96607229b80490565b600061015e61010c565b546001600160a01b0316919050565b80610176610130565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6000602082840312156101a957600080fd5b81356001600160a01b03811681146101c057600080fd5b939250505056fea2646970667358221220262fed0912083a96b1bfdd7e1fd167cdab27ce893abef70fea2cf17b20130c0d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bafe0a0e0693af1c5cdbad5a0b114611b4de7240
-----Decoded View---------------
Arg [0] : implementation (address): 0xBAFe0A0E0693AF1C5CDBad5A0B114611b4DE7240
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bafe0a0e0693af1c5cdbad5a0b114611b4de7240
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.